11
5
How may I force an application to use software based opengl rendering on Ubuntu?
11
5
How may I force an application to use software based opengl rendering on Ubuntu?
20
If you're using Mesa's libGL
, you can enable software rendering permanently by running:
sudo apt-get install libgl1-mesa-swx11
This will remove the libgl1-mesa-glx
hardware-accelerated Mesa libraries and install the software-only renderer.
Alternately, you can set LIBGL_ALWAYS_SOFTWARE=1
, which will only affect programs started with that environment variable, not the entire system.
Both these changes may not work if you're using the binary NVidia drivers, which supply their own libGL
.
1Hi, where can I set this variable LIBGL_ALWAYS_SOFTWARE=1? I have the inverse problem, OpenGL is always software rendered and my laptop does not support Unity3D for ubuntu 15.04. I have hybrid Intel-Nvidia graphics. – Santi – 2015-09-09T16:06:33.940
1libgl1-mesa-swx11 no longer replaces libgl1-mesa-glx. Thus when installing it you need to configure an override to use it.
Still, I recommend using the LLVM-Pipe Software rendering using "LIBGL_ALWAYS_SOFTWARE=1 " It's much faster and takes advantage of newer hardware.
Also, users of nvidia and amd drivers can force the use of the mesa software pipeline, if mesa is installed, through using an ld.so hack to override the libGL library that is loaded. – Robert Wm Ruedisueli – 2015-11-05T08:51:38.177
2Does this work on AMD proprietary drivers? Is there an easy option on Nvidia? – Daniel M Gessel – 2016-02-27T00:47:31.430
I wonder why LIBGL_ALWAYS_SOFTWARE=1
could not be made to work with NVIDIA drivers installed + libgl1-mesa-glx
, since my program is still linked to /usr/lib/x86_64-linux-gnu/libGL.so
(provided by libgl1-mesa-dev
) and not /usr/lib/nvidia-361/libGL.so
, which seems to be loaded with dlopen
by Mesa. Ubuntu 16.04. – Ciro Santilli 新疆改造中心法轮功六四事件 – 2016-09-04T15:20:18.233
1
If this is about your own application, you can link to the software OpenGL implementation Mesa3D.
What (kind of) application are we talking about? – Bobby – 2010-09-24T08:13:44.747