You are not logged in.

#1 2021-05-06 11:37:18

aoaaceai
Member
Registered: 2021-04-21
Posts: 7

[Solved] kernel 5.12 on Ryzen 4700U - suspending breaks amdgpu

This problem was here since kernel 5.11, but my workaround fix failed after upgrading to 5.12.
journalctl --reverse for 5.11:

Apr 21 14:05:36 aoaaptop kernel: [drm:process_one_work] *ERROR* ib ring test failed (-110).
Apr 21 14:05:36 aoaaptop kernel: amdgpu 0000:03:00.0: [drm:amdgpu_ib_ring_tests [amdgpu]] *ERROR* IB test failed on comp_1.3.1 (-110).
Apr 21 14:05:36 aoaaptop kernel: amdgpu 0000:03:00.0: [drm:amdgpu_ib_ring_tests [amdgpu]] *ERROR* IB test failed on comp_1.2.1 (-110).
Apr 21 14:05:36 aoaaptop kernel: amdgpu 0000:03:00.0: [drm:amdgpu_ib_ring_tests [amdgpu]] *ERROR* IB test failed on comp_1.1.1 (-110).
Apr 21 14:05:36 aoaaptop kernel: amdgpu 0000:03:00.0: [drm:amdgpu_ib_ring_tests [amdgpu]] *ERROR* IB test failed on comp_1.0.1 (-110).
Apr 21 14:05:36 aoaaptop kernel: amdgpu 0000:03:00.0: [drm:amdgpu_ib_ring_tests [amdgpu]] *ERROR* IB test failed on comp_1.3.0 (-110).
Apr 21 14:05:36 aoaaptop kernel: amdgpu 0000:03:00.0: [drm:amdgpu_ib_ring_tests [amdgpu]] *ERROR* IB test failed on comp_1.2.0 (-110).
Apr 21 14:05:36 aoaaptop kernel: amdgpu 0000:03:00.0: [drm:amdgpu_ib_ring_tests [amdgpu]] *ERROR* IB test failed on comp_1.1.0 (-110).
Apr 21 14:05:36 aoaaptop kernel: amdgpu 0000:03:00.0: [drm:amdgpu_ib_ring_tests [amdgpu]] *ERROR* IB test failed on comp_1.0.0 (-110).
Apr 21 14:05:36 aoaaptop kernel: [drm] Fence fallback timer expired on ring sdma0
Apr 21 14:05:36 aoaaptop kernel: amdgpu 0000:03:00.0: amdgpu: ring jpeg_dec uses VM inv eng 6 on hub 1
Apr 21 14:05:36 aoaaptop kernel: amdgpu 0000:03:00.0: amdgpu: ring vcn_enc1 uses VM inv eng 5 on hub 1
Apr 21 14:05:36 aoaaptop kernel: amdgpu 0000:03:00.0: amdgpu: ring vcn_enc0 uses VM inv eng 4 on hub 1
Apr 21 14:05:36 aoaaptop kernel: amdgpu 0000:03:00.0: amdgpu: ring vcn_dec uses VM inv eng 1 on hub 1
Apr 21 14:05:36 aoaaptop kernel: amdgpu 0000:03:00.0: amdgpu: ring sdma0 uses VM inv eng 0 on hub 1
Apr 21 14:05:36 aoaaptop kernel: amdgpu 0000:03:00.0: amdgpu: ring kiq_2.1.0 uses VM inv eng 11 on hub 0
Apr 21 14:05:36 aoaaptop kernel: amdgpu 0000:03:00.0: amdgpu: ring comp_1.3.1 uses VM inv eng 10 on hub 0
Apr 21 14:05:36 aoaaptop kernel: amdgpu 0000:03:00.0: amdgpu: ring comp_1.2.1 uses VM inv eng 9 on hub 0
Apr 21 14:05:36 aoaaptop kernel: amdgpu 0000:03:00.0: amdgpu: ring comp_1.1.1 uses VM inv eng 8 on hub 0
Apr 21 14:05:36 aoaaptop kernel: amdgpu 0000:03:00.0: amdgpu: ring comp_1.0.1 uses VM inv eng 7 on hub 0
Apr 21 14:05:36 aoaaptop kernel: amdgpu 0000:03:00.0: amdgpu: ring comp_1.3.0 uses VM inv eng 6 on hub 0
Apr 21 14:05:36 aoaaptop kernel: amdgpu 0000:03:00.0: amdgpu: ring comp_1.2.0 uses VM inv eng 5 on hub 0
Apr 21 14:05:36 aoaaptop kernel: amdgpu 0000:03:00.0: amdgpu: ring comp_1.1.0 uses VM inv eng 4 on hub 0
Apr 21 14:05:36 aoaaptop kernel: amdgpu 0000:03:00.0: amdgpu: ring comp_1.0.0 uses VM inv eng 1 on hub 0
Apr 21 14:05:36 aoaaptop kernel: amdgpu 0000:03:00.0: amdgpu: ring gfx uses VM inv eng 0 on hub 0
(note: lid opened, trimmed some unrelated messages)

