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

@de_vulpe
I see the compilation logs for the 495 driver. But is not loading.
Please show the output of:
dkms status
Please also look for files that blacklist the nvidia driver:
grep -r -e "blacklist.*nvidia$" /etc/modprobe.d /lib/modprobe.d

Also, did you install cuda?

Hi Mart,

thank you for your quick response.

Yes, I have installed cuda for about one year, and now it will be regularly updated. May it was also the reason…

With dkm status i get nvidia, 465.19.01, 5.11.0-46-generic, x86_64: installed. And earlier with nvidia 465 it was worked (the nvidia-driver-465 is also chosen in Additional Drivers).
I have no files in blacklist.

Please also show the output of (post it as quote please):
dpkg -l | grep nvidia

A lot of stuff…

ii  libnvidia-common-465                       465.19.01-0ubuntu1                    all          Shared files used by the NVIDIA libraries
ii  libnvidia-common-470                       470.82.01-0ubuntu1                    all          Shared files used by the NVIDIA libraries
ii  libnvidia-common-510                       510.39.01-0ubuntu1                    all          Shared files used by the NVIDIA libraries
rc  libnvidia-compute-460:amd64                460.73.01-0ubuntu1                    amd64        NVIDIA libcompute package
ii  libnvidia-compute-465:amd64                465.19.01-0ubuntu1                    amd64        NVIDIA libcompute package
ii  libnvidia-decode-465:amd64                 465.19.01-0ubuntu1                    amd64        NVIDIA Video Decoding runtime libraries
ii  libnvidia-encode-465:amd64                 465.19.01-0ubuntu1                    amd64        NVENC Video Encoding runtime library
ii  libnvidia-extra-465:amd64                  465.19.01-0ubuntu1                    amd64        Extra libraries for the NVIDIA driver
ii  libnvidia-fbc1-465:amd64                   465.19.01-0ubuntu1                    amd64        NVIDIA OpenGL-based Framebuffer Capture runtime library
ii  libnvidia-gl-465:amd64                     465.19.01-0ubuntu1                    amd64        NVIDIA OpenGL/GLX/EGL/GLES GLVND libraries and Vulkan ICD
ii  libnvidia-ifr1-465:amd64                   465.19.01-0ubuntu1                    amd64        NVIDIA OpenGL-based Inband Frame Readback runtime library
rc  nvidia-compute-utils-460                   460.73.01-0ubuntu1                    amd64        NVIDIA compute utilities
ii  nvidia-compute-utils-465                   465.19.01-0ubuntu1                    amd64        NVIDIA compute utilities
rc  nvidia-dkms-460                            460.73.01-0ubuntu1                    amd64        NVIDIA DKMS package
ii  nvidia-dkms-465                            465.19.01-0ubuntu1                    amd64        NVIDIA DKMS package
ii  nvidia-driver-465                          465.19.01-0ubuntu1                    amd64        NVIDIA driver metapackage
rc  nvidia-kernel-common-460                   460.73.01-0ubuntu1                    amd64        Shared files used with the kernel module
ii  nvidia-kernel-common-465                   465.19.01-0ubuntu1                    amd64        Shared files used with the kernel module
ii  nvidia-kernel-source-465                   465.19.01-0ubuntu1                    amd64        NVIDIA kernel source package
ii  nvidia-machine-learning-repo-ubuntu1804    1.0.0-1                               amd64        nvidia-machine-learning repository configuration files
ii  nvidia-modprobe                            510.39.01-0ubuntu1                    amd64        Load the NVIDIA kernel driver and create device files
ii  nvidia-prime                               0.8.16~0.20.04.1                      all          Tools to enable NVIDIA's Prime
ii  nvidia-settings                            510.39.01-0ubuntu1                    amd64        Tool for configuring the NVIDIA graphics driver
ii  nvidia-utils-465                           465.19.01-0ubuntu1                    amd64        NVIDIA driver support binaries
ii  screen-resolution-extra                    0.18build1                            all          Extension for the nvidia-settings control panel
ii  xserver-xorg-video-nvidia-465              465.19.01-0ubuntu1                    amd64        NVIDIA binary Xorg driver

ok, here’s the deal:
1: you got multiple versions of libnvidia-common-xxx installed. They break each other.
2: You boot with kernel 5.13, but the driver is only installed for kernel 5.11.

So my suggestion would be to clean up and install driver version 470. Is that ok for you?

P.S.
(sorry, I misread the bug report earlier, the eyes mixed up 465 with 495.)
BTW: nvidia-detector only shows you the newest possible driver version, 510 in this case which is still only a beta driver.

Thank you. I will do it tomorrow. I hope it helps.

first get rid of the residual configs of driver 460:
sudo apt purge libnvidia-compute-460 nvidia-compute-utils-460 nvidia-dkms-460 nvidia-kernel-common-460
or more neat:
sudo apt purge "(^nvidia.*460|^libnvidia.*460)"

then clean up the libnvidia-common stuff:
sudo apt purge libnvidia-common-470 libnvidia-common-510

then install the 470 driver:
sudo apt install nvidia-driver-470

check dkms status that it says installed for the 470 driver on the 5.13 kernel.

Then just to make sure:
sudo prime select on-demand && sudo prime select nvidia
sudo update-initramfs -u

Reboot.

If dpkg -l|grep nvidia still shows some ā€œrcā€ = residual config stuff, purge it:
sudo apt purge "(^nvidia.*465|^libnvidia.*465)"

