NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver. Make sure that the latest NVIDIA driver is installed and running.
开了系统的自动更新,damn!!!关机重启了一下以新版本启动,以前的显卡驱动就不识别了,所以出现上述错误。
网上列的方法找到无法连接的驱动版本号没有用,把系统回退到以前的内核版本解决了这个问题。
重启,在开机界面按“shift”进入GRUB界面,点击“Advanced options for Ubuntu”选择上一个版本启动,果然nvidia-smi可以使用了。
uname -r #查看当前内核版本号
锁定当前内核版本:
sudo apt-mark hold linux-image-6.8.0-52-generic linux-headers-6.8.0-52-generic
删掉更新的新版本:
sudo apt-get remove --purge linux-image-6.8.0-54-generic
更新GRUB配置:
sudo update-grub
检查是否锁定:
apt-mark showhold
在系统中关闭自动更新