Views:
203,137β
Votes: 17β
Tags:
drivers
nvidia
steam
yad
Link:
π See Original Answer on Ask Ubuntu β§ π
URL:
https://askubuntu.com/q/978112
Title:
Steam: libGL error: No matching fbConfigs or visuals found libGL error: failed to load driver: swrast
ID:
/2017/11/19/Steam_-libGL-error_-No-matching-fbConfigs-or-visuals-found-libGL-error_-failed-to-load-driver_-swrast
Created:
November 19, 2017
Edited: July 12, 2023
Upload:
September 15, 2024
Layout: post
TOC:
false
Navigation: false
Copy to clipboard: false
Windows Subsystem for Linux (WSL) Has Same Error
In Windows Subsystem for Linux (WSL) under Windows 10 there the file /usr/lib/i386-linux-gnu/mesa/libGL.so.1
does not exist. Instead there is the file /usr/lib/x86_64-linux-gnu/mesa/libGL.so.1
seems to replace it. However if you delete the replacement file the library doesnβt work at all.
Rename library then rename back solves problem
If you rename the file and then rename it back the errors disappear and it works a lot faster:
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
rick@alien:/mnt/e/etc$ lock-screen-timer
Linux version 4.4.0-43-Microsoft (Microsoft@Microsoft.com) (gcc version 5.4.0 (GCC) ) #1-Microsoft Wed Dec 31 14:42:53 PST 2014
libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: swrast
Gtk-Message: GtkDialog mapped without a transient parent. This is discouraged.
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
rick@alien:/mnt/e/etc$ sudo ldconfig -p | grep -i gl.so
libwayland-egl.so.1 (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/libwayland-egl.so.1
libcogl.so.20 (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/libcogl.so.20
libQt5OpenGL.so.5 (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/libQt5OpenGL.so.5
libGL.so.1 (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/mesa/libGL.so.1
libEGL.so.1 (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/mesa-egl/libEGL.so.1
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
rick@alien:/mnt/e/etc$ sudo rm /usr/lib/i386-linux-gnu/mesa/libGL.so.1
rm: cannot remove '/usr/lib/i386-linux-gnu/mesa/libGL.so.1': No such file or directory
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
rick@alien:/mnt/e/etc$ sudo mv /usr/lib/x86_64-linux-gnu/mesa/libGL.so.1 /usr/lib/x86_64-linux-gnu/mesa/libGL.so.1.ORIGINAL
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
rick@alien:/mnt/e/etc$ lock-screen-timer
Linux version 4.4.0-43-Microsoft (Microsoft@Microsoft.com) (gcc version 5.4.0 (GCC) ) #1-Microsoft Wed Dec 31 14:42:53 PST 2014
/usr/bin/zenity: error while loading shared libraries: libGL.so.1: cannot open shared object file: No such file or directory
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
rick@alien:/mnt/e/etc$ sudo mv /usr/lib/x86_64-linux-gnu/mesa/libGL.so.1.ORIGINAL /usr/lib/x86_64-linux-gnu/mesa/libGL.so.1
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
rick@alien:/mnt/e/etc$ lock-screen-timer
Linux version 4.4.0-43-Microsoft (Microsoft@Microsoft.com) (gcc version 5.4.0 (GCC) ) #1-Microsoft Wed Dec 31 14:42:53 PST 2014
Gtk-Message: GtkDialog mapped without a transient parent. This is discouraged.
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
rick@alien:/mnt/e/etc$
I verified the change is persistent, ie close the WSL terminal window and open a new window.
Quick Fix From Comments
In comment below it is suggested to try https://stackoverflow.com/a/63450299/6929343
export LIBGL_ALWAYS_INDIRECT=1
For a quick test, run:
glxinfo -B | grep renderer
NOTE: I havenβt tested this solution.
Whatβs Using the Library?
The library is used by yad
in the lock-screen-timer bash script upgraded with hybrid support for WSL in addition to Ubuntu. Yad is a fork of Zenity
which is why you see the Zenity-like Gtk-Message:
reference in the third error message above.
Hereβs what the yad
window looks like in Ubuntu (in WSL itβs slightly different):