The system worked perfectly fine after resuming, but freezes if I tried to suspend again.
My workaround for that was to force one gpu reset on startup by doing:

cat /sys/kernel/debug/dri/0/amdgpu_gpu_recover

After resetting, the suspending issue never appers.

After upgrading to kernel 5.12, this issue came back with different errors.
journalctl --reverse:

May 06 18:11:09 aoaaptop kernel: PM: suspend exit
May 06 18:11:09 aoaaptop systemd-sleep[6932]: System resumed.
May 06 18:11:09 aoaaptop kernel: Restarting tasks ... done.
May 06 18:11:09 aoaaptop kernel: OOM killer enabled.
May 06 18:11:09 aoaaptop kernel: amdgpu 0000:03:00.0: amdgpu: Msg issuing pre-check failed and SMU may be not in the right state!
May 06 18:11:09 aoaaptop kernel: amdgpu 0000:03:00.0: amdgpu: ring jpeg_dec uses VM inv eng 6 on hub 1
May 06 18:11:09 aoaaptop kernel: amdgpu 0000:03:00.0: amdgpu: ring vcn_enc1 uses VM inv eng 5 on hub 1
May 06 18:11:09 aoaaptop kernel: amdgpu 0000:03:00.0: amdgpu: ring vcn_enc0 uses VM inv eng 4 on hub 1
May 06 18:11:09 aoaaptop kernel: amdgpu 0000:03:00.0: amdgpu: ring vcn_dec uses VM inv eng 1 on hub 1
May 06 18:11:09 aoaaptop kernel: amdgpu 0000:03:00.0: amdgpu: ring sdma0 uses VM inv eng 0 on hub 1
May 06 18:11:09 aoaaptop kernel: amdgpu 0000:03:00.0: amdgpu: ring kiq_2.1.0 uses VM inv eng 11 on hub 0
May 06 18:11:09 aoaaptop kernel: amdgpu 0000:03:00.0: amdgpu: ring comp_1.3.1 uses VM inv eng 10 on hub 0
May 06 18:11:09 aoaaptop kernel: amdgpu 0000:03:00.0: amdgpu: ring comp_1.2.1 uses VM inv eng 9 on hub 0
May 06 18:11:09 aoaaptop kernel: amdgpu 0000:03:00.0: amdgpu: ring comp_1.1.1 uses VM inv eng 8 on hub 0
May 06 18:11:09 aoaaptop kernel: amdgpu 0000:03:00.0: amdgpu: ring comp_1.0.1 uses VM inv eng 7 on hub 0
May 06 18:11:09 aoaaptop kernel: amdgpu 0000:03:00.0: amdgpu: ring comp_1.3.0 uses VM inv eng 6 on hub 0
May 06 18:11:09 aoaaptop kernel: amdgpu 0000:03:00.0: amdgpu: ring comp_1.2.0 uses VM inv eng 5 on hub 0
May 06 18:11:09 aoaaptop kernel: amdgpu 0000:03:00.0: amdgpu: ring comp_1.1.0 uses VM inv eng 4 on hub 0
May 06 18:11:09 aoaaptop kernel: amdgpu 0000:03:00.0: amdgpu: ring comp_1.0.0 uses VM inv eng 1 on hub 0
May 06 18:11:09 aoaaptop kernel: amdgpu 0000:03:00.0: amdgpu: ring gfx uses VM inv eng 0 on hub 0
May 06 18:11:09 aoaaptop kernel: [drm] JPEG decode initialized successfully.
May 06 18:11:09 aoaaptop kernel: [drm:jpeg_v2_0_set_powergating_state [amdgpu]] *ERROR* Dpm enable jpeg failed, ret = -5. 
May 06 18:11:09 aoaaptop kernel: amdgpu 0000:03:00.0: amdgpu: Failed to power ungate JPEG!
May 06 18:11:09 aoaaptop kernel: amdgpu 0000:03:00.0: amdgpu: Msg issuing pre-check failed and SMU may be not in the right state!
May 06 18:11:09 aoaaptop kernel: [drm] VCN decode and encode initialized successfully(under DPG Mode).
May 06 18:11:09 aoaaptop kernel: [drm:amdgpu_dpm_enable_uvd [amdgpu]] *ERROR* Dpm enable uvd failed, ret = -5. 
May 06 18:11:09 aoaaptop kernel: amdgpu 0000:03:00.0: amdgpu: Failed to power ungate VCN!
May 06 18:11:09 aoaaptop kernel: amdgpu 0000:03:00.0: amdgpu: Msg issuing pre-check failed and SMU may be not in the right state!
May 06 18:11:09 aoaaptop kernel: amdgpu 0000:03:00.0: amdgpu: Fail to set workload type 2
May 06 18:11:09 aoaaptop kernel: amdgpu 0000:03:00.0: amdgpu: Msg issuing pre-check failed and SMU may be not in the right state!
May 06 18:11:09 aoaaptop kernel: amdgpu 0000:03:00.0: amdgpu: Failed to disable gfxoff!
May 06 18:11:09 aoaaptop kernel: [drm:smu_v12_0_gfx_off_control [amdgpu]] *ERROR* disable gfxoff timeout and failed!
May 06 18:11:09 aoaaptop kernel: amdgpu 0000:03:00.0: amdgpu: Msg issuing pre-check failed and SMU may be not in the right state!
May 06 18:11:09 aoaaptop kernel: nvme nvme0: 16/0/0 default/read/poll queues
May 06 18:11:09 aoaaptop kernel: amdgpu 0000:03:00.0: amdgpu: Failed to update WMTABLE!
May 06 18:11:09 aoaaptop kernel: amdgpu 0000:03:00.0: amdgpu: Msg issuing pre-check failed and SMU may be not in the right state!
May 06 18:11:09 aoaaptop kernel: [drm] DMUB hardware initialized: version=0x01020008
May 06 18:11:09 aoaaptop kernel: amdgpu 0000:03:00.0: amdgpu: Failed to power ungate SDMA!
May 06 18:11:09 aoaaptop kernel: amdgpu 0000:03:00.0: amdgpu: Msg issuing pre-check failed and SMU may be not in the right state!
May 06 18:11:09 aoaaptop kernel: amdgpu 0000:03:00.0: amdgpu: SMU is resumed successfully!
May 06 18:11:09 aoaaptop kernel: amdgpu 0000:03:00.0: amdgpu: failed send message:      SetGfxCGPG (47)         param: 0x00000001 response 0xff
May 06 18:11:09 aoaaptop kernel: amdgpu 0000:03:00.0: amdgpu: dpm has been disabled
May 06 18:11:09 aoaaptop kernel: amdgpu 0000:03:00.0: amdgpu: SMU is resuming...
May 06 18:11:09 aoaaptop kernel: [drm] PCIE GART of 1024M enabled (table at 0x000000F400900000).
May 06 18:11:09 aoaaptop kernel: pci 0000:00:00.2: PCI INT A: no GSI
May 06 18:11:09 aoaaptop kernel: pci 0000:00:00.2: can't derive routing for PCI INT A
May 06 18:11:09 aoaaptop kernel: ACPI: EC: interrupt unblocked
May 06 18:11:09 aoaaptop kernel: ACPI: EC: interrupt blocked
May 06 18:11:09 aoaaptop kernel: printk: Suspending console(s) (use no_console_suspend to debug)
May 06 18:11:09 aoaaptop kernel: Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.
May 06 18:11:09 aoaaptop kernel: OOM killer disabled.
May 06 18:11:09 aoaaptop kernel: Freezing user space processes ... (elapsed 0.001 seconds) done.
May 06 18:11:09 aoaaptop kernel: Filesystems sync: 0.005 seconds
(note: lid opened at 18:11:09)
May 06 18:10:59 aoaaptop kernel: PM: suspend entry (s2idle)
May 06 18:10:59 aoaaptop systemd-sleep[6932]: Suspending system...
May 06 18:10:58 aoaaptop systemd[1]: Starting Suspend...
May 06 18:10:58 aoaaptop systemd[1]: Reached target Sleep.
(note: lid closed, trimmed unrelated messages)

