[Problem feedback] 【初步分析】惠普amd笔记本安装系统,出现xorg崩溃
Tofloor
poster avatar
rg
deepin
2025-01-01 19:41
Author

这几天在惠普战66三代amd笔记本上尝试安装deepin v23,发现安装引导界面和安装后重启界面总是有高概率黑屏有背光,此时无法操作了,只能重启再来....(下图是黑屏前必然出现的日志)

微信图片_20250101193543.jpg

好不容易凑巧有一次一路正常安装进桌面,此时会在上图的基础上打印日志:

amdgpu: Secure display: Generic Failure.
amdgpu: SECUREDISPLAY: query secure display TA failed. ret 0x0

看了一下有xorg的coredump:

image.png

xorg日志(我后来重装了mint,现象是一样的,这里拿mint上的xorg代替一下):

X.Org X Server 1.21.1.11
X Protocol Version 11, Revision 0
[    90.560] Current Operating System: Linux will-PC 6.8.0-51-generic #52-Ubuntu SMP PREEMPT_DYNAMIC Thu Dec  5 13:09:44 UTC 2024 x86_64
[    90.560] Kernel command line: BOOT_IMAGE=/vmlinuz-6.8.0-51-generic root=UUID=6b110094-bda4-43f1-8dfb-38dd088bf1a6 ro quiet splash amdgpu.dc=0
[    90.560] xorg-server 2:21.1.12-1ubuntu1.1 (For technical support please see http://www.ubuntu.com/support)
[    90.560] Current version of pixman: 0.42.2
[    90.560]    Before reporting problems, check http://wiki.x.org
        to make sure that you have the latest version.
[    90.560] Markers: (--) probed, (**) from config file, (==) default setting,
        (++) from command line, (!!) notice, (II) informational,
        (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[    90.560] (==) Log file: "/var/log/Xorg.0.log", Time: Wed Jan  1 19:03:38 2025
[    90.560] (==) Using system config directory "/usr/share/X11/xorg.conf.d"
[    90.561] (==) No Layout section.  Using the first Screen section.
[    90.561] (==) No screen section available. Using defaults.
[    90.561] (**) |-->Screen "Default Screen Section" (0)
[    90.561] (**) |   |-->Monitor ""
[    90.561] (==) No monitor specified for screen "Default Screen Section".
        Using a default monitor configuration.
[    90.561] (**) Allowing byte-swapped clients
[    90.561] (==) Automatically adding devices
[    90.561] (==) Automatically enabling devices
[    90.561] (==) Automatically adding GPU devices
[    90.561] (==) Automatically binding GPU devices
[    90.561] (==) Max clients allowed: 256, resource mask: 0x1fffff
[    90.561] (WW) The directory "/usr/share/fonts/X11/cyrillic" does not exist.
[    90.561]    Entry deleted from font path.
[    90.561] (WW) The directory "/usr/share/fonts/X11/100dpi/" does not exist.
[    90.561]    Entry deleted from font path.
[    90.561] (WW) The directory "/usr/share/fonts/X11/75dpi/" does not exist.
[    90.561]    Entry deleted from font path.
[    90.561] (WW) The directory "/usr/share/fonts/X11/100dpi" does not exist.
[    90.561]    Entry deleted from font path.
[    90.561] (WW) The directory "/usr/share/fonts/X11/75dpi" does not exist.
[    90.561]    Entry deleted from font path.
[    90.561] (==) FontPath set to:
        /usr/share/fonts/X11/misc,
        /usr/share/fonts/X11/Type1,
        built-ins
[    90.561] (==) ModulePath set to "/usr/lib/xorg/modules"
[    90.561] (II) The server relies on udev to provide the list of input devices.
        If no devices become available, reconfigure udev or disable AutoAddDevices.
[    90.561] (II) Loader magic: 0x57c6f48aa020
[    90.561] (II) Module ABI versions:
[    90.561]    X.Org ANSI C Emulation: 0.4
[    90.561]    X.Org Video Driver: 25.2
[    90.561]    X.Org XInput driver : 24.4
[    90.561]    X.Org Server Extension : 10.0
[    90.562] (++) using VT number 7

[    90.562] (II) systemd-logind: logind integration requires -keeptty and -keeptty was not provided, disabling logind integration
[    90.563] (II) xfree86: Adding drm device (/dev/dri/card1)
[    90.563] (II) Platform probe for /sys/devices/pci0000:00/0000:00:08.1/0000:05:00.0/drm/card1
[    90.565] (--) PCI:*(5@0:0:0) 1002:1636:103c:8730 rev 194, Mem @ 0xd0000000/268435456, 0xe0000000/2097152, 0xe0600000/524288, I/O @ 0x00002000/256, BIOS @ 0x????????/131072
[    90.565] (II) LoadModule: "glx"
[    90.565] (II) Loading /usr/lib/xorg/modules/extensions/libglx.so
[    90.565] (II) Module glx: vendor="X.Org Foundation"
[    90.565]    compiled for 1.21.1.11, module version = 1.0.0
[    90.565]    ABI class: X.Org Server Extension, version 10.0
[    90.565] (II) Applying OutputClass "AMDgpu" to /dev/dri/card1
[    90.565]    loading driver: amdgpu
[    90.565] (==) Matched amdgpu as autoconfigured driver 0
[    90.566] (==) Matched ati as autoconfigured driver 1
[    90.566] (==) Matched modesetting as autoconfigured driver 2
[    90.566] (==) Matched fbdev as autoconfigured driver 3
[    90.566] (==) Matched vesa as autoconfigured driver 4
[    90.566] (==) Assigned the driver to the xf86ConfigLayout
[    90.566] (II) LoadModule: "amdgpu"
[    90.566] (II) Loading /usr/lib/xorg/modules/drivers/amdgpu_drv.so
[    90.566] (II) Module amdgpu: vendor="X.Org Foundation"
[    90.566]    compiled for 1.21.1.11, module version = 23.0.0
[    90.566]    Module class: X.Org Video Driver
[    90.566]    ABI class: X.Org Video Driver, version 25.2
[    90.566] (II) LoadModule: "ati"
[    90.566] (II) Loading /usr/lib/xorg/modules/drivers/ati_drv.so
[    90.566] (II) Module ati: vendor="X.Org Foundation"
[    90.566]    compiled for 1.21.1.11, module version = 22.0.0
[    90.566]    Module class: X.Org Video Driver
[    90.566]    ABI class: X.Org Video Driver, version 25.2
[    90.570] (II) LoadModule: "modesetting"
[    90.570] (II) Loading /usr/lib/xorg/modules/drivers/modesetting_drv.so
[    90.570] (II) Module modesetting: vendor="X.Org Foundation"
[    90.570]    compiled for 1.21.1.11, module version = 1.21.1
[    90.570]    Module class: X.Org Video Driver
[    90.570]    ABI class: X.Org Video Driver, version 25.2
[    90.570] (II) LoadModule: "fbdev"
[    90.571] (II) Loading /usr/lib/xorg/modules/drivers/fbdev_drv.so
[    90.571] (II) Module fbdev: vendor="X.Org Foundation"
[    90.571]    compiled for 1.21.1.11, module version = 0.5.0
[    90.571]    Module class: X.Org Video Driver
[    90.571]    ABI class: X.Org Video Driver, version 25.2
[    90.571] (II) LoadModule: "vesa"
[    90.571] (II) Loading /usr/lib/xorg/modules/drivers/vesa_drv.so
[    90.571] (II) Module vesa: vendor="X.Org Foundation"
[    90.571]    compiled for 1.21.1.7, module version = 2.6.0
[    90.571]    Module class: X.Org Video Driver
[    90.571]    ABI class: X.Org Video Driver, version 25.2
[    90.571] (II) AMDGPU: Driver for AMD Radeon:
        All GPUs supported by the amdgpu kernel driver
[    90.571] (II) modesetting: Driver for Modesetting Kernel Drivers: kms
[    90.571] (II) FBDEV: driver for framebuffer: fbdev
[    90.571] (II) VESA: driver for VESA chipsets: vesa
[    90.573] (WW) Falling back to old probe method for modesetting
[    90.573] (EE) open /dev/dri/card0: No such file or directory
[    90.573] (WW) Falling back to old probe method for fbdev
[    90.573] (II) Loading sub module "fbdevhw"
[    90.573] (II) LoadModule: "fbdevhw"
[    90.573] (II) Loading /usr/lib/xorg/modules/libfbdevhw.so
[    90.573] (II) Module fbdevhw: vendor="X.Org Foundation"
[    90.573]    compiled for 1.21.1.11, module version = 0.0.2
[    90.573]    ABI class: X.Org Video Driver, version 25.2
[    90.573] (EE) open /dev/fb0: No such file or directory
[    90.573] (II) AMDGPU(0): Creating default Display subsection in Screen section
        "Default Screen Section" for depth/fbbpp 24/32
[    90.573] (==) AMDGPU(0): Depth 24, (--) framebuffer bpp 32
[    90.573] (II) AMDGPU(0): Pixel depth = 24 bits stored in 4 bytes (32 bpp pixmaps)
[    90.573] (==) AMDGPU(0): Default visual is TrueColor
[    90.573] (II) Applying OutputClass "AMDgpu" options to /dev/dri/card1
[    90.573] (==) AMDGPU(0): RGB weight 888
[    90.573] (II) AMDGPU(0): Using 8 bits per RGB (8 bit DAC)
[    90.573] (--) AMDGPU(0): Chipset: "AMD Radeon Graphics" (ChipID = 0x1636)
[    90.573] (II) Loading sub module "fb"
[    90.573] (II) LoadModule: "fb"
[    90.573] (II) Module "fb" already built-in
[    90.573] (II) Loading sub module "dri2"
[    90.573] (II) LoadModule: "dri2"
[    90.573] (II) Module "dri2" already built-in
[    90.595] (II) Loading sub module "glamoregl"
[    90.595] (II) LoadModule: "glamoregl"
[    90.595] (II) Loading /usr/lib/xorg/modules/libglamoregl.so
[    90.597] (II) Module glamoregl: vendor="X.Org Foundation"
[    90.597]    compiled for 1.21.1.11, module version = 1.0.1
[    90.597]    ABI class: X.Org ANSI C Emulation, version 0.4
[    90.603] (II) AMDGPU(0): glamor X acceleration enabled on AMD Radeon Graphics (radeonsi, renoir, LLVM 17.0.6, DRM 3.57, 6.8.0-51-generic)
[    90.603] (II) AMDGPU(0): glamor detected, initialising EGL layer.
[    90.603] (==) AMDGPU(0): TearFree property default: auto
[    90.603] (==) AMDGPU(0): VariableRefresh: disabled
[    90.603] (==) AMDGPU(0): AsyncFlipSecondaries: disabled
[    90.603] (II) AMDGPU(0): KMS Pageflipping: enabled
[    90.603] (WW) AMDGPU(0): No outputs definitely connected, trying again...
[    90.603] (WW) AMDGPU(0): Unable to find connected outputs - setting 1024x768 initial framebuffer
[    90.603] (II) AMDGPU(0): mem size init: gart size :1e0171000 vram size: s:1e822000 visible:1e822000
[    90.603] (==) AMDGPU(0): DPI set to (96, 96)
[    90.603] (==) AMDGPU(0): Using gamma correction (1.0, 1.0, 1.0)
[    90.603] (II) Loading sub module "ramdac"
[    90.603] (II) LoadModule: "ramdac"
[    90.603] (II) Module "ramdac" already built-in
[    90.603] (EE) AMDGPU(0): No modes.
[    90.603] (II) UnloadModule: "amdgpu"
[    90.603] (II) UnloadSubModule: "glamoregl"
[    90.603] (II) Unloading glamoregl
[    90.603] (EE) Screen(s) found, but none have a usable configuration.
[    90.603] (EE)
Fatal server error:
[    90.603] (EE) no screens found(EE)

xorg.conf:

image.png

内核日志,成功亮屏的情况,必然出现 Secure display: Generic Failure SECUREDISPLAY: query securedisplay TA failed. ret 0x0 的输出:

1月 01 08:50:43 will-PC kernel: [drm] psp gfx command LOAD_TA(0x1) failed and response status is (0x7)
1月 01 08:50:43 will-PC kernel: [drm] psp gfx command INVOKE_CMD(0x3) failed and response status is (0x4)
1月 01 08:50:43 will-PC kernel: amdgpu 0000:05:00.0: amdgpu: Secure display: Generic Failure.
1月 01 08:50:43 will-PC kernel: amdgpu 0000:05:00.0: amdgpu: SECUREDISPLAY: query securedisplay TA failed. ret 0x0
1月 01 08:50:43 will-PC kernel: amdgpu 0000:05:00.0: amdgpu: SMU is initialized successfully!
1月 01 08:50:43 will-PC kernel: ------------[ cut here ]------------
1月 01 08:50:43 will-PC kernel: UBSAN: array-index-out-of-bounds in /build/linux-jgGCUS/linux-6.8.0/drivers/gpu/drm/amd/amdgpu/../display/dc/bios/bios_pars>
1月 01 08:50:43 will-PC kernel: index 8 is out of range for type 'atom_gpio_pin_assignment [8]'
1月 01 08:50:43 will-PC kernel: CPU: 6 PID: 422 Comm: (udev-worker) Not tainted 6.8.0-38-generic #38-Ubuntu
1月 01 08:50:43 will-PC kernel: Hardware name: HP HP ProBook 455 G7/8730, BIOS S79 Ver. 01.19.00 11/22/2024
1月 01 08:50:43 will-PC kernel: Call Trace:
1月 01 08:50:43 will-PC kernel:  
1月 01 08:50:43 will-PC kernel:  dump_stack_lvl+0x76/0xa0

但是从这个日志上看,显然出现了bios_parser2.c中的指针越界。内核6版本amdgpu的drm驱动源码中是这么写的:

image.png

看起来算错是因为 le16_to_cpu 这个宏计算错误,但是这个宏貌似是上游linux内核中的,不太可能有问题。

暂时没找到办法,尝试直接添加内核参数 amdgpu.dc=0 来跳过这个 dc 模块,尝试了不行... 所以目前只能用 nomodeset 禁用显卡驱动来勉强使用,但是这么不是办法,毕竟 nomodeset 下缩放和锯齿有严重问题。

这个黑屏的现象,我在deepin\ubuntu\mint上都发现了,各位大佬有什么办法吗?

Reply Favorite View the author
All Replies
2 / 2
To page
昨夜的星辰
deepin
2025-01-01 23:17
#21

楼主先去官网找找有没有BIOS更新吧,很少有人会更新BIOS,但事实上有些本子更新BIOS后会解决一些莫名其妙的问题

Reply View the author
rg
deepin
2025-01-02 13:55
#22
忘记、过去

有没有试过外接显示器?或者试试安装 deepin 20.9......


按照 xorg.log 提示,显卡设备节点 /dev/fb0/dev/dri/card0 一个都没有,可以认为显卡设备初始化失败了


查了下,AMD R5 4500U 的核显是 Vega 6,感觉可以考虑在 grub 参数里加上 modprobe.blacklist=amdgpu 屏蔽 amdgpu 驱动模块,让系统加载更古老的 radeon 驱动试试?

这个办法我昨天试过,和加nomodeset效果一样的

Reply View the author
rg
deepin
2025-01-02 13:55
#23
昨夜的星辰

楼主先去官网找找有没有BIOS更新吧,很少有人会更新BIOS,但事实上有些本子更新BIOS后会解决一些莫名其妙的问题

这个昨天也更新到最新的BIOS了,还是不行~

Reply View the author
rg
deepin
2025-01-02 15:47
#24
神末shenmo

https://bbs.archlinux.org/viewtopic.php?id=260919

补一个Arch论坛的解法,似乎都指向这个机型的固件是烂的,关闭Legacy兼容可能可以解决问题

虽然上面那个mint的链接我打不开,但是这个arch的解决方案真的有用!感谢大佬~

不过为啥legeacy兼容和纯uefi不太一样呢

Reply View the author
神末shenmo
deepin
Spark-App
Solutions Team Moderator
2025-01-02 20:49
#25
rg

虽然上面那个mint的链接我打不开,但是这个arch的解决方案真的有用!感谢大佬~

不过为啥legeacy兼容和纯uefi不太一样呢

加了什么神秘妙妙魔法导致破坏了兼容性,这就得去问惠普了

Reply View the author
Amber
deepin
2025-01-06 18:03
#26
忘记、过去

有没有试过外接显示器?或者试试安装 deepin 20.9......


按照 xorg.log 提示,显卡设备节点 /dev/fb0/dev/dri/card0 一个都没有,可以认为显卡设备初始化失败了


查了下,AMD R5 4500U 的核显是 Vega 6,感觉可以考虑在 grub 参数里加上 modprobe.blacklist=amdgpu 屏蔽 amdgpu 驱动模块,让系统加载更古老的 radeon 驱动试试?

系统里有集成radeon这个驱动吗?和amdgpu驱动又有啥差别呢?

Reply View the author
2 / 2
To page