这是全新(非升级)的 20.04.2 LTS 安装。系统启动时,控制台会显示令人生畏的(且毫无帮助的)非特异性)“哦不!出了点问题”屏幕。
在详细介绍之前,我想指出的是,此映像是在小型实验室服务器上构建的(那里更温暖、更舒适!),然后磁盘安装在不同的系统上(不同的 CPU、视频等),因此这可能与此有关。如果我把它带回实验室,它仍然运行良好。我记得在安装过程中看到一条关于“为您的硬件配置”的消息,所以这可能是配置或驱动程序问题,但当它在生产服务器上时,我找不到“重新扫描”的工具。我可以通过 ssh 或非 GUI VT 登录,但在 gnome 登录屏幕上只看到“Oh No”。
该视频使用 Radeon 驱动程序
$ sudo lshw -c video
*-display
description: VGA compatible controller
product: ES1000
vendor: Advanced Micro Devices, Inc. [AMD/ATI]
physical id: 5
bus info: pci@0000:01:05.0
version: 02
width: 32 bits
clock: 33MHz
capabilities: pm vga_controller bus_master cap_list rom
configuration: driver=radeon latency=64 mingnt=8
resources: irq:17 memory:f0000000-f7ffffff ioport:c000(size=256) memory:fcbf0000-fcbfffff memory:c0000-dffff
... 看起来 Radeon 驱动程序已加载
$ lsmod | grep radeon
radeon 1466368 2
i2c_algo_bit 16384 1 radeon
ttm 102400 1 radeon
drm_kms_helper 217088 1 radeon
drm 552960 5 drm_kms_helper,radeon,ttm
并且正在使用
$ dmesg | grep -i radeon
[ 14.765323] [drm] radeon kernel modesetting enabled.
[ 15.509574] fb0: switching to radeondrmfb from VESA VGA
[ 17.906464] radeon 0000:01:05.0: vgaarb: deactivate vga console
[ 17.908262] radeon 0000:01:05.0: VRAM: 128M 0x00000000F0000000 - 0x00000000F7FFFFFF (16M used)
[ 17.908267] radeon 0000:01:05.0: GTT: 512M 0x00000000D0000000 - 0x00000000EFFFFFFF
[ 17.908411] [drm] radeon: 16M of VRAM memory ready
[ 17.908413] [drm] radeon: 512M of GTT memory ready.
[ 17.929587] radeon 0000:01:05.0: WB disabled
[ 17.929593] radeon 0000:01:05.0: fence driver on ring 0 use gpu addr 0x00000000d0000000 and cpu addr 0x(____ptrval____)
[ 17.929635] [drm] radeon: irq initialized.
[ 17.930135] [drm] radeon: ring at 0x00000000D0001000
[ 17.931067] [drm] Radeon Display Connectors
[ 18.017858] fbcon: radeondrmfb (fb0) is primary device
[ 18.192362] radeon 0000:01:05.0: fb0: radeondrmfb frame buffer device
[ 18.215817] [drm] Initialized radeon 2.50.0 20080528 for 0000:01:05.0 on minor 0
在研究了 dmesg 和各种日志之后,我认为我已经将其缩小到 syslog 中的这一部分(编辑以删除来自其他子系统的消息并添加省略号...表示重复/相似的行)。
引起我注意的一些事情是:
- libGL 错误:无法创建 dri 屏幕
- libGL 错误:无法加载驱动程序:radeon
- 陷阱:gnome-shell[2221] 陷阱无效操作码 ip:7ff7d2f7b43c sp:7ffe95253200 错误:0
Feb 20 12:52:54 ubuntu4 systemd[1028]: Starting GNOME Shell on X11...
Feb 20 12:52:54 ubuntu4 /usr/lib/gdm3/gdm-x-session[1067]: (II) RADEON(0): EDID vendor "PGS", prod id 779
Feb 20 12:52:54 ubuntu4 /usr/lib/gdm3/gdm-x-session[1067]: (II) RADEON(0): DDCModeFromDetailedTiming: Ignoring tiny 0x316 mode
Feb 20 12:52:54 ubuntu4 /usr/lib/gdm3/gdm-x-session[1067]: (II) RADEON(0): Printing DDC gathered Modelines:
Feb 20 12:52:54 ubuntu4 /usr/lib/gdm3/gdm-x-session[1067]: (II) RADEON(0): Modeline "1280x1024"x0.0 108.00 1280 1328 1440 1688 1024 1025 1028 1066 +hsync +vsync (64.0 kHz eP)
...
Feb 20 12:52:54 ubuntu4 gnome-shell[2221]: libGL error: failed to create dri screen
Feb 20 12:52:54 ubuntu4 gnome-shell[2221]: libGL error: failed to load driver: radeon
Feb 20 12:52:54 ubuntu4 gsd-media-keys[1645]: Failed to grab accelerators: GDBus.Error:org.freedesktop.DBus.Error.UnknownMethod: No such interface “org.gnome.Shell” on object at path /org/gnome/Shell
Feb 20 12:52:55 ubuntu4 gnome-shell[2221]: Unset XDG_SESSION_ID, getCurrentSessionProxy() called outside a user session. Asking logind directly.
Feb 20 12:52:55 ubuntu4 gnome-shell[2221]: Will monitor session 2
Feb 20 12:52:55 ubuntu4 gsd-media-keys[1645]: Failed to grab accelerators: GDBus.Error:org.freedesktop.DBus.Error.UnknownMethod: No such interface “org.gnome.Shell” on object at path /org/gnome/Shell
Feb 20 12:52:55 ubuntu4 dbus-daemon[1070]: [session uid=1000 pid=1070] Activating service name='org.freedesktop.portal.IBus' requested by ':1.100' (uid=1000 pid=2783 comm="ibus-daemon --panel disable --xim " label="unconfined")
Feb 20 12:52:55 ubuntu4 dbus-daemon[1070]: [session uid=1000 pid=1070] Successfully activated service 'org.freedesktop.portal.IBus'
Feb 20 12:52:56 ubuntu4 gnome-shell[2221]: Telepathy is not available, chat integration will be disabled.
Feb 20 12:52:56 ubuntu4 colord[1757]: failed to get session [pid 753]: No data available
Feb 20 12:52:56 ubuntu4 gnome-shell[2221]: Failed to create file /run/user/1000/gnome-shell-disable-extensions: Error opening file “/run/user/1000/gnome-shell-disable-extensions”: File exists
Feb 20 12:52:56 ubuntu4 dbus-daemon[1070]: [session uid=1000 pid=1070] Activating service name='org.gnome.Shell.Notifications' requested by ':1.98' (uid=1000 pid=2221 comm="/usr/bin/gnome-shell " label="unconfined")
Feb 20 12:52:56 ubuntu4 dbus-daemon[1070]: [session uid=1000 pid=1070] Successfully activated service 'org.gnome.Shell.Notifications'
Feb 20 12:52:56 ubuntu4 systemd[1028]: Started GNOME Shell on X11.
Feb 20 12:52:56 ubuntu4 systemd[1028]: Reached target GNOME Shell on X11.
Feb 20 12:52:56 ubuntu4 systemd[1028]: Reached target GNOME X11 Session.
Feb 20 12:52:56 ubuntu4 systemd[1028]: Reached target GNOME X11 Session (session: ubuntu).
Feb 20 12:52:56 ubuntu4 NetworkManager[756]: <info> [1613854376.7398] agent-manager: agent[75d0de6dc9ef5eaa,:1.68/org.gnome.Shell.NetworkAgent/1000]: agent registered
Feb 20 12:52:56 ubuntu4 gnome-shell[2221]: Error looking up permission: GDBus.Error:org.freedesktop.portal.Error.NotFound: No entry for geolocation
Feb 20 12:52:56 ubuntu4 gsd-media-keys[1645]: Failed to grab accelerator for keybinding settings:playback-repeat
...
Feb 20 12:52:56 ubuntu4 gnome-shell[2221]: Window manager warning: Overwriting existing binding of keysym 31 with keysym 31 (keycode a).
...
Feb 20 12:52:57 ubuntu4 kernel: [ 18.029584] traps: gnome-shell[2221] trap invalid opcode ip:7ff7d2f7b43c sp:7ffe95253200 error:0
Feb 20 12:52:57 ubuntu4 systemd[1028]: gnome-shell-x11.service: Main process exited, code=dumped, status=4/ILL
Feb 20 12:52:57 ubuntu4 systemd[1028]: gnome-shell-x11.service: Failed with result 'core-dump'.
Feb 20 12:52:57 ubuntu4 systemd[1028]: gnome-shell-x11.service: Scheduled restart job, restart counter is at 2.
Feb 20 12:52:57 ubuntu4 systemd[1028]: Stopped target GNOME X11 Session (session: ubuntu).
Feb 20 12:52:57 ubuntu4 systemd[1028]: Stopping GNOME X11 Session (session: ubuntu).
Feb 20 12:52:57 ubuntu4 systemd[1028]: Stopped target GNOME X11 Session.
Feb 20 12:52:57 ubuntu4 systemd[1028]: Stopping GNOME X11 Session.
Feb 20 12:52:57 ubuntu4 systemd[1028]: Stopped target GNOME Shell on X11.
Feb 20 12:52:57 ubuntu4 systemd[1028]: Stopping GNOME Shell on X11.
Feb 20 12:52:57 ubuntu4 systemd[1028]: Stopped GNOME Shell on X11.
Feb 20 12:52:57 ubuntu4 systemd[1028]: Starting GNOME Shell on X11...
[manual edit ... this cycle repeats three times...]
答案1
对我来说,解决方案是重命名用户目录,然后将其重新创建为空并设置适当的权限。登录后,我恢复了重要的文档和设置。后来我发现问题是由于我从另一台计算机恢复了 VHD,其中同一台 VM 配置为使用较新的 Hyper-V 配置 9.0 而不是 8.0。升级配置就足够了,因为在我复制 VHD 之前它工作得很好。
答案2
这里删除 mesa_shader_cache 目录就可以了:
sudo rm -rf /var/lib/gdm3/.cache/mesa_shader_cache
rm -rf $HOME/.cache/mesa_shader_cache