The symptoms are the same: suspending worked the first time, error occurs during resuming, and suspending for the second time freezes the computer.
I've tried resetting after booting, doesn't work, and forcing a reset after resuming.
journalctl --reverse after resetting:

May 06 18:28:18 aoaaptop kernel: amdgpu 0000:03:00.0: amdgpu: GPU reset end with ret = -5
May 06 18:28:18 aoaaptop kernel: amdgpu 0000:03:00.0: amdgpu: GPU reset(2) failed
May 06 18:28:18 aoaaptop kernel: amdgpu 0000:03:00.0: amdgpu: ASIC reset failed with error, -5 for drm dev, 0000:03:00.0
May 06 18:28:18 aoaaptop kernel: amdgpu 0000:03:00.0: amdgpu: Mode2 reset failed!
May 06 18:28:18 aoaaptop kernel: amdgpu 0000:03:00.0: amdgpu: Msg issuing pre-check failed and SMU may be not in the right state!
May 06 18:28:18 aoaaptop kernel: amdgpu 0000:03:00.0: amdgpu: MODE2 reset
May 06 18:28:18 aoaaptop kernel: [drm] free PSP TMR buffer
May 06 18:28:18 aoaaptop kernel: amdgpu 0000:03:00.0: amdgpu: Msg issuing pre-check failed and SMU may be not in the right state!
May 06 18:28:18 aoaaptop kernel: amdgpu 0000:03:00.0: [drm:amdgpu_ring_test_helper [amdgpu]] *ERROR* ring kiq_2.1.0 test failed (-110)
May 06 18:28:18 aoaaptop kernel: amdgpu 0000:03:00.0: amdgpu: Failed to power gate SDMA!
May 06 18:28:18 aoaaptop kernel: amdgpu 0000:03:00.0: amdgpu: Msg issuing pre-check failed and SMU may be not in the right state!
May 06 18:28:18 aoaaptop kernel: amdgpu 0000:03:00.0: amdgpu: Failed to disable gfxoff!
May 06 18:28:18 aoaaptop kernel: amdgpu 0000:03:00.0: amdgpu: Msg issuing pre-check failed and SMU may be not in the right state!
May 06 18:28:18 aoaaptop kernel: amdgpu 0000:03:00.0: amdgpu: GPU reset begin!

