Friday, February 6, 2015

Steam client on Gentoo stops with GL errors

I use the Steam client on Gentoo Linux and recently it stopped working which meant I had TF2 withdrawal :-)

I'm not a programmer so this may be a bad way to fix things but it worked for me. YMMV.

It all started when you launch the steam client it brings up a dialog:

OpenGL GLX context is not using direct rendering, which may cause performance problems

TF2 would not even launch :-(

Launching from a terminal gave me

libGL error: unable to load driver: r600_dri.so
libGL error: driver pointer missing
libGL error: failed to load driver: r600
libGL error: unable to load driver: swrast_dri.so
libGL error: failed to load driver: swrast



After searching through all sorts of things I found an article  about MatLab but with similar errors.

 After doing the:

export LIBGL_DEBUG=verbose

things started to make sense.

libGL: screen 0 does not appear to be DRI3 capable
libGL: pci id for fd 7: 1002:68b8, driver r600
libGL: OpenDriver: trying /usr/lib/dri/tls/r600_dri.so
libGL: OpenDriver: trying /usr/lib/dri/r600_dri.so
libGL: dlopen /usr/lib/dri/r600_dri.so failed (/home/nick/.local/share/Steam/ubuntu12_32/steam-runtime/i386/usr/lib/i386-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by /usr/lib/dri/r600_dri.so))
libGL error: unable to load driver: r600_dri.so
libGL error: driver pointer missing
libGL error: failed to load driver: r600
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 (/home/nick/.local/share/Steam/ubuntu12_32/steam-runtime/i386/usr/lib/i386-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by /usr/lib/dri/swrast_dri.so))
libGL error: unable to load driver: swrast_dri.so



The libstdc++ in the Steam directory was

 

ls -al /home/nick/.local/share/Steam/ubuntu12_32/steam-runtime/i386/usr/lib/i386-linux-gnu/libstdc++.so.6
lrwxrwxrwx 1 nick users 19 Jul 19  2014 /home/nick/.local/share/Steam/ubuntu12_32/steam-runtime/i386/usr/lib/i386-linux-gnu/libstdc++.so.6 -> libstdc++.so.6.0.18


but the r600 driver was now built with

ls /usr/lib/gcc/i686-pc-linux-gnu/4.9.2/libstdc++.so.6*
/usr/lib/gcc/i686-pc-linux-gnu/4.9.2/libstdc++.so.6  /usr/lib/gcc/i686-pc-linux-gnu/4.9.2/libstdc++.so.6.0.20


So can you just link the one outside the Steam directory? Delete the link and try..


rm /home/nick/.local/share/Steam/ubuntu12_32/steam-runtime/i386/usr/lib/i386-linux-gnu/libstdc++.so.6
ln -s /usr/lib/gcc/i686-pc-linux-gnu/4.9.2/libstdc++.so.6.0.20 /home/nick/.local/share/Steam/ubuntu12_32/steam-runtime/i386/usr/lib/i386-linux-gnu/libstdc++.so.6



Let's try steam


libGL: screen 0 does not appear to be DRI3 capable
libGL: pci id for fd 7: 1002:68b8, driver r600
libGL: OpenDriver: trying /usr/lib/dri/tls/r600_dri.so
libGL: OpenDriver: trying /usr/lib/dri/r600_dri.so



It says not DRI3 capable but I thoguth it was but no biggie.  No dialog about OpenGL. Getting excited... Launched TF2.  No error straight away and it worked! I was back in Pyro land :-)


Update: I recently made the jump to 64 bit Gentoo and the link command is now different but otherwise it just worked again.

ln -s /usr/lib/gcc/x86_64-pc-linux-gnu/4.9.3/libstdc++.6 /home/nick/.local/share/Steam/ubuntu12_32/steam-runtime/i386/usr/lib/i386-linux-gnu/libstdc++.so.6

A second link is needed to make some games go (such as Outlast) I'm guessing these are 64 bit

ln -s /usr/lib/gcc/x86_64-pc-linux-gnu/4.9.3/libstdc++.6 /home/nick/.local/share/Steam/ubuntu12_32/steam-runtime/amd64/usr/lib/x86_64-linux-gnu/libstdc++.so.6










3 comments:

Binayak Ghosh said...

I was facing the same problem with matlab.. The same solution worked for my case. Thanks a lot!

Nick Brooker said...

A recent change has upset things again. I got:

libGL: Can't open configuration file /home/nick/.drirc: No such file or directory.
libGL: pci id for fd 7: 1002:6939, driver radeonsi
libGL: OpenDriver: trying /usr/lib32/dri/tls/radeonsi_dri.so
libGL: OpenDriver: trying /usr/lib32/dri/radeonsi_dri.so
libGL: Can't open configuration file /home/nick/.drirc: No such file or directory.
libGL: Can't open configuration file /home/nick/.drirc: No such file or directory.
libGL: Using DRI3 for screen 0
/home/nick/.local/share/Steam/ubuntu12_32/steam: symbol lookup error: /usr/lib32/libxcb-dri3.so.0: undefined symbol: xcb_send_request_with_fds
/home/nick/.local/share/Steam/steam.sh: line 444: no match: ssfn*

libcxb-dri3 is too new

rm .local/share/Steam/ubuntu12_32/steam-runtime/i386/usr/lib/i386-linux-gnu/libxcb.so.1
ln -s /usr/lib/libxcb.so.1.1.0 .local/share/Steam/ubuntu12_32/steam-runtime/i386/usr/lib/i386-linux-gnu/libxcb.so.1

You might need to do this on the 64bit directories as well. I had to destroy my steam folder after a recent update so it hasn't updated to the 64bit version yet.

Nick Brooker said...

Wow things just keep moving and breaking :-)

So after clearing and reinstalling Steam, to get things going now (systemd-232 change libudev.so to .1 so this may not completely work)

export STEAM_RUNTIME=0

change your masks:
media-libs/openal abi_x86_32
gnome-base/gconf abi_x86_32
media-libs/libcanberra abi_x86_32


and add a new link for udev.so. This is probably asking for a world of hurt though so be warned.

sudo ln -s /usr/lib32/libudev.so.1.6.5 /usr/lib32/libudev.so.0