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

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


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:


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~                      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…


1 Like

Thank you for fast response.

I’ll do it tomorrow.

can you explain how to change liquorix ppa kernel ?

How can I find a compatible version?

and my ubuntu version is 18.04.

Ubuntu Prerequisites:

sudo add-apt-repository ppa:damentz/liquorix && sudo apt-get update

The Liquorix kernel can be installed by way of meta-packages. This will guarantee that the latest kernel is installed on every upgrade.


sudo apt-get install linux-image-liquorix-amd64 linux-headers-liquorix-amd64

Thank you for clarification!

But i run two command and reboot, nvidia-smi doesn’t work.

what i have to do?

dkms status

backport-iwlwifi, 8324, 4.15.0-188-generic, x86_64: installed
backport-iwlwifi, 8324, 4.15.0-189-generic, x86_64: installed
backport-iwlwifi, 8324, 5.4.0-121-generic, x86_64: installed
backport-iwlwifi, 8324, 5.4.0-122-generic, x86_64: installed
librealsense2-dkms, 1.3.18, 4.15.0-188-generic, x86_64: installed
librealsense2-dkms, 1.3.18, 4.15.0-189-generic, x86_64: installed
librealsense2-dkms, 1.3.18, 5.4.0-121-generic, x86_64: installed
librealsense2-dkms, 1.3.18, 5.4.0-122-generic, x86_64: installed
nvidia, 515.48.07, 5.18.0-12.2-liquorix-amd64, x86_64: installed

nvidia-bug-report.log.gz (136.1 KB)

You booted to the wrong kernel. Please select the liquorix kernel in grub menu.

I have the same issue on a completely headless server I setup with some old hardware I had laying around for an emby server(im accessing it via ssh but its on the same local network). Im currently trying to monitor system performance with netdata but it requires nvidia-smi. This was working when I was using the drivers from the debian repos, but after purging that and getting the latest drivers via the website it stopped working.

here is my system info via neofetch:

retrozelda@debian-desktop:~$ neofetch
       _,met$$$$$gg.          retrozelda@debian-desktop 
    ,g$$$$$$$$$$$$$$$P.       -------------------- 
  ,g$$P"     """Y$$.".        OS: Debian GNU/Linux 11 (bullseye) x86_64 
 ,$$P'              `$$$.     Host: Z97M-DS3H 
',$$P       ,ggs.     `$$b:   Kernel: 5.10.0-20-amd64 
`d$$'     ,$P"'   .    $$$    Uptime: 1 hour, 4 mins 
 $$P      d$'     ,    $$P    Packages: 1713 (dpkg) 
 $$:      $$.   -    ,d$$'    Shell: bash 5.1.4 
 $$;      Y$b._   _,d$P'      Terminal: /dev/pts/0 
 Y$$.    `.`"Y$$$$P"'         CPU: Intel i7-4790K (8) @ 4.400GHz 
 `$$b      "-.__              GPU: Intel HD Graphics 
  `Y$$                        GPU: NVIDIA GeForce GTX 970 
   `Y$$.                      Memory: 3373MiB / 31973MiB 

First I did this to purge all existing nvidia stuff:
sudo apt purge nvidia*

then I installed the latest driver via this run file: NVIDIA-Linux-x86_64-525.60.11.run

installation seems to have been successful because I can run sudo dkms status and get this output:
nvidia, 525.60.11, 5.10.0-20-amd64, x86_64: installed

Here is my log:
nvidia-bug-report.log.gz (67.5 KB)

running nvidia-settings gives me this as well:

Unable to init server: Could not connect: Connection refused

ERROR: The control display is undefined; please run `nvidia-settings --help` for usage information.