2

I need to use CUDA 11.1 driver for machine learning. Steam requires libnvidia-gl-450:i386 driver to be installed in order to open. However, installing one driver removes the other. How would I be able to use both of them at the same time or be able to play steam games while using a CUDA driver?

I've tried How do I install NVIDIA and CUDA drivers into Ubuntu? but it only works for 18.04. A similar question was asked here but there isn't any answer.

3
  • The installation of CUDA 11.1 would be very similar but do the .run file installation and unselect the video driver that CUDA 11 wants to install, that way you can use the drivers from the graphics-drivers PPA which will allow for Steam. Get the .run file from developer.nvidia.com/…
    – Terrance
    Oct 7, 2020 at 14:30
  • Thanks @Terrance. I'll try it out.
    – CoderUni
    Oct 7, 2020 at 14:36
  • Oops, I gave you the .run file link for 11.0 not 11.1. Here is the 11.1 link: developer.nvidia.com/…
    – Terrance
    Oct 7, 2020 at 18:23

2 Answers 2

2

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:

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

You will probably need to run this for the system to detect the new libraries:

sudo ldconfig
0

I found the solution. Install Anaconda from the official site (download and run their script). Then run in your terminal:

conda create -n environment_name
conda activate environment_name
conda install cudatoolkit=11   
conda install python=3.7

Afterwards you'll need to conda activate your environment every time you start working on your project. To search for packages, use conda search. It will install the CUDA toolkit in the virtual environment instead of in the system.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .