5.13.0-40 更新至 20.04.4 LTS 后系统不稳定

5.13.0-40 更新至 20.04.4 LTS 后系统不稳定

几天前,我安装了 5.13.0-40 更新,在此之前,我对 Ubuntu 20.04.4LTS 系统一直非常满意。安装此更新时,安装过程似乎因删除较早的更新(不记得是哪个)而冻结。我等了一个小时,想看看它是否会完成,但没有任何变化,因此强制关机并重启。系统重新启动并运行 -40 更新,但存在各种不稳定问题。它可能会挂在 Ubuntu 启动屏幕上,并出现旋转的轮子,或者可能会继续运行但会在短时间内冻结。从 grub 菜单启动到 -39 内核工作正常,系统稳定如预期。以同样的方式启动 -40 会出现同样的问题。

基本系统双启动、Ubuntu 和 W10、华硕 ROG STRIX Z690-A GAMING WIFI D4 LGA 1700 ATX 主板、英特尔酷睿 i7-12700K 12 核、Corsair Vengeance RGB PRO 32GB(2x 16GB)DDR4 3600MHz CL18 内存、2x Seagate FireCuda 530 1TB PCI-Express Gen4x4 NVMe M.2 2280-D2 SSD(一个用于 Ubuntu,一个用于 W10)、华硕 GeForce RTX 3080 TUF Gaming OC V2 10GB 显卡 - LHR 版本、LG UltraGear 34 英寸 UWQHD IPS 165Hz G-Sync 兼容 FreeSync 曲面游戏显示器(34GN850-B)、Corsair 键盘。

任何帮助调试的请求都将不胜感激。很乐意运行任何命令并提供输出以协助诊断。

彼得

感谢 Joepie Es 的帮助。

我修改了 grub 以启动 -39 系统。然后按照您的说明操作(略作修改以将“-generic”添加到我要删除的软件包中)。这样,我得到了一个单一功能版本的系统 -39,它可以毫无问题地启动和运行。

现在该怎么办?我是不是应该止损并等待下一次更新,还是应该努力让 -40 正确?是否有一个简单的“启动失败的更新进行第二次尝试”命令?

彼得

以下是我执行的命令:

$ sudo dpkg --list | grep linux-image
rc  linux-image-5.11.0-27-generic              5.11.0-27.29~20.04.1                amd64        Signed kernel image generic
rc  linux-image-5.11.0-43-generic              5.11.0-43.47~20.04.2                amd64        Signed kernel image generic
rc  linux-image-5.11.0-44-generic              5.11.0-44.48~20.04.2                amd64        Signed kernel image generic
rc  linux-image-5.11.0-46-generic              5.11.0-46.51~20.04.1                amd64        Signed kernel image generic
rc  linux-image-5.13.0-25-generic              5.13.0-25.26~20.04.1                amd64        Signed kernel image generic
rc  linux-image-5.13.0-27-generic              5.13.0-27.29~20.04.1                amd64        Signed kernel image generic
rc  linux-image-5.13.0-28-generic              5.13.0-28.31~20.04.1                amd64        Signed kernel image generic
rc  linux-image-5.13.0-30-generic              5.13.0-30.33~20.04.1                amd64        Signed kernel image generic
rc  linux-image-5.13.0-35-generic              5.13.0-35.40~20.04.1                amd64        Signed kernel image generic
rc  linux-image-5.13.0-37-generic              5.13.0-37.42~20.04.1                amd64        Signed kernel image generic
ii  linux-image-5.13.0-39-generic              5.13.0-39.44~20.04.1                amd64        Signed kernel image generic
ii  linux-image-5.13.0-40-generic              5.13.0-40.45~20.04.1                amd64        Signed kernel image generic
ii  linux-image-generic-hwe-20.04              5.13.0.40.45~20.04.25               amd64        Generic Linux kernel image

然后

$ uname -r
5.13.0-39-generic

然后

$ sudo apt purge linux-headers-5.13.0-40-generic  linux-image-5.13.0-40-generic  linux-modules-5.13.0-40-generic
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  amd64-microcode intel-microcode iucode-tool linux-hwe-5.13-headers-5.13.0-40 thermald
Use 'sudo apt autoremove' to remove them.
The following packages will be REMOVED:
  linux-generic-hwe-20.04* linux-headers-5.13.0-40-generic* linux-headers-generic-hwe-20.04* linux-image-5.13.0-40-generic*
  linux-image-generic-hwe-20.04* linux-modules-5.13.0-40-generic* linux-modules-extra-5.13.0-40-generic*
0 to upgrade, 0 to newly install, 7 to remove and 2 not to upgrade.
After this operation, 432 MB disk space will be freed.
Do you want to continue? [Y/n] Y
(Reading database ... 296137 files and directories currently installed.)
Removing linux-generic-hwe-20.04 (5.13.0.40.45~20.04.25) ...
Removing linux-headers-generic-hwe-20.04 (5.13.0.40.45~20.04.25) ...
Removing linux-headers-5.13.0-40-generic (5.13.0-40.45~20.04.1) ...
Removing linux-image-generic-hwe-20.04 (5.13.0.40.45~20.04.25) ...
Removing linux-modules-extra-5.13.0-40-generic (5.13.0-40.45~20.04.1) ...
Removing linux-modules-5.13.0-40-generic (5.13.0-40.45~20.04.1) ...
Removing linux-image-5.13.0-40-generic (5.13.0-40.45~20.04.1) ...
/etc/kernel/prerm.d/dkms:
dkms: removing: nvidia 510.60.02 (5.13.0-40-generic) (x86_64)

