1

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 manually installing as other answers had suggested, and nothing is working. I have purged and re-installed the latest as well as other versions of the drivers multiple times now.

  • 1
    Ensure your login has not selected a "Wayland" option (click on the little gear next to the login button). – ubfan1 Nov 09 '19 at 03:38
  • What is the output of the command grep -i "nvidia" /var/log/Xorg.0.log ? – Michal Przybylowicz Nov 09 '19 at 09:37
  • The output is [ 39.740] (II) config/udev: Adding input device HDA NVidia HDMI/DP,pcm=3 (/dev/input/event14) – Aayog Koirala Nov 10 '19 at 04:05
  • @MichalPrzybylowicz Why did you ask that? – KansaiRobot Oct 20 '20 at 05:51
  • @KansaiRobot In this file You can often find clues on what is going on. Look for lines that start with EE (error) or WW (warning). – Michal Przybylowicz Oct 20 '20 at 17:49
  • Do you know that the driver is actually loaded? Does running lsmod | grep nvidia give you a loaded nvidia driver module? If not, then the kernel module (and thus the driver itself) isn't loaded. Does cat /proc/driver/nvidia/version give you a version? – bdav Dec 01 '20 at 15:31

2 Answers2

1

Check if Secure Boot is disabled in BIOS.

Pilot6
  • 90,100
  • 91
  • 213
  • 324
0

This happened when Ubuntu update somehow messed up Nvidia driver during kernel upgrade to 6.1.0-1015-oem (Ubuntu 22.04). I had to execute these steps to restore nvidia driver.

  • sudo apt-get remove --purge '^nvidia-.*'
  • sudo apt-get remove --purge '^libnvidia-.*'
  • sudo apt-get remove --purge '^cuda-.*'
  • sudo apt-get install linux-headers-$(uname -r)
  • Check latest recommended driver using ubuntu-drivers devices (It was nvidia-driver-535 for me)
  • Install latest recommended driver sudo apt install nvidia-driver-535
  • Reboot and run nvidia-smi to ensure that everything is working
  • (Optional) Switch to Nvidia Performance mode and reboot

Reference: https://forums.developer.nvidia.com/t/nvidia-smi-has-failed-because-it-couldnt-communicate-with-the-nvidia-driver-make-sure-that-the-latest-nvidia-driver-is-installed-and-running/197141/6?u=abdulraufmujahid