Bug 201305 - Laptop needs "nomodeset" to hibernate. - AMD A12-9720P RADEON R7 RX540
Summary: Laptop needs "nomodeset" to hibernate. - AMD A12-9720P RADEON R7 RX540
Status: RESOLVED PATCH_ALREADY_AVAILABLE
Alias: None
Product: Power Management
Classification: Unclassified
Component: Hibernation/Suspend (show other bugs)
Hardware: x86-64 Linux
: P1 high
Assignee: Rafael J. Wysocki
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-10-01 23:33 UTC by Nelson G
Modified: 2021-03-23 20:51 UTC (History)
7 users (show)

See Also:
Kernel Version: 5.0
Subsystem:
Regression: No
Bisected commit-id:


Attachments
journalctl (with nomodeset) (150.06 KB, text/plain)
2018-10-01 23:33 UTC, Nelson G
Details
dmesg (nomodeset) (72.39 KB, text/plain)
2018-10-01 23:34 UTC, Nelson G
Details
dmesg (defaults) (120.31 KB, text/plain)
2018-10-01 23:35 UTC, Nelson G
Details
lshw (defaults) (20.25 KB, text/plain)
2018-10-01 23:41 UTC, Nelson G
Details
dmesg of hibernate hang with initcall_debug (221.41 KB, text/plain)
2019-03-14 09:50 UTC, woolf
Details

Description Nelson G 2018-10-01 23:33:29 UTC
Created attachment 278881 [details]
journalctl (with nomodeset)

Hi.

I've been having trouble with my laptop's S3 and S4 states, I got it a few months ago, the latest kernel was 4.14, neither S3 or S4 states were reliable. 
At the moment (kernel 4.18), S3 it's not perfect, but it works, although I wouldn't recommend using it too much because sometimes it might not comeback properly, just a blank screen or the lockscreen frozen, but you can still use sysrq so it's fine atm. I've tried disabling 'open lid to wake up' on BIOS but it doesn't change anything.
I've already tried several distros and kernels. Best thing to do is to use the latest kernel/firmware since the laptop works better and better each upgrade. At the moment I'm struggling with poor wifi, wrong battery readings, and the absence of S4 state.

S4 had never worked, It seems to create the image, but it fails to shutdown the machine, the screen goes black, but the machine is still on, fans and everything, can't use sysrq, you have to press the power off button for a few seconds and shut it down. Otherwise it'll stay on, even if battery is critically low. I had to use the warranty to replace the battery actually, because it happened to me a few times, and a cell got swollen, my bad lol

I thought it was BIOS related, but today I tried 'nomodeset' and hibernation works perfect, as good as it does on Windows 10, I tried at least 5 times, and it came back successfully always, no blank screens, freezes or anything. Very smooth,fast and stable. Still not a solution, because with 'nomodeset' fans are always kept on, brightness doesn't doesn't work properly, etc. Graphically glitchy.
With 'nomodeset' S3 is worst. quite buggy. But it goes to sleep and comes back OK, still with a blank screen most of the time, still having to rely on sysrq to reboot safely. Impressed to see that S4 works far better if not perfect with 'nomodeset'.
Might be because of amdgpu firmware or something else?

I'll attach journalctl and dmesg from system successfully hibernating with boot parameter 'nomodeset'.
And my lshw and dmesg with the default parameters.

I'm not able to recover the journald from a failed hibernate session on Debian, but I am sure the last thing it does is to create the image, I remember seeing that on a Fedora installation I had, but at the moment I can't test it with a different distro or mainline kernel, might be able on a few weeks, but I think debian is enough if more info is needed.

(p.s: sorry for any misspelling)
Comment 1 Nelson G 2018-10-01 23:34:34 UTC
Created attachment 278883 [details]
dmesg (nomodeset)
Comment 2 Nelson G 2018-10-01 23:35:16 UTC
Created attachment 278885 [details]
dmesg (defaults)
Comment 3 Nelson G 2018-10-01 23:41:11 UTC
Created attachment 278887 [details]
lshw (defaults)
Comment 4 woolf 2019-03-14 09:50:16 UTC
Created attachment 281817 [details]
dmesg of hibernate hang with  initcall_debug
Comment 5 woolf 2019-03-14 09:50:34 UTC
1. When booting system in normal mode when trying to hibernate via "systemctl hibernate" system is turning off display, and freezes. No input reaction, or access via ssh. If system is booted with amdgpu module blacklisted (without initrd) - hibernate and resume is success. I was tried iommu=off and iommu=soft, nothing changes. I'm using AMD APU A10-9600p. Also, I have system with AMD APU A10-7300, it's working without issues. In Windows system is also hibernates successfully.


2. Now kernel id 5.0-rc8, same behavior was tested from kernels from 4.14 to latest.


3. This is never worked.

4. Reproducible always. Just type "systemctl hibernate" in root terminal.
Comment 6 woolf 2019-03-15 10:49:23 UTC
I tried some debug, and as I can see, system freezes after
error = dpm_suspend(PMSG_FREEZE);
in hibernate.c
Comment 7 woolf 2019-03-20 20:37:18 UTC
https://bugs.freedesktop.org/show_bug.cgi?id=106571 is similar
Comment 8 woolf 2019-03-20 20:40:43 UTC
i think, that affected all stoney integrated graphics. I'm trying to debug, but have no needed skills. I think, problem in amdkfd part, or related to firmware.
Comment 9 Jaime Barros 2019-04-13 18:20:01 UTC
From kernel 4.16 onwards.
computer incompatible, literally unstable
AMD a12-9720p
Comment 10 Utku Helvacı 2019-07-26 15:59:22 UTC
Issue has been gone!
As of 5.3.0-050300rc1-generic #201907212232 the issue is have been gone.
i have downloaded and installed the kernel via mainline kernel update utility on Pop_OS!
tested both vulkan and opengl.
https://bugzilla.kernel.org/show_bug.cgi?id=201077#c37
Comment 11 Nelson G 2019-07-26 17:19:05 UTC
Hello Utku
I am very glad to hear the bug is gone. 
I had to return my Acer laptop thus I can't do anymore tests, if you don't mind I'm marking this bug as resolved.
Cheers.
Comment 12 alvin 2021-01-04 12:09:17 UTC
Similar to mine https://bugzilla.kernel.org/show_bug.cgi?id=210095
I tried many things to debug and also getting the logs out after issuing hibernate, but without proper access to serial port, it may be impossible to know exactly causing hibernate problem.
Comment 13 woolf 2021-03-23 20:51:54 UTC
No, bug is steel unresolved. Kernel 5.11.8 - still same results.

Note You need to log in before you can comment on or make changes to this bug.