s2idle fails when battery power on 5800U
Brief summary of the problem:
Machine fails to suspend (s2idle) 100% of the time when is running with battery. It suspends well when plugged in AC.
Hardware description:
- Machine name: HP Pavilion Aero Laptop 13-be0097nr
- CPU: AMD Ryzen 7 5800U with Radeon Graphics
- GPU: 03:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Device [1002:1638] (rev c1)
- System Memory: 16Gb
- Display(s): 1920x1200
- Type of Display Connection: built-in LCD
System information:
- Distro name and Version: Linux Mint 20.2
- Kernel version: 5.14.0-1007-oem
- Custom kernel: kernel from linux-oem-20.04d
- AMD official driver version: N/A
How to reproduce the issue:
Unplug power supply, then put the machine to sleep (or echo 'freeze' > /sys/power/state
).
Machine will go attempt to go to sleep but fail and remains non-operable. Display is off and hard power cycle (log press power button) is required to restart.
Attached files:
Log files (for system lockups / game freezes / crashes)
Captured syslog (/var/log/syslog
) during failure and during a success sleep. Isolated relevant log messages.
Both logs where produced with initcall_debug_enabled
kernel argument:
Looking at the failed log, the relevant lines are:
Nov 17 15:16:06 princeton kernel: [ 113.280369] amd_pmc AMDI0005:00: PM: calling acpi_subsys_suspend_noirq+0x0/0x50 @ 3843, parent: platform
...
Nov 17 15:16:06 princeton kernel: [ 115.280527] amd_pmc AMDI0005:00: SMU response timed out
Nov 17 15:16:06 princeton kernel: [ 115.280533] amd_pmc AMDI0005:00: suspend failed
Nov 17 15:16:06 princeton kernel: [ 115.280535] PM: dpm_run_callback(): acpi_subsys_suspend_noirq+0x0/0x50 returns -110
Nov 17 15:16:06 princeton kernel: [ 115.280543] amd_pmc AMDI0005:00: PM: acpi_subsys_suspend_noirq+0x0/0x50 returned -110 after 2000315 usecs
Nov 17 15:16:06 princeton kernel: [ 115.280549] amd_pmc AMDI0005:00: PM: failed to suspend noirq: error -110
Then eventually the system attempts to resume and a bunch of other failures occurs. I guess error -110 is ETIMEDOUT caused by the SMU not responding in time.
This could be related to the timeout extension (https://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git/commit/?h=fixes&id=3c3c8e88c8712bfe06cd10d7ca77a94a33610cd6)... although it's weird because when plugged in, it is very reliable and computer goes to sleep in < 1 sec. Anyway, I don't know if this version of the kernel I am running contains this fix. but I guess I could rebuild the kernel and try... Let me know.