Project: chromium Issues People Development process History Sign in
New issue
Advanced search Search tips
Issue 122912 Detect Linux NVIDIA driver version without creating GL context
Starred by 4 users Project Member Reported by kbr@chromium.org, Apr 11 2012 Back to list
Status: Fixed
Owner:
Closed: Jul 2012
Cc:
Components:
NextAction: ----
OS: Linux
Pri: 1
Type: Bug

Blocked on:
issue 119439

Restricted
  • Only users with Commit permission may comment.


Sign in to add a comment
Currently Chrome's blacklist needs to fully initialize the GPU process in order to determine the driver version for all GPUs on Linux except AMD GPUs. The reason is that it creates an OpenGL context in order to figure out the driver version.

This fact makes it difficult to blacklist based on driver version. Currently the first page that accesses GPU functionality will generally work, and then subsequent pages won't. This results in a poor user experience.

There are demonstrable problems with NVIDIA driver versions up to and including the 280 series. See Issue 119439 for only one example. Many WebGL robustness issues have been reported by Google employees on Linux workstations with NVIDIA GPUs. We need to blacklist these drivers in a robust fashion.

It looks like it is possible to figure out the NVIDIA driver version just by examining the file names of certain shared objects on disk. Here are a couple of examples of path names:

On machines using the nvidia-current package on Ubuntu:

/usr/lib/nvidia-current/libGL.so.280.13
/usr/lib64/nvidia-current/libGL.so.280.13

On machines using NVIDIA's binary driver installer:

/usr/lib/libGL.so.295.33
/usr/lib64/libGL.so.295.33

Here is a proposed algorithm for determining the NVIDIA driver version in the preliminary GPU info:

1. If the PCI vendor ID is not NVIDIA, abort.
2. If sizeof(long) == 4, use "/usr/lib" as the prefix. If 8, use "/usr/lib64".
3. Do the following first in the prefix dir, and then in that dir plus "nvidia-current":
3.1. Initialize a file descriptor to libGL.so in that directory, which should be a symlink.
3.2. At most 5 times:
3.2.1. Resolve the symlink.
3.2.2. If the resolved symlink is an actual file rather than another symlink, try to parse the driver version from the dotted suffix after ".so".

Let's please implement this with urgency and blacklist driver versions earlier than or equal to 280.

 
Comment 1 by kbr@chromium.org, Apr 11 2012
Cc: vangelis@chromium.org
Comment 2 by kbr@chromium.org, Apr 11 2012
Cc: vivianz@chromium.org anan...@chromium.org kbr@chromium.org
Issue 122584 has been merged into this issue.
After upgrading to Ubuntu 12.04, I confirm the issue is not reproducible anymore. Anyway there's still a bug on the Chrome side since previous versions did not have this behaviour !
Labels: OS-Linux
FWIW, my 64-bit Ubuntu 12.04 machine does not have /usr/lib64.

Is dlopening libGL.so, and then looking in /proc/self/maps a workable alternative?
Comment 5 by kbr@chromium.org, May 4 2012
Labels: -Pri-2 Pri-1
Owner: zmo@chromium.org
Status: Assigned
@thestig: Possibly.

This is becoming more and more urgent as we keep getting reports from people running the 280 series drivers. See Issue 125419 as one example. We need to stop supporting everything before the 295 series. Per offline discussion with zmo, I'm raising the priority of this bug to P1 as it needs to be fixed right away.

Project Member Comment 6 by bugdroid1@chromium.org, Jun 21 2012
Blockedon: -119439 chromium:119439
The following revision refers to this bug:
    http://src.chromium.org/viewvc/chrome?view=rev&revision=143323

------------------------------------------------------------------------
r143323 | zmo@chromium.org | Wed Jun 20 18:08:17 PDT 2012

Changed paths:
 M http://src.chromium.org/viewvc/chrome/trunk/src/content/gpu/gpu_info_collector_linux.cc?r1=143323&r2=143322&pathrev=143323
 M http://src.chromium.org/viewvc/chrome/trunk/src/content/content_gpu.gypi?r1=143323&r2=143322&pathrev=143323

