Score:1

Proprietary NVIDIA drivers on Ubuntu 20.04 and 21.10 not working

fr flag

I have a GeForce RTX 3060 Ti graphics card, and a clean install of Ubuntu 20.04 LTS. My motherboard is from MSI: PRO Z690-A DDR4(MS-7D25). I have installed the OS from a bootable USB drive, and selected the options Download updates while installing Ubuntu and Install third-party software for graphics and Wi-Fi hardware and additional media formats. After installing, I booted into the OS.

Now I still wanted NVIDIA drivers, so I followed this tutorial.

I have updated the software using the GUI software updater. I looked into the "Additional drivers" part of Software & Updates, and the Nouveau driver was selected. I clicked Using NVIDIA driver metapackage from nvidia-driver-470 (proprietary, tested)option, applied the changes and rebooted. Now my PC will not get past the MSI booting logo. I can get a tty with Ctrl+Alt+F3. From there I executed these commands:

$ ubuntu-drivers devices
== /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0 ==
modalias : pci:v000010DEd00002489sv000010DEsd0000153Cbc03sc00i00
vendor   : NVIDIA Corporation
driver   : nvidia-driver-470 - distro non-free recommended
driver   : nvidia-driver-495 - distro non-free
driver   : nvidia-driver-460-server - distro non-free
driver   : nvidia-driver-460 - distro non-free
driver   : nvidia-driver-470-server - distro non-free
driver   : xserver-xorg-video-nouveau - distro free builtin

Note that I do not get a model field! I don't know why...

$ nvidia-settings -q all
Unable to init server: Could not connect: Connection refused

ERROR: The control display is undefined; please run `nvidia-settings --help` for usage information.
$ nvidia-smi
Wed Dec 22 11:47:05 2021       
+---------------------------------------------+
| NVIDIA-SMI 470.86       Driver Version: 470.86       CUDA Version: 11.4     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|                               |                      |               MIG M. |
|===============================+======================+======================|
|   0  NVIDIA GeForce ...  Off  | 00000000:01:00.0 Off |                  N/A |
|  0%   33C    P8     6W / 200W |     14MiB /  7982MiB |      0%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+
                                                                               
+---------------------------------------------+
| Processes:                                                                  |
|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
|        ID   ID                                                   Usage      |
|=============================================================================|
|    0   N/A  N/A      1017      G   /usr/lib/xorg/Xorg                  8MiB |
|    0   N/A  N/A      1310      G   /usr/bin/gnome-shell                3MiB |
+---------------------------------------------+
$ nvidia-smi --query-gpu=name --format=csv,noheader
NVIDIA GeForce RTX 3060 Ti
$ sudo lshw -c video
  *-display
       description: VGA compatible controller
       product: GA104 [GeForce RTX 3060 Ti Lite Hash Rate]
       vendor: NVIDIA Corporation
       physical id: 0
       bus info: pci@0000:01:00.0
       version: a1
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress vga_controller bus_master cap_list rom
       configuration: driver=nvidia latency=0
       resources: irq:160 memory:42000000-42ffffff memory:60000000-6fffffff memory:70000000-71ffffff ioport:5000(size=128) memory:43000000-4307ffff
  *-display UNCLAIMED
       description: VGA compatible controller
       product: AlderLake-S GT1
       vendor: Intel Corporation
       physical id: 2
       bus info: pci@0000:00:02.0
       version: 0c
       width: 64 bits
       clock: 33MHz
       capabilities: pciexpress msi pm vga_controller bus_master cap_list
       configuration: latency=0
       resources: memory:41000000-41ffffff memory:50000000-5fffffff ioport:6000(size=64) memory:c0000-dffff memory:45000000-4bffffff
$ systemctl status gdm
● gdm.service - GNOME Display Manager
     Loaded: loaded (/lib/systemd/system/gdm.service; static; vendor preset: enabled)
     Active: active (running) since Wed 2021-12-22 11:17:05 CET; 31min ago
    Process: 892 ExecStartPre=/usr/share/gdm/generate-config (code=exited, status=0/SUCCESS)
    Process: 913 ExecStartPre=/usr/lib/gdm3/gdm-wait-for-drm (code=exited, status=0/SUCCESS)
   Main PID: 916 (gdm3)
      Tasks: 3 (limit: 76852)
     Memory: 5.6M
     CGroup: /system.slice/gdm.service
             └─916 /usr/sbin/gdm3

