how to force chrome to use mesa software driver for webgl

不想你离开。 提交于 2019-12-01 18:16:42

I don't have a linux box so I can't check but you can specify a prefix chrome will use for launching the GPU process with

--gpu-launcher=<prefix>

It's normally used for debugging for example

--gpu-launcher="xterm -e gdb --args"

When chrome launches a process it calls spawn. Normally it just launches

path/to/chrome <various flags>

--gpu-launcher lets you add a prefix to that. So for example

 --gpu-launcher=/usr/local/yourname/launch.sh 

would make it spawn

 /usr/local/yourname/launch.sh path/to/chrome <various flags>

You can now make /usr/local/yourname/launch.sh do whatever you want and finally launch chrome. The simplest would be something like

#!/bin/sh
"$@"

In your case I'd guess you'd want

#!/bin/sh
export LIBGL_ALWAYS_SOFTWARE=1
"$@"

Be sure to mark launch.sh as executable.


given the script above this worked for me

/opt/google/chrome/chrome --ignore-gpu-blacklist --gpu-launcher=/usr/local/gman/launch.sh

after which about:gpu gives me

GL_VENDOR   VMware, Inc.
GL_RENDERER Gallium 0.4 on llvmpipe (LLVM 0x301)
GL_VERSION  2.1 Mesa 9.0.3
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!