Improved Debugging Of Suspend/Resume For AMD Ryzen Laptops On Linux Coming With MP2 STB

Written by Michael Larabel in AMD on 8 March 2024 at 09:43 AM EST. 2 Comments
AMD
AMD engineers and those debugging s2idle suspend/resume issues for Ryzen laptops under Linux will soon have more information at disposal for newer SoCs supporting MP2 STB functionality.

AMD Linux engineers have been working on wiring up the AMD PMC driver to support MP2 Smart Trace Buffer (STB) functionality. MP2 STB is an improved buffer over MP1 for providing more information around the most recent s2idle suspend/resume event. The AMD s2idle support has come a long way the past few years but there still are occasionally suspend/resume issues being discovered across different AMD laptops with Linux.

AMD MP2 STB


The AMD MP2 STB patches explain of the new MP2 functionality:
"A data buffer known as the STB (Smart Trace Buffer) is a circular buffer which is a low-level log to assist in debugging by providing insights into any potential hangs or stalls that may occur during the S2Idle suspend/resume processes.

The current PMC driver retrieves STB data from MP1, but there can be scenarios where MP1 might hang or become unresponsive, leading to the loss of critical data present in the STB buffer. This defeats the purpose of the STB buffer, which was originally meant to help identify system failures.

This feature creates stb_read_previous_boot debugfs allows users to retrieve the STB log from MP2 specifically from the last occurrence of the S2Idle suspend/resume. A userspace daemon can access STB log of last S2Idle suspend/resume which can help to troubleshoot potential issues related to hangs or stalls during the S2Idle suspend/resume sequence."

The patches are still undergoing code review so they might not be ready until Linux ~6.10 but at least it's being worked on. It's not clear from the current code which Ryzen SoCs have the MP2 support present vs. MP1, but given the timing is either a late addition for the Ryzen 7000/8000 series or may be in preparation for next-gen laptops.
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