I suspect the kernel 5.13 is for ubuntu 21.10 so the driver doesn’t compile. Did you install that manually?

No, just normal update from Ubuntu.

Mart, thank you for such detailed instructions! I will try.

As generix reminded me of a thing I easily tend to forget… check if your kernel headers are installed before any install attempts: apt show linux-headers-$(uname -r), or dpkg -l | grep linux-headers-$(uname -r)

They seem to be installed:
ii linux-headers-5.13.0-27-generic 5.13.0-27.29~20.04.1 amd64 Linux kernel headers for version 5.13.0 on 64 bit x86 SMP

ok, you should be good to go…

1 Like

Well, I have purged old NVIDIA drivers (460 and 465).
And after reboot dkms status tells me, I have a 510 driver: nvidia, 510.39.01, 5.13.0-27-generic, x86_64: installed. The monitor was also detected and in the settings I see, that NVIDIA Graphic card was chosen.
So, I don’t think I need to install nvidia-driver-470 anymore…

Thank you very mach for your help!

Hi, folks. I am encountering the same issue by running nvidia-smi and the system complains:

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

By running dkms status, it says:

nvidia, 510.73.05, 5.13.0-44-generic, x86_64: installed
nvidia, 510.73.05, 5.13.0-48-generic, x86_64: installed

By running uname -r, it shows:

5.13.0-44-generic

By running dpkg -l | grep nvidia, it shows

ii  libnvidia-cfg1-510:amd64                     510.73.05-0ubuntu0.20.04.1            amd64        NVIDIA binary OpenGL/GLX configuration library
hi  libnvidia-common-510                         510.73.05-0ubuntu0.20.04.1            all          Shared files used by the NVIDIA libraries
ii  libnvidia-compute-510:amd64                  510.73.05-0ubuntu0.20.04.1            amd64        NVIDIA libcompute package
ii  libnvidia-compute-510:i386                   510.73.05-0ubuntu0.20.04.1            i386         NVIDIA libcompute package
ii  libnvidia-decode-510:amd64                   510.73.05-0ubuntu0.20.04.1            amd64        NVIDIA Video Decoding runtime libraries
ii  libnvidia-decode-510:i386                    510.73.05-0ubuntu0.20.04.1            i386         NVIDIA Video Decoding runtime libraries
ii  libnvidia-encode-510:amd64                   510.73.05-0ubuntu0.20.04.1            amd64        NVENC Video Encoding runtime library
ii  libnvidia-encode-510:i386                    510.73.05-0ubuntu0.20.04.1            i386         NVENC Video Encoding runtime library
ii  libnvidia-extra-510:amd64                    510.73.05-0ubuntu0.20.04.1            amd64        Extra libraries for the NVIDIA driver
ii  libnvidia-fbc1-510:amd64                     510.73.05-0ubuntu0.20.04.1            amd64        NVIDIA OpenGL-based Framebuffer Capture runtime library
ii  libnvidia-gl-510:amd64                       510.73.05-0ubuntu0.20.04.1            amd64        NVIDIA OpenGL/GLX/EGL/GLES GLVND libraries and Vulkan ICD
ii  libnvidia-gl-510:i386                        510.73.05-0ubuntu0.20.04.1            i386         NVIDIA OpenGL/GLX/EGL/GLES GLVND libraries and Vulkan ICD
ii  nvidia-compute-utils-510                     510.73.05-0ubuntu0.20.04.1            amd64        NVIDIA compute utilities
ii  nvidia-dkms-510                              510.73.05-0ubuntu0.20.04.1            amd64        NVIDIA DKMS package
ii  nvidia-driver-510                            510.73.05-0ubuntu0.20.04.1            amd64        NVIDIA driver metapackage
ii  nvidia-kernel-common-510                     510.73.05-0ubuntu0.20.04.1            amd64        Shared files used with the kernel module
ii  nvidia-kernel-source-510                     510.73.05-0ubuntu0.20.04.1            amd64        NVIDIA kernel source package
ii  nvidia-prime                                 0.8.16~0.20.04.2                      all          Tools to enable NVIDIA's Prime
ii  nvidia-settings                              470.57.01-0ubuntu0.20.04.3            amd64        Tool for configuring the NVIDIA graphics driver
ii  nvidia-utils-510                             510.73.05-0ubuntu0.20.04.1            amd64        NVIDIA driver support binaries
ii  screen-resolution-extra                      0.18build1                            all          Extension for the nvidia-settings control panel
ii  xserver-xorg-video-nvidia-510                510.73.05-0ubuntu0.20.04.1            amd64        NVIDIA binary Xorg driver

Hello, I have a similar problem with Nvidia driver.

When I run nvidia-smi I get:

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

Running nvidia-settings:
it work, however, no any graphic card exist

Currently installed driver, installed via sudo apt install nvidia-driver-515:
dkms status
nvidia, 515.48.07: added

my notbook is msi…

how can i solve?
please help me…
nvidia-bug-report.log.gz (115.1 KB)

@user157866 You installed an incompatible kernel from mainline, please use the liquorix ppa to get a compatible one.

Please explain in more detail…

https://forums.developer.nvidia.com/t/nvidia-driver-failed-and-showing-nvidia-settings-shows-this-critical-error-message/214950/4?u=generix

1 Like

Thank you for fast response.

I’ll do it tomorrow.