Score:0

Nvidia drivers problem (not booting, nvidia-smi not detecting etc.)

ar flag

I am at my wits end with Nvidia drivers. I believe that I tried to set them up a long time ago, failed, and settled with open-source drivers. However, I still had to deal with screen tearing so after a year or so, I have decided to switch to propreitary drivers once and for all.

First, I made a file called /etc/modprobe.d/blacklist-nouveau.conf which consists of these two lines to block the kernel from loading the nouveau modules:

blacklist nouveau
options nouveau modeset=0

I then ran sudo update-initramfs -u to update the changes.

Then, I typed the following commands to remove all existing nvidia drivers on my device:

sudo apt-get remove --purge '^nvidia-.*'
sudo apt-get remove --purge '^libnvidia-.*'
sudo apt-get remove --purge '^cuda-.*'

Then, I added the nvidia drivers ppa using sudo add-apt-repository ppa:graphics-drivers. After doing that, I installed the most recent drivers using sudo apt install nvidia-driver-530.

However, now I am running into problems. Once I reboot and boot into Ubuntu (I am running a dual boot with Windows), I am faced with a black screen. I have to go into the tty1 terminal to interact with my system from this point. If I run sudo apt-get remove --purge '^nvidia-.*' and reboot, my system loads up fine. Note that in the tty1 here (before I purge the nvidia drivers), nvidia-smi gives me output on my nvidia-drivers.

However, if I turn secure boot on (it was off previously), then I can load fine into the graphic log-in screen and use linux normally. However, now, if I run nvidia-smi, it will inform me that:

NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver. Make sure that the latest NVIDIA driver is installed and running.

So, I either can use my system but (apparently) without proper nvidia driver support or the drivers can be supported and read but the system won't load. I don't know how to fix this, any help?

Debug information (with secure boot on, nvidia-smi can't read nvidia drivers)

I am running ubuntu 20.04 LTS version.

The output of is apt list --installed | grep nvidia is

libnvidia-cfg1-530/focal-updates,focal-security,focal,now 530.41.03-0ubuntu0.20.04.2 amd64 [installed,automatic]
libnvidia-common-530/focal-updates,focal-updates,focal-security,focal-security,focal,focal,now 530.41.03-0ubuntu0.20.04.2 all [installed,automatic]
libnvidia-compute-530/focal-updates,focal-security,focal,now 530.41.03-0ubuntu0.20.04.2 amd64 [installed,automatic]
libnvidia-compute-530/focal-updates,focal-security,focal,now 530.41.03-0ubuntu0.20.04.2 i386 [installed,automatic]
libnvidia-decode-530/focal-updates,focal-security,focal,now 530.41.03-0ubuntu0.20.04.2 amd64 [installed,automatic]
libnvidia-decode-530/focal-updates,focal-security,focal,now 530.41.03-0ubuntu0.20.04.2 i386 [installed,automatic]
libnvidia-encode-530/focal-updates,focal-security,focal,now 530.41.03-0ubuntu0.20.04.2 amd64 [installed,automatic]
libnvidia-encode-530/focal-updates,focal-security,focal,now 530.41.03-0ubuntu0.20.04.2 i386 [installed,automatic]
libnvidia-extra-530/focal-updates,focal-security,focal,now 530.41.03-0ubuntu0.20.04.2 amd64 [installed,automatic]
libnvidia-fbc1-530/focal-updates,focal-security,focal,now 530.41.03-0ubuntu0.20.04.2 amd64 [installed,automatic]
libnvidia-fbc1-530/focal-updates,focal-security,focal,now 530.41.03-0ubuntu0.20.04.2 i386 [installed,automatic]
libnvidia-gl-530/focal-updates,focal-security,focal,now 530.41.03-0ubuntu0.20.04.2 amd64 [installed,automatic]
libnvidia-gl-530/focal-updates,focal-security,focal,now 530.41.03-0ubuntu0.20.04.2 i386 [installed,automatic]
nvidia-compute-utils-530/focal-updates,focal-security,focal,now 530.41.03-0ubuntu0.20.04.2 amd64 [installed,automatic]
nvidia-dkms-530/focal-updates,focal-security,focal,now 530.41.03-0ubuntu0.20.04.2 amd64 [installed,automatic]
nvidia-driver-530/focal-updates,focal-security,focal,now 530.41.03-0ubuntu0.20.04.2 amd64 [installed]
nvidia-kernel-common-530/focal-updates,focal-security,focal,now 530.41.03-0ubuntu0.20.04.2 amd64 [installed,automatic]
nvidia-kernel-source-530/focal-updates,focal-security,focal,now 530.41.03-0ubuntu0.20.04.2 amd64 [installed,automatic]
nvidia-prime/focal-updates,focal-updates,now 0.8.16~0.20.04.2 all [installed,automatic]
nvidia-settings/focal-updates,focal,now 470.57.01-0ubuntu0.20.04.3 amd64 [installed,automatic]
nvidia-utils-530/focal-updates,focal-security,focal,now 530.41.03-0ubuntu0.20.04.2 amd64 [installed,automatic]
xserver-xorg-video-nvidia-530/focal-updates,focal-security,focal,now

The output of lspci -v | grep "VGA controller" is:

00:02.0 VGA compatible controller: Intel Corporation UHD Graphics (rev 05) (prog-if 00 [VGA controller])
01:00.0 VGA compatible controller: NVIDIA Corporation TU106 [GeForce RTX 2060] (rev a1) (prog-if 00 [VGA controller])
Nmath avatar
ng flag
If it were *me* I would just reinstall the system. If you check "download updates" and "proprietary drivers" then the Ubuntu installer will configure the appropriate proprietary Nvidia driver and you won't need to do anything else. Unfortunately, after you've installed nouveau, you can have problems with proprietary. If you've ever downloaded and installed the driver's from Nvidia's website, they aren't compatible and are extremely difficult to clean up the mess they cause. The PPA has similar problems to the other two. Having done all? That's a big mess and will be hard to fix.
Nmath avatar
ng flag
If you reinstall, and there are still problems, you can run `sudo ubuntu-drivers autoinstall`. If you still have problems, ask a new question with the details of the new attempts.
I sit in a Tesla and translated this thread with Ai:

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.