Tried hibernation, and resuming didn't cause any problems. I've been replacing suspend with hibernate since upgrading, but my SSD is screaming.

Last edited by aoaaceai (2021-07-22 12:44:09)

Offline

#2 2021-05-06 12:08:22

nunopenim
Member
From: Portugal
Registered: 2021-03-06
Posts: 21

Re: [Solved] kernel 5.12 on Ryzen 4700U - suspending breaks amdgpu

Well, as I own a Ryzen 7 4700U too, but with only s2idle, I was never able to get suspend to work. I used only hibernate. Truth is, many times I close my PC with nothing opened, so I replaced that habit with a shutdown. Then kept hibernation for this. This post actually gives me hope in seeing suspending working.


Check my GitHub here: github.com/nunopenim

I apologize in advance if some of my comments or replies don't make any sense. I am currently dealing with a bit of an alcohol problem, and I might be drunk at the time! Sorry and thank you for understanding!

Offline

#3 2021-06-20 08:24:06

dante666
Member
From: Hyderabad, India
Registered: 2014-03-01
Posts: 3

Re: [Solved] kernel 5.12 on Ryzen 4700U - suspending breaks amdgpu

I too have a Ryzen 5500U and I am able to suspend once but doesn't work the next time on kernel 5.12 and I see similar errors.

