FS#76198 - Kernel 6.0.1 hangs resuming from suspend to ram

Attached to Project: Arch Linux
Opened by Jamp (jamp) - Friday, 14 October 2022, 06:44 GMT
Last edited by Jan Alexander Steffens (heftig) - Friday, 11 November 2022, 09:06 GMT
Task Type Bug Report
Category Packages: Core
Status Closed
Assigned To Jan Alexander Steffens (heftig)
Architecture x86_64
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 3
Private No

Details

Description:

Linux 6.0.1 installed yesterday. Machine is desktop Ryzen 3900X + AMD RX 5800 XT .
After resume from suspend to ram the screen is black, the machine seems to be running since the disk led flashes from time to time.
I have to cycle power to restore normal operation, since the keyboard seems unresponsive.
With earlier kernels suspend to RAM worked well.

Additional info:
* package version(s)
* config and/or log files etc.
* link to upstream bug report, if any

Steps to reproduce:


This task depends upon

Closed by  Jan Alexander Steffens (heftig)
Friday, 11 November 2022, 09:06 GMT
Reason for closing:  Fixed
Additional comments about closing:  linux 6.0.8.arch1-1
Comment by Jamp (jamp) - Friday, 14 October 2022, 19:54 GMT
I add that suspend to disk does not work either.

I found this discussion

https://gitlab.freedesktop.org/drm/amd/-/issues/2164

seems related to AMD Gpu.
Comment by Jamp (jamp) - Sunday, 16 October 2022, 19:50 GMT
Version 6.0.2 is still broken..
reverting to 5.9.13 fixes the problem
Comment by Eric (harpium) - Tuesday, 18 October 2022, 00:40 GMT
I also have a similar issue on X11 with an Intel i5-12600K + AMD RX 5600 XT that started with this kernel update. If I suspend and wake up my PC, the monitor turns on but only shows black, then turns off. I have to switch to a new tty for my monitor to respond and then switch back. This seems to be either an AMD driver or a DPMS issue. Also, I'm using a service that runs a lock screen before suspension. If I disable it, then I don't have this problem.
Comment by slip (slip) - Friday, 21 October 2022, 00:22 GMT Comment by Jamp (jamp) - Saturday, 29 October 2022, 05:47 GMT
Kernel 6.0.5 just installed and the problem is still there ..........................
reverting to 5.19.13
Comment by slip (slip) - Saturday, 29 October 2022, 08:29 GMT
The fix isn't in 6.0.5. It apparently made it into 6.1, but hasn't been picked up into the 6.0.x series yet. AMD dev has requested it though.

https://gitlab.freedesktop.org/drm/amd/-/issues/2164#note_1611205
Comment by Jan Alexander Steffens (heftig) - Saturday, 29 October 2022, 14:05 GMT
They're in 6.0.5-arch1, though. Looks like these patches don't fix your issue, then.
Comment by slip (slip) - Saturday, 29 October 2022, 15:32 GMT
Oh, my bad. I didn't realize Arch had pulled it in. I was just patiently monitoring the git issue. I had just updated about 20 hours ago and was on 6.0.2, so I assumed the other user was building the kernel on their own.

I just updated to 6.0.5 and can confirm a successful suspend and resume on multiple attempts for me.

Thanks, devs!
Comment by Jamp (jamp) - Saturday, 29 October 2022, 18:49 GMT
I tried version 6.0.5 again to double check but no luck. Unfortunately my machine does not resume from suspend.
I disabled the screensaver as suggested by @Eric but it does not work.
Switching consoles as someone suggested as a temporary workaround don't work either.
I went back to 5.19.13.
Comment by Jamp (jamp) - Saturday, 29 October 2022, 19:26 GMT
I made another attempt and found that the machine is not dead. I can connect from another PC.
After logging in I simple restarted the display manager (sddm) and then the display has come back.

In the dmesg log I found what follows, as you can see there is an *ERROR* Failed to pin framebuffer with error -19

So maybe the applied patch does not work for me.

