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])