天天看点

DKMS helloworld

Dynamic Kernel Module Support(DKMS) is a program/frameworkthat enables generating Linux kernel moduleswhose sources generally reside outside the kernelsource tree. The concept is to have DKMS modules automatically rebuilt when a new kernel is installed.

解决ubuntu 20.04下重启后nVIDIA 3090*2 显卡丢失

NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver. 
Make sure that the latest NVIDIA driver is installed and running.           

复制

DKMS全称是Dynamic Kernel Module Support,

它可以帮我们维护内核外的驱动程序,在内核版本变动之后可以自动重新生成新的模块。

sudo apt update
sudo apt install dkms
ls /usr/src | grep nvidia
sudo dkms install -m nvidia -v 470.57.02
nvidia-smi
# sudo reboot           

复制

禁止内核更新

# uname -a
# sudo apt-mark hold linux-image-5.11.0-34-generic
sudo apt-mark hold linux-image-*-generic           

复制

参考链接

https://blog.chengc.name/2020/03/15/Ubuntu%E9%87%8D%E5%90%AF%E5%90%8E%E6%89%BE%E4%B8%8D%E5%88%B0NVIDIA-GPU%E9%A9%B1%E5%8A%A8/