Linux Fix Queued For Recent AMD Laptops Failing To Resume From Attached USB Devices

Written by Michael Larabel in AMD on 5 October 2023 at 03:51 PM EDT. 11 Comments
AMD
A fix has made its way into the Linux PCI subsystem's power management branch to address various AMD Ryzen Rembrandt and Phoenix generation laptops failing to resume from suspend when external USB devices are attached for initiating the system resume.

After going through 22 revisions on the Linux kernel mailing list, this change to avoid D3 at suspend for AMD PCIe root ports with USB4 controllers has made it into the PCI subsystem's PM branch. With it going to the power management branch rather than "for-linus", it's likely to be initially merged for the upcoming Linux 6.7 cycle.

Ryzen laptops


The fix is a result of this bug report over resuming from suspend breaking for a Lenovo ThinkPad Z13 running Linux:
"The issue is that I can suspend just fine, but I can't resume using plugged-in USB devices. I usually have the thing docked unless I'm travelling and it lives in a fairly inaccessible place so this is actually quite annoying. Normally I would mash some keys on the external USB keyboard to but now I have to contort around to be able to reach the power button!"

This doesn't happen with all Ryzen 6000 and 7000 series mobile laptops but with various models. The patch with this fix/workaround explains:
"Iain reports that USB devices can't be used to wake a Lenovo Z13 from suspend. This occurs because on some AMD platforms, even though the Root Ports advertise PME_Support for D3hot and D3cold, wakeup events from devices on a USB4 controller don't result in wakeup interrupts from the Root Port when amd-pmc has put the platform in a hardware sleep state.

If amd-pmc will be involved in the suspend, remove D3hot and D3cold from the PME_Support mask of Root Ports above USB4 controllers so we avoid those states if we need wakeups.

Restore D3 support at resume so that it can be used by runtime suspend.

This affects both AMD Rembrandt and Phoenix SoCs."

So if you've had similar troubles with AMD laptops on Linux failing to resume from suspend, checking on connected USB devices is a worthwhile consideration and at least this fix is now on the way to being mainlined.
Related News
About The Author
Michael Larabel

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via MichaelLarabel.com.

Popular News This Week