[RESPONDED] Framework 13 AMD Ryzen - Resume from sleep on its own

Here are the steps to reproduce the issue:

  • I have installed Ubuntu 22.04 using the official guide.
  • I am using firmware 3.03.
  • Plug the Framework 13 AMD into a Dell WD15 dock.
  • Press the power button on the laptop to put it to sleep.
  • About 50% of the time, the laptop will resume after an arbitrary time. See dmesg log below.
[1726165.829450] PM: suspend entry (s2idle)
[1726165.831859] Filesystems sync: 0.002 seconds
[1726166.091205] Freezing user space processes
[1726166.093943] Freezing user space processes completed (elapsed 0.002 seconds)
[1726166.093948] OOM killer disabled.
[1726166.093948] Freezing remaining freezable tasks
[1726166.095294] Freezing remaining freezable tasks completed (elapsed 0.001 seconds)
[1726166.095298] printk: Suspending console(s) (use no_console_suspend to debug)
[1726167.037787] ACPI: EC: interrupt blocked
[1727306.895302] ACPI: EC: interrupt unblocked
[1727307.347054] ucsi_acpi USBC000:00: ucsi_handle_connector_change: GET_CONNECTOR_STATUS failed (-5)
[1727307.478745] ucsi_acpi USBC000:00: unknown error 0
[1727307.478751] ucsi_acpi USBC000:00: ucsi_handle_connector_change: GET_CONNECTOR_STATUS failed (-5)
[1727308.111029] nvme nvme0: 16/0/0 default/read/poll queues
[1727308.225086] [drm:mes_v11_0_submit_pkt_and_poll_completion.constprop.0 [amdgpu]] *ERROR* MES failed to response msg=14
[1727308.225303] [drm:amdgpu_mes_reg_write_reg_wait [amdgpu]] *ERROR* failed to reg_write_reg_wait
[1727308.227838] [drm] PCIE GART of 512M enabled (table at 0x000000801FD00000).
[1727308.227910] amdgpu 0000:c1:00.0: amdgpu: SMU is resuming...
[1727308.231031] amdgpu 0000:c1:00.0: amdgpu: SMU is resumed successfully!
[1727308.237358] [drm] Watermarks table not configured properly by SMU
[1727308.342827] [drm] VCN decode and encode initialized successfully(under DPG Mode).
1 Like

For what it’s worth, I have the same problem with a Thinkpad P14s that uses the same AMD 7840U CPU as the Framework laptop. When I try to enter suspend I get the same errors as you:

kernel: [drm:mes_v11_0_submit_pkt_and_poll_completion.constprop.0 [amdgpu]] *ERROR* MES failed to
 response msg=14
kernel: [drm:amdgpu_mes_reg_write_reg_wait [amdgpu]] *ERROR* failed to reg_write_reg_wait

and the system immediately returns to running status.

This occurs with kernel 6.6.13, with or without a dock. For me it happens systematically.

1 Like

Reproduce it using scripts/amd_s2idle.py · master · drm / amd · GitLab and then share the report file it creates.

Set the time longer than it should be asleep and it will pick up the cause.

I made the suggested change in the post below.

Update: It did not resolve the problem. Here’s more log.

Suspend

[141372.648378] PM: suspend entry (s2idle)
[141372.655669] Filesystems sync: 0.007 seconds
[141372.915929] Freezing user space processes
[141372.918409] Freezing user space processes completed (elapsed 0.002 seconds)
[141372.918412] OOM killer disabled.
[141372.918412] Freezing remaining freezable tasks
[141372.919552] Freezing remaining freezable tasks completed (elapsed 0.001 seconds)
[141372.919554] printk: Suspending console(s) (use no_console_suspend to debug)
[141373.111248] ACPI: EC: interrupt blocked

And then it resumes without any interaction from me.

[143194.708358] ACPI: EC: interrupt unblocked
[143194.880567] nvme nvme0: 16/0/0 default/read/poll queues
[143194.995377] [drm:mes_v11_0_submit_pkt_and_poll_completion.constprop.0 [amdgpu]] *ERROR* MES failed to response msg=14
[143194.995601] [drm:amdgpu_mes_reg_write_reg_wait [amdgpu]] *ERROR* failed to reg_write_reg_wait
[143194.998453] [drm] PCIE GART of 512M enabled (table at 0x000000801FD00000).
[143194.998574] amdgpu 0000:c1:00.0: amdgpu: SMU is resuming...
[143195.002617] amdgpu 0000:c1:00.0: amdgpu: SMU is resumed successfully!
[143195.008430] [drm] Watermarks table not configured properly by SMU
[143195.114135] [drm] DP Alt mode state on HPD: 1
[143195.226703] [drm] DM_MST: starting TM on aconnector: 0000000010a2182e [id: 94]
[143195.264374] [drm] VCN decode and encode initialized successfully(under DPG Mode).
[143195.264631] amdgpu 0000:c1:00.0: [drm:jpeg_v4_0_hw_init [amdgpu]] JPEG decode initialized successfully.
[143195.264832] amdgpu 0000:c1:00.0: amdgpu: ring gfx_0.0.0 uses VM inv eng 0 on hub 0

Thank you for pointing out (and writing) this script.

Running it highlighted the following logs:

kernel: amdgpu 0000:64:00.0: firmware: failed to load amdgpu/gc_11_0_1_mes_2.bin (-2)
kernel: amdgpu 0000:64:00.0: Direct firmware load for amdgpu/gc_11_0_1_mes_2.bin failed with error -2

I installed the firmware from linux-firmware.git and regenerated the initramfs image. Suspend now works (in 3/3 tries). FTR, I’m running Debian Sid.

Sure glad you solved it. You should report this to debian to get fixed.

Reported here https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1063750

2 Likes

Thanks for taking time to report this bug @Benjamin_Poirier :slight_smile: