Closed Bug 679110 Opened 13 years ago Closed 13 years ago

Improve detection of multiple GPUs in about:support

Categories

(Core :: Graphics, defect)

x86
Windows 7
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla11

People

(Reporter: ajuma, Assigned: ajuma)

References

(Blocks 1 open bug)

Details

Attachments

(1 file, 1 obsolete file)

Bug 591057 added detection of multiple GPUs to about:support. Since this information is taken from the Windows registry, about:support will have incorrect information when the registry includes entries for GPUs that aren't actually present.
Nightly is currently reporting that I have 2 GPU's on my Lenovo Thinkpad T400, while I though I have only 1. The Device ID is different though.

  Graphics

        Adapter Description
        Mobile Intel(R) 4 Series Express Chipset Family

        Vendor ID
        8086

        Device ID
        2a42

        Adapter RAM
        Unknown

        Adapter Drivers
        igxprd32

        Driver Version
        6.14.10.5294

        Driver Date
        8-18-2010

        Vendor ID (GPU #2)
        8086

        Device ID (GPU #2)
        2a43

        Adapter RAM (GPU #2)
        Unknown

        Adapter Drivers (GPU #2)
        Unknown

        Driver Version (GPU #2)
        6.14.10.5294

        Driver Date (GPU #2)
        8-18-2010

        WebGL Renderer
        Google Inc. -- ANGLE -- OpenGL ES 2.0 (ANGLE 0.0.0.686)

        GPU Accelerated Windows
        1/1 Direct3D 9

When I look into dxdiag, I'm not seeing anything special. But the Microsoft System Information Tool indeed reveals that I have 2 devices, with different PNP Device Id's and different memory addresses. Maybe the second one is a wrapper or proxy for the first one ? Or a reflection of my 2 video ports (the internal display and a VGA port for an external one, not in mirror-mode). I'm listing the info here, maybe it can help.

Name	ConfigMgr Remote Control Driver
PNP Device ID	ROOT\*CM_RCDISPLAY\0001
Adapter Type	Mobile Intel(R) 4 Series Express Chipset Family, Microsoft compatible
Adapter Description	ConfigMgr Remote Control Driver
Adapter RAM	1,00 GB (1.073.741.824 bytes)
Installed Drivers	igxprd32.dll
Driver Version	4.00.6163.1000
INF File	oem73.inf (mirror section)
Color Planes	1
Color Table Entries	4294967296
Resolution	1280 x 800 x 60 hertz
Bits/Pixel	32
Driver	c:\winnt\system32\drivers\smsmdm.sys (4.00.6163.1000 (SCCM.080317-2110), 12,16 KB (12.448 bytes), 20/10/2008 21:08)
	
Name	Mobile Intel(R) 4 Series Express Chipset Family
PNP Device ID	PCI\VEN_8086&DEV_2A42&SUBSYS_20E417AA&REV_07\3&B1BFB68&0&10
Adapter Type	Mobile Intel(R) 4 Series Express Chipset Family, Intel Corporation compatible
Adapter Description	Mobile Intel(R) 4 Series Express Chipset Family
Adapter RAM	1,00 GB (1.073.741.824 bytes)
Installed Drivers	igxprd32.dll
Driver Version	6.14.10.5294
INF File	oem65.inf (iCNT0 section)
Color Planes	Not Available
Color Table Entries	Not Available
Resolution	Not Available
Bits/Pixel	Not Available
Memory Address	0xF4400000-0xF47FFFFF
Memory Address	0xD0000000-0xDFFFFFFF
I/O Port	0x00001800-0x00001807
IRQ Channel	IRQ 16
I/O Port	0x000003B0-0x000003BB
I/O Port	0x000003C0-0x000003DF
Memory Address	0xA0000-0xBFFFF
Driver	c:\winnt\system32\drivers\igxpmp32.sys (6.14.10.5294, 1,92 MB (2.012.096 bytes), 8/12/2008 21:26)
	
Name	Mobile Intel(R) 4 Series Express Chipset Family
PNP Device ID	PCI\VEN_8086&DEV_2A43&SUBSYS_20E417AA&REV_07\3&B1BFB68&0&11
Adapter Type	Not Available
Adapter Description	Intel Corporation
Adapter RAM	Not Available
Installed Drivers	Not Available
Driver Version	Not Available
INF File	6.14.10.5294 (oem65.inf section)
Color Planes	iCNT1
Color Table Entries	Not Available
Resolution	Not Available
Bits/Pixel	Not Available
Memory Address	0xF4200000-0xF42FFFFF
Driver	c:\winnt\system32\drivers\igxpmp32.sys (6.14.10.5294, 1,92 MB (2.012.096 bytes), 8/12/2008 21:26)


The second device (2A43) has no Adapter RAM, no installed drivers, no driver version, etc ... Maybe it can be ignored ?
I believe one a virtual device used for the remote controlling component RDP of Windows, which is ia. used by "Remote Assistance" and "Windows Live Mesh".
(In reply to Jo Hermans from comment #1)
> I'm listing the info here, maybe it can help.

Thanks for the report. This is exactly the sort of information that will help us understand the types of situations in which the Windows registry has GPU entries that don't correspond to an installed GPU.
This patch cleans up the logic used to detect a second GPU.

First, it gets rid of the "flip the last character of the driver key from 0 to 1" hack that we currently use to find a second GPU. As pointed out in Bug 628129, Comment 5, this approach is flawed. Instead, we now enumerate devices in the display adapter device interface class, looking for a device that is different from the first GPU.

Second, a device that is missing information that is usually present for a GPU (e.g. driver information) is no longer treated as a second GPU.

These changes will cut down on non-GPUs showing up as "GPU #2" in about:support. 

However, these changes do not solve the problem of previously installed GPUs showing up in about:support (but this seems like a less common problem than non-GPUs showing up in about:support).
Attachment #571775 - Flags: review?(jmuizelaar)
Comment on attachment 571775 [details] [diff] [review]
Clean up detection of multiple GPUs.

I ran cppcheck on this and it picked up a duplicate if test
>>>

                                    if (result == ERROR_SUCCESS) {
                                        deviceID2 = value;
                                    } else if (result == ERROR_SUCCESS) {
                                        RegCloseKey(key);
                                        continue;
<<<

It does seem to now correctly find one gpu on my machine.
(In reply to michaelbraithwaite from comment #6)

> I ran cppcheck on this and it picked up a duplicate if test

Ooops, good catch. Corrected patch coming soon.

> It does seem to now correctly find one gpu on my machine.

Great! I wasn't expecting this to solve the problem of previously installed GPUs, but I'm glad to here that at least on some machines it does.


(In reply to Ali Juma [:ajuma] from comment #5)

> ... As pointed out in Bug
> 628129, Comment 5 ...

This should really be Bug 628129, Comment 25.
This fixes up a few 'if' statements in the previous version.
Attachment #571775 - Attachment is obsolete: true
Attachment #571775 - Flags: review?(jmuizelaar)
Attachment #572047 - Flags: review?(jmuizelaar)
Comment on attachment 572047 [details] [diff] [review]
Clean up detection of multiple GPUs, v2.

Review of attachment 572047 [details] [diff] [review]:
-----------------------------------------------------------------

::: widget/src/windows/GfxInfo.cpp
@@ +530,5 @@
> +          setupDestroyDeviceInfoList(devinfo);
> +        }
> +      }
> +
> +

This hunk feels a little hairy, but I have no suggestions for how to fix it.
Attachment #572047 - Flags: review?(jmuizelaar) → review+
https://hg.mozilla.org/integration/mozilla-inbound/rev/03a61b02049e
Status: NEW → ASSIGNED
Target Milestone: --- → mozilla11
https://hg.mozilla.org/mozilla-central/rev/03a61b02049e
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
(In reply to Ali Juma [:ajuma] from comment #5)
> 
> However, these changes do not solve the problem of previously installed GPUs
> showing up in about:support (but this seems like a less common problem than
> non-GPUs showing up in about:support).

You said the above was in the scope of this bug, 

https://groups.google.com/group/mozilla.dev.apps.firefox/browse_thread/thread/861a2f0974a403dc

if so, then it's not fixed.
(In reply to al_9x from comment #12)

> You said the above was in the scope of this bug, 
> 
> https://groups.google.com/group/mozilla.dev.apps.firefox/browse_thread/
> thread/861a2f0974a403dc
> 
> if so, then it's not fixed.

The commenter in Comment 6 noted that previously installed GPUs were no longer showing up for him with the patch, so it may well be that using Windows' display adapter device interface class is more robust than I was expecting.

If this problem continues to occur (the patch isn't in Nightly yet; it will be in tomorrow's Nightly), we can reopen or file a follow-up bug specifically for the issue of previously installed GPUs.
This is the report for the same laptop that was used in comment 1. Device 2a43 is now removed from the report.

  Graphics

        Adapter Description
        Mobile Intel(R) 4 Series Express Chipset Family

        Vendor ID
        8086

        Device ID
        2a42

        Adapter RAM
        Unknown

        Adapter Drivers
        igxprd32

        Driver Version
        6.14.10.5294

        Driver Date
        8-18-2010

        WebGL Renderer
        Google Inc. -- ANGLE (Mobile Intel(R) 4 Series Express Chipset Family) -- OpenGL ES 2.0 (ANGLE 0.0.0.809)

        GPU Accelerated Windows
        1/1 Direct3D 9
(In reply to Ali Juma [:ajuma] from comment #13)
>
> If this problem continues to occur (the patch isn't in Nightly yet; it will
> be in tomorrow's Nightly), we can reopen or file a follow-up bug
> specifically for the issue of previously installed GPUs.

I didn't realize it wasn't out yet, the latest nightly no longer shows the non-present adapter.
Depends on: 726797
(In reply to Ali Juma [:ajuma] from comment #4 and comment #5)

> Clean up detection of multiple GPUs.
> This patch cleans up the logic used to detect a second GPU.
> ...
> These changes will cut down on non-GPUs showing up as "GPU #2" in
> about:support. 
> ...
This portion is fixed correctly. Thank you.


>  Ali Juma [:ajuma] 2011-09-10 08:59:46 PDT Comment 4
> Duplicate of this bug: 686125

In Bug: 686125 the complaint is that: "GPU quantity (and other info) is (usually?) incorrect in about:support and [Help][Troubleshooting Information].".

I still get "Adapter RAM   Unknown" when using an 'NVidia GTS 250' (and recent Drivers).

To fix this Bug 679110 the other info for the "Graphics" Section need to be correct for all Cards (since Bug 686125 complains of the "other info" being incorrect).


Can you change this from "Resolved Fixed" while we wait for the "other info" to be corrected or should I make Bug 686125 about the "other info" and reopen it ?
(In reply to Rob from comment #16)
> Can you change this from "Resolved Fixed" while we wait for the "other info"
> to be corrected or should I make Bug 686125 about the "other info" and
> reopen it ?

Let's de-dupe Bug 686125 and make it about the "other info" (since it sounds like the remaining issues aren't specific to the detection of multiple GPUs).
Blocks: 686125
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: