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 773216 - tools: Don't read cached info about 1st GPU when 2nd one is requested
tools: Don't read cached info about 1st GPU when 2nd one is requested
Status: RESOLVED FIXED
Product: gnome-session
Classification: Core
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: Session Maintainers
Session Maintainers
Depends on: 756914
Blocks: 773213
 
 
Reported: 2016-10-19 11:32 UTC by Bastien Nocera
Modified: 2019-01-20 12:15 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
tools: Don't read cached info about 1st GPU when 2nd one is requested (1.81 KB, patch)
2016-10-19 11:32 UTC, Bastien Nocera
none Details | Review
tools: Don't read cached info about 1st GPU when 2nd one is requested (1.80 KB, patch)
2016-10-20 17:53 UTC, Bastien Nocera
committed Details | Review

Description Bastien Nocera 2016-10-19 11:32:35 UTC
.
Comment 1 Bastien Nocera 2016-10-19 11:32:38 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.
Comment 2 Ray Strode [halfline] 2016-10-20 14:48:04 UTC
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.
Comment 3 Bastien Nocera 2016-10-20 17:53:46 UTC
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.
Comment 4 Bastien Nocera 2016-10-20 18:07:43 UTC
(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? :)
Comment 5 Bastien Nocera 2016-10-20 18:09:19 UTC
Attachment 338115 [details] pushed as a3aeacf - tools: Don't read cached info about 1st GPU when 2nd one is requested
Comment 6 Ray Strode [halfline] 2016-10-20 18:45:01 UTC
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.
Comment 7 Bastien Nocera 2019-01-20 12:15:41 UTC
(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?