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

nvidia-smi

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

安装好驱动后,apt-get upgrade执行了一下。结果重启驱动就不行了。

以为驱动坏了,卸载重装也不顶事。最后找来找去这样搞好了。

sudo apt install nvidia-cuda-toolkit

搞环境很琐碎,是以为记。

重装的步骤

1.卸载nvidia驱动
卸载NV驱动和安装一样,首先ctrl+Alt+F2进入命令行状态,然后停止lightdm
sudo service lightdm stop
或者
sudo /etc/init.d/lightdm stop

卸载命令位置/usr/bin/nvidia-uninstall,以下命令即可卸载。
sudo /usr/bin/nvidia-uninstall
————————————————
然后重装:

sudo ./cuda_10.0.130_410.48_linux.run

选 driver 和 nvidia X 这两个。其他不选。

就安装好了。

原文地址:https://www.cnblogs.com/whu-zeng/p/12184459.html