欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

nvidia-smi报错 NVIDIA-SMI has failed because it couldn’t communicate with the NVIDIA driver. Make sure

程序员文章站 2022-03-23 16:46:02
...

服务器用了几个月之后突然报错 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驱动(非cuda)

1.首先在官网下载电脑对应驱动NVIDIA-Linux-x86_64-410.78.run,拷贝到ubuntu某个目录后先改权限

chomd 777 NVIDIA-Linux-x86_64-410.78.run

2.删除原有驱动(可选)

$ sudo apt-get remove --purge nvidia*

3.临时关闭显示服务

sudo service lightdm stop

有可能会报错,可以忽略

4.运行安装程序

sudo ./NVIDIA-Linux-x86_64-410.78.run

 安装过程中一些选项(有一些问题记不清楚了,只给出需要选择的选项:):
The distribution-provided pre-install script failed! Are you sure you want to continue? 选择 yes 继续。
Would you like to register the kernel module souces with DKMS? This will allow DKMS to automatically build a new module, if you install a different kernel later?  选择 No 继续。
问题没记住,选项是:install without signing
问题大概是:Nvidia's 32-bit compatibility libraries? 选择 No 继续。
Would you like to run the nvidia-xconfigutility to automatically update your x configuration so that the NVIDIA x driver will be used when you restart x? Any pre-existing x confile will be backed up.  选择 Yes  继续

5. 挂载Nvidia驱动:

$ modprobe nvidia

6.安装后再重启显示

sudo service lightdm start

7.检查驱动是否安装成功:

$ nvidia-smi

 nvidia-smi报错 NVIDIA-SMI has failed because it couldn’t communicate with the NVIDIA driver. Make sure

参考:

https://blog.csdn.net/Stories_Untold/article/details/78521925

https://blog.csdn.net/hiudawn/article/details/81357029