[ 29.386260] [drm] reserve 0x900000 from 0x817d000000 for PSP TMR
[ 29.428564] amdgpu 0000:2f:00.0: amdgpu: RAS: optional ras ta ucode is not available
[ 29.434614] amdgpu 0000:2f:00.0: amdgpu: RAP: optional rap ta ucode is not available
[ 29.434615] amdgpu 0000:2f:00.0: amdgpu: SECUREDISPLAY: securedisplay ta ucode is not available
[ 29.434617] amdgpu 0000:2f:00.0: amdgpu: SMU is resuming...
[ 29.434667] amdgpu 0000:2f:00.0: amdgpu: use vbios provided pptable
[ 29.434669] amdgpu 0000:2f:00.0: amdgpu: smc_dpm_info table revision(format.content): 4.5
[ 29.470400] amdgpu 0000:2f:00.0: amdgpu: SMU is resumed successfully!
[ 29.662760] amdgpu: Move buffer fallback to memcpy unavailable
[ 29.662762] amdgpu 0000:2f:00.0: amdgpu: 00000000af06643b pin failed
[ 29.662763] [drm:dm_plane_helper_prepare_fb [amdgpu] *ERROR* Failed to pin framebuffer with erro
r -19
[ 29.664339] [drm] kiq ring m]ec 2 pipe 1 q 0
[ 29.666326] [drm] VCN decode and encode initialized successfully(under DPG Mode).
[ 29.666466] [drm] JPEG decode initialized successfully.
[ 29.666479] amdgpu 0000:2f:00.0: amdgpu: ring gfx_0.0.0 uses VM inv eng 0 on hub 0
[ 29.666480] amdgpu 0000:2f:00.0: amdgpu: ring comp_1.0.0 uses VM inv eng 1 on hub 0
[ 29.666481] amdgpu 0000:2f:00.0: amdgpu: ring comp_1.1.0 uses VM inv eng 4 on hub 0
[ 29.666481] amdgpu 0000:2f:00.0: amdgpu: ring comp_1.2.0 uses VM inv eng 5 on hub 0
[ 29.666482] amdgpu 0000:2f:00.0: amdgpu: ring comp_1.3.0 uses VM inv eng 6 on hub 0
[ 29.666482] amdgpu 0000:2f:00.0: amdgpu: ring comp_1.0.1 uses VM inv eng 7 on hub 0
[ 29.666483] amdgpu 0000:2f:00.0: amdgpu: ring comp_1.1.1 uses VM inv eng 8 on hub 0
[ 29.666484] amdgpu 0000:2f:00.0: amdgpu: ring comp_1.2.1 uses VM inv eng 9 on hub 0
[ 29.666484] amdgpu 0000:2f:00.0: amdgpu: ring comp_1.3.1 uses VM inv eng 10 on hub 0
[ 29.666485] amdgpu 0000:2f:00.0: amdgpu: ring kiq_2.1.0 uses VM inv eng 11 on hub 0
Comment by Jamp (jamp) - Saturday, 29 October 2022, 21:59 GMT
Also tried by compiling the latest 6.0.6 arch1 kernel from source. I checked the code and the patch seems there.
However it still does not work for me.
Comment by Jamp (jamp) - Thursday, 03 November 2022, 07:57 GMT
I applied the attached patch from https://gitlab.freedesktop.org/drm/amd/-/issues/2213#note_1618476
to v 6.0.6 arch1 and rebuilt from sources and now it works.

Comment by Jamp (jamp) - Saturday, 05 November 2022, 07:59 GMT
Only to report that the freshly installed 6.0.7-arch1 STILL HAS the bug.
Comment by Eric (harpium) - Friday, 11 November 2022, 04:00 GMT
It seems to be fixed on 6.0.8-arch1-1. After resuming I have to press a key so the display turns on. I don't remember needing to do that before, but that's not a big deal.
Comment by Jamp (jamp) - Friday, 11 November 2022, 08:45 GMT
Yep. I confirm. No need to press any key for me. Resume from suspend is OK now.
I noticed that the 6.0.8 arch1 kernel has the above patch while the official 6.0.8 kernel has not been updated yet.

Loading...