Can't install nvidia-driver in ubuntu 20.04.2 kernel version 5.8.0-55

Problem

I can’t install nvidia-driver-460 in newly installed ubuntu 20.04.
I ran command
sudo ubuntu-drivers autoinstall
then I got errors bellow.

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 linux-modules-nvidia-460-generic-hwe-20.04 : Depends: linux-modules-nvidia-460-5.8.0-55-generic (= 5.8.0-55.62~20.04.1) but it is not going to be installed
                                              Depends: nvidia-kernel-common-460 (<= 460.80-1) but 460.84-0ubuntu0~0.20.04.1 is to be installed
E: Unable to correct problems, you have held broken packages.

Status

Ubuntu version is

cat /etc/os-release
NAME="Ubuntu"
VERSION="20.04.2 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04.2 LTS"
VERSION_ID="20.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=focal
UBUNTU_CODENAME=focal

kernel version

uname -a 
Linux ~~ 5.8.0-55-generic #62~20.04.1-Ubuntu SMP Wed Jun 2 08:55:04 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

drivers list

ubuntu-drivers list
nvidia-driver-460, (kernel modules provided by linux-modules-nvidia-460-generic-hwe-20.04)
nvidia-driver-418-server, (kernel modules provided by linux-modules-nvidia-418-server-generic-hwe-20.04)
nvidia-driver-460-server, (kernel modules provided by linux-modules-nvidia-460-server-generic-hwe-20.04)
nvidia-driver-465, (kernel modules provided by linux-modules-nvidia-465-generic-hwe-20.04)
nvidia-driver-450-server, (kernel modules provided by linux-modules-nvidia-450-server-generic-hwe-20.04)

devices list

ubuntu-drivers devices
== /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0 ==
modalias : pci:v000010DEd00001E07sv000010DEsd000012A4bc03sc00i00
vendor   : NVIDIA Corporation
model    : TU102 [GeForce RTX 2080 Ti Rev. A]
driver   : nvidia-driver-460-server - distro non-free
driver   : nvidia-driver-460 - third-party non-free recommended
driver   : nvidia-driver-418-server - distro non-free
driver   : nvidia-driver-465 - distro non-free
driver   : nvidia-driver-450-server - distro non-free
driver   : xserver-xorg-video-nouveau - distro free builtin

What I tried

sudo apt update && sudo apt upgrade
sudo apt-get update && sudo apt-get upgrade

Why I can’t install nvidia-drivers via ubuntu-driver autoinstall

1 Like

Same issue here.

Got the exactly the same issue, with the same unmet dependencies.
Initially was running 18.04 but after updating the nvidia driver my PC would freeze on startup.
I have tried so many things since I can’ even remember all of it. I event went as far as completely reinstalling Ubuntu. Tried 18.04, 20.04 and 21.04, happens on all of them. Currently sitting on a fresh 20.04 and tried installing the driver using ubuntu-drivers instead of apt and got the same error as @mushin.hudoushin

I don’t use those commands. I use nvidia-driver command, but you should be able to do it GUI way. You need to enable allow 3rd party software. Than go to Additional Drivers and you should be able to enable the Nvidia Driver for the system to use. If it doesn’t work right away it will usually work with in a week. Keep trying a reboot or two usually kicks it in.

Here is a guide. I hope this helps.

https://www.cyberciti.biz/faq/ubuntu-linux-install-nvidia-driver-latest-proprietary-driver/

Same issue, following https://www.cyberciti.biz/faq/ubuntu-linux-install-nvidia-driver-latest-proprietary-driver/ didn’t seem to help at all.

Anyone managed to solve?

Maybe some blocking packages got auto-installed, please post the output of
dpkg -l |grep nvidia

linux-modules-nvidia-460-generic-hwe-20.04 will pull the signed kernel modules for your installed kernel in, so that they work without problems with secure-boot on. This is currently for the driver version 460.80 since those are in the Ubuntu repositories.

You do however also have a PPA with the nvidia driver 460.84 enabled, and that PPA does not have the signed precompiled modules.

Just disable the PPA to install 460.80 and wait for it to get updated to 460.84 in the Ubuntu repositories, or do not use the signed precompiled modules, and install nvidia-dkms-460 instead to compile the modules.

Hi, Mushin.

I had almost the same problem - at the beginning of ubuntu-driver autoinstall i was getting that error:

WARNING:root:_pkg_get_support nvidia-driver-390: package has invalid Support Legacyheader, cannot determine support level

My solution was to completely remove all nvidia packages with Synaptic Package Manager.
When i selected all to remove them, SPM automatically reselected the current 460.84 driver to install and now it is working like new.

i wasted 2 hours, because the solution of the problem was very simple. Just try to insert this command in terminal:

  • sudo apt install libnvidia-common-470
    470 is my recomendated version. after that again insert:
  • sudo ubuntu-drivers autoinstall
2 Likes

For me below solution work after 2 days efforts :

  1. Install Ubuntu 18.0.4 LTS
  2. Upgrade OS to 20.0.4 LTS.
  3. Goto → Software & Updates → Install latest Driver of Nividia (ex: nividia-driver-470).
  4. sudo nvidia-settings
    It will pop up nividia setting window.
  5. reboot

I also had problems the day before. For Ubuntu, you should install the nvidia drivers thru apt-get:

sudo apt-get install nvidia-drivers-470

However, there might be a problem with manually installed drivers with the shell script (NVIDIA-Linux-x86_64-470.74.run). To remove the manually installed drivers, use:

NVIDIA-Linux-x86_64-470.74.run --uninstall

And finally, UEFI Secure Boot requires additional configuration to work with third-party drivers. While installing the nvidia drivers, you will be asked for a password of your choice. On next reboot, you will be shown a text menu prior to the X stuff. Select the 2nd line (Enroll MOK) and re-enter that password. The system will then boot again. Obviously you have to be at the Console.
This procedure seems to be necessary only once, maybe because the Registration Keys of the driver don’t change