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

Hello, for some reason I can’t use my GPU anymore. nvidia-smi gives the following error message : “NVIDIA-SMI has failed because it couldn’t communicate with the NVIDIA driver. Make sure that the latest NVIDIA driver is installed and running.”
I have tried various fixes mentioned in others thread (disable secure boot, update gcc, update init-rampf) without success.
Here is my bug report nvidia-bug-report.log.gz (203.2 KB)
I’m using ubuntu 20 and a dell g3.

Thanks in advance for the help

There doesn’t seem to be a kernel driver installed and nouveau is enabled. Please check if you’re boting the correct kernel version. Please also post the output of
dkms status

Thank you for you response.
How can I check if i’m booting the correct kernel version? And what is the correct kernel version?

dkms status outputs nothing image

Please use Software&Updates to install the latest available nvidia driver.
On reboot, hold down shift to open the grub menu, check which kernel versions are available and boot the highest one.
After boot, please create a new nvidia-bug-report.log and post the output of
dkms status

Using command line, I can’t install any nvidia driver version. I get an error “impossible to correct issues, defectuous packages are in “stay in current state” mode”

Did you add the graphics-drivers-ppa at any time? If so, maybe try to remove it

sudo apt-add-repository -r ppa:graphics-drivers/ppa

then remove any nvidia packages

sudo apt remove "*nvidia*"

reboot and check if you can then install the nvidia driver, maybe after adding back the ppa.

sudo ubuntu-drivers autoinstall

I removed graphics-drivers-ppa then did (your command was returning “impossible to find nvidia package”)

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

But then when doing

sudo ubuntu-drivers autoinstall

I get the same error as before

Please check what’s still installed:

sudo dpkg -l | grep nvidia

Ok, I managed to identify and remove the packages that were causing

sudo ubuntu-drivers autoinstall

to fail.

So autoinstall ubuntu-drivers worked, and after a reboot the nvidia-smi command also works

Thank you a lot for your help !

Disabling secure boot from the BIOS solved my problem when installing the drivers