Page MenuHomeFreeBSD

Suspend to idle support
Needs ReviewPublic

Authored by bwidawsk on Oct 23 2018, 10:17 PM.
Referenced Files
F72210799: D17675.diff
Sun, Dec 3, 2:45 PM
Unknown Object (File)
Thu, Nov 9, 1:20 PM
Unknown Object (File)
Tue, Nov 7, 7:17 PM
Unknown Object (File)
Tue, Nov 7, 8:47 AM
Unknown Object (File)
Mon, Nov 6, 7:19 AM
Unknown Object (File)
Mon, Nov 6, 7:19 AM
Unknown Object (File)
Oct 27 2023, 8:45 AM
Unknown Object (File)
Oct 25 2023, 2:28 PM



This patch series implements suspend to idle. It was developed on github

Suspend to idle is like s3 except instead of using ACPI to suspend and resume,
it simply idles the CPU. Please see the commit messages on github for a
description of the individual changes. In short, you mean specify S0IDLE for
certain sysctls to enable the support.

For example, sysctl hw.acpi.suspend_state=S0IDLE, will make acpiconf -s3 use
suspend to idle instead of the default (NONE or S3).

On top of this series will be support for s0ix (emulated s3), and then after
that, hopefully some sort of runtime power management. Emulated S3 support is
"done" and being debugged is here:

Test Plan

Set suspend to use suspend to idle, use power button to wake machine.

Diff Detail

Lint Passed
No Test Coverage
Build Status
Buildable 20374
Build 19815: arc lint + arc unit

Event Timeline

Is this one ready to be reviewed?

I think so. I think there are definitely some robustifications needed, but generally it'd be good to know if I need any major overhauls. Also, at this point in the series, it's entirely opt-in, and any regressions should be fixable.

imp added inline comments.

Would it be appropriate to have a printf here? I'm on the fence about this.


Same comment as above.


I see s2idle and other things like that in the rest of the code. Do we need that here too?


would it make sense to make this a named struct instead of repeating?