Skip to content

Screen does not wake up after resume (AMD Ryzen 7 Pro 4750U) #6923

@isodude

Description

@isodude

Solved as of

linux-firmware-20230123-135.fc32.noarch
xen-4.14.5-20.fc32.x86_64
kernel-latest-6.2.10-1.qubes.fc32.x86_64

Qubes OS release

R4.1,
kernel 5.14.7-1 (fedora 5.14) (same behavior in lower kernels.)
XEN 4.14.3 (build from @marmarek branch)

Brief summary

Laptops does not resume after third sleep/resume cycle.
The problem seems to be with

[drm] psp command (0x7) failed and response status is (0xFFFF0007)
[drm:psp_hw_start [amdgpu]] *ERROR* PSP load tmp failed!

It feels like there's a hung process in the amdgpu drivers for some reason.

Not sure how to debug this properly, XEN is not giving me much info at all.
The problem is visible with X started as well obviously but I try to make the bug surface smaller.

Steps to reproduce

Boot laptop with X disabled, no VMs started.
run systemctl suspend three times (and resuming)
run reboot to restore system

Expected behavior

Possible to suspend limitless.

Actual behavior

Screen does not wake up on third resume. It's possible to write reboot and restart.

Notes

Works well with kernel booted without XEN.
crash.filtered.log
crash.filtered.xen.log

Workarounds

A bit more testing is needed but I do have sort of stable suspend/resume now. It even survives when everything goes south.
There's a bit of tearing, but I'd rather have suspend than tearing.

cat << > /etc/X11/xorg.conf.d/50-video.conf 
Section "Device"
	Identifier "card0"
	Driver "amdgpu"
	Option "AccelMethod" "none"
EndSection

Compile xorg-x11-drv-amdgpu from https://github.com/freedesktop/xorg-xf86-video-amdgpu
Run make install and install amdgpu_drv.so in /usr/lib64/xorg/modules/drivers on dom0.

For more stability run with kernel cmdline preempt=none

Do note that e.g. 4k external screen will be royally sluggish.

Sometimes the screen turns up black, type in the password anyhow and switch to tty2 and back again / suspend-resume again and it will most likely come to life again. Suspend/resume too fast could lead to instant reboot.

Metadata

Metadata

Assignees

No one assigned

    Labels

    C: XenThis issue pertains to the Xen hypervisor in Qubes OS.C: power managementThis issue pertains to power management in Qubes OS.P: majorPriority: major. Between "default" and "critical" in severity.affects-4.1This issue affects Qubes OS 4.1.diagnosedTechnical diagnosis of this issue has been performed.hardware supportThis issue pertains to the hardware that Qubes OS supports.

    Type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions