6

I have Ubuntu 18.04 64-bit with proprietary NVidia driver installed. When I try to start any Windows graphical app I get the following error:

libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: swrast
X Error of failed request:  GLXBadContext
  Major opcode of failed request:  151 (GLX)
  Minor opcode of failed request:  6 (X_GLXIsDirect)
  Serial number of failed request:  257
  Current serial number in output stream:  256

Having surfed around similar issues on SO communities I realized that this is likely caused by wine using 32-bit graphical libs.

The issue is that the NVidia proprietary 32-bit drivers installer checks for the architecture and fails the installation (although I have multiarch-support package installed).

Is there is a way to work around this issue having proprietary drivers preserved? Or if not what would be the most robust way to set up those libs?

Thanks!

Zanna
  • 72,312
Alexey R.
  • 116

4 Answers4

3

I do know of this problem and I solved it.
I'm using a newer OS, but the commands may be similar.

You may need to run this command, if you don't have any 32-bit packages yet:

dpkg --add-architecture i386

You must manually install all 32-bit libraries of Nvidia to run 32-bit games and programms. If you're not installing all files, you get an error with "swrast".

I use these commands for me, and they work.

sudo apt install nvidia-driver-430:i386 libnvidia-gl-430:i386 xserver-xorg-video-nvidia-430:i386 libnvidia-cfg1-430:i386 libnvidia-ifr1-430:i386 libnvidia-decode-430:i386 libnvidia-encode-430:i386 nvidia-settings
sudo apt install nvidia-driver-430 libnvidia-gl-430 nvidia-utils-430 xserver-xorg-video-nvidia-430 libnvidia-cfg1-430 libnvidia-ifr1-430 libnvidia-decode-430 libnvidia-encode-430 nvidia-settings

After that:

  1. Change 430 to your version of driver 64bit already installed.
  2. If any file cannot be installed, or is already installed, just remove it from the list and try your step
  3. Carefully check in Synaptic for files with libnvidia and nvidia-driver

Their authors can periodically change names of files or add new. I hope that there are no changes from 430 to 440.

PS: Instead of apt, you can use

sudo aptitude install .... 

Of course, I use PPA

sudo add-apt-repository ppa:graphics-drivers/ppa

(sudo apt-get update is required).

PPS: Do you have one graphics card?
Or two cards in a notebook?
If you have two, you must use nvidia-prime or bumblebee, and optirun to run apps like this:

optirun wine

You can get the name of your video card by running:

inxi -G" or "glxinfo | grep OpenGL

To test the 32-bit part of the Nvidia driver, just run any 32bit wine program. Even Heroes 3.

Zanna
  • 72,312
2

After several attempts to apply the solutions from answers to this question and similar others I came to the one that resolved my particular case.

  1. Download the latest proprietary 64 bit NVidia driver from NVidia site
  2. Start Ubuntu in cmd mode under root: https://askubuntu.com/a/859640/924671
  3. Run installer
  4. At some point installer will ask if you would like to install 32-bit compatibility libraries. Answer [Yes]
  5. When you are asked about if you want to overwrite the existing files (there are probably several places there) confirm the option
  6. Reboot
Alexey R.
  • 116
1

No guarantee this fixes your problem but the same errors occurred in 2014:

The solution back then (please read full link) was to create a new symbolic link.

0

Any reason not to upgrade to the new LTS? If NVidia drivers continue to be a problem, maybe change to Pop OS or take a look at their drivers... https://support.system76.com/articles/upgrade-ubuntu/