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 782212 - elements get blacklisted in headless systems
elements get blacklisted in headless systems
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer-vaapi
1.10.4
Other Linux
: Normal normal
: 1.13.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2017-05-05 10:39 UTC by Marc Leeman
Modified: 2017-10-03 11:28 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
limit scanning during plugin inspection (785 bytes, patch)
2017-05-05 10:39 UTC, Marc Leeman
rejected Details | Review
libs: display: remove parent member (2.53 KB, patch)
2017-10-02 10:32 UTC, Víctor Manuel Jáquez Leal
committed Details | Review
libs: display: remove display_type member (3.03 KB, patch)
2017-10-02 10:32 UTC, Víctor Manuel Jáquez Leal
committed Details | Review
libs: display: remove display_type from display info (3.95 KB, patch)
2017-10-02 10:32 UTC, Víctor Manuel Jáquez Leal
committed Details | Review
libs: display: egl: avoid two vaDisplay instantiates (1.61 KB, patch)
2017-10-02 10:32 UTC, Víctor Manuel Jáquez Leal
committed Details | Review
libs: display: delay getting screen resolution (3.52 KB, patch)
2017-10-02 10:32 UTC, Víctor Manuel Jáquez Leal
committed Details | Review
pluigns: try to create test display in order (1.75 KB, patch)
2017-10-02 10:32 UTC, Víctor Manuel Jáquez Leal
none Details | Review
plugins: try to create test display in order (1.75 KB, patch)
2017-10-03 09:50 UTC, Víctor Manuel Jáquez Leal
committed Details | Review

Description Marc Leeman 2017-05-05 10:39:41 UTC
Created attachment 351177 [details] [review]
limit scanning during plugin inspection

When the DISPLAY variable is not set, the elements get blacklisted. It is enough to log in to a system over ssh and do a gst-inspect-1.0 to get into this situation.

Received a patch on IRC and validated that it resolves the issue.
Comment 1 Víctor Manuel Jáquez Leal 2017-05-10 14:49:07 UTC
The problem is gst_vaapi_display_create_unlocked (): it tries to extract the display size when the instantiated display is X11, but if the system is headless, there is no display to query.

We have to options here:

1\ Follow the proposed patch and use only the DRM, though some drivers might no support DRM
2\ Refactor the code and avoid the display query when creating the display.
Comment 2 Víctor Manuel Jáquez Leal 2017-10-02 10:32:19 UTC
Created attachment 360755 [details] [review]
libs: display: remove parent member

Parent was a crumb left from display cache.
Comment 3 Víctor Manuel Jáquez Leal 2017-10-02 10:32:24 UTC
Created attachment 360756 [details] [review]
libs: display: remove display_type member

It is not used any more since GstVaapiDisplay was ported as a
GstObject-based. This information is part of the class information.
Comment 4 Víctor Manuel Jáquez Leal 2017-10-02 10:32:31 UTC
Created attachment 360757 [details] [review]
libs: display: remove display_type from display info

Since it's no required to pass the display type in the display info,
the structure member is removed.
Comment 5 Víctor Manuel Jáquez Leal 2017-10-02 10:32:37 UTC
Created attachment 360758 [details] [review]
libs: display: egl: avoid two vaDisplay instantiates

GstVaapiDisplayEGL is a wrapper of another GstVaapiDisplay, either X11
or Wayland. Nonetheless it created another vaDisplay for it, instead
of using the wrapped one.

This patch enables the reuse of the wrapped vaDisplay avoiding
instantiating two.
Comment 6 Víctor Manuel Jáquez Leal 2017-10-02 10:32:42 UTC
Created attachment 360759 [details] [review]
libs: display: delay getting screen resolution

Instead of extracting the screen resolution at GstVaapiDisplay
creation, this patch delay it until the screen size is requested for
first time.
Comment 7 Víctor Manuel Jáquez Leal 2017-10-02 10:32:48 UTC
Created attachment 360760 [details] [review]
pluigns: try to create test display in order

When creating the test display for querying capabilites, it try in
certain order: DRM, Wayland and finally X11. GLX nor EGL are tried
since they are either composited with X11 or Wayland.

The reason for this is to reduce the posibility of failure that could
blacklist the plugin.
Comment 8 Víctor Manuel Jáquez Leal 2017-10-03 09:50:46 UTC
Created attachment 360820 [details] [review]
plugins: try to create test display in order

When creating the test display for querying capabilites, it try in
certain order: DRM, Wayland and finally X11. GLX nor EGL are tried
since they are either composited with X11 or Wayland.

The reason for this is to reduce the posibility of failure that could
blacklist the plugin.
Comment 9 Víctor Manuel Jáquez Leal 2017-10-03 11:27:22 UTC
Attachment 360755 [details] pushed as dcf135e - libs: display: remove parent member
Attachment 360756 [details] pushed as 4e9de44 - libs: display: remove display_type member
Attachment 360757 [details] pushed as 494ac4e - libs: display: remove display_type from display info
Attachment 360758 [details] pushed as 66e4593 - libs: display: egl: avoid two vaDisplay instantiates
Attachment 360759 [details] pushed as 63a76c9 - libs: display: delay getting screen resolution
Attachment 360820 [details] pushed as 68aca50 - plugins: try to create test display in order