Installing 32-bit libnvidia-gl alongside 64-bit version
Steam and the majority of games on Linux rely on 32-bit OpenGL libraries being available. However, Nvidia planned to drop 32-bit support for CUDA for some time now. Luckily, the necessary 32-bit libraries can be manually installed to make Steam work.
I suggest you install both CUDA and the 64bit driver from the Nvidia repository first, then check what version of driver has been installed. Obviously, the 32-bit library files have to match the installed driver version. The appropriate files can be obtained by using the extract only option provided by the installer e.g. for 465.19.01 get the driver and do ./NVIDIA-Linux-x86_64-465.19.01.run -x
The i386 library files are in a folder named "32". To install the 32-bit library manually:
chmod u+x NVIDIA-Linux-x86_64-465.19.01.run
./NVIDIA-Linux-x86_64-465.19.01.run -x
cd NVIDIA-Linux-x86_64-465.19.01
cd 32
sudo cp libEGL* libGLESv* libGLX* libnvidia-egl* libnvidia-gl* libnvidia-tls* /usr/lib32
There are some symlinks that should be created (update version numbers as appropriate):
cd /usr/lib32
sudo ln -s libEGL_nvidia.so.465.19.01 libEGL_nvidia.so.0
sudo ln -s libGLESv1_CM_nvidia.so.465.19.01 libGLESv1_CM_nvidia.so.1
sudo ln -s libGLESv2_nvidia.so.465.19.01 libGLESv2_nvidia.so.2
sudo ln -s libGLX_nvidia.so.465.19.01 libGLX_indirect.so.0
sudo ln -s libGLX_nvidia.so.465.19.01 libGLX_nvidia.so.0
If your /usr/lib32 is not checked for libraries, create the file /etc/ld.so.conf.d/nvidia32.conf with the content:
/usr/lib32
You will probably need to run this for the system to detect the new libraries:
sudo ldconfig
Here is a thread on steam's github page about this exact problem. There are some solutions/workarounds there, but I didn't have time to check them all (or didn't like workarounds that break package manager) and simply gave up on that for now. Right now I have v460 driver with additional :i386
libs (I added foreign architecture before) and removed CUDA for now.
The cleanest way in my opinion is to run a Rapids docker container with CUDA environment. This on the other hand forces you to learn docker, configure your new docker environment and may introduce some other docker related problems, but at least it's the one solution that keeps it all clean and separate from your raw system. In the github reply to this issue there is a further explanation on how to do it. If you don't really mind this setup, then It may be your way to go.
In my case there was also a problem with installing additional :i386
libs (they disabled the driver and removed :amd64
packages) because of some drivers and cuda repository conflict. I also had to purge nvidia with cuda completely, remove the cuda repository from /etc/apt/sources.list
and install nvidia driver again (now with libnvidia-gl-460:i386
). If you have problems you can always check status of your libs and drivers with:
apt-cache policy nvidia-driver-460 libnvidia-gl-460 libnvidia-gl-460:i386