在 Ubuntu 21.04 上安装 amdgpu 驱动程序失败后出现显示问题

在 Ubuntu 21.04 上安装 amdgpu 驱动程序失败后出现显示问题

我的系统是 ThinkPad T14 (Gen. 1),配备 AMD Ryzen 7 Pro 4750u(具有集成的 Renoir GPU)。操作系统是 Ubuntu 21.04,内核为 5.11。

它一直运行正常,直到昨天,突然之间,它既不想重新启动也不想关机。当我使用 GUI 中的命令时,它没有sudo shutdown -h now任何反应。所以我按住电源按钮强制关闭它。sudo reboot

重启后,它无法识别外接显示器(HDMI)。此外,内置显示器的亮度调节功能也不起作用了(键盘快捷键可用,我可以看到滑块在菜单中移动,但显示屏不会改变亮度)。

的输出$ xrandr没有列出 hdmi 端口。它只列出了内置的Screen 0

$ xrandr
xrandr: Failed to get size of gamma for output default
Screen 0: minimum 1920 x 1080, current 1920 x 1080, maximum 1920 x 1080
default connected primary 1920x1080+0+0 0mm x 0mm
   1920x1080     77.00* 

多次重启并尝试修复损坏的软件包都没有任何改变。

是什么原因造成的?几天前,我尝试安装 amdgpu 驱动程序,但失败了,导致计算机无法正常启动。所以我回滚了整个安装(amdgpu 附带一个卸载脚本)。后来我了解到 amdgpu 驱动程序不适用于内核 5.11。回滚后,一切都恢复正常,所以我不确定这只是巧合还是问题的原因。

现在,glxgears -info告诉我它正在使用 llvmpipe 驱动程序,据我所知,这意味着 GPU 根本没有被使用。

$ glxgears -info
GL_RENDERER   = llvmpipe (LLVM 11.0.1, 256 bits)
GL_VERSION    = 3.1 Mesa 21.0.1
GL_VENDOR     = Mesa/X.org

/var/log/Xorg.0.log 中有一些可疑的行:

[   292.244] (II) systemd-logind: took control of session /org/freedesktop/login1/session/c4
[   292.246] (--) PCI:*(7@0:0:0) 1002:1636:17aa:5081 rev 209, Mem @ 0xc60000000/268435456, 0xc70000000/2097152, 0xfd300000/524288, I/O @ 0x00001000/256
[   292.247] (II) LoadModule: "glx"
[   292.247] (II) Loading /usr/lib/xorg/modules/extensions/libglx.so
[   292.247] (II) Module glx: vendor="X.Org Foundation"
[   292.247]    compiled for 1.20.11, module version = 1.0.0
[   292.247]    ABI class: X.Org Server Extension, version 10.0
[   292.247] (==) Matched ati as autoconfigured driver 0
[   292.247] (==) Matched modesetting as autoconfigured driver 1
[   292.247] (==) Matched fbdev as autoconfigured driver 2
[   292.247] (==) Matched vesa as autoconfigured driver 3
[   292.247] (==) Assigned the driver to the xf86ConfigLayout
[   292.247] (II) LoadModule: "ati"
[   292.247] (II) Loading /usr/lib/xorg/modules/drivers/ati_drv.so
[   292.248] (II) Module ati: vendor="X.Org Foundation"
[   292.248]    compiled for 1.20.10, module version = 19.1.0
[   292.248]    Module class: X.Org Video Driver
[   292.248]    ABI class: X.Org Video Driver, version 24.1
[   292.311] (II) LoadModule: "radeon"
[   292.312] (II) Loading /usr/lib/xorg/modules/drivers/radeon_drv.so
[   292.312] (II) Module radeon: vendor="X.Org Foundation"
[   292.312]    compiled for 1.20.10, module version = 19.1.0
[   292.312]    Module class: X.Org Video Driver
[   292.312]    ABI class: X.Org Video Driver, version 24.1
[   292.312] (II) LoadModule: "modesetting"
[   292.312] (II) Loading /usr/lib/xorg/modules/drivers/modesetting_drv.so
[   292.312] (II) Module modesetting: vendor="X.Org Foundation"
[   292.312]    compiled for 1.20.11, module version = 1.20.11
[   292.312]    Module class: X.Org Video Driver
[   292.312]    ABI class: X.Org Video Driver, version 24.1
[   292.312] (II) LoadModule: "fbdev"
[   292.312] (II) Loading /usr/lib/xorg/modules/drivers/fbdev_drv.so
[   292.312] (II) Module fbdev: vendor="X.Org Foundation"
[   292.312]    compiled for 1.20.10, module version = 0.5.0
[   292.312]    Module class: X.Org Video Driver
[   292.312]    ABI class: X.Org Video Driver, version 24.1
[   292.312] (II) LoadModule: "vesa"
[   292.312] (II) Loading /usr/lib/xorg/modules/drivers/vesa_drv.so
[   292.312] (II) Module vesa: vendor="X.Org Foundation"
[   292.312]    compiled for 1.20.10, module version = 2.5.0
[   292.312]    Module class: X.Org Video Driver
[   292.312]    ABI class: X.Org Video Driver, version 24.1
[   292.312] (II) RADEON: Driver for ATI/AMD Radeon chipsets:
        [long list of ATI/AMD graphics cards]
[   292.317] (II) modesetting: Driver for Modesetting Kernel Drivers: kms
[   292.317] (II) FBDEV: driver for framebuffer: fbdev
[   292.317] (II) VESA: driver for VESA chipsets: vesa
[   292.317] (EE) open /dev/dri/card0: No such file or directory
[   292.317] (WW) Falling back to old probe method for modesetting
[   292.317] (EE) open /dev/dri/card0: No such file or directory
[   292.317] (II) Loading sub module "fbdevhw"
[   292.317] (II) LoadModule: "fbdevhw"
[   292.317] (II) Loading /usr/lib/xorg/modules/libfbdevhw.so
[   292.317] (II) Module fbdevhw: vendor="X.Org Foundation"
[   292.317]    compiled for 1.20.11, module version = 0.0.2
[   292.317]    ABI class: X.Org Video Driver, version 24.1
[   292.317] (**) FBDEV(1): claimed PCI slot 7@0:0:0
[   292.317] (II) FBDEV(1): using default device
[   292.317] (EE) Screen 0 deleted because of no matching config section.
[   292.317] (II) UnloadModule: "modesetting"
[   292.317] (II) FBDEV(0): Creating default Display subsection in Screen section
    "Default Screen Section" for depth/fbbpp 24/32

[   292.407] (II) config/udev: Adding input device HD-Audio Generic HDMI/DP,pcm=3 (/dev/input/event11)
[   292.408] (II) No input driver specified, ignoring this device.
[   292.408] (II) This device may have been added with another device file.
[   292.408] (II) config/udev: Adding input device HD-Audio Generic HDMI/DP,pcm=7 (/dev/input/event12)
[   292.408] (II) No input driver specified, ignoring this device.
[   292.408] (II) This device may have been added with another device file.
[   292.408] (II) config/udev: Adding input device HD-Audio Generic HDMI/DP,pcm=8 (/dev/input/event13)
[   292.408] (II) No input driver specified, ignoring this device.

[...]

有人知道这里发生了什么吗?可以帮我修复它吗?

从我目前发现的情况来看,实际利用 GPU 的最佳选择是使用 Ubuntu 20.04 重新安装系统。但我也很高兴让当前系统恢复正常,即使它没有使用 GPU。

非常感谢您的帮助!谢谢,Fred

相关内容