Ubuntu由于内核升级导致NVIDIA驱动无法连接到问题

问题描述:

        服务器突然断连,重启后连接执行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.”

原因:

        Ubuntu内核自动更新,导致内核与NVIDIA驱动版本不匹配。

解决方法:

1.降低内核版本,据说在开机界面选择高级配置,可以退回之前内核版本。(本人测试时无法连接服务器与显示屏,方法测试失败)

2.更新驱动

参考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 - Linux - NVIDIA Developer Forums方法描述:

①卸载旧驱动

sudo apt-get remove --purge '^nvidia-.*'

sudo apt-get remove --purge '^libnvidia-.*'

sudo apt-get remove --purge '^cuda-.*'

②安装sudo apt-get install linux-headers-$(uname -r)

③根据自己的版本下载新驱动。CUDA Toolkit 12.2 Update 2 Downloads | NVIDIA Developer

防止再次发生:

关闭自动更新

vi /etc/apt/apt.conf.d/10periodic
vi /etc/apt/apt.conf.d/20auto-apgrades

里面的参数值都改成0。

参考

1.NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver. Make sure that the latest NVIDIA driver is installed and running - #5 by XuehaiPan - Linux - NVIDIA Developer Forums

2.Ubuntu由于内核升级导致NVIDIA驱动无法连接到问题 - 知乎

  • 1
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 2
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值