10

I need Cuda 10.1, for PyTorch, TensorFlow, and MatLab. They don't support Cuda 11. I also need steam to play games. Is there any way I can use Cuda's parallel processing while able to play games on steam. Please help.

Steam requires libnvidia-gl-440:i386.

The following packages have unmet dependencies:
libnvidia-gl-440:i386 : Depends: libnvidia-gl-450:i386 but it is not going to be installed

But installing libnvidia-gl-450:i386, says:

The following packages will be REMOVED:
cuda-10-1 cuda-demo-suite-10-1 cuda-drivers cuda-drivers-450 cuda-runtime-10-1 libnvidia-compute-450 libnvidia-decode-450 libnvidia-encode-450 libnvidia-gl-450 libnvidia-ifr1-450 nvidia-compute-utils-450 nvidia-driver-450 nvidia-utils-450

Tried links: Steam won't launch on Ubuntu 18.04 Steam not working on Ubuntu 20.04 but didn't help with Cuda and steam both at the same time.

Edit:

It's not only with steam, it won't allow me to use any other 32-bit application. Installing libnvidia-gl-450:i386 asks to remove Cuda 10.1 which I can not.

I am looking for a way to run Cuda, as well as use all the 32-bit arch applications. As stated above Matlab, Pytorch, TensorFlow do not support Cuda 11.

Black Chase
  • 445
  • 1
  • 5
  • 16

4 Answers4

3

I had the same issue (Ubuntu 18.04 and CUDA 11.0, but the issue seems to be the same)

NVidia has 3 install options. An installer by NVidia itself and two options for a .deb. The .debs don't include any i386 packages. The custom installer however does. So for Steam you need to install with the .run file.

I needed TensorRT, but that had some dependencies that didn't seem to be installed via de the .run file. It wouldn't surprise me if TensorFlow will have similar issues. The solution for that was also to install the .deb, but not cuda via the .deb.

  1. Since things could go wrong you better make a backup of your system-files

  2. Remove your old cuda and nvidia drivers

sudo sudo apt-get --purge remove "*cublas*" "*cufft*" "*curand*"  "*cusolver*" "*cusparse*" "*npp*" "*nvjpeg*" "cuda*" "nsight*"
sudo apt-get --purge remove "*nvidia*"
  1. Blacklist Nouveau:
sudo bash -c "echo blacklist nouveau > /etc/modprobe.d/blacklist-nvidia-nouveau.conf"
sudo bash -c "echo options nouveau modeset=0 >> /etc/modprobe.d/blacklist-nvidia-nouveau.conf"
sudo update-initramfs -u
sudo reboot
  1. Get and install the runfile installer (CUDA 10.1 doesn't seem to be support Ubuntu > 18.10 though?)

  2. Install Steam sudo apt install steam

    Steam should be able to run now

  3. Install TensorFlow. If it complains about dependencies you might also need to install the .deb repository before TensorFlow. But make sure not to do the last step of actually installing cuda

0

There's no conflict with Steam and CUDA 10.1 -- The problem you describe is a result of the unwanted dependencies (on the Nvidia Drivers they include) Intel attaches to their CUDA packages. These unwanted Nvidia packages may be old drivers, older than what you have currently on your Ubuntu, or new drivers, maybe not even appropriate for your hardware. In any case, there are two possible solutions:

  1. Download the Intel CUDA deb, unpack it instead of installing it, keep unpacking any included debs, skipping the Nvidia included debs, and you get a local install of the CUDA files without the package manager being involved at all. See answer Question about installing CUDA 10.1 on Ubuntu 20.04, the root folder is empty for this approach.
  2. Run the install from the Intel CUDA deb to a known location -- avoid spreading the cuda libs and executables all through your system. Deal with the old /new Nvidia driver (if even possible) by first backing up the CUDA files, since your helpful package manager deletes them (they are dependents on the Nvidia package you are replacing). Install your selected Nvidia driver (which deletes all your CUDA files!), and restore from your backup the CUDA files. Clean up all the "rc" removed/configured leftover CUDA packages. Messy, but it worked when an older Nvidia drivers was included with the CUDA debs.

The supplied Ubuntu CUDA packages seem to be parts of what the Intel deb supplies, maybe they would work for you, but you have no control over versions.

ubfan1
  • 17,838
0

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

Update: I can confirm this approach works with 470.57.02

TimSC
  • 221
  • 2
  • 8
  • Isn't this is version of nVidia in the beta stage? – Black Chase May 01 '21 at 18:22
  • @BlackChase yes that driver version is a beta but the CUDA libraries currently in the Nvidia repository depend on that version. I'd expect they will change the driver dependency at some point. – TimSC May 03 '21 at 11:05
-1

Solution:


sudo apt-get update --fix-missing

sudo dpkg --configure -a

sudo apt-get install -f

sudo apt-get clean

sudo apt-get autoremove

Unlock the dpkg – (message /var/lib/dpkg/lock)

sudo fuser -vki /var/lib/dpkg/lock.
sudo dpkg --configure -a

You can delete the lock file with the following command:

sudo rm /var/lib/apt/lists/lock

You may also need to delete the lock file in the cache directory

sudo rm /var/cache/apt/archives/lock

Now You Can Install libnvidia-gl-450:i386 :

sudo apt install libnvidia-gl-450:i386
sudo apt autoremove
sudo apt upgrade
Ibster
  • 386
  • 2
    Not working, the issue is with cuda, once you are trying to install i386 files, it says The following packages will be REMOVED: cuda-10-1 cuda-demo-suite-10-1 cuda-drivers cuda-drivers-450 cuda-runtime-10-1 libnvidia-gl-450 libnvidia-ifr1-450 nvidia-driver-450 The following NEW packages will be installed: libnvidia-gl-450:i386 And i cannot remove cuda 10.1 because i need it, which is working and is important for my work. – Black Chase Sep 05 '20 at 20:48