最近,在对 Ubuntu 18.04.6(内核 5.4.0-125-generic)进行例行自动更新后,默认启动陷入了启动循环,从未进入登录提示。从视觉上看,在启动时会显示默认的 Ubuntu 启动画面(点前进),但随后启动画面突然闪烁并再次显示(点前进),然后再次闪烁……如此无限循环,从未提示登录。所以我需要按下电源按钮来中断启动循环。
splash
通过在 GRUB2 启动菜单中手动更改为,系统可以正常启动nosplash
。也可以启动到恢复模式。
检查日志显示,在启动循环中,Xorg 似乎无法启动,然后每次都尝试重新启动,但都失败了。下面是摘录自/var/lib/gdm3/.local/share/xorg/Xorg.0.log
,显示了第一个 (EE) 错误:
[ 14.945] (--) Log file renamed from "/var/lib/gdm3/.local/share/xorg/Xorg.pid-1816.log" to "/var/lib/gdm3/.local/share/xorg/Xorg.0.log"
[ 14.945]
X.Org X Server 1.20.8
X Protocol Version 11, Revision 0
[ 14.945] Build Operating System: Linux 5.4.0-121-generic x86_64 Ubuntu
[ 14.945] Current Operating System: Linux box 5.4.0-125-generic #141~18.04.1-Ubuntu SMP Thu Aug 11 20:15:56 UTC 2022 x86_64
[ 14.945] Kernel command line: BOOT_IMAGE=/boot/vmlinuz-5.4.0-125-generic root=UUID=18b08207-3e7f-4106-a123-58417720e98d ro quiet splash vt.handoff=1
[ 14.945] Build Date: 06 July 2022 02:40:21PM
[ 14.945] xorg-server-hwe-18.04 2:1.20.8-2ubuntu2.2~18.04.7 (For technical support please see http://www.ubuntu.com/support)
[ 14.945] Current version of pixman: 0.34.0
[ 14.945] Before reporting problems, check http://wiki.x.org
to make sure that you have the latest version.
[ 14.945] Markers: (--) probed, (**) from config file, (==) default setting,
(++) from command line, (!!) notice, (II) informational,
(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[ 14.945] (==) Log file: "/var/lib/gdm3/.local/share/xorg/Xorg.0.log", Time: Fri Sep 9 09:36:16 2022
[ 14.945] (==) Using system config directory "/usr/share/X11/xorg.conf.d"
[ 14.946] (==) No Layout section. Using the first Screen section.
[ 14.946] (==) No screen section available. Using defaults.
[ 14.946] (**) |-->Screen "Default Screen Section" (0)
[ 14.946] (**) | |-->Monitor "<default monitor>"
[ 14.946] (==) No monitor specified for screen "Default Screen Section".
Using a default monitor configuration.
[ 14.946] (==) Automatically adding devices
[ 14.946] (==) Automatically enabling devices
[ 14.946] (==) Automatically adding GPU devices
[ 14.946] (==) Automatically binding GPU devices
[ 14.946] (==) Max clients allowed: 256, resource mask: 0x1fffff
[ 14.946] (WW) The directory "/usr/share/fonts/X11/cyrillic" does not exist.
[ 14.946] Entry deleted from font path.
[ 14.946] (WW) The directory "/usr/share/fonts/X11/100dpi/" does not exist.
[ 14.946] Entry deleted from font path.
[ 14.946] (WW) The directory "/usr/share/fonts/X11/75dpi/" does not exist.
[ 14.946] Entry deleted from font path.
[ 14.946] (WW) The directory "/usr/share/fonts/X11/100dpi" does not exist.
[ 14.946] Entry deleted from font path.
[ 14.946] (WW) The directory "/usr/share/fonts/X11/75dpi" does not exist.
[ 14.946] Entry deleted from font path.
[ 14.946] (==) FontPath set to:
/usr/share/fonts/X11/misc,
/usr/share/fonts/X11/Type1,
built-ins
[ 14.946] (==) ModulePath set to "/usr/lib/xorg/modules"
[ 14.946] (II) The server relies on udev to provide the list of input devices.
If no devices become available, reconfigure udev or disable AutoAddDevices.
[ 14.946] (II) Loader magic: 0x555d931d0020
[ 14.946] (II) Module ABI versions:
[ 14.946] X.Org ANSI C Emulation: 0.4
[ 14.946] X.Org Video Driver: 24.1
[ 14.946] X.Org XInput driver : 24.1
[ 14.946] X.Org Server Extension : 10.0
[ 14.947] (++) using VT number 1
[ 14.950] (II) systemd-logind: took control of session /org/freedesktop/login1/session/c6
[ 14.951] (II) xfree86: Adding drm device (/dev/dri/card0)
[ 14.951] (II) systemd-logind: got fd for /dev/dri/card0 226:0 fd 12 paused 1
[ 14.951] (EE) Error systemd-logind returned paused fd for drm node
[ 14.951] (II) systemd-logind: releasing fd for 226:0
.....
[ 15.397] (EE) modeset(0): drmSetMaster failed: Permission denied
[ 15.397] (EE)
Fatal server error:
[ 15.397] (EE) AddScreen/ScreenInit failed for driver 0
在nosplash
启动时,第一个(EE)错误不存在,而是显示相应的(II):
[ 10.079] Kernel command line: BOOT_IMAGE=/boot/vmlinuz-5.4.0-125-generic root=UUID=18b08207-3e7f-4106-a123-58417720e98d ro quiet nosplash vt.handoff=1
....
[ 10.091] (II) systemd-logind: got fd for /dev/dri/card0 226:0 fd 12 paused 0
....
这将启动 Xorg ($XDG_SESSION_TYPE x11)。但同样,nosplash
它也可以成功登录 Wayland。
不确定这里可能存在什么问题。splash
可能是由普利茅斯处理的,但是否nosplash
完全排除普利茅斯以让启动继续进行?
我可以在 GRUB2 中强制执行nosplash
,但似乎某个地方存在一些潜在问题,我宁愿现在就修复它,也不愿在不合时宜的时候面对它。
答案1
目前还不清楚到底是什么导致了这个问题,但我设法解决的方法是重新安装gdm3
并ubuntu-desktop
- 启动进入恢复内核/控制台
- 启用网络
- 打开 root 提示
apt install --reinstall gdm3
apt install --reinstall ubuntu-desktop
restart
这将保留所有当前设置;仅重新安装这些包中的文件。
注意:在这种情况下,由于某种原因,可以通过使用参数启动内核来防止引导循环nosplash
。
在GRUB中,点击E (edit)
启动选项,修改linux load
命令,Ctrl+X
保存并启动。