GNOME Bugzilla – Bug 773216
tools: Don't read cached info about 1st GPU when 2nd one is requested
Last modified: 2019-01-20 12:15:41 UTC
.
Created attachment 338007 [details] [review] tools: Don't read cached info about 1st GPU when 2nd one is requested This avoids both GPUs having the name of the first one when running the Details settings panel under X.org.
Review of attachment 338007 [details] [review]: ::: tools/gnome-session-check-accelerated.c @@ +152,3 @@ + * assume wayland will work. + * Also make sure that we don't read cached information about the first GPU + * when requesting information about the second. to me, either the caching is important and we should cache the information about the second gpu too, or the caching isn't important and we should just drop it. I kind of think the latter... On the other hand, we've got bigger fish to fry so whatever.
Created attachment 338115 [details] [review] tools: Don't read cached info about 1st GPU when 2nd one is requested This avoids both GPUs having the name of the first one when running the Details settings panel under X.org.
(In reply to Ray Strode [halfline] from comment #2) > Review of attachment 338007 [details] [review] [review]: > > ::: tools/gnome-session-check-accelerated.c > @@ +152,3 @@ > + * assume wayland will work. > + * Also make sure that we don't read cached information about the > first GPU > + * when requesting information about the second. > > to me, either the caching is important and we should cache the information > about the second gpu too, or the caching isn't important and we should just > drop it. I kind of think the latter... The goal of the cache was to allow implementing things like: - checking the max size of textures so that gnome-shell could either bail, or reset the xrandr setup to mirroring - check whether acceleration is possible We could probably remove all that code, but this should probably be part of a bigger project to simplify gnome-session (when we start using systemd for the session for example? :)
Attachment 338115 [details] pushed as a3aeacf - tools: Don't read cached info about 1st GPU when 2nd one is requested
Review of attachment 338115 [details] [review]: just a note, not a big deal if we don't change it right away... ::: tools/gnome-session-check-accelerated.c @@ +129,3 @@ + if (!dri_prime) + return FALSE; + if (*dri_prime != '1') should probably be == '0' since i think you can also specify the ID_PATH_TAG from udev, e.g. DRI_PRIME=pci-0000_01_00_0 Of course to be foolproof we'd need to check that the ID_PATH_TAG isn't the boot_vga card, but I guess we don't really need to be too foolproof here.
(In reply to Ray Strode [halfline] from comment #6) > Review of attachment 338115 [details] [review] [review]: > > just a note, not a big deal if we don't change it right away... > > ::: tools/gnome-session-check-accelerated.c > @@ +129,3 @@ > + if (!dri_prime) > + return FALSE; > + if (*dri_prime != '1') > > should probably be == '0' since i think you can also specify the ID_PATH_TAG > from udev, e.g. > > DRI_PRIME=pci-0000_01_00_0 > > Of course to be foolproof we'd need to check that the ID_PATH_TAG isn't the > boot_vga card, but I guess we don't really need to be too foolproof here. Do you want to file a separate bug about this?