-------- Uninstall Beginning --------
Module:  nvidia
Version: 510.60.02
Kernel:  5.13.0-40-generic (x86_64)
-------------------------------------

Status: Before uninstall, this module version was ACTIVE on this kernel.

nvidia.ko:
 - Uninstallation
   - Deleting from: /lib/modules/5.13.0-40-generic/updates/dkms/
 - Original module
   - No original module was found for this module on this kernel.
   - Use the dkms install command to reinstall any previous module version.


nvidia-modeset.ko:
 - Uninstallation
   - Deleting from: /lib/modules/5.13.0-40-generic/updates/dkms/
 - Original module
   - No original module was found for this module on this kernel.
   - Use the dkms install command to reinstall any previous module version.


nvidia-drm.ko:
 - Uninstallation
   - Deleting from: /lib/modules/5.13.0-40-generic/updates/dkms/
 - Original module
   - No original module was found for this module on this kernel.
   - Use the dkms install command to reinstall any previous module version.


nvidia-uvm.ko:
 - Uninstallation
   - Deleting from: /lib/modules/5.13.0-40-generic/updates/dkms/
 - Original module
   - No original module was found for this module on this kernel.
   - Use the dkms install command to reinstall any previous module version.


nvidia-peermem.ko:
 - Uninstallation
   - Deleting from: /lib/modules/5.13.0-40-generic/updates/dkms/
 - Original module
   - No original module was found for this module on this kernel.
   - Use the dkms install command to reinstall any previous module version.

depmod...

DKMS: uninstall completed.
I: /boot/vmlinuz is now a symlink to vmlinuz-5.13.0-39-generic
I: /boot/initrd.img is now a symlink to initrd.img-5.13.0-39-generic
/etc/kernel/postrm.d/initramfs-tools:
update-initramfs: Deleting /boot/initrd.img-5.13.0-40-generic
/etc/kernel/postrm.d/zz-update-grub:
Sourcing file `/etc/default/grub'
Sourcing file `/etc/default/grub.d/init-select.cfg'
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-5.13.0-39-generic
Found initrd image: /boot/initrd.img-5.13.0-39-generic
Found Windows Boot Manager on /dev/nvme0n1p1@/EFI/Microsoft/Boot/bootmgfw.efi
Adding boot menu entry for UEFI Firmware Settings
done
(Reading database ... 279632 files and directories currently installed.)
Purging configuration files for linux-modules-extra-5.13.0-40-generic (5.13.0-40.45~20.04.1) ...
Purging configuration files for linux-modules-5.13.0-40-generic (5.13.0-40.45~20.04.1) ...
dpkg: warning: while removing linux-modules-5.13.0-40-generic, directory '/lib/modules/5.13.0-40-generic' not empty so not removed
Purging configuration files for linux-image-5.13.0-40-generic (5.13.0-40.45~20.04.1) ...
rmdir: failed to remove '/lib/modules/5.13.0-40-generic': Directory not empty

(the /lib/modules/5.13.0-40-generic/misc directory contained 3 virtualbox files that were also contained in the -39-generic/misc directory
so I removed the non empty directory tree from and including /lib/modules/5.13.0-40-generic )

答案1

列出已安装的内核。dpkg --list | grep linux-image在终端中使用。
使用以下命令检查当前运行的内核:uname -r
如果您按照我之前写的步骤操作,那么您现在将运行 5.13.0-39。
使用以下命令卸载 5.13.0-40 内核:
sudo apt purge linux-headers-5.13.0-40 linux-image-5.13.0-40 linux-modules-5.13.0-40

您也可以使用“Ubuntu Mainline Kernel Installer”(

sudo add-apt-repository ppa:cappelikan/ppa
sudo apt update
sudo apt install mainline

)如果您没有安装,可以使用更 GUI 的方式。这真的很容易使用。您可以看到安装了哪些内核以及哪些内核正在运行。

您的系统现在可以正常运行。现在再次尝试升级。使用终端或 Ubuntu Mainline Kernel Installer 由您决定。

希望在“旧”更新期间没有其他问题,也希望这对您有所帮助。

答案2

要以标准方式运行 5.13.0-39 内核,你可以使用自己喜欢的文本编辑器编辑 /etc/default/grub,即

sudo nano /etc/default/grub

找到这条线

GRUB_DEFAULT=0

将其更改为您想要从默认启动的行,要查看您想要的行,请在计算机 POST 后立即按下 Shift 键并按住它,Grub 将显示可供启动的行,第一个是 0,第二个是 1,等等。在 GRUB_DEFAULT= 中插入您想要的值。

如果您更喜欢 GUI 类型的人,请安装 Grub Customizer。

此 PPA 包含最新版本的 Grub Customizer。

sudo add-apt-repository ppa:danielrichter2007/grub-customizer

sudo apt-get update

sudo apt-get install grub-customizer

安装后,运行它并选择“首选项”。在“常规”选项卡中有一个默认选项。选择您想要的那个。完成后保存更改。

相关内容