OpenGL error (unable to load driver: after a recent update

After a recent update, I get following error messages as soon as I start running any GPU-accelerated terminal emulator such as kitty or alacritty

libGL error: unable to load driver:
libGL error: failed to load driver: swrast

Based on some other posts, it seems it is related to missing/conflicting OpenGL drivers provided by nvidia or mesa

Here is some hardware/software info of my system, Manjaro 18.04 (Illyria):

uname -a

Linux manjaro-macpro 4.19.32-1-MANJARO #1 SMP PREEMPT Wed Mar 27 18:55:07 UTC 2019 x86_64 GNU/Linux
lspci -vnn | grep VGA
05:00.0 VGA compatible controller [0300]: NVIDIA Corporation GK104 [GeForce GTX 760] [10de:1187] (rev a1) (prog-if 00 [VGA controller])
	Subsystem: Corp. GK104 [GeForce GTX 760] [3842:2762]
	Subsystem: Corp. GK104 HDMI Audio Controller [3842:2762]
> pacman -Qs libgl 

local/lib32-libglvnd 1.1.1-1
    The GL Vendor-Neutral Dispatch library
local/lib32-mesa 19.0.1+really+18.3.5-1
    An open-source implementation of the OpenGL specification (32-bit)
local/libglade 2.6.4-6
    Allows you to load glade interface files in a program at runtime
local/libglvnd 1.1.1-1
    The GL Vendor-Neutral Dispatch library
local/mesa 19.0.1+really+18.3.5-1
    An open-source implementation of the OpenGL specification
> pacman -Qs nvidia      
local/lib32-libvdpau 1.2-1
    Nvidia VDPAU library
local/libvdpau 1.2-1
    Nvidia VDPAU library
local/libxnvctrl-390xx 390.116-1
    NVIDIA NV-CONTROL X extension, 390xx legacy branch
local/linux419-nvidiabl 0.88-27 (linux419-extramodules)
    Driver to adjust display backlight on modern mobile NVidia graphics adapters.
local/mhwd-nvidia 1:418.43-1
    MHWD module-ids for nvidia 418.43
local/mhwd-nvidia-340xx 340.107-1
    MHWD module-ids for nvidia 340.107
local/mhwd-nvidia-390xx 390.116-1
    MHWD module-ids for nvidia 390.116

How do I fix this so those applications start working again?

Thanks in advance

Not sure if this will be helpful:

> sudo find /usr -iname "**" -exec ls -l {} \;
-rwxr-xr-x 1 root root 402740 Mar 14 04:17 /usr/lib32/
lrwxrwxrwx 1 root root 14 Mar 14 04:17 /usr/lib32/ ->
lrwxrwxrwx 1 root root 14 Mar 14 04:17 /usr/lib32/ ->
-rwxr-xr-x 1 root root 591624 Mar 14 03:35 /usr/lib/
lrwxrwxrwx 1 root root 14 Mar 14 03:35 /usr/lib/ ->
lrwxrwxrwx 1 root root 14 Mar 14 03:35 /usr/lib/ ->
sudo pacman -Syyuu
1 Like

Thanks for your response.
After doing sudo pacman -Syyuu, the first error message is resolved however I still get the second one plus a new one!

libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: swrast

Did you reboot?

yes, I did. now the monitor is entirely black!

I can ssh into system however I can't see any error messages in file. All messages indicate fb, dri & nvidia gpu are being recognized & loaded correctly!

Oh dear.

Can you get to a tty (e.g ctrl+alt+f4)?

If so log in and see if startx works.

Assuming you are able to get a tty or the desktop try looking for error messages with
journalctl -b -p3

Another place to look is /var/log/pacman.log to see if there was some problem with the update.

Finally inxi -Fxz will provide system information so that others might help better.

If you are unable to get to tty try to chroot in after live boot to your install media: Can't login - black screen & chroot guide

First thing I would suggest doing once in is
sudo pacman-mirrors -f5
sudo pacman -Syyuu
in case the previously used mirror was out of date. If the second command gives an update rather than 'there is nothing to do' then try rebooting to your system proper. Else try to provide as much good information as possible. There might be a bit more here How to provide good information in your posts than I have already covered.

Good luck, I have to run. :grinning:

Thank you @grinner for your response.
I couldn't get a tty to check for startx
However, the GFX card has three monitor connections, I connected all three to my monitors & managed to boot & see all 3 screens. I then use nvidia settings tool to set one of the monitors as default and that seemed to fix the issue, at least after 2nd reboot.
Hopefully, it will stick!

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.

Forum kindly sponsored by