1

I'm having problems uxing nvidia-driver-460 with my 2x GeForce 1080Ti cards with Ubuntu 20.04.2 (black screen after boot). It was fine with 440... How can I force install / downgrade to 440 and pin the version?

I tried to purge nvidia* and ran the below but 460 ended up being installed instead.

sudo apt install nvidia-driver-440

Now I've purged all Nvidia drivers and fell back onto default X.org drivers...

Thanks.

WillZ
  • 279

3 Answers3

3

Hold Super (Win-key) and hit A, then type "additional" and click the single icon that appears.

You will be presented with a list of "Additional drivers", see if you can find something suitable in that list
(FWIW I have several nvidia drivers to choose from in my Ubuntu 20.04.2).

Hannu
  • 5,374
  • 1
  • 23
  • 40
  • 1
    well, in additional drivers, I no longer see 440 or 450 available, can only choose from 460 / 465 / 390... And I know 460 / 465 both cause black screen for me.. – WillZ Jun 05 '21 at 22:33
  • Well, 460 has and still does work for me - did you uninstall the *.run -driver? That is a must as far as I know. – Hannu Jun 05 '21 at 23:02
  • which card are you using? 1080ti? – WillZ Jun 06 '21 at 00:05
  • Hmm... that might make it different, yes: RTX 2060 – Hannu Jun 06 '21 at 05:52
0

another way if this nvidia-driver-440 is needed;

Note focal/restricted has to be enabled.

create under folder /etc/apt/preferences.d/ file restricted.pref with following content

Package: *
Pin: release  a=focal,c=restricted
Pin-Priority: 1001 

this way the packages are drawn from restricted.

Install your nvidia driver and mark the packages as hold with

sudo apt-mark hold <package name>

Remove created file.

Note:

  1. I do not know if this is the right nvidia-driver for your card!
  2. you have to remember before an release upgrade to revert the status hold of your marked packages!
  3. if you need 32-bit packages too for (steam/wine ore something else) you have to install the nvidia packages (32-bit) as long apt pinning is active. Or your package management will whine about brocken packages.
  4. you should have some experience with apt to make it this way!

with apt pinning

apt-get -s install nvidia-driver-440
NOTE: This is only a simulation!
      apt-get needs root privileges for real execution.
      Keep also in mind that locking is deactivated,
      so don't depend on the relevance to the real current situation!
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  libnvidia-cfg1-440 libnvidia-common-440 libnvidia-compute-440 libnvidia-decode-440 libnvidia-encode-440 libnvidia-extra-440 libnvidia-fbc1-440
  libnvidia-gl-440 libnvidia-ifr1-440 nvidia-compute-utils-440 nvidia-dkms-440 nvidia-kernel-common-440 nvidia-kernel-source-440 nvidia-utils-440
  xserver-xorg-video-nvidia-440
Recommended packages:
  nvidia-settings nvidia-prime libnvidia-compute-440:i386 libnvidia-decode-440:i386 libnvidia-encode-440:i386 libnvidia-ifr1-440:i386
  libnvidia-fbc1-440:i386 libnvidia-gl-440:i386
The following packages will be REMOVED:
  linux-headers-5.4.0-72* linux-headers-5.4.0-72-generic* linux-image-5.4.0-72-generic* linux-modules-5.4.0-72-generic*
  linux-modules-extra-5.4.0-72-generic*
The following NEW packages will be installed:
  libnvidia-cfg1-440 libnvidia-common-440 libnvidia-compute-440 libnvidia-decode-440 libnvidia-encode-440 libnvidia-extra-440 libnvidia-fbc1-440
  libnvidia-gl-440 libnvidia-ifr1-440 nvidia-compute-utils-440 nvidia-dkms-440 nvidia-driver-440 nvidia-kernel-common-440 nvidia-kernel-source-440
  nvidia-utils-440 xserver-xorg-video-nvidia-440
