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 691613 - Don't use glxinfo to access the graphic driver name
Don't use glxinfo to access the graphic driver name
Status: RESOLVED FIXED
Product: gnome-control-center
Classification: Core
Component: Other Preferences
unspecified
Other All
: Normal normal
: ---
Assigned To: Control-Center Maintainers
Control-Center Maintainers
: 690527 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2013-01-12 17:00 UTC by Giovanni Campagna
Modified: 2013-04-13 06:36 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Don't use glxinfo to access the graphic driver name (5.57 KB, patch)
2013-01-12 17:00 UTC, Giovanni Campagna
needs-work Details | Review
Don't use glxinfo to access the graphic driver name (4.45 KB, patch)
2013-01-14 22:06 UTC, Giovanni Campagna
committed Details | Review
Fix display of graphic driver name. (2.33 KB, patch)
2013-04-11 22:38 UTC, darkxst
none Details | Review

Description Giovanni Campagna 2013-01-12 17:00:24 UTC
glxinfo is part of mesa-demos, and installing it pulls a lot of unnecessary
programs. We can get the same informations by querying the driver directly.
Comment 1 Giovanni Campagna 2013-01-12 17:00:31 UTC
Created attachment 233308 [details] [review]
Don't use glxinfo to access the graphic driver name
Comment 2 Bastien Nocera 2013-01-12 21:04:22 UTC
Review of attachment 233308 [details] [review]:

Why would we not want to use GLX? This shouldn't be a configure option IMO.

Does it play nicely with clutter? (as used in the user-accounts panel when cheese support is enabled)
Comment 3 Giovanni Campagna 2013-01-13 00:54:44 UTC
(In reply to comment #2)
> Review of attachment 233308 [details] [review]:
> 
> Why would we not want to use GLX? This shouldn't be a configure option IMO.

Because you may want EGL? Think of wayland.

(Of course, that means that we should have a GLX implementation and a EGL implementation...)

> Does it play nicely with clutter? (as used in the user-accounts panel when
> cheese support is enabled)

I believe so, yes. I explicitly use a different GLX context and a dummy X window, so there should be no conflict.
Comment 4 Bastien Nocera 2013-01-13 01:25:43 UTC
(In reply to comment #3)
> (In reply to comment #2)
> > Review of attachment 233308 [details] [review] [details]:
> > 
> > Why would we not want to use GLX? This shouldn't be a configure option IMO.
> 
> Because you may want EGL? Think of wayland.

Let's think of wayland when we do start porting to Wayland. For now, I don't see a point in doing so (gnome-settings-daemon is a hard-dep of gnome-control-center, and can only compile against X11, to start with...).

> (Of course, that means that we should have a GLX implementation and a EGL
> implementation...)
> 
> > Does it play nicely with clutter? (as used in the user-accounts panel when
> > cheese support is enabled)
> 
> I believe so, yes. I explicitly use a different GLX context and a dummy X
> window, so there should be no conflict.

Great.

Can you respin the patch without the compile-time option?
Comment 5 Matthias Clasen 2013-01-14 11:45:38 UTC
doesn't linking against gl incur a rather heavy startup time penalty ?
Comment 6 Bastien Nocera 2013-01-14 11:56:51 UTC
(In reply to comment #5)
> doesn't linking against gl incur a rather heavy startup time penalty ?

Would that startup penalty be any different from the one we already incur through clutter usage?
Comment 7 Giovanni Campagna 2013-01-14 22:06:15 UTC
Created attachment 233471 [details] [review]
Don't use glxinfo to access the graphic driver name

glxinfo is part of mesa-demos, and installing it pulls a lot of unnecessary
programs. We can get the same informations by querying the driver directly.
Comment 8 Bastien Nocera 2013-01-15 07:02:14 UTC
Review of attachment 233471 [details] [review]:

Looks good.
Comment 9 Giovanni Campagna 2013-01-15 16:47:50 UTC
Attachment 233471 [details] pushed as c60221e - Don't use glxinfo to access the graphic driver name
Comment 10 Jeremy Bicha 2013-01-16 03:35:24 UTC
*** Bug 690527 has been marked as a duplicate of this bug. ***
Comment 11 Sebastien Bacher 2013-03-26 11:24:12 UTC
shouldn't the configure check as well for "x11" since the code is using XCreateSimpleWindow()? (I tried to backport that patch on 3.6 and ran into a build issue due to that, will try on 3.8 next)
Comment 12 darkxst 2013-04-10 22:41:21 UTC
This fails on nvidia blob.

Seems that glXCreateWindow () is throwing a BadMatch Error.
Comment 13 darkxst 2013-04-11 22:38:36 UTC
Created attachment 241310 [details] [review]
Fix display of graphic driver name.

Use XCreateWindow to ensure we are using the same X VisualInfo on
both the config and window. This avoids a BadMatch error on nvidia
glx implementation.

XCreateSimpleWindow appears to make a copy of the X Visual that has a different
visualID. This mismatch in VisualID's is what was throwing the BadMatch error.
Comment 14 darkxst 2013-04-13 06:36:51 UTC
Comment on attachment 241310 [details] [review]
Fix display of graphic driver name.

Filed as a new bug here -> https://bugzilla.gnome.org/show_bug.cgi?id=697881