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
1 Like

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

Hello Team,

I am also facing similar issue on my machine ( Dell G3 3590) I have upgraded machine from 18.04 to 20.04 recently. It was working perfect on 18.04 but on 20.04 seems to be its installed but can’t enable as active one. So could you please help me ?

Here is my output of some requested commands:

sunil@sunil-G3-3590:~$ uname -a
Linux sunil-G3-3590 5.4.0-66-generic #74-Ubuntu SMP Wed Jan 27 22:54:38 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

sunil@sunil-G3-3590:~$ sudo dkms status
nvidia, 460.39, 5.4.0-65-generic, x86_64: installed
nvidia, 460.39, 5.4.0-66-generic, x86_64: installed

sunil@sunil-G3-3590:~$ glxinfo | grep “OpenGL”

OpenGL vendor string: Intel
OpenGL renderer string: Mesa Intel(R) UHD Graphics 630 (CFL GT2)
OpenGL core profile version string: 4.6 (Core Profile) Mesa 20.2.6
OpenGL core profile shading language version string: 4.60
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 4.6 (Compatibility Profile) Mesa 20.2.6
OpenGL shading language version string: 4.60
OpenGL context flags: (none)
OpenGL profile mask: compatibility profile
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 3.2 Mesa 20.2.6
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20
OpenGL ES profile extensions:

sunil@sunil-G3-3590:~$ nvidia-settings

ERROR: NVIDIA driver is not loaded

ERROR: Unable to load info from any available system

(nvidia-settings:6839): GLib-GObject-CRITICAL **: 20:41:28.217: g_object_unref: assertion ‘G_IS_OBJECT (object)’ failed
** Message: 20:41:28.219: PRIME: Requires offloading
** Message: 20:41:28.219: PRIME: is it supported? yes
** Message: 20:41:28.240: PRIME: Usage: /usr/bin/prime-select nvidia|intel|on-demand|query
** Message: 20:41:28.240: PRIME: on-demand mode: “1”
** Message: 20:41:28.240: PRIME: is “on-demand” mode supported? yes