Last Comment Bug 679110 - Improve detection of multiple GPUs in about:support
: Improve detection of multiple GPUs in about:support
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: Graphics (show other bugs)
: Trunk
: x86 Windows 7
: -- normal (vote)
: mozilla11
Assigned To: Ali Juma [:ajuma]
:
Mentors:
Depends on: 726797
Blocks: 628129 686125
  Show dependency treegraph
 
Reported: 2011-08-15 13:31 PDT by Ali Juma [:ajuma]
Modified: 2012-05-13 20:56 PDT (History)
10 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Clean up detection of multiple GPUs. (9.83 KB, patch)
2011-11-03 14:24 PDT, Ali Juma [:ajuma]
no flags Details | Diff | Splinter Review
Clean up detection of multiple GPUs, v2. (9.63 KB, patch)
2011-11-04 12:42 PDT, Ali Juma [:ajuma]
jmuizelaar: review+
Details | Diff | Splinter Review

Description Ali Juma [:ajuma] 2011-08-15 13:31:59 PDT
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.
Comment 1 Jo Hermans 2011-08-16 14:30:34 PDT
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 ?
Comment 2 [Baboo] 2011-08-16 15:23:18 PDT
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".
Comment 3 Ali Juma [:ajuma] 2011-08-16 16:39:51 PDT
(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.
Comment 4 Ali Juma [:ajuma] 2011-09-10 08:59:46 PDT
*** Bug 686125 has been marked as a duplicate of this bug. ***
Comment 5 Ali Juma [:ajuma] 2011-11-03 14:24:04 PDT
Created attachment 571775 [details] [diff] [review]
Clean up detection of multiple GPUs.

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).
Comment 6 michaelbraithwaite 2011-11-04 10:12:33 PDT
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.
Comment 7 Ali Juma [:ajuma] 2011-11-04 12:17:55 PDT
(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.
Comment 8 Ali Juma [:ajuma] 2011-11-04 12:42:06 PDT
Created attachment 572047 [details] [diff] [review]
Clean up detection of multiple GPUs, v2.

This fixes up a few 'if' statements in the previous version.
Comment 9 Jeff Muizelaar [:jrmuizel] 2011-11-08 14:43:43 PST
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.
Comment 11 Marco Bonardo [::mak] 2011-11-10 03:13:45 PST
https://hg.mozilla.org/mozilla-central/rev/03a61b02049e
Comment 12 al_9x 2011-11-10 12:32:13 PST
(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.
Comment 13 Ali Juma [:ajuma] 2011-11-10 13:13:49 PST
(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.
Comment 14 Jo Hermans 2011-11-11 10:42:25 PST
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
Comment 15 al_9x 2011-11-11 16:05:33 PST
(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.
Comment 16 Rob 2012-04-20 05:31:48 PDT
(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 ?
Comment 17 Ali Juma [:ajuma] 2012-04-20 05:53:08 PDT
(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).

Note You need to log in before you can comment on or make changes to this bug.