buntu18.04 NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver. Make sure t

Ubuntu18.04 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查看GPU,突然报错:
NVIDIA-SMI has failed because it couldn’t communicate with the NVIDIA driver. Make sure that the latest NVIDIA driver is installed and running.
可是之前跑程序没有问题。检查以后发现是generic发生了更改。检查的命令:

sudo dpkg --get-selections |grep linux-image

可以看到新出现三个install
在这里插入图片描述

解决方法:重新装driver

最好装与之前相同版本的driver。
之前的版本我放在了Downloads/文件夹下。
首先禁用图形界面:

sudo systemctl set-default multi-user.target

在这里插入图片描述
然后转到Downloads/下

cd Downloads/

我的driver版本是430.14

sudo bash NVIDIA-Linux-x86_64-430.14.run -no-opengl-files -no-x-check -no-nouveau-check

然后后面的选项一般都选no。
安装完后再输入nvidia-smi就发现可以连接了。
最后重启图像界面

sudo systemctl set-default graphical.target

搞定!

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值