dec 22 11:17:05 spectroag systemd[1]: Starting GNOME Display Manager...
dec 22 11:17:05 spectroag systemd[1]: Started GNOME Display Manager.
dec 22 11:17:07 spectroag gdm-autologin][961]: gkr-pam: no password is available for user
dec 22 11:17:07 spectroag gdm-autologin][961]: pam_unix(gdm-autologin:session): session opened for user developer by (uid=0)
dec 22 11:17:07 spectroag gdm-autologin][961]: gkr-pam: gnome-keyring-daemon started properly

(I installed Ubuntu with auto login)

$ sudo lspci -vnn | grep -i VGA -A 25
00:02.0 VGA compatible controller [0300]: Intel Corporation Device [8086:4680] (rev 0c) (prog-if 00 [VGA controller])
    DeviceName: Onboard - Video
    Subsystem: Micro-Star International Co., Ltd. [MSI] Device [1462:7d25]
    Flags: bus master, fast devsel, latency 0, IRQ 255
    Memory at 41000000 (64-bit, non-prefetchable) [size=16M]
    Memory at 50000000 (64-bit, prefetchable) [size=256M]
    I/O ports at 6000 [size=64]
    Expansion ROM at 000c0000 [virtual] [disabled] [size=128K]
    Capabilities: [40] Vendor Specific Information: Len=0c <?>
    Capabilities: [70] Express Root Complex Integrated Endpoint, MSI 00
    Capabilities: [ac] MSI: Enable- Count=1/1 Maskable+ 64bit-
    Capabilities: [d0] Power Management version 2
    Capabilities: [100] Process Address Space ID (PASID)
    Capabilities: [200] Address Translation Service (ATS)
    Capabilities: [300] Page Request Interface (PRI)
    Capabilities: [320] Single Root I/O Virtualization (SR-IOV)

00:06.0 PCI bridge [0604]: Intel Corporation Device [8086:464d] (rev 02) (prog-if 00 [Normal decode])
    Flags: bus master, fast devsel, latency 0, IRQ 123
    Bus: primary=00, secondary=02, subordinate=02, sec-latency=0
    I/O behind bridge: [disabled]
    Memory behind bridge: 44800000-448fffff [size=1M]
    Prefetchable memory behind bridge: [disabled]
    Capabilities: [40] Express Root Port (Slot+), MSI 00
    Capabilities: [80] MSI: Enable+ Count=1/1 Maskable- 64bit-
    Capabilities: [90] Subsystem: Device [0000:0000]
--
01:00.0 VGA compatible controller [0300]: NVIDIA Corporation Device [10de:2489] (rev a1) (prog-if 00 [VGA controller])
    Subsystem: NVIDIA Corporation Device [10de:153c]
    Flags: bus master, fast devsel, latency 0, IRQ 160
    Memory at 42000000 (32-bit, non-prefetchable) [size=16M]
    Memory at 60000000 (64-bit, prefetchable) [size=256M]
    Memory at 70000000 (64-bit, prefetchable) [size=32M]
    I/O ports at 5000 [size=128]
    Expansion ROM at 43000000 [virtual] [disabled] [size=512K]
    Capabilities: [60] Power Management version 3
    Capabilities: [68] MSI: Enable+ Count=1/1 Maskable- 64bit+
    Capabilities: [78] Express Legacy Endpoint, MSI 00
    Capabilities: [b4] Vendor Specific Information: Len=14 <?>
    Capabilities: [100] Virtual Channel
    Capabilities: [250] Latency Tolerance Reporting
    Capabilities: [258] L1 PM Substates
    Capabilities: [128] Power Budgeting <?>
    Capabilities: [420] Advanced Error Reporting
    Capabilities: [600] Vendor Specific Information: ID=0001 Rev=1 Len=024 <?>
    Capabilities: [900] Secondary PCI Express
    Capabilities: [bb0] Resizable BAR <?>
    Capabilities: [c1c] Physical Layer 16.0 GT/s <?>
    Capabilities: [d00] Lane Margining at the Receiver <?>
    Capabilities: [e00] Data Link Feature <?>
    Kernel driver in use: nvidia
    Kernel modules: nvidiafb, nouveau, nvidia_drm, nvidia
