ubuntu突然报错:NVIDIA-SMI has failed because it couldn‘t communicate with the NVIDIA driver

I haven't used the computer for a while, but the graphics card suddenly disappeared when I turned it on today. After I reinstalled it again, the graphics card still did not come out. I checked it on the Internet and first used nvcc -V to check if the driver was still there, and found mine is still there.
It may be that the kernel has been updated and does not match the original version. According to the Internet, two lines of commands can solve this problem, and the pro-test is effective.

sudo apt install dkms
sudo dkms install -m nvidia -v 450.66

Wherein 450.66 is the driver version installed on your own computer, you can find it with the following command:

ls / usr / src | grep nvidia

Guess you like

Origin blog.csdn.net/qq_43265072/article/details/109305366