On 9/8/25 4:19 AM, Greg Kroah-Hartman wrote:
On Sat, Sep 06, 2025 at 09:36:31AM -0500, Mario Limonciello (AMD) wrote:
A variety of issues both in function and in power consumption have been
raised as a result of devices not being put into a low power state when
the system is powered off.
There have been some localized changes[1] to PCI core to help these issues,
but they have had various downsides.
This series instead tries to use the S4 flow when the system is being
powered off. This lines up the behavior with what other operating systems
do as well. If for some reason that fails or is not supported, run their
shutdown() callbacks.
Cc: AceLan Kao <acelan....@canonical.com>
Cc: Kai-Heng Feng <kaihe...@nvidia.com>
Cc: Mark Pearson <mpearson-len...@squebb.ca>
Cc: Merthan Karakaş <m3rth...@gmail.com>
Cc: Eric Naim <dn...@cachyos.org>
---
v6 RESEND:
* Resent because Greg said he was ignoring it and would like the whole
series to be able to review.
Messy, but wow, I'll trust you all that this actually works properly.
Yes; I double checked from a UART log all devices (now) went to correct
state and from power measurement hardware the respective drop in power.
I will note I have a sampling bias of hardware being x86 AMD hardware.
Some of the testers of the series also tested Intel hardware which had
similar power consumption problem, and I know there were improvements
there too.
We probably will have to wait for linux-next for non-x86 hardware coverage.
No objections from me, but I don't want my ack on this as I don't know
how to maintain it :)
I mean - if all goes well even a failed S4 flow should fall back to old
path shutdown. I *did contrive some failures* in an earlier version of
the series and confirmed in the UART log it emitted the printk that it
was falling back to shutdown.
I had two ideas that maybe could help for regression risk though:
1) I could add a shutdown= kernel parameter. I'm not sure what words to
use for the two paths but the idea would be if someone had a shutdown
failure they could isolate if it's due to this by adding the parameter.
2) I could make a Documentation/ file explaining some examples how to
get the shutdown log saved to pstore in case they don't have a UART
available.