首页 > 其他分享> > NVIDIA-SMI has failed because it couldn‘t communicate with the NVIDIA driver. Make sure that the lat
NVIDIA-SMI has failed because it couldn‘t communicate with the NVIDIA driver. Make sure that the lat
作者:互联网
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
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
出错原因:Nvidia 驱动出了问题
问题处理
**(1)首先查看显卡驱动的型号 **
第一种:官网查询
如果知道自己的显卡信息,输入自己的显卡信息,然后查询对应的型号
例如 我这里查看我的型号支持为 470.94 需要记下来,到时候后面安装版本会用到
第二种:直接服务器上查询
ubuntu-drivers devices
可以看到,这边有多个,推荐的是安装495,其实这几种都可以
(2)看显卡驱动版本支持的cuda 官网查看
如果不想去官网,这里附上一个截屏下来的参考图
需要服务器安装符合要求的 CUDA 版本,CUDA安装与切换
(3)卸载与安装驱动
卸载驱动:
sudo apt-get autoremove --purge nvidia-*
# 卸载完之后在重新安装驱动,可以重新安装一下linux
sudo apt-get install --reinstall linux-headers-$(uname -r)
安装驱动:
# 安装驱动源
sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt-get update
# 第一种:#直接安装推荐的驱动
sudo ubuntu-drivers autoinstall
# 第一种:#直接指定版本的驱动
sudo apt-get install nvidia-384
然后重启 再执行nvidia-smi 命令即可
文章传送门:
标签:because,couldn,nvidia,NVIDIA,driver,显卡,驱动,sudo 来源: https://blog.csdn.net/weixin_42272869/article/details/122364241