Index: content/gpu/gpu_main.cc |
=================================================================== |
--- content/gpu/gpu_main.cc (revision 129207) |
+++ content/gpu/gpu_main.cc (working copy) |
@@ -81,10 +81,22 @@ |
LOG(INFO) << "gpu_info_collector::CollectGraphicsInfo failed"; |
} |
+#if defined(OS_LINUX) |
+ if (gpu_info.vendor_id == 0x10de) { // NVIDIA |
+ base::ThreadRestrictions::AssertIOAllowed(); |
+ if (access("/dev/nvidiactl", R_OK) != 0) { |
+ LOG(INFO) << "NVIDIA device file /dev/nvidiactl access denied"; |
+ gpu_info.gpu_accessible = false; |
+ dead_on_arrival = true; |
+ } |
+ } |
+#endif |
+ |
// Set the GPU info even if it failed. |
content::GetContentClient()->SetGpuInfo(gpu_info); |
} else { |
LOG(INFO) << "gfx::GLSurface::InitializeOneOff failed"; |
+ gpu_info.gpu_accessible = false; |
dead_on_arrival = true; |
} |