After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 794716 - gl/gbm: Requires a display connected
gl/gbm: Requires a display connected
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
1.14.0
Other Linux
: Normal normal
: 1.15.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2018-03-27 08:08 UTC by Alex
Modified: 2018-08-01 04:53 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
A simple headless patch (2.26 KB, patch)
2018-07-27 11:17 UTC, Eugen Klim
none Details | Review
git format patch (2.53 KB, patch)
2018-07-30 07:09 UTC, Eugen Klim
committed Details | Review

Description Alex 2018-03-27 08:08:08 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
Comment 1 Nicolas Dufresne (ndufresne) 2018-03-27 13:57:38 UTC
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 ?
Comment 2 Matthew Waters (ystreet00) 2018-03-27 14:12:30 UTC
Hrm? Plumbing where exactly?  libgstgl can already do no-output GL correctly elsewhere.
Comment 3 Nicolas Dufresne (ndufresne) 2018-03-27 14:16:37 UTC
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.
Comment 4 Matthew Waters (ystreet00) 2018-03-27 14:43:53 UTC
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
Comment 5 Nicolas Dufresne (ndufresne) 2018-03-27 16:09:23 UTC
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.
Comment 6 Eugen Klim 2018-04-28 11:16:23 UTC
Are there any news on this?
Comment 7 Nicolas Dufresne (ndufresne) 2018-04-28 12:52:49 UTC
We need someone available to make a patch. It's not a design issue.
Comment 8 Eugen Klim 2018-07-27 11:17:53 UTC
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.
Comment 9 Matthew Waters (ystreet00) 2018-07-30 03:19:40 UTC
Review of attachment 373185 [details] [review]:

This diff looks ok.  Could you attach a 'git format-patch' formatted patch please.
Comment 10 Eugen Klim 2018-07-30 07:09:25 UTC
Created attachment 373215 [details] [review]
git format patch

Here is the patch made with `git format`.
Comment 11 Matthew Waters (ystreet00) 2018-08-01 04:53:46 UTC
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