-
Notifications
You must be signed in to change notification settings - Fork 8.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How can i deal with 'libGL error: failed to load driver: swrast.' #509
Comments
Can you give more detail on what the current problem is? |
Hi, @tlbtlbtlb |
You need the swrast driver installed for OpenGL rendering to work in headless mode. Typically, |
Hi, and swarast_dri.so can be find as follows. Also, video drivers, mesa-utils and libgl1-mesa-glx all upgraded. |
It's a common problem with Ubuntu 14.04 and nVidia drivers. Easy solutions are to uninstall the nvidia drivers, or upgrade to Ubuntu 16.04. Many other solutions at https://encrypted.google.com/search?hl=en&q=driver%20does%20not%20expose%20__driDriverGetExtensions_swrast |
Note: I fixed this by using nvidia-docker instead |
Based on the dockerfile of nvidia/cuda, I can solve this problem. Or you can just use it with nvidia-docker to create another container run all the stuff without touching your OS environments. |
Wait so I'm seeing this in a basic chroot (drivers installed on the host and chroot.. trying to load steam) |
VMware Ubuntu 2018/10/20 12:53:47 I1020 12:53:47.639172 3702 gymvnc.go:550] [0:localhost:5900] connection established |
When on CentOS7: |
Thanks BuhuanJin, this solved a lot of problems. |
I deal with it in Redhat-8.2 (aarch64) with installing the mesa driver: sudo dnf install -y mesa-dri-drivers |
I am receiving a similar issue, and it did't get resolved even after updating mesa drivers. Kindly could you please help me with this? Output of "glxgears": Output of "ldconfig -p | grep -I gl.so" |
For future reference, you can run your programs with the prefix |
When on CentOS7: yum install -y mesa-dri-drivers # worked for me |
commmenting for posterity only to help anyone who lands here For me, I was working on an old ubuntu 14.04 box, after a motherboard replacement and much messing around with the graphics drivers, which for me were old mesa drivers. I got out my old backup archive HD for this machine and it had a different libGL.so.0.1.2.0 for me to try, in /usr/lib/fglrx pointing my system /usr/lib/libGL.so and /usr/lib/libGL.so.1 files in a symlink to this /usr/lib/fglrx/libGLS.so.0.1.2.0 worked for me to restore headless libGL working again on this old machine. So if you are getting this error it means you are likely using the wrong version of libGL.so for your machine to load the swrast libs. |
yeah, thanks. You help me a lot. |
I am using a xrdp remote connecting to a Ubuntu14.04 desktop machine, which successfully installed tensorflow and caffe.
After i install gym and run
import gym env = gym.make('CartPole-v0') env.reset() for _ in range(1000): env.render() env.step(env.action_space.sample()) # take a random action
libGL error occurs.
using "LIBGL_DEBUG=verbose glxgears" , it outputs:
libGL: screen 0 does not appear to be DRI3 capable libGL: OpenDriver: trying /usr/lib/x86_64-linux-gnu/dri/tls/swrast_dri.so libGL: OpenDriver: trying /usr/lib/x86_64-linux-gnu/dri/swrast_dri.so libGL: driver does not expose __driDriverGetExtensions_swrast(): /usr/lib/x86_64-linux-gnu/dri/swrast_dri.so: undefined symbol: __driDriverGetExtensions_swrast libGL: Can't open configuration file /home/lfwin/.drirc: No such file or directory. libGL: Can't open configuration file /home/lfwin/.drirc: No such file or directory. 3751 frames in 5.0 seconds = 750.148 FPS 4278 frames in 5.0 seconds = 855.515 FPS
I googled, but need reinstall nvidia drivers.
EDIT: After i update nvidia drivers, it works in local Ubuntu14.04 desktop machine, but still have error in remote connection
The text was updated successfully, but these errors were encountered: