【linux】NVIDIA驱动失效简单解决方案:NVIDIA-SMI has failed because it couldn‘t communicate with the NVIDIA driver

AI学习目录汇总

1、问题描述

之前在ubuntu20.04安装过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.

2、解决方法

2.1 使用DKMS维护驱动

DKMS全称是DynamicKernel ModuleSupport,它可以帮我们维护内核外的驱动程序,在内核版本变动之后可以自动重新生成新的模块。
1)安装DKMS

sudo apt install dkms

2)查看已安装的NVIDIA版本

ls /usr/src | grep nvidia
nvidia-525.116.04

3)重新生成NVIDIA驱动

sudo dkms install -m nvidia -v 525.116.04

补充:如果已安装,正常输出如下:

sudo dkms install -m nvidia -v 525.

你可能感兴趣的:(linux驱动,AI,NVIDIA)