0 upgraded, 16 newly installed, 5 to remove and 0 not upgraded.
Purg linux-headers-5.4.0-72-generic [5.4.0-72.80]
Purg linux-headers-5.4.0-72 [5.4.0-72.80]
Purg linux-modules-extra-5.4.0-72-generic [5.4.0-72.80]
Purg linux-image-5.4.0-72-generic [5.4.0-72.80]
Purg linux-modules-5.4.0-72-generic [5.4.0-72.80]
Inst libnvidia-cfg1-440 (440.82+really.440.64-0ubuntu6 Ubuntu:20.04/focal [amd64])
Inst libnvidia-common-440 (440.82+really.440.64-0ubuntu6 Ubuntu:20.04/focal [all])
Inst libnvidia-compute-440 (440.82+really.440.64-0ubuntu6 Ubuntu:20.04/focal [amd64])
Inst libnvidia-decode-440 (440.82+really.440.64-0ubuntu6 Ubuntu:20.04/focal [amd64])
Inst libnvidia-encode-440 (440.82+really.440.64-0ubuntu6 Ubuntu:20.04/focal [amd64])
Inst libnvidia-extra-440 (440.82+really.440.64-0ubuntu6 Ubuntu:20.04/focal [amd64])
Inst libnvidia-fbc1-440 (440.82+really.440.64-0ubuntu6 Ubuntu:20.04/focal [amd64])
Inst libnvidia-gl-440 (440.82+really.440.64-0ubuntu6 Ubuntu:20.04/focal [amd64])
Inst libnvidia-ifr1-440 (440.82+really.440.64-0ubuntu6 Ubuntu:20.04/focal [amd64])
Inst nvidia-compute-utils-440 (440.82+really.440.64-0ubuntu6 Ubuntu:20.04/focal [amd64])
Inst nvidia-kernel-source-440 (440.82+really.440.64-0ubuntu6 Ubuntu:20.04/focal [amd64])
Inst nvidia-kernel-common-440 (440.82+really.440.64-0ubuntu6 Ubuntu:20.04/focal [amd64])
Inst nvidia-dkms-440 (440.82+really.440.64-0ubuntu6 Ubuntu:20.04/focal [amd64])
Inst nvidia-utils-440 (440.82+really.440.64-0ubuntu6 Ubuntu:20.04/focal [amd64])
Inst xserver-xorg-video-nvidia-440 (440.82+really.440.64-0ubuntu6 Ubuntu:20.04/focal [amd64])
Inst nvidia-driver-440 (440.82+really.440.64-0ubuntu6 Ubuntu:20.04/focal [amd64])
Conf libnvidia-cfg1-440 (440.82+really.440.64-0ubuntu6 Ubuntu:20.04/focal [amd64])
Conf libnvidia-common-440 (440.82+really.440.64-0ubuntu6 Ubuntu:20.04/focal [all])
Conf libnvidia-compute-440 (440.82+really.440.64-0ubuntu6 Ubuntu:20.04/focal [amd64])
Conf libnvidia-decode-440 (440.82+really.440.64-0ubuntu6 Ubuntu:20.04/focal [amd64])
Conf libnvidia-encode-440 (440.82+really.440.64-0ubuntu6 Ubuntu:20.04/focal [amd64])
Conf libnvidia-extra-440 (440.82+really.440.64-0ubuntu6 Ubuntu:20.04/focal [amd64])
Conf libnvidia-fbc1-440 (440.82+really.440.64-0ubuntu6 Ubuntu:20.04/focal [amd64])
Conf libnvidia-gl-440 (440.82+really.440.64-0ubuntu6 Ubuntu:20.04/focal [amd64])
Conf libnvidia-ifr1-440 (440.82+really.440.64-0ubuntu6 Ubuntu:20.04/focal [amd64])
Conf nvidia-compute-utils-440 (440.82+really.440.64-0ubuntu6 Ubuntu:20.04/focal [amd64])
Conf nvidia-kernel-source-440 (440.82+really.440.64-0ubuntu6 Ubuntu:20.04/focal [amd64])
Conf nvidia-kernel-common-440 (440.82+really.440.64-0ubuntu6 Ubuntu:20.04/focal [amd64])
Conf nvidia-dkms-440 (440.82+really.440.64-0ubuntu6 Ubuntu:20.04/focal [amd64])
Conf nvidia-utils-440 (440.82+really.440.64-0ubuntu6 Ubuntu:20.04/focal [amd64])
Conf xserver-xorg-video-nvidia-440 (440.82+really.440.64-0ubuntu6 Ubuntu:20.04/focal [amd64])
Conf nvidia-driver-440 (440.82+really.440.64-0ubuntu6 Ubuntu:20.04/focal [amd64])
nobody
  • 5,437
  • The problem I have is that sudo apt install nvidi-driver-440 doesn't work - it installs 460 instead... – WillZ Jun 07 '21 at 07:44
-2

I figured this out myself. Posting just in case if someone needs to do this... or for my future self...

  1. I went here and downloaded the latest 450 driver.

  2. Since I was using default X.org / Nouveau driver, Nvidia wouldn't let me install the driver by running the script, following here.

  3. I then went to Additional Drivers and selected nvidia-drivers-390 in the menu. This worked, and I was able to boot with Nvidia driver without black screen.

  4. I updated grub following this to boot into terminal mode.

  5. I then ran the installation script for 450 to finally install the driver... After that, revert back to booting into X-windows directly. Reboot.

Finally back to where I was a few days ago, without black screens... As of this moment, I'll definitely wait for some version after 460.84 to try Ubuntu's default nvidia drivers...

WillZ
  • 279
  • Using the nvidia-provided "run"-script will work as long as neither X nor the kernel is updated. You will need to "-uninstall" and then "-install" the driver for each such update. – Hannu Jun 05 '21 at 22:34
  • Thanks. Which step are you referring to here? since the nvidia install script complained about Nouveau being used, and I didn't know how to disable nouveau quickly, I took a shortcut with installing nvidia 390 version.. – WillZ Jun 05 '21 at 22:40
  • 1
    You're using the *.run file from nvidia, that is what I refer to. – Hannu Jun 05 '21 at 22:59
  • thanks for the tip! – WillZ Jun 06 '21 at 00:05