Nvidia-smi has failed because it could’t communicate with the NVIDIA driver

NVIDIA-SMI error:
NVIDIA-SMI has failed because it couldn’t communicate with the NVIDIA driver. Make sure that the latest NVIDIA driver is installed and running
This is a common problem that often occurs in Ubuntu systems, mainly because the kernel has been upgraded and the new kernel does not match the old graphics driver
Solution 1:
Just execute two commands:
Sudo apt-get install DKMS

Set all the “1” in the double quotation marks to “0”, and save after modification.
To turn off auto-update using a graphical interface, go to System Settings –>; Software Update (Software & Updates)

Read More: