CUDA NVIDIA Drivers For Ubuntu 22.04

I am using Ubuntu 22.0.1

$ uname -a
Linux 6.8.0-45-generic #45~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Wed Sep 11 15:25:05 UTC 2 x86_64 x86_64 x86_64 GNU/Linux

$ lspci -v | grep -i NV
05:00.0 Non-Volatile memory controller: Marvell Technology Group Ltd. Device 1321 (rev 02) (prog-if 02 [NVM Express])
Kernel driver in use: nvme
Kernel modules: nvme
cc:00.0 3D controller: NVIDIA Corporation GK210GL [Tesla K80] (rev a1)
Subsystem: NVIDIA Corporation GK210GL [Tesla K80]
Kernel modules: nvidiafb, nouveau
cd:00.0 3D controller: NVIDIA Corporation GK210GL [Tesla K80] (rev a1)
Subsystem: NVIDIA Corporation GK210GL [Tesla K80]
Kernel modules: nvidiafb, nouveau

$ nvidia-smi
Command ā€˜nvidia-smiā€™ not found, but can be installed with:
sudo apt install nvidia-utils-390 # version 390.157-0ubuntu0.22.04.2, or
sudo apt install nvidia-utils-418-server # version 418.226.00-0ubuntu5~0.22.04.1
sudo apt install nvidia-utils-450-server # version 450.248.02-0ubuntu0.22.04.1
sudo apt install nvidia-utils-470 # version 470.256.02-0ubuntu0.22.04.1
sudo apt install nvidia-utils-470-server # version 470.256.02-0ubuntu0.22.04.1
sudo apt install nvidia-utils-535 # version 535.183.01-0ubuntu0.22.04.1
sudo apt install nvidia-utils-535-server # version 535.183.06-0ubuntu0.22.04.1
sudo apt install nvidia-utils-550 # version 550.107.02-0ubuntu0.22.04.1
sudo apt install nvidia-utils-550-server # version 550.90.07-0ubuntu0.22.04.1
sudo apt install nvidia-utils-510 # version 510.60.02-0ubuntu1
sudo apt install nvidia-utils-510-server # version 510.47.03-0ubuntu3
sudo apt install nvidia-utils-545 # version 545.29.06-0ubuntu0.22.04.2

Now, please can guide me to install correct nvidia drivers, as installing nvidia-utils-470/535/510, is not working

Thanks & Regards
Emb3

The K80 has Compute Capability 3.7 and the last driver to support it is the 470 series. If you need to install the Cuda Toolkit, 11.8 is the last to support it.

1 Like

But which should I install, among the below two
sudo apt install nvidia-utils-470 # version 470.256.02-0ubuntu0.22.04.1
sudo apt install nvidia-utils-470-server # version 470.256.02-0ubuntu0.22.04.1

If try to install install ā€œsudo apt install nvidia-utils-470ā€, the I am getting the following error. And also, should I install the Toolkit first and then drivers or drivers first and then Toolkit.

Error
Error! Bad return status for module build on kernel: 6.8.0-45-generic (x86_64)
Consult /var/lib/dkms/nvidia/470.256.02/build/make.log for more information.
dpkg: error processing package nvidia-dkms-470 (ā€“configure):
installed nvidia-dkms-470 package post-installation script subprocess returned error exit status 10
dpkg: dependency problems prevent configuration of nvidia-driver-470:
nvidia-driver-470 depends on nvidia-dkms-470 (<= 470.256.02-1); however:
Package nvidia-dkms-470 is not configured yet.
nvidia-driver-470 depends on nvidia-dkms-470 (>= 470.256.02); however:
Package nvidia-dkms-470 is not configured yet.

dpkg: error processing package nvidia-driver-470 (ā€“configure):
dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous fai
lure.
Processing triggers for initramfs-tools (0.140ubuntu13.4) ā€¦
update-initramfs: Generating /boot/initrd.img-6.8.0-45-generic
Errors were encountered while processing:
nvidia-dkms-470
nvidia-driver-470
E: Sub-process /usr/bin/dpkg returned an error code (1)

I have no experience using ubuntu packages. Your original post mentioned the nvidia-utils package, which I understand does not contain the driver and your machine appears to be currently using the nouveau driver, so I was suggesting which driver version you might like to install.

Looking at what you have just posted, it may be that you have attempted to install the driver and/or toolkit and perhaps have a broken installation, so may want to remove any nvidia packages and start again.

If you havenā€™t already, and you want the toolkit, read this, in particular section 3. A full toolkit install includes a driver.

thats definitely the right document to read but its also a lot to read. I am also not an obuntu user, but if your still having problems, perhaps this might help:

read the section about preinstallation actions and do the kernel development thing etc.

included in this would be: (you need to specify distro, version and architecture appropriate to your system - what these are is explained in the fileā€¦

sudo dpkg -i cuda-repo-.deb

then:
sudo apt-get install cuda-drivers-470

if it bleats about a conflict with other nvidia drivers remove them as per the document, try again

reboot.

you should be able to run nvidia-smi (forgive me if I am wrong but I believe it is installed with the driver)

If it can see the card and tell you anything about it (info that can be provided varies by card type). Also dont be confused by ā€œcuda versionā€ top right. It does not mean what you have, it means the latest supported version by that driver.

if all good,
sudo apt-get install cuda-toolkit

that will install everything without messing with the driver

AFAIK this method will help survive:
sudo apt update
sudo apt full-upgrade

Sorry, for late reply. I tried multiple times but I am unable install the drivers.

sudo dpkg -i cuda-repo-ubuntu2204-11-8-local_11.8.0-520.61.05-1_amd64.deb
sudo cp /var/cuda-repo-ubuntu2204-11-8-local/cuda-*-keyring.gpg /usr/share/keyrings/
sudo apt-get update
sudo apt install nvidia-driver-470 libnvidia-gl-470 libnvidia-compute-470 libnvidia-decode-470 libnvidia-encode-470 libnvidia-ifr1-470 libnvidia-fbc1-470
sudo dpkg --configure nvidia-dkms-470

Commands I ran, also I am attaching the crash reports can see tell anything.

Thank you for the help
Regards
Emb3
470_dkms_crash.txt (1.1 MB)
470_crash.txt (1.1 MB)

I am only guessing here, but both crash reports relate to a kernel header file.

If you look at the start of the install document I refered to above, the kernel versions mentioned do not match the version you seem to have installed, which could well be the issue.