Wine with proprietary Nvidia driver on 64-bit Ubuntu
Solution 1
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.
- Download the latest proprietary 64 bit NVidia driver from NVidia site
- Start Ubuntu in cmd mode under root: https://askubuntu.com/a/859640/924671
- Run installer
- At some point installer will ask if you would like to install 32-bit compatibility libraries. Answer [Yes]
- When you are asked about if you want to overwrite the existing files (there are probably several places there) confirm the option
- Reboot
Solution 2
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:
- Change 430 to your version of driver 64bit already installed.
- If any file cannot be installed, or is already installed, just remove it from the list and try your step
- Carefully check in Synaptic for files with
libnvidia
andnvidia-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.
Solution 3
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.
Related videos on Youtube
Alexey R.
Updated on September 18, 2022Comments
-
Alexey R. over 1 year
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!
-
WinEunuuchs2Unix about 4 yearsOne reason I can think of is all the new bugs inevitably in a brand new LTS. Recommending switching off of Ubuntu onto Pop will probably not be well received in this community. Why not recommend Windows for gaming which is the superior platform for playing?
-
Alexey R. about 4 yearsI've not yet been prompted to upgrade my version to the latest LTS. Honestly I am not sure this will fix my issue.
-
Alexey R. about 4 yearsEven if I run drivers installation command from your example I get
Unable to locate package
error for the packagesnvidia-driver-430:i386
,xserver-xorg-video-nvidia-430:i386
,libnvidia-cfg1-430:i386
-
Alexey R. about 4 yearsI've followed your advice - removed the files which installer didn't manage to find. And it looks like I now broke something different because now when I try to run win app I get the following error (not mentioning swarst this time):
Error of failed request: BadValue (integer parameter out of range for operation) Major opcode of failed request: 151 (GLX) Minor opcode of failed request: 3 (X_GLXCreateContext)
-
Alexey R. about 4 yearsThanks but that is not working for me. I have no broken symlinks. I think my case is a bit different because there are several points which are not relevant to my situation. For example I can successfully run that test OpenGL app. Looks like I do have 32 bit libGL.so (but for some reason it is of
1.0.0
version) and I tried to map my/usr/lib/libGL.so.1
to that 32 lib but with no success.. -
Alexey R. about 4 yearsDespite your solution didn't work for my particular case I think your contribution deserves the bounty. Meanwhile I'm going to add the solution that fixed my issue and mark it as correct so that it could help people facing the same issue.
-
nightwatch over 3 yearsHaving the same issue.. can you clarify step 3 above? Run which installer? How?... sorry just clicked in my brain.. very tired. :-)
-
Alexey R. over 3 yearsAs the result of Step 1 you should have file (installer) that ends with
.run
. This is the executable. On step 3 you should change directory to the one holding that installer likecd /path/to/installer
. Then make sure you can execute itchmod u+x NVIDIA-Linux-x86_64-450.80.02.run
(here I use the file that I have downloaded, but you might have different one), and then execute it like./NVIDIA-Linux-x86_64-450.80.02.run
. -
nightwatch over 3 yearsFigured out the steps...ran them.. still can't get wine 5.0 drivers for nvidia 455 and/or webcam...to work properly.. the win10 app that I am using still can't determine webcam. :-/
-
nightwatch over 3 yearsShould also mention that I ended up with boot-up errors as well. "Failed to find Nvidia persistence daemon". Had to use safe mode, root user with networking to repair broken packages...