When it works,

Jun 20 07:25:58 vishwakarma-portable kernel: amdgpu 0000:03:00.0: amdgpu: Msg issuing pre-check failed and SMU may be not in the right state!
Jun 20 07:25:58 vishwakarma-portable kernel: amdgpu 0000:03:00.0: amdgpu: ring jpeg_dec uses VM inv eng 6 on hub 1
Jun 20 07:25:58 vishwakarma-portable kernel: amdgpu 0000:03:00.0: amdgpu: ring vcn_enc1 uses VM inv eng 5 on hub 1
Jun 20 07:25:58 vishwakarma-portable kernel: amdgpu 0000:03:00.0: amdgpu: ring vcn_enc0 uses VM inv eng 4 on hub 1
Jun 20 07:25:58 vishwakarma-portable kernel: amdgpu 0000:03:00.0: amdgpu: ring vcn_dec uses VM inv eng 1 on hub 1
Jun 20 07:25:58 vishwakarma-portable kernel: amdgpu 0000:03:00.0: amdgpu: ring sdma0 uses VM inv eng 0 on hub 1
Jun 20 07:25:58 vishwakarma-portable kernel: amdgpu 0000:03:00.0: amdgpu: ring kiq_2.1.0 uses VM inv eng 11 on hub 0
Jun 20 07:25:58 vishwakarma-portable kernel: amdgpu 0000:03:00.0: amdgpu: ring comp_1.3.1 uses VM inv eng 10 on hub 0
Jun 20 07:25:58 vishwakarma-portable kernel: amdgpu 0000:03:00.0: amdgpu: ring comp_1.2.1 uses VM inv eng 9 on hub 0
Jun 20 07:25:58 vishwakarma-portable kernel: amdgpu 0000:03:00.0: amdgpu: ring comp_1.1.1 uses VM inv eng 8 on hub 0
Jun 20 07:25:58 vishwakarma-portable kernel: amdgpu 0000:03:00.0: amdgpu: ring comp_1.0.1 uses VM inv eng 7 on hub 0
Jun 20 07:25:58 vishwakarma-portable kernel: amdgpu 0000:03:00.0: amdgpu: ring comp_1.3.0 uses VM inv eng 6 on hub 0
Jun 20 07:25:58 vishwakarma-portable kernel: amdgpu 0000:03:00.0: amdgpu: ring comp_1.2.0 uses VM inv eng 5 on hub 0
Jun 20 07:25:58 vishwakarma-portable kernel: amdgpu 0000:03:00.0: amdgpu: ring comp_1.1.0 uses VM inv eng 4 on hub 0
Jun 20 07:25:58 vishwakarma-portable kernel: amdgpu 0000:03:00.0: amdgpu: ring comp_1.0.0 uses VM inv eng 1 on hub 0
Jun 20 07:25:58 vishwakarma-portable kernel: amdgpu 0000:03:00.0: amdgpu: ring gfx uses VM inv eng 0 on hub 0
Jun 20 07:25:58 vishwakarma-portable kernel: [drm] JPEG decode initialized successfully.
Jun 20 07:25:58 vishwakarma-portable kernel: [drm:jpeg_v2_0_set_powergating_state [amdgpu]] *ERROR* Dpm enable jpeg failed, ret = -5. 
Jun 20 07:25:58 vishwakarma-portable kernel: amdgpu 0000:03:00.0: amdgpu: Failed to power ungate JPEG!
Jun 20 07:25:58 vishwakarma-portable kernel: amdgpu 0000:03:00.0: amdgpu: Msg issuing pre-check failed and SMU may be not in the right state!
Jun 20 07:25:58 vishwakarma-portable kernel: [drm] VCN decode and encode initialized successfully(under DPG Mode).
Jun 20 07:25:58 vishwakarma-portable kernel: [drm:amdgpu_dpm_enable_uvd [amdgpu]] *ERROR* Dpm enable uvd failed, ret = -5. 
Jun 20 07:25:58 vishwakarma-portable kernel: amdgpu 0000:03:00.0: amdgpu: Failed to power ungate VCN!
Jun 20 07:25:58 vishwakarma-portable kernel: amdgpu 0000:03:00.0: amdgpu: Msg issuing pre-check failed and SMU may be not in the right state!
Jun 20 07:25:58 vishwakarma-portable kernel: amdgpu 0000:03:00.0: amdgpu: Fail to set workload type 2
Jun 20 07:25:58 vishwakarma-portable kernel: amdgpu 0000:03:00.0: amdgpu: Msg issuing pre-check failed and SMU may be not in the right state!
Jun 20 07:25:58 vishwakarma-portable kernel: amdgpu 0000:03:00.0: amdgpu: Failed to disable gfxoff!
Jun 20 07:25:58 vishwakarma-portable kernel: [drm:smu_v12_0_gfx_off_control [amdgpu]] *ERROR* disable gfxoff timeout and failed!
Jun 20 07:25:58 vishwakarma-portable kernel: amdgpu 0000:03:00.0: amdgpu: Msg issuing pre-check failed and SMU may be not in the right state!
Jun 20 07:25:58 vishwakarma-portable kernel: usb 1-4: reset full-speed USB device number 3 using xhci_hcd
Jun 20 07:25:58 vishwakarma-portable kernel: nvme nvme0: 16/0/0 default/read/poll queues
Jun 20 07:25:58 vishwakarma-portable kernel: amdgpu 0000:03:00.0: amdgpu: Failed to update WMTABLE!
Jun 20 07:25:58 vishwakarma-portable kernel: amdgpu 0000:03:00.0: amdgpu: Msg issuing pre-check failed and SMU may be not in the right state!
Jun 20 07:25:58 vishwakarma-portable kernel: [drm] DMUB hardware initialized: version=0x01020008
Jun 20 07:25:58 vishwakarma-portable kernel: amdgpu 0000:03:00.0: amdgpu: Failed to power ungate SDMA!
Jun 20 07:25:58 vishwakarma-portable kernel: amdgpu 0000:03:00.0: amdgpu: Msg issuing pre-check failed and SMU may be not in the right state!
Jun 20 07:25:58 vishwakarma-portable kernel: amdgpu 0000:03:00.0: amdgpu: SMU is resumed successfully!
Jun 20 07:25:58 vishwakarma-portable kernel: amdgpu 0000:03:00.0: amdgpu: failed send message:      SetGfxCGPG (47)         param: 0x00000001 response 0xff
Jun 20 07:25:58 vishwakarma-portable kernel: amdgpu 0000:03:00.0: amdgpu: dpm has been disabled
Jun 20 07:25:58 vishwakarma-portable kernel: amdgpu 0000:03:00.0: amdgpu: SMU is resuming...

