Elementary OS does not detect NVidia drivers

On a fresh elementary-OS setup, I installed the nvidia-driver-460 and its dependent packages. But no luck. neofetch fails to recognise the driver, and so does nvidia-smi. Here’s the error I see when I run the latter command:

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

nvidia-bug-report.log.gz (69.1 KB)
Screenshot from 2021-06-17 03-30-08

When I launch nvidia-settings I see this blank window. Uploading the diagnostic logs.

I fixed this by creating this file:

cat > /etc/modprobe.d/nvidiafb-blacklist.conf
blacklist nvidiafb
blacklist nouveau


And then moved /etc/X11/xorg.conf to a temporary location:

mv /etc/X11/xorg.conf /tmp

Finally, updated the kernel and NVIDIA driver:

sudo update-initramfs -u

And reboot.

Hi @saurabh.lambe10 , with the cat command i get a permission denied even using sudo…can you help me?

Also, there is not a xorg.conf file in etc/x11 and nvidia-persistenced gives “nvidia-persistenced failed to initialize. Check syslog for more details.”

Hi @piermarco_lunghi, is your secure boot disabled? If not, disable it and reboot. This worked for me.