Linux Workaround Coming For Better s2idle Resume On More AMD Lenovo Laptops
Mario Limonciello of AMD's Linux client team who in recent months has been working on many suspend/resume and power management fixes for AMD Ryzen laptops has continued this quest with the latest patch now pending as a "fix" within the x86 platform drivers subsystem.
The patch was queued this week into the "fixes" branch by x86 platform drivers subsystem maintainer Hans de Goede. The code change is a s2idle resume quirk for various ThinkPad laptops. This should fix s2idle behavior on various AMD Ryzen Lenovo ThinkPads -- or making the resume happen much more timely. The workaround is coming for what equates to problematic system firmware.
Limonciello explained in the patch, "Lenovo laptops that contain NVME SSDs across a variety of generations have
trouble resuming from suspend to idle when the IOMMU translation layer is active for the NVME storage device. This generally manifests as a large resume delay or page faults. These delays and page faults occur as a result of a Lenovo BIOS specific SMI that runs during the D3->D0 transition on NVME devices...Create a quirk that will run early in the resume process to prevent this SMI from running. As any of these machines are fixed, they can be peeled back from this quirk or narrowed down to individual firmware versions."
This should fix s2idle resume handling for Lenovo laptops such as the L14 Gen2 AMD, T14s Gen2 AMD, X13 Gen2 AMD, T14 Gen2 AMD, T14 Gen1 AMD, T14s Gen1 AMD, P14s Gen1 AMD, P14s Gen2 AMD, and P14s Gen2 AMD models. Given it's in the "fixes" branch, it should be sent in as part of the next batch of platform-drivers-x86 fixes for the in-development Linux 5.18 kernel.