NVIDIA无法连接:NVIDIA-SMI has failed because it couldn‘t communicate with the NVIDIA driver
前言
在使用Ubuntu服务器的时候,有时会碰到GPU无法使用的情况,即当输入指令‘nvidia-smi’显示NVIDIA-SMI has failed because it couldn’t communicate with the NVIDIA driver
情况有二:
第一种:显卡驱动型号自动改变
有时候显卡驱动自动切换到开源的显卡驱动“Nouveau”上,导致NVIDIA显卡驱动失效,把驱动调回第一个驱动即可解决问题。(这里没想通这里的驱动为啥会自动切换,也许跟内核自动更新有关)
第二种:内核更新导致原显卡驱动不可用
这里许多博主说用安装DKMS的方式解决,但是对我无效。遂采用降低内核版本并禁用内核更新的方式解决。
修改系统引导文件:sudo gedit /etc/default/grub
更改内容如下:
GRUB_TIMEOUT=10
GRUB_CMDLINE_LINUX_DEFAULT=“text”
# grub_timeout_style=hidden(以#号注释该语句)
更新使生效:sudo update-grub
重启后系统引导多了一个选择界面,分别是:
*ubuntu
*ubuntu的高级选项
选择最老的内核版本并启动,此时输入nvidia-smi正常
但是为了以绝后患,接下来关闭自动更新和自动升级内核:
在terminal输入 uname -a查看当前内核版本,博主的是5.11.0-40-generic
输入指令
sudo apt-mark hold linux-headers-5.11.0-40-generic
sudo apt-mark hold linux-image-5.11.0-40-generic
sudo apt-mark hold linux-modules-5.11.0-40-generic
sudo apt-mark hold linux-modules-extra-5.11.0-40-generic
sudo apt-mark hold linux-modules-nvidia-470-5.11.0-40-generic
查看启动项grep menuentry /boot/grub/grub.cfg
并编辑启动项
sudo gedit /etc/default/grub
设置默认启动项,更改GRUB_DEFAULT=0为 GRUB_DEFAULT="Advanced options for Ubuntu>Ubuntu,Linux 5.11.0-40-generic"
(如果是中文则为**“Ubuntu 高级选项>Ubuntu,Linux 5.11.0-40-generic”**)
NVIDIA无法连接:NVIDIA-SMI has failed because it couldn‘t communicate with the NVIDIA driver相关推荐
- Centos Nvidia连接失败 NVIDIA-SMI has failed because it couldn‘t communicate with the NVIDIA driver 解决方案
今天nvidia的机器重启了,再次使用显卡时发现使用不了, 输入nvidia-smi出现一个报错 下面来解决这个问题 1.首先要有yum,安装一下这个库 sudo apt-get install dk ...
- 无法连接NVIDIA驱动:NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver
NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver 重启服务器之后就出现连接不上NVIDIA驱动的 ...
- 无法连接NVIDIA驱动:NVIDIA-SMI has failed because it couldn’t communicate with the NVIDIA driver
1. 问题 今天正要用GPU跑代码的时候,发现cuda不可用,然后在终端执行nvidia-smi发现无法连接NVIDIA驱动,问题如下: NVIDIA-SMI has failed because i ...
- Centos无法连接NVIDIA驱动:NVIDIA-SMI has failed because it couldn’t communicate with the NVIDIA driver
Centos无法连接NVIDIA驱动:NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver 重启服务 ...
- nvidia-smi报错:NVIDIA-SMI has failed because it couldn‘t communicate with the NVIDIA driver 解决方案
nvidia-smi报错:NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver. Make sure ...
- nvidia-smi命令显示NVIDIA-SMI has failed because it couldn‘t communicate with the NVIDIA driver
1.在aicloud虚拟机查看硬件信息,显示共0B,剩0B. 从这里可以看出,能找到硬件设备,但无法正确读取硬件相关信息,即证明驱动问题导致的. 2.nvidia-smi NVIDIA-SMI has ...
- ubuntu22.04:NVIDIA-SMI has failed because it couldn‘t communicate with the NVIDIA driver 解决方案
ubuntu22.04:NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver 解决方案 文章目录 u ...
- WIN10 NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver解决方案
WIN10 NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver 若在win10下输入NVIDIA- ...
- 解决Ubuntu Nvidia-smi的错误“NVIDIA-SMI has failed because it couldn‘t communicate with the NVIDIA driver”
事件描述 头天晚上刚训练完,为了快速关闭我的ubuntu,按了电源键直接关机(之前一直都是使用shutdown命令关机,这样默认会在1分钟之后才关机),次日开机发现nvidia-smi命令失效了,错误 ...
最新文章
- 17张图揭密支付宝系统架构
- HTML中通过CSS方式隐藏元素
- [搬运工系列]-JMeter(二十四)搭建持续集成接口测试平台(Jenkins+Ant+Jmeter)
- MySQL日期数据类型、时间类型使用总结
- 测试Maven版本插件自动递增版本号
- 利刃 MVVMLight 2:Model、View、ViewModel结构以及全局视图模型注入器的说明
- 【转】新方法打造自己的N合一 XP系统盘
- js实现手机摇一摇功能
- 2022年下半年信息系统项目管理师下午真题及答案解析
- 【图像分割】基于模糊核聚类算法KFCM实现医学图像分割matlab代码
- sublime text 3143 授权码
- 区块链技术再出新玩法——解决跨境支付问题
- 如何在GNS3中使用VPCS虚拟PC
- 旋转体体积和平行截面的面积求体积
- 反相放大器和同相放大器的过程和区别及选择方式概述
- 信息技术与计算机应用基础教学的有效融合,《信息技术(教学助手)与学科教学有效融合》课题方案...
- 大叔最新课程~EF核心技术剖析
- 最新q绑在线查询源码,低配版社工库恶搞版,纯html源码可直接使用
- 如何由电磁理论引出牛顿力学下的引力场方程
- 联想小新14.20190717