When it doesn't

Jun 20 07:27:38 vishwakarma-portable systemd-logind[376]: System is powering down.
Jun 20 07:27:38 vishwakarma-portable systemd-logind[376]: Powering Off...
Jun 20 07:27:38 vishwakarma-portable systemd-logind[376]: Power key pressed.
Jun 20 07:27:00 vishwakarma-portable kernel: amdgpu 0000:03:00.0: amdgpu: GPU reset begin!
Jun 20 07:27:00 vishwakarma-portable kernel: [drm:amdgpu_job_timedout [amdgpu]] *ERROR* Process information: process kitty pid 623 thread kitty:cs0 pid 624
Jun 20 07:27:00 vishwakarma-portable kernel: [drm:amdgpu_job_timedout [amdgpu]] *ERROR* ring gfx timeout, signaled seq=24865, emitted seq=24869
....
Jun 20 07:26:47 vishwakarma-portable kernel: amdgpu 0000:03:00.0: amdgpu: GPU reset end with ret = -5
Jun 20 07:26:47 vishwakarma-portable kernel: amdgpu 0000:03:00.0: amdgpu: GPU reset(1) failed
Jun 20 07:26:47 vishwakarma-portable kernel: amdgpu 0000:03:00.0: amdgpu: ASIC reset failed with error, -5 for drm dev, 0000:03:00.0
Jun 20 07:26:47 vishwakarma-portable kernel: amdgpu 0000:03:00.0: amdgpu: Mode2 reset failed!
Jun 20 07:26:47 vishwakarma-portable kernel: amdgpu 0000:03:00.0: amdgpu: Msg issuing pre-check failed and SMU may be not in the right state!
Jun 20 07:26:47 vishwakarma-portable kernel: amdgpu 0000:03:00.0: amdgpu: MODE2 reset
Jun 20 07:26:47 vishwakarma-portable kernel: [drm] free PSP TMR buffer
Jun 20 07:26:47 vishwakarma-portable kernel: amdgpu 0000:03:00.0: amdgpu: Msg issuing pre-check failed and SMU may be not in the right state!
Jun 20 07:26:47 vishwakarma-portable kernel: amdgpu 0000:03:00.0: amdgpu: GPU reset begin!
Jun 20 07:26:47 vishwakarma-portable kernel: [drm:amdgpu_job_timedout [amdgpu]] *ERROR* Process information: process  pid 0 thread  pid 0
Jun 20 07:26:47 vishwakarma-portable kernel: [drm:amdgpu_job_timedout [amdgpu]] *ERROR* ring sdma0 timeout, signaled seq=710, emitted seq=711
....
Jun 20 07:26:31 vishwakarma-portable kernel: amdgpu 0000:03:00.0: PM: failed to resume async: error -5
Jun 20 07:26:31 vishwakarma-portable kernel: PM: dpm_run_callback(): pci_pm_resume+0x0/0xe0 returns -5
Jun 20 07:26:31 vishwakarma-portable kernel: amdgpu 0000:03:00.0: amdgpu: amdgpu_device_ip_resume failed (-5).
Jun 20 07:26:31 vishwakarma-portable kernel: [drm:amdgpu_device_ip_resume_phase2 [amdgpu]] *ERROR* resume of IP block <smu> failed -5
Jun 20 07:26:31 vishwakarma-portable kernel: amdgpu 0000:03:00.0: amdgpu: Failed to setup smc hw!
Jun 20 07:26:31 vishwakarma-portable kernel: amdgpu 0000:03:00.0: amdgpu: Failed to SetDriverDramAddr!
Jun 20 07:26:31 vishwakarma-portable kernel: amdgpu 0000:03:00.0: amdgpu: Msg issuing pre-check failed and SMU may be not in the right state!
Jun 20 07:26:31 vishwakarma-portable kernel: amdgpu 0000:03:00.0: amdgpu: SMU is resuming...
Jun 20 07:26:31 vishwakarma-portable kernel: [drm] PCIE GART of 1024M enabled (table at 0x000000F400900000).
Jun 20 07:26:31 vishwakarma-portable kernel: pci 0000:00:00.2: PCI INT A: no GSI
Jun 20 07:26:31 vishwakarma-portable kernel: pci 0000:00:00.2: can't derive routing for PCI INT A
Jun 20 07:26:31 vishwakarma-portable kernel: ACPI: EC: interrupt unblocked
Jun 20 07:26:31 vishwakarma-portable kernel: ACPI: EC: interrupt blocked
Jun 20 07:26:31 vishwakarma-portable kernel: amdgpu 0000:03:00.0: amdgpu: Failed to power gate SDMA!
Jun 20 07:26:31 vishwakarma-portable kernel: amdgpu 0000:03:00.0: amdgpu: Msg issuing pre-check failed and SMU may be not in the right state!

