10

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.

Elazar Leibovich
  • 3,131
  • 5
  • 27
  • 28

3 Answers3

9

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.

ephemient
  • 15,640
  • 5
  • 49
  • 39
  • But do you have to remove the package? Can't you just remove a line from xorg.conf? – Elazar Leibovich Nov 23 '10 at 19:12
  • 1
    I hadn't thought of that — many newer distributions have a skeleton or no `xorg.conf` at all, so I'd have to explain which `Section` to add/change and what lines to add/change within there — but RHEL is old enough that you could probably flip the DRI extension by changing a single line from Load to Disable. – ephemient Nov 23 '10 at 21:13
  • see my answer for a simpler approach. I don't care about loading the DRI module, I just want to avoid using it ;-). – Elazar Leibovich Nov 26 '10 at 06:55
2

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.

Elazar Leibovich
  • 3,131
  • 5
  • 27
  • 28
  • I believe that doesn't work for all drivers, but if it works for you, then good. – ephemient Nov 26 '10 at 06:57
  • Please see the first link, if it doesn't work for your driver - file a bug. http://www.redhat.com/archives/fedora-devel-list/2006-September/msg00593.html – Elazar Leibovich Nov 27 '10 at 18:52
  • `NoDRI` is basically the same as `LIBGL_ALWAYS_INDIRECT` environment variable I believe. But this variable isn't quite the same as `LIBGL_ALWAYS_SOFTWARE`: it even gives lower OpenGL version for me on Intel(R) HD Graphics P4600/P4700. – Ruslan Jun 17 '16 at 10:08
1

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.)

cjm
  • 26,740
  • 12
  • 88
  • 84