本文主要是介绍centos: NVIDIA-SMI has failed because it couldn‘t communicate with the NVIDIA driver.,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
ubuntu: NVIDIA-SMI has failed because it couldn‘t communicate with the NVIDIA driver.
centos: NVIDIA-SMI has failed because it couldn‘t communicate with the NVIDIA driver.
重启服务器之后就出现连接不上NVIDIA驱动的情况。
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 驱动的版本号
ls -l /usr/src/
输出
输入
sudo dkms install -m nvidia -v 440.95.01
输出报错:
有可能是 nouveau模块没有禁用
- 打开如下文件:vim /usr/lib/modprobe.d/dist-blacklist.conf
新增以下两行内容:
blacklist nouveau
options nouveau modeset=0
- 备份当前的镜像:mv /boot/initramfs- ( u n a m e − r ) . i m g / b o o t / i n i t r a m f s − (uname -r).img /boot/initramfs- (uname−r).img/boot/initramfs−(uname -r).img.bak
- 建立新的镜像:dracut /boot/initramfs-$(uname -r).img $(uname -r)、
- 然后重启 sudo reboot
再输入nvidia-smi
问题解决
这篇关于centos: NVIDIA-SMI has failed because it couldn‘t communicate with the NVIDIA driver.的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!