Ubuntu 18.10 : How can I install a specific NVIDIA drivers version?

After installing Ubuntu 18.10 I wanted to install the new NVIDIA drivers from the GPU Drivers PPA (ppa:graphics-drivers/ppa), but I forgot to check if my graphics card supports nvidia-410.

After the installation and the reboot, I got an error message that the drivers are unsigned and this error message was appearing in a loop even in TTY 2-7.

PKCS#7 signature not signed with a trusted key

I was forced to remove the NVIDIA drivers and to install nvidia-340 as the only option right because the nouveau drivers didn't want to run properly.

When I try to install another drivers version, the installer tells that it will install nvidia-410 packages.

The following additional packages will be installed:
  libnvidia-cfg1-410 libnvidia-common-410 libnvidia-compute-410 libnvidia-compute-410:i386 libnvidia-decode-410 libnvidia-decode-410:i386
  libnvidia-encode-410 libnvidia-encode-410:i386 libnvidia-fbc1-410 libnvidia-fbc1-410:i386 libnvidia-gl-410 libnvidia-gl-410:i386
  libnvidia-ifr1-410 libnvidia-ifr1-410:i386 nvidia-compute-utils-410 nvidia-dkms-410 nvidia-driver-390 nvidia-driver-410
  nvidia-kernel-common-410 nvidia-kernel-source-410 nvidia-utils-410 xserver-xorg-video-nvidia-410

Is it possible to force the installation of a specified drivers version other than nvidia-410?

I tried to install drivers with bash installers from the NVIDIA website, but I'm getting an error:

ERROR: Unable to load the "nvidia-drm" kernel module.

Solution 1:

APT generally looks for and installs the latest stable version of any package. To achieve what you want, you have to remove the GPU Drivers PPA. But first remove all NVIDIA related software and reboot the operating system. Regarding the error message that the drivers aren't signed, boot into BIOS and disable Secure Boot in the UEFI settings. After having done this, perform these steps ...

  • If you have the original NVIDIA drivers installed : sudo nvidia-installer --uninstall
  • If you have the "Ubuntu drivers version" installed : sudo apt purge nvidia*
  • Reboot the operating system : sudo reboot
  • Remove the PPA : sudo add-apt-repository --remove ppa:graphics-drivers/ppa
  • Update the software sources : sudo apt update
  • Search for available drivers : sudo apt search nvidia*
  • Install the drivers of your choice - an example : sudo apt install nvidia-driver-390
  • Reboot the operating system : sudo reboot

What's important : you can only install and use drivers versions that support your GPU, of course.

Solution 2:

I tried the solution from cl-netbox going from driver-460 to driver-435 and it doesn't seem to work anymore as driver-435 requires driver-455 to work now.

Is there another solution?

Edit: To answer the comment: I can't comment so that's why I write here. I can write a duplicate of this problem if that's how it works

*Edit 2: I managed to solve the problem.

  1. Check the channel you're using. For example this one https://packages.ubuntu.com/focal-updates/nvidia-driver-435 redirect to 450 but not this one: https://packages.ubuntu.com/focal/nvidia-driver-435
  2. You have to run sudo apt purge nvidia* BUT ALSO sudo apt purge libnvidia*, and then reboot. Otherwise newer libnvidia* libs will conflict with older drivers.