[PATCH 0/2] amd_pmc: Delay s2idle suspend for some devices
From: Daniel Gibson
Date: Fri May 01 2026 - 00:06:25 EST
On some AMD Zen3 and Zen3+-based Lenovo IdeaPad laptops the keyboard and
the lid switch stop working after the first suspend, until rebooted.
More specifically, they stop sending events when pressing a key or
closing the lid - it's still possible to toggle the capslock- and
numlock-LEDs with an external keyboard or read the lid state at
/proc/acpi/button/lid/LID/state.
See also https://bugzilla.kernel.org/show_bug.cgi?id=221383
It appears that suspending and/or resuming gets the EC into a broken
state. This problem doesn't happen on Windows and Mario Limonciello
mentioned that the Windows kernel gives hardware and software some time
before actually suspending (before activating HW DRIPS), while Linux
(or the amd_pmc module) does that immediately, so it may be worth trying
if calling msleep() in amd_pmc_s2idle_check() helps.
It turned out that sleeping for 2.5 seconds at that point indeed makes
the problems disappear. Sleeping for 1.5 seconds wasn't enough.
Luckily there was already a quirk that does exactly that under other
circumstances, so I could build on that:
https://lore.kernel.org/platform-driver-x86/20250414162446.3853194-1-superm1@xxxxxxxxxx/
I enable this quirk for two lines of Lenovo Laptops that are known to
have this problem and for which the patch has been successfully tested.
I found several reports of these or similar issues on the web, for
different devices, so in a second commit I added a parameter to the
kernel module that allows enabling or disabling this, which will make
it easy for people whose devices aren't matched yet to test this quirk.
Thanks to Mario Limonciello for his support and to Sindre Henriksen
for testing my patch!
Daniel Gibson (2):
platform/x86/amd/pmc: Delay suspend for some Lenovo Laptops
platform/x86/amd/pmc: Add delay_suspend module argument
drivers/platform/x86/amd/pmc/pmc-quirks.c | 36 +++++++++++++++++++++++
drivers/platform/x86/amd/pmc/pmc.c | 18 +++++++++++-
drivers/platform/x86/amd/pmc/pmc.h | 1 +
3 files changed, 54 insertions(+), 1 deletion(-)
--
2.48.1