GNOME Bugzilla – Bug 794716
gl/gbm: Requires a display connected
Last modified: 2018-08-01 04:53:57 UTC
Here is the chat from gst-devel mailing list describing the problem: http://gstreamer-devel.966125.n4.nabble.com/Headless-mode-for-GL-plugin-td4686470.html#a4686475
It's more like a feature request to me, I think kmssink have the same limitation. We need quite some plumbing to supports this. Are you taking this project ?
Hrm? Plumbing where exactly? libgstgl can already do no-output GL correctly elsewhere.
With kms/gbm, you need to detect when HDMI is disconnected, instead of failing, you also need code to detect when the HDMI get connected again, do the mode setting as no Xorg or Wayland will do that for us, renegotiate the caps (optional, but might not be optimal) and then re-enable page flip (or whatever it's called in gbm API). As we replace compositor or Xorg, we need to do that work now. It's a nice feature to have.
Again, hrm? This is not about having the cable become unplugged while running (that's a separate bug) but rather that there is or never will be an output at all. Pretty much all the other implementations allow for no output correctly. I just did a quick hack removing all the crtc/encoder/page flip stuff from the gbm code and got this to work so it's definitely possible. e.g. GST_GL_WINDOW=gbm videotestsrc num-buffers=1 ! glupload ! gleffects_xray ! glcolorconvert ! gldownload ! pngenc ! filesink location=test.png
I haven't said it's impossible, I simply assumed that a glimagesink use case as there is no bug description or example pipeline in comment 1. Your hack will break glimagesink of course. I didn't know it was not working without glimagesink, I cannot unplug my LCD screen on my laptop ;-P. The mode setting should only happen if a "window" is to be used, not sure what's the trigger.
Are there any news on this?
We need someone available to make a patch. It's not a design issue.
Created attachment 373185 [details] [review] A simple headless patch Ok, I've created a simple patch making DRM initialization unnecessary (since we don't need it for headless mode). It works for me in both headless and ``connected'' modes, although dynamic display connection does not work since it would require more profound changes.
Review of attachment 373185 [details] [review]: This diff looks ok. Could you attach a 'git format-patch' formatted patch please.
Created attachment 373215 [details] [review] git format patch Here is the patch made with `git format`.
Thanks! I reworked the commit message a bit. commit 810d560a2f90086b62369f9d38c64dbaa5f969ec Author: freyr <ciceromarcus@yandex.ru> Date: Mon Jul 30 10:03:11 2018 +0300 gl/gbm: allow headless mode Don't require an output for the GBM backend. https://bugzilla.gnome.org/show_bug.cgi?id=794716