$ prime-select query
nvidia
$ ps aux | grep X
root        1017  0.0  0.0 25358216 56396 tty2   Sl+  11:17   0:01 /usr/lib/xorg/Xorg vt2 -displayfd 3 -auth /run/user/1000/gdm/Xauthority -background none -noreset -keeptty -verbose 3
root        2905  0.0  0.0 25346156 51956 tty1   Sl+  11:50   0:00 /usr/lib/xorg/Xorg vt1 -displayfd 3 -auth /run/user/125/gdm/Xauthority -background none -noreset -keeptty -verbose 3
develop+    3488  0.0  0.0  17676   664 tty3     R+   12:12   0:00 grep --color=auto X

(I'm in tty3 executing this)

$ cat /etc/default/grub | grep CMDLINE
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX=""

Any idea what might be happening? It looks a lot like it should work, but I can't get any visuals.

In my BIOS I can see that Secure Boot is disabled, also I'm using UEFI if that matters.

Please let me know if I should provide more information!

EDIT: I got the screen to show a log during boot, so I can see what it's doing before being stuck. This is the last part of what's on the screen:

[  OK  ] Started Session 1 of user developer.
         Starting RealtimeKit Scheduling Policy Service...
         Starting NVIDIA Persistence Daemon...
[  OK  ] Started NVIDIA Persistence Daemon.
[  OK  ] Started Snap Daemon.
         Starting Wait until snapd is fully seeded...
[  OK  ] Finished Wait until snapd is fully seeded.
[  OK  ] Started RealtimeKit Scheduling Policy Service.
         Starting Daemon for power management...
[  OK  ] Started Daemon for power management.

Most processes I would expect are also there, but I cannot copy it all for you. It looks like it holds after finishing, and I have no idea why still...

UPDATE : I have installed Ubuntu 21.10, and downloaded the driver with sudo apt install nvidia-driver-470. When rebooting, I have the same situation as described in the post. This time, I also cannot go into the VT3 by pressing ctrl alt f3, since it keeps going back to what I think is VT1 (the login screen), showing a black screen with a cursor (again like in the post).

UPDATE : I have tried to update my BIOS version, but the v11 version bricked my whole system and I had to manually downgrade the BIOS back to v10. I have tried with the 495.44 driver, and also with the 470.94 driver that's not in the standard repos. I have tried with kernel 5.15. Nothing worked unfortunately. With kernel 5.15 and driver 495.44 the latest boot log is "Starting Show Plymouth Boot Screen..." and I don't have a log saying it finished.

UPDATE : Here is some more information: /var/log/boot.log, which looks quite normal to me. /var/lib/gdm3/.local/share/xorg/Xorg.0.log, which shows an interesting error. For both logs I am using kernel 5.13.0-22-generic and NVIDIA Driver 470.86 on a fresh install.

ChanganAuto avatar
us flag
Disable Secure Boot, that should be enough.
Maarten Meijer avatar
fr flag
@ChanganAuto I hoped that would be enough as well, but unfortunately it was already disabled... "MSI Fast Boot" and "Fast Boot" are also disabled.
ChanganAuto avatar
us flag
Fast Boot is NOT Secure Boot.
Maarten Meijer avatar
fr flag
I know, Fast Boot and Secure Boot are both disabled. I just mentioned it because I thought it might also concern you
za flag
Respectfully, if I may ask; why you wish to run Ubuntu 20.04, and not 21.04 or 21.10? Resolving your issue could require hours of attempts and days waiting for replies. Practicality? When I installed 21.10, the time needed was about 25 minutes, and the result is a stable working desktop. You may wish to consider a fresh upgrade. To speed things, I would choose a minimal install, defaulting to Nouveau, then manually installing the Nvidia driver, to ensure no problems at that point, then installing everything else I might need. I find 'synaptic' to be very useful for this.
Maarten Meijer avatar
fr flag
I chose to install Ubuntu 20.04 because it is the newest version with LTS. I figured that would be the best since I would like to run a stable OS with good support. I did not think the newer versions would have better support for my drivers, but I will give it a try now. Considering "manually installing the Nvidia driver", do you mean not using the GUI? I have used the GUI because it looks like it is the most reliable way to install the drivers, but I can try to install the driver with `sudo apt install nvidia-470`. I will try this!
Maarten Meijer avatar
fr flag
Update: I have installed Ubuntu 21.10, and downloaded the driver with `sudo apt install nvidia-driver-470`. When rebooting, I have the same situation as described in the post. This time, I also cannot go into the VT3 by pressing ctrl alt f3, since it keeps going back to what I think is VT1 (the login screen), showing a black screen with a cursor (again like in the post).
heynnema avatar
ru flag
Do you know how to add `nomodeset` in the GRUB menu at boot time?
cc flag
Search this site for 3060ti and see that you are not alone. First ensure your motherboard firmware is up-to-date, try the latest available Nvidia driver (495.44 from the standard repos), and if necessary, the latest kernel you can get starting with the 21.10 release.
Maarten Meijer avatar
fr flag
@heynnema yes, I know how to. I have tried and it makes me use the nouveau drivers, but it doesn't help me with using NVIDIA drivers.
Maarten Meijer avatar
fr flag
@ubfan1 I have tried to update my BIOS version (https://www.msi.com/Motherboard/PRO-Z690-A-DDR4/support#down-bios), but the v11 version bricked my whole system and I had to manually downgrade the BIOS back to v10. I have tried with the 495.44 driver, and also with the 470.94 driver that's not in the standard repos. I have tried with kernel 5.15. Nothing worked unfortunately. With kernel 5.15 and driver 495.44 the latest boot log is "Starting Show Plymouth Boot Screen..." and I don't have a log saying it finished
heynnema avatar
ru flag
@ubfan1 Nvidia 495 is a beta driver. Should be using 470.
heynnema avatar
ru flag
@MaartenMeijer Boy, you're certainly having a tough time. Nvidia 495 is a beta driver. I'd stick with 470. Regarding the BIOS, go to BIOS v10 and select "reset to factory" or "reset to default", and then retry the v11 BIOS update. Are you using Wayland or X11? Check the Settings/About panel to check, if you can. Otherwise you can check it on your login screen. Nvidia and Wayland don't really play nice yet.
Maarten Meijer avatar
fr flag
@heynnema Indeed I already switched back to 470. I don't even get a login screen so I'm not sure if I was using Wayland, but now I disabled Wayland in `/etc/gdm3/custom.conf`, but the problem still remains... My BIOS v10 was already with default settings, so I don't think that would help.
heynnema avatar
ru flag
@MaartenMeijer If you boot with nomodeset, does that get you to the login screen? If so, check if you're set to use wayland or x11/xorg.
Maarten Meijer avatar
fr flag
No, it makes no change, I still have to use tty3
heynnema avatar
ru flag
@MaartenMeijer Does it boot to a Ubuntu Live USB? If so, try installing Nvidia 470 there (using Software & Updates) and see if it works. Do you have a different Nvidia card that you can try? I'd contact MSI about your BIOS v11 problem, and Nvidia about your current problem.
heynnema avatar
ru flag
@MaartenMeijer Log in via tty3 and purge your Nvidia driver. Then you should at least be able to boot, and use nouveau, until you can get some support from Nvidia. (The issue might be your BIOS).
heynnema avatar
ru flag
Start comments to me with @heynnema or I'll probably miss them.
cc flag
Do you have both power cables plugged into the card? See https://www.nvidia.com/en-us/geforce/forums/game-ready-drivers/13/416912/rtx-3060-ti-driver-issues/ for one solution to the black screen.
Score:1
fr flag

I got it to work! I am stupid for only doing this so late, but my monitor was connected to the HDMI port of the motherboard, and not of the GPU. Just moving the cable to the GPU port fixed it, because the drivers were working correctly... I hope no-one else has to go through this!

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.