文章目录
- 问题描述
- 测试
- 问题原因
- 解决方法
- 禁止内核更新
- 更改启动项选择
- 修改启动选项
- 更新GRUB
- 重启
- 卸载内核
问题描述
- 外接显示器无反应;
- 输入
nvidia-smi
发现报错:
测试
重启电脑, 在ubuntu 启动过程中选择Advanced options for Ubuntu
的低版本版本运行。
输入:
发现是正常的,同时外接显示器也能正常显示。
问题原因
NVIDIA驱动是在低版本的时候安装,由于系统更新,内核版本升级导致NVIDIA无法应用在高内核版本.
解决方法
查看自己电脑中的内核:
我这里有三个内核,每个内核都有四个小部分。
查看当前版本的内核号:
禁止内核更新
- ubuntu禁止自动更新内核
更改启动项选择
查看内核启动选项:
我们想要的5.4.0-84-generic
是在第三位:
说明:
-
menuentry(主菜单)
: 默认启动内核。 为0, 对应 /etc/default/grub
中 GRUB_DEFAULT=0 的0。 -
submenu(子菜单)
: 包含所有启动内核。 为1 对应 /etc/default/grub
中 GRUB_DEFAULT=“1> 2"
的1。其中menuentry所对应的索引从0开始。
修改启动选项
找到GRUB_DEFAULT=0
:
修改为你所想要还原的版本号:(只用更改最后的即可)
更新GRUB
如果底下有warning,就按他说的改一下,我这里是:
重启
卸载内核
卸载最新的内核:
参考文章:
- Ubuntu下回退内核版本
- NVIDIA-SMI has failed 问题解决(无需重装驱动)
- Ubuntu更改默认启动内核