Using software OpenGL rendering with X

I want to try the most basic OpenGL driver, in order to find out what’s the problem of my X server with OpenGL.

I want then to have X use software rendering for OpenGL, like windows do with opengl.dll with no driver installed.

How can I do that? Didn’t find anything when searching for X OpenGL software rendering. I’ll be glad for a reference, and for the keywords I had to use in order to find out how to do that.

I’m using Xorg in RHEL 5.3.

Asked By: Elazar Leibovich

||

I think you’re looking for Mesa. I’m not sure if RHEL has RPMs for that. (Although Mesa is used in some hardware OpenGL drivers for X, it also provides a software-only renderer.)

Answered By: cjm

Duplicating my answer Force software based opengl rendering – Super User:

sudo apt-get install libgl1-mesa-swx11

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.

Fedora doesn’t package the swrast DRI backend separately from mesa-dri-drivers (and I assume the same is the case in RHEL), so the first isn’t an option, but the latter is.

Answered By: ephemient

Another simpler solution is to add Option NoDRI, to the Device section in xorg.conf. For example

Section "Device"
    Identifier  "Generic Video Card"
    Driver      "savage"
    BusID       "PCI:1:0:0"
    Option      "NoDRI"
EndSection

According to this email, it should always work. See this bug for more information. I didn’t find anything about it in Xorg’s documentation, so if you find anything about it – do edit it into my answer.

Answered By: Elazar Leibovich
Categories: Answers Tags: ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.