Use nv contrl x extension to query nvidia driver version.

So we can do it in browser process, not wait until gpu process launches and a gl context is created.

This is tested on my linux box with NVIDIA driver.

We need to put more code to tell chrome (Linux/NVIDIA) that we have enough information for blacklisting, so at GPU launch time we don't need to collect GPUInfo.

Will do it in a followup CL.

BUG= 122912 
TEST=tree green
TBR=jam
Review URL: https://chromiumcodereview.appspot.com/10536232
------------------------------------------------------------------------
Project Member Comment 7 by bugdroid1@chromium.org, Jun 21 2012
The following revision refers to this bug:
    http://src.chromium.org/viewvc/chrome?view=rev&revision=143325

------------------------------------------------------------------------
r143325 | viettrungluu@chromium.org | Wed Jun 20 18:18:21 PDT 2012

Changed paths:
 M http://src.chromium.org/viewvc/chrome/trunk/src/content/gpu/gpu_info_collector_linux.cc?r1=143325&r2=143324&pathrev=143325
 M http://src.chromium.org/viewvc/chrome/trunk/src/content/content_gpu.gypi?r1=143325&r2=143324&pathrev=143325

Revert 143323 - Use nv contrl x extension to query nvidia driver version.

[Failed checkdeps. No try jobs?!? Nice.]

So we can do it in browser process, not wait until gpu process launches and a gl context is created.

This is tested on my linux box with NVIDIA driver.

We need to put more code to tell chrome (Linux/NVIDIA) that we have enough information for blacklisting, so at GPU launch time we don't need to collect GPUInfo.

Will do it in a followup CL.

BUG= 122912 
TEST=tree green
TBR=jam
Review URL: https://chromiumcodereview.appspot.com/10536232

TBR=zmo@chromium.org
Review URL: https://chromiumcodereview.appspot.com/10606005
------------------------------------------------------------------------
Project Member Comment 8 by bugdroid1@chromium.org, Jun 21 2012
The following revision refers to this bug:
    http://src.chromium.org/viewvc/chrome?view=rev&revision=143472

------------------------------------------------------------------------
r143472 | zmo@chromium.org | Thu Jun 21 15:31:06 PDT 2012

Changed paths:
 M http://src.chromium.org/viewvc/chrome/trunk/src/content/gpu/DEPS?r1=143472&r2=143471&pathrev=143472
 M http://src.chromium.org/viewvc/chrome/trunk/src/content/gpu/gpu_info_collector_linux.cc?r1=143472&r2=143471&pathrev=143472
 M http://src.chromium.org/viewvc/chrome/trunk/src/content/content_gpu.gypi?r1=143472&r2=143471&pathrev=143472

Use nv contrl x extension to query nvidia driver version.

This is trying to reland the reverted CL http://codereview.chromium.org/10536232/.  I added third_party/libXNVCtrl to content/gpu/DEPS.

So we can do it in browser process, not wait until gpu process launches and a gl context is created.

This is tested on my linux box with NVIDIA driver.

We need to put more code to tell chrome (Linux/NVIDIA) that we have enough information for blacklisting, so at GPU launch time we don't need to collect GPUInfo.

Will do it in a followup CL.

BUG= 122912 
TEST=tree green
R=jam@chromium.org
TBR=kbr,piman
Review URL: https://chromiumcodereview.appspot.com/10641006
------------------------------------------------------------------------
Comment 9 by zmo@chromium.org, Jul 23 2012
Blockedon: -chromium:119439 chromium:119439
Status: Fixed
Project Member Comment 10 by bugdroid1@chromium.org, Oct 13 2012
Labels: Restrict-AddIssueComment-Commit
This issue has been closed for some time. No one will pay attention to new comments.
If you are seeing this bug or have new data, please click New Issue to start a new bug.
Project Member Comment 11 by bugdroid1@chromium.org, Mar 10 2013
Labels: -Area-Internals -Internals-Graphics -Feature-GPU-VendorSpecific Cr-Internals-GPU-VendorSpecific Cr-Internals-Graphics Cr-Internals
Sign in to add a comment