Error: NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver
The issue might due to a confirmed "bug" in 4.4.0-116 patch. I ran into the same issue with nvidia-390. If you still want to use a newer version of Nvidia-driver, I followed the instructions here and managed to solve the problem. In general, use the following steps:
- If you cannot login to the desktop and fall into to the fail-loop, press ctrl + alt + F1 to login into the command line mode.
- Check if the version of gcc is outdated, if so, update it:
gcc --version
- If the gcc version is 5+, uninstall the nvidia driver first:
sudo apt-get remove nvidia-390
- Purge the 4.4.0-116 kernel:
sudo apt-get purge linux-headers-4.4.0-116 linux-headers-4.4.0-116-generic linux-image-4.4.0-116-generic linux-image-extra-4.4.0-116-generic linux-signed-image-4.4.0-116-generic
- Reinstall the kernel:
sudo apt-get install linux-generic linux-signed-generic
- Reinstall the nvidia-390:
sudo apt-get install nvidia-390
- Check if the problem is solved by
modinfo nvidia-390 -k 4.4.0-116-generic | grep vermagic
, make sure retpoline shows up this time - Reboot:
sudo reboot
Hope this works for you and other people who run into the same issue. The post in the forum saved my weekend.
Try
- Download the driver from here
sudo apt-get purge nvidia*
- To remove your current installationsdpkg -i nvidia-diag-driver-local-repo-ubuntu1604_375.66-1_amd64.deb
- installing what you downloaded earliersudo apt-get update
sudo apt-get install cuda-drivers
After this, go on and reboot your computer.
When it's up again, the nvidia-smi
command should run smoothly