Bug 215387

Summary: s2idle offered even though firmware is set to deep on Lenovo P14s Gen2 AMD
Product: Drivers Reporter: bjoern.daase
Component: Platform_x86Assignee: Mario Limonciello (AMD) (mario.limonciello)
Status: RESOLVED WILL_NOT_FIX    
Severity: normal CC: mario.limonciello, perry_yuan
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: 5.15.10 Subsystem:
Regression: No Bisected commit-id:

Description bjoern.daase 2021-12-22 15:38:31 UTC
We are coming from https://gitlab.freedesktop.org/drm/amd/-/issues/1824. Mario Limonciello, however, thinks it is a kernel bug in the end.

The problem is as follows. On the Lenovo P14s Gen2 AMD, there are three configurations available:

* "Windows 10" mode selected in BIOS, "s2idle" selected in /sys/power/mem_sleep
* "Linux" mode selected in BIOS, "s2idle" selected in /sys/power/mem_sleep
* "Linux" mode selected in BIOS, "deep" selected in /sys/power/mem_sleep

The first and last combination works as expected. However, the second combination ("deep" in BIOS, "s2idle" selected in Linux), causes weird resume crashes. In the original thread, Mario thinks that the sheer offering of "s2idle" when the BIOS is set to "deep" is a kernel bug - it shouldn't be offering "s2idle" on x86 when the firmware is set to "deep".
Comment 1 Mario Limonciello (AMD) 2022-05-03 14:10:04 UTC
We decided not to stop exposing it but instead have some messaging if a user tries to suspend in a bad combination that there will be higher power consumption.

https://github.com/torvalds/linux/blob/v5.18-rc4/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c#L1062