Installing nvidia-cuda-toolkit removes nvidia-driver-510

Bug #1963976 reported by Gon Solo
32
This bug affects 7 people
Affects Status Importance Assigned to Milestone
nvidia-cuda-toolkit (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

I tried to install the CUDA toolkit.
When doing a "sudo apt install nvidia-cuda-toolkit" apt tries to remove my driver "nvidia-driver-510". Also the cuda toolkit is 11.3 whereas 11.6 is available.

I think the two packages should be in sync.

ProblemType: Bug
DistroRelease: Ubuntu 21.10
Package: ubiquity 21.10.10
ProcVersionSignature: Ubuntu 5.13.0-30.33-generic 5.13.19
Uname: Linux 5.13.0-30-generic x86_64
NonfreeKernelModules: zfs zunicode zavl icp zcommon znvpair nvidia_modeset nvidia
ApportVersion: 2.20.11-0ubuntu71
Architecture: amd64
CasperMD5CheckResult: unknown
CurrentDesktop: ubuntu:GNOME
Date: Mon Mar 7 17:23:07 2022
InstallCmdLine: BOOT_IMAGE=/boot/vmlinuz-5.13.0-30-generic root=UUID=5ad16aab-e3c0-47b9-a0fd-f06aaf640323 ro quiet splash vt.handoff=7
SourcePackage: ubiquity
Symptom: installation
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Gon Solo (gonsolo) wrote :
summary: - Installing nvidia-cuda-toolkit remove nvidia-driver-510
+ Installing nvidia-cuda-toolkit removes nvidia-driver-510
Paul White (paulw2u)
affects: ubuntu → nvidia-cuda-toolkit (Ubuntu)
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in nvidia-cuda-toolkit (Ubuntu):
status: New → Confirmed
Revision history for this message
Russell Morris (6-u3untu-h) wrote :

Hi,

The same issue here - it wants to force me back to nvidia-driver-470. Is there a way around this?

Thanks!

Revision history for this message
Joseph Yasi (joe-yasi) wrote :

This is a debian packaging issue.
rules.defs in the Debian source package has different rules for Debian and Ubuntu for libnvidia-ml1 and libcuda1. From the jammy package of 11.5.1-1ubuntu1:
-----snip-----
package_libcuda1.Debian += libcuda1 (>= $${nvidia:MinVersion}) [!armhf !ppc64el] |
package_libcuda1.Debian += libnvidia-tesla-495-cuda1 (>= $${nvidia:MinVersion}) [amd64 i386 arm64 ppc64el] |

package_libcuda1.Ubuntu += libnvidia-compute-495 (>= $${nvidia:MinVersion}) [amd64 i386] |
package_libcuda1.Ubuntu += libnvidia-compute-495-server (>= $${nvidia:MinVersion}) [amd64 i386] |

package_libnvidia-ml1.Debian += libnvidia-ml1 (>= $${nvidia:MinVersion}) [!armhf !ppc64el] |
package_libnvidia-ml1.Debian += libnvidia-tesla-495-ml1 (>= $${nvidia:MinVersion}) [amd64 i386 arm64 ppc64el] |

package_libnvidia-ml1.Ubuntu = $(package_libcuda1.Ubuntu)
-----snip-----

package_libnvidia-ml1.Ubuntu is missing the libnvidia-ml1 line. It's depending upon a specific version of the package available package build time. The Ubuntu Nvidia driver packages provide libnvidia-ml1 now, but might not have in the past.

Revision history for this message
ash ketschup (ashketschup) wrote (last edit ):

I have the same issue and it is almost one year since this bug was reported. I used ubuntu 20.04 before 22.04 and everything worked fine before.

I tell you never touch a running system xD.

Okay I have to confest, that the installation routine was more complicated in the old ubuntu version but at least it worked.

I have the same issue with nvidia-drivers-515 and nvidia-drivers-525.

Revision history for this message
ash ketschup (ashketschup) wrote :

Funny Part is that it seemed to work not too long ago, as this guy here is showing in his video.
https://www.youtube.com/watch?time_continue=44&v=8NBgJLZGnPc&feature=emb_logo

Revision history for this message
ash ketschup (ashketschup) wrote :

I was able to find a workaround by doing the installation the "complicated nvidia way". Just in case anybody else needs a workaround and has no idea how to do so, here the steps I did (no warranty that it works for you and will not break up your system (for me this happened this happened 5 times but finally I found out that the following steps works very well for me.))

#DOWNLOAD CUDNN tar.gz (yes, in order to do so, you have to create an nvidia developer account -.-'#).
https://developer.nvidia.com/rdp/cudnn-download

# install compatible driver (somehow the cuda installation removes the previous installation)
sudo apt install nvidia-driver-515
sudo reboot

# INSTALL CUDA11 (CUDA 12 is not compatible currently)
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/cuda-ubuntu2004.pin
 wget http://developer.download.nvidia.com/compute/cuda/11.0.2/local_installers/cuda-repo-ubuntu2004-11-0-local_11.0.2-450.51.05-1_amd64.deb
sudo dpkg -i cuda-repo-ubuntu2004-11-0-local_11.0.2-450.51.05-1_amd64.deb
sudo dpkg -i cuda-repo-ubuntu2004-11-0-local_11.0.2-450.51.05-1_amd64.deb
sudo dpkg -i cuda-repo-ubuntu2004-11-0-local_11.0.2-450.51.05-1_amd64.deb
sudo apt-key add /var/cuda-repo-ubuntu2004-11-0-local/7fa2af80.pub
sudo apt-get update
sudo apt-get -y install cuda

# check if cuda 11 is installed successfully (if command could be found your fine :))
nvcc

# add cuda to PATH variable
echo "export PATH=/usr/local/cuda-11.0/bin${PATH:+:${PATH}}" >> ~/.bashrc
sudo reboot

# copy the cudnn libs (go to folder with cudnn.tar.gz download first)
tar -xvf cudnn-linux-x86_64-8.7.0.84_cuda11-archive.tar.xz
sudo cp cudnn-*-archive/include/cudnn*.h /usr/local/cuda/include.
sudo cp -P cudnn-*-archive/lib/libcudnn* /usr/local/cuda/lib64
sudo chmod a+r /usr/local/cuda/include/cudnn*.h /usr/local/cuda/lib64/libcudnn*

# install pip (to) install tensorflow
sudo apt install python3-pip

# install tensorflow 2.9.1 since 2.11 did not work for me with cudnn
pip install tensorflow==2.9.1

# create a symlink to libcusolver.so.11
sudo ln -s /usr/local/cuda/targets/x86_64-linux/lib/libcusolver.so.11 /home/horus/.local/lib/python3.10/site-packages/tensorflow/python/libcusolver.so.11

# check if gpus are available
python3 -c 'import tensorflow as tf; print(tf.version.VERSION);print(tf.config.list_physical_devices());'

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.