Score:3

Problem with installing CUDA Toolkit on Ubuntu 21.10

cn flag

I successfully installed CUDA Toolkit by following the process mentioned on the official site. But during installation, it also upgrades the Nvidia drivers. Currently nvidia-driver-390 is working but after CUDA Toolkit installation it upgrades and those new drivers don't work. In Ubuntu 21.04, it was fine but now it's not working anymore. I have Quadro K1100M GPU in laptop.

cc flag
Looks like 418 is the latest one for your hardware. Get your Nvidia working, then pick a cuda install method that does not install its own (wrong) version. See answers 1077061 and 1219761 on this site.
Shahzad Akram avatar
cn flag
Yeah, I upgraded to 418 but its new number is 470 and after installing CUDA, drivers stop working. I tried many versions but no one is working. Even if I just install any driver from cuda repo it doesn't work.
de flag
I have encountered a similar issue. If one installs `nvidia-driver-495` and then attempts to install `nvidia-cuda-toolkit`, it will try to remove the `nvidia-driver-495` in the process - and it's my general understanding that you need both in order to run CUDA applications....
Score:2
cn flag

I solved it by the following process.

sudo apt purge cuda*
sudo apt purge nvidia*
sudo apt purge libnvidia*
sudo apt autoremove

Removing all the stuff regarding nvidia is mandatory, otherwise you might face some installation issues.

I found that my supported nvidia driver is nvidia-driver-418 from nvidia driver downloads, later I found that ubuntu nvidia-driver-418 has been moved to nvidia-driver-470 (470.82.01), I don't know the theory behind this.

Then from NVIDIA CUDA Toolkit Release Notes I got that CUDA 11.4 Update 3 ships with nvidia-driver-470 (470.82.01) and it's done. Then simply I followed the process from official documentation for local deb (Ubuntu 21.10 isn't available there but 20.04 works), and it worked.

In my case it was like:

wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/cuda-ubuntu2004.pin
sudo mv cuda-ubuntu2004.pin /etc/apt/preferences.d/cuda-repository-pin-600
wget https://developer.download.nvidia.com/compute/cuda/11.4.3/local_installers/cuda-repo-ubuntu2004-11-4-local_11.4.3-470.82.01-1_amd64.deb
sudo dpkg -i cuda-repo-ubuntu2004-11-4-local_11.4.3-470.82.01-1_amd64.deb
sudo apt-key add /var/cuda-repo-ubuntu2004-11-4-local/7fa2af80.pub
sudo apt-get update
sudo apt-get -y install cuda
de flag
Downloading from the nvidia website is ok, but then you loose automatic updates via apt. Isn't there a better way of fixing this?
Shahzad Akram avatar
cn flag
I think it's better to go with Nvidia because in my case, Ubuntu didn't update the driver, it kept me on `nvidia-driver-390` and my GPU supports 418(470) which I installed manually.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.