Cogito ergo sum.

Offline

#4 2021-06-20 12:26:55

dante666
Member
From: Hyderabad, India
Registered: 2014-03-01
Posts: 3

Re: [Solved] kernel 5.12 on Ryzen 4700U - suspending breaks amdgpu

There are some patches in the new Kernel that may be able to fix this issue.

For now, to avoid this, you could disable dynamic power management until a better solution arrives.

This could lead to loss of work so I did this as a quick fix and works in my case.

https://wiki.archlinux.org/title/Kernel … odprobe.d/

options.conf
------------------------------------
# Disabling dpm fixes the resume after suspend issue on 5.12
options amdgpu dpm=0

You could also try building 5.13-rc6 and see if that works.


Cogito ergo sum.

Offline

#5 2021-06-22 10:53:45

sxmwht
Member
Registered: 2020-05-15
Posts: 9

Re: [Solved] kernel 5.12 on Ryzen 4700U - suspending breaks amdgpu

Ryzen 4500U here, also desperate for suspend to work. I'm finding I'm hardly ever using my laptop as it's just a faff with no suspend

Offline

#6 2021-06-23 05:56:02

arglebargle
Member
Registered: 2020-10-08
Posts: 6

Re: [Solved] kernel 5.12 on Ryzen 4700U - suspending breaks amdgpu

There's a huge thread about this issue on gitlab here: https://gitlab.freedesktop.org/drm/amd/ … ote_967616 (read backward in this comment chain, this is where all of the patches are; this page takes ages to load.)

The short answer is that there are 10 patches landing in 5.14 that enable modern suspend on Renoir/Cezanne machines and one PCI quirk patch for amd-xhci that won't be accepted upstream until AMD issues errata, but it's needed on many machines.

The core patches needed are here: https://gitlab.com/belegdol/kernel-ark/ … am-newnvme -- you'll want the last 11 commits after 5.12.11. There are another 6 commits in another branch that are "nice to haves" for diagnosing s0ix suspend problems.

Here's a PKGBUILD for the stock Arch kernel with all of those applied if you want to build a kernel with working suspend right now: https://github.com/arglebargle-arch/lin … x-PKGBUILD -- have a look at the changes to the PKGBUILD and it should be straightforward to add those patches onto any other kernel variant you want to use instead.

edit:

They're still chasing down some plug/unplug event related suspend issues; these seem to happen across a variety of OEMs so be aware of plugging/unplugging while suspended. Feel free to jump into that gitlab thread with test results, the kernels I've uploaded are all you need to help get this fixed. You can find ready to build PKGBUILDs for `linux-amd-s0ix`, `xanmod-rog` (Xanmod with a few hardware enablement patches for ASUS laptops plus the s0ix patches), `linux-g14` (Arch kernel with the same patches) and `linux-mainline` with the s0ix patches here: https://github.com/arglebargle-arch

I'll keep those PKGBUILDs updated as new patches for our machines become available to test.

If you trust binaries from random people on the internet (and you shouldn't) I've made packages for these kernels available here:
https://drive.google.com/drive/folders/ … sp=sharing

Last edited by arglebargle (2021-06-23 23:26:19)

Offline

#7 2021-06-29 18:27:54

magillos
Member
Registered: 2010-07-03
Posts: 29

Re: [Solved] kernel 5.12 on Ryzen 4700U - suspending breaks amdgpu

...Here's a PKGBUILD for the stock Arch kernel...

This is an amazing work you have done! 5.12.13 has some quite annoying issue with gpu power usage. Would your PKBUILD be free of that problem too?

Last edited by magillos (2021-06-29 18:30:34)

Offline

#8 2021-06-29 18:42:47

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 13,269

Re: [Solved] kernel 5.12 on Ryzen 4700U - suspending breaks amdgpu

Should be the relevant patches are part of the PKGBUILD

Offline

#9 2021-06-29 20:20:02

magillos
Member
Registered: 2010-07-03
Posts: 29

Re: [Solved] kernel 5.12 on Ryzen 4700U - suspending breaks amdgpu

V1del wrote:

Should be the relevant patches are part of the PKGBUILD

Power usage seems fine at 4-8W compared to 15-20W with regular ARCH 5.12.13. Laptops sleeps fine but only wakes up with power button which pressing takes me straight to log out/shutdown screen on the wake up; it's not a big deal though. Pressing any other key only make the keyboard back light flickering.

edit: It's actually not just flickering. The keyboard backlit can not be adjusted after resume; it stays in the state it was suspended. Even with the laptop's lid shut it would stay on too. Only complete power off/on cycle helps to restore its proper functioning.

Last edited by magillos (2021-07-06 10:32:28)

Offline

#10 2021-07-22 12:43:40

aoaaceai
Member
Registered: 2021-04-21
Posts: 7

Re: [Solved] kernel 5.12 on Ryzen 4700U - suspending breaks amdgpu

Solved after upgrading to kernel 5.13.

Last edited by aoaaceai (2021-07-22 12:43:53)

Offline

Board footer

Powered by FluxBB