I am having issues loading the NVIDIA driver on Ubuntu 21.04. The result of nvidia-smi
is
NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver.
Make sure that the latest NVIDIA driver is installed and running.
And the result of nvidia-settings
:
ERROR: NVIDIA driver is not loaded
ERROR: Unable to load info from any available system
I have tried reinstalling the latest NVIDIA driver available, 470.57.02 (my current kernel is 5.14.2-051402-generic
). When installing with sudo apt-get update
and sudo apt-get install nvidia-driver-470
I get this error:
INFO:Enable nvidia
DEBUG:Parsing /usr/share/ubuntu-drivers-common/quirks/put_your_quirks_here
DEBUG:Parsing /usr/share/ubuntu-drivers-common/quirks/dell_latitude
DEBUG:Parsing /usr/share/ubuntu-drivers-common/quirks/lenovo_thinkpad
Loading new nvidia-470.57.02 DKMS files...
Building for 5.14.2-051402-generic 5.14.3-051403-generic
Building for architecture x86_64
Building initial module for 5.14.2-051402-generic
ERROR (dkms apport): kernel package linux-headers-5.14.2-051402-generic is not supported
Error! Bad return status for module build on kernel: 5.14.2-051402-generic (x86_64)
Consult /var/lib/dkms/nvidia/470.57.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.57.02-0ubuntu1); however:
Package nvidia-dkms-470 is not configured yet.
dpkg: error processing package nvidia-driver-470 (--configure):
dependency problems - leaving unconfigured
Setting up libnvidia-encode-470:amd64 (470.57.02-0ubuntu1) ...
No apport report written because the error message indicates its a followup error from a previous failure.
Processing triggers for desktop-file-utils (0.26-1ubuntu1) ...
Processing triggers for gnome-menus (3.36.0-1ubuntu1) ...
Processing triggers for libc-bin (2.33-0ubuntu5) ...
Processing triggers for man-db (2.9.4-2) ...
Processing triggers for mailcap (3.68ubuntu1) ...
Processing triggers for initramfs-tools (0.139ubuntu3) ...
update-initramfs: Generating /boot/initrd.img-5.14.3-051403-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 tried purging all NVIDIA packages with sudo apt-get purge nvidia-*
, sudo apt-get autoremove
and repeating the process, but no success. I also tried installing it on a previous kernel (5.11), installing a previous driver (nvidia-driver-460
), but nothing worked.
The card is correctly detected. This is the output of lspci | grep NVIDIA
:
01:00.0 VGA compatible controller: NVIDIA Corporation GA106M [GeForce RTX 3060 Mobile / Max-Q] (rev a1)
01:00.1 Audio device: NVIDIA Corporation Device 228e (rev a1)
I also have tried the solutions from Unable to install nvidia drivers - unable to locate package, and NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver. Make sure that the latest NVIDIA driver is installed and running, still no success.
Any advice? Thanks!