On Thu, Dec 12, 2024 at 4:14 PM Christoph Hellwig <hch@xxxxxx> wrote: > > On Thu, Dec 12, 2024 at 01:49:15PM +0100, Ulf Hansson wrote: > > Right. This seems to somewhat work for ACPI types of systems, because > > ACPI is controlling the low power state for all the devices. Based on > > the requested system wide low power state, ACPI can then decide to > > call pm_set_suspend_via_firmware() or not. > > > > Still there is a problem with this for ACPI too. > > > > How does ACPI know whether it's actually a good idea to keep the NVMe > > storage powered in s2idle (ACPI calls pm_set_suspend_via_firmware() > > only for S2R and S2disk!?)? Especially when my laptop only supports > > s2idle and that's what I will use when I close the lid. In this way, > > the NMVe storage will certainly contribute to draining the battery, > > especially when I won't be using my laptop for a couple of days. > > > > In my opinion, we need a better approach that is both flexible and > > that dynamically adjusts based upon the use case. > > Agreed. I'd be happy to work with the PM maintainers to do this, > but I don't really know enough about the PM core to drive it > (as the reply from Rafael to my mail makes pretty clear :)) I'm here to help. Let me know what exactly you want to achieve and we'll see how to make it work.