[SOLVED] after update, failed to load driver swrast

General support questions
Post Reply
jody
Posts: 53
Joined: 2015/05/12 12:58:08

[SOLVED] after update, failed to load driver swrast

Post by jody » 2016/02/04 11:33:03

Hi
I did a 'yum update' today on our CentOS 7 machine.
I am quite sure NVIDIA-Linux-x86_64-352.79 was installed (before the update, it was NVIDIA-Linux-x86_64-352.63)

Everything seems to be working normally and most OpenGL program work. However one OpenGL application reports

Code: Select all

libGL error: unable to load driver: swrast_dri.so
libGL error: failed to load driver: swrast
during start and then the GL windows are not drawn - they just contain the background.
Before the update this application worked correctly, and did not display the message about swrast.

However, swrast seems to be present:

Code: Select all

$ ls -l /usr/lib64/dri/*swrast*
-rwxr-xr-x. 7 root root 8292104 Nov 20 18:42 /usr/lib64/dri/kms_swrast_dri.so
-rwxr-xr-x. 7 root root 8292104 Nov 20 18:42 /usr/lib64/dri/swrast_dri.so
There was a post with a similar topic
viewtopic.php?f=13&t=4130&p=20321&hilit=swrast#p20321
but in my case 'glxinfo' does not complain.

In my ' /var/log/Xorg.0.log' there was no mention of 'swrast'.

Is it perhaps necessary to reinstall swrast?
If yes, which package would i have to install?

Can anybody help me fix this problem?

Thank You
Last edited by jody on 2016/02/04 15:10:32, edited 1 time in total.

User avatar
TrevorH
Site Admin
Posts: 32962
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: after update, failed to load driver swrast

Post by TrevorH » 2016/02/04 11:54:13

If you have installed the nvidia drivers using their binary .run package then you need to reinstall that each and every time there is a kernel update. They also overwrite other files belonging to other packages (mesa* xorg*?) so other things may also break them when CentOS packages are updated. This is why ELRepo repackage the nvidia .run files as proper CentOS yum packages and remove the file overwrites.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

jody
Posts: 53
Joined: 2015/05/12 12:58:08

Re: after update, failed to load driver swrast

Post by jody » 2016/02/04 14:06:27

It is true that i have originally installed nvidia with a *.run binary.

But after some problems i uninstalled it (with --uninstall) and then did 'yum install kmod-nvidia'.

I ran the failing program again with

Code: Select all

export LIBGL_DEBUG=verbose
for more detailed output.
The 'libGL' messages were now:

Code: Select all

libGL: screen 0 does not appear to be DRI2 capable
libGL: OpenDriver: trying /usr/lib/dri/tls/swrast_dri.so
libGL: OpenDriver: trying /usr/lib/dri/swrast_dri.so
libGL: dlopen /usr/lib/dri/swrast_dri.so failed (/usr/lib/dri/swrast_dri.so: cannot open shared object file: No such file or directory)
libGL error: unable to load driver: swrast_dri.so
libGL error: failed to load driver: swrast
It looks like libGL is looking in a wrong directory: there is no ' /usr/lib/dri/' on my machine, there is only a '/usr/lib64/dri'.
Could this mean that the application in question is 32bit?

with 'sudo yum install mesa-dri-drivers.i686 mesa-libGL-devel.i686 mesa-libGLU-devel.i686 mesa-libGLU.i686' i managed to get a '/usr/lib/dri/' with amongst others a swrast_dri.so.

But the program still doesn't work correctly, but th messages have slightly changed:

Code: Select all

libGL: screen 0 does not appear to be DRI2 capable
libGL: OpenDriver: trying /usr/lib/dri/tls/swrast_dri.so
libGL: OpenDriver: trying /usr/lib/dri/swrast_dri.so
libGL: Can't open configuration file /home/jody/.drirc: No such file or directory.
libGL: Can't open configuration file /home/jody/.drirc: No such file or directory.
libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: swrast
In the meantime i have read in an other post
The swrast thing is the software renderer. That means it's not finding the hardware driver for your graphics card.
So assuming this program is really 32bit, i guess iwould need a 32bit nvidia library

But i seems that 'kmod-nvidia' only come as x86_64.
Is there a way to get a kmod-nvidia for 32bit?

Thanks

stevemowbray
Posts: 519
Joined: 2012/06/26 14:20:47

Re: after update, failed to load driver swrast

Post by stevemowbray » 2016/02/04 14:19:49

Elrepo includes a nvidia-x11-drv-32bit package which may be what you want.

giulix63
Posts: 1305
Joined: 2014/05/14 10:06:37
Location: UK

Re: after update, failed to load driver swrast

Post by giulix63 » 2016/02/04 14:33:33

Actually, that library is in mesa-dri-drivers-10.6.5-3.20150824.el7.i686, which is in base.
To find out if the program is 32 bits, run

Code: Select all

file program
Substitute program with actual name of executable.
Root is evil: Do not use root (sudo) to run any of the commands specified in my posts unless explicitly indicated. Please, provide the necessary amount of context to understand your problem/question.

jody
Posts: 53
Joined: 2015/05/12 12:58:08

Re: after update, failed to load driver swrast

Post by jody » 2016/02/04 15:10:08

@stevemowbray, @giulix63:Thank you for your suggestions.

The 'file' command indeed showed the program to be 32bit.

I (reinstalled) the package 'mesa-dri-drivers-10.6.5-3.20150824.el7.i686', but the program still didn't work properly.

However, after installing 'nvidia-x11-drv-32bit.x86_64' the problem was fixed!

Thanks again
Jody

kaengo
Posts: 24
Joined: 2017/04/24 16:32:51
Contact:

Re: [SOLVED] after update, failed to load driver swrast

Post by kaengo » 2017/06/09 19:10:25

Hi
I have the same problem
(most apps are running, but salome gives the same error-messages:

export LIBGL_DEBUG=verbose
./salome
WARNING:salomeContext:Overwriting environment variable: QTDIR=/home/user/salome/Salome-V8_2_0-univ/prerequisites/Qt-5611
WARNING:salomeContext:Overwriting environment variable: QT_PLUGIN_PATH=/home/user/salome/Salome-V8_2_0-univ/prerequisites/Qt-5611/plugins
runSalome running on localhost.localdomain
Searching for a free port for naming service: 2813 - OK
Searching Naming Service + found in 0.1 seconds
Searching /Kernel/Session in Naming Service +++++++++Warning: this type (Study,objref) already exists, it will be ignored.
Warning: this type (pyobj,objref) already exists, it will be ignored.
+ found in 5.0 seconds
Start SALOME, elapsed time : 5.2 seconds
.
.
.
libGL: screen 0 does not appear to be DRI2 capable
libGL: OpenDriver: trying /usr/lib64/dri/tls/swrast_dri.so
libGL: OpenDriver: trying /usr/lib64/dri/swrast_dri.so
libGL: Can't open configuration file /home/user/.drirc: No such file or directory.
libGL: Can't open configuration file /home/user/.drirc: No such file or directory.
libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: swrast
X Error of failed request: GLXUnsupportedPrivateRequest
Major opcode of failed request: 153 (GLX)
Minor opcode of failed request: 16 (X_GLXVendorPrivate)
Serial number of failed request: 53
Current serial number in output stream: 54
user@localhost appli_V8_2_0]$ Terminating SALOME on port 2813...

I tried all your suggestions without success.

So: has anyone an idea?
kaengo
engineer, germany
Centos 7 (hopefully at next time ...)

Post Reply