admin管理员组文章数量:1568357
目录
1.报错:NVIDIA内核驱动版本和系统驱动不一致(内核版本自动更新了,导致新版本内核和原来显卡驱动不匹配)
2.解决:使用两条命令即可,不同重新安装显卡驱动。
1.报错:
can't initialize NVML
NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver.
Make sure that the latest NVIDIA driver is installed and running.
1)用台式机GPU跑代码,突然发现报错:can't initialize NVML。在网上搜索一番,显示出现该问题的原因是:NVIDIA内核驱动版本和系统驱动不一致(内核版本自动更新了,导致新版本内核和原来显卡驱动不匹配)。给出的解决方法基本都是:重新安装驱动。。。
2)在命令行使用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.
2.解决:
1)查看已安装驱动的版本信息:
ls /usr/src | grep nvidia
发现显卡驱动版本为:nvidia-525.105.17。(显卡驱动是存在的,只是内核驱动版本自动更新了,导致和安装的显卡驱动版本不一致,所以报错。。。)
2)查看已安装内核:
dpkg --get-selections |grep linux-image
查看正在使用的内核:
uname -a
显示为6.2.0-32-generic。因为之前安装nvidia驱动时记下了当时的内核版本为5.19.0-41-generic。所以可以确定确实是因为内核版本更新导致不匹配的问题。
3)依次输入以下两条命令即可:
sudo apt-get install dkms
sudo dkms install -m nvidia -v 525.105.17
#这里的525.105.17是自己的显卡驱动版本
4)再次输入nvidia-smi,可以看到显卡显示成功啦!!!问题解决!!!
参考博客:NVIDIA驱动失效简单解决方案:NVIDIA-SMI has failed because it couldn‘t communicate with the NVIDIA driver._nvidia-smi has failed because it couldn't communic-CSDN博客
解决NVIDIA-SMI has failed because it couldn‘t communicate with the NVIDIA driver_nvidia-smi has failed because it couldn't communic_可即的博客-CSDN博客
本文标签: 显卡驱动NVIDIAUbuntuSMIdriver
版权声明:本文标题:Ubuntu:解决显卡驱动问题NVIDIA-SMI has failed because it couldn‘t communicate with the NVIDIA driver. 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:https://www.elefans.com/xitong/1726393156a1068840.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论