disabling sleep when shutting down
Colin Percival
cperciva at freebsd.org
Sat Sep 26 07:26:50 UTC 2015
Hi all,
I think there is consensus for:
* Using a sysctl (simpler than a device node),
* Setting this sysctl on all architectures,
* Calling the sysctl kern.suspend_blocked,
* Consulting the sysctl from the ACPI code (for now) and possibly from
other platform-specific forms of sleeping (in the indefinite future).
Points without consensus:
* jkim thinks we should prevent suspend when we're dropping to single-user
mode; I'm not sure I see the point, but I don't think there's any harm in
doing that too.
* Ian Smith would like to have suspend blocked for the last 5 minutes before
shutdown(8) signals init to shut the system down. I don't think anyone else
has expressed a desire for this, and some people have raised concerns about
blocking suspend for too long in case a system is running out of battery; so
I'm inclined to leave this out at this point. (It would be easy enough to
add the sysctl-frobbing to shutdown(8) if desired later.)
With the above in mind, I've written (but not yet actually compiled or tested,
so beware of typos) a patch which I think makes sense. If nobody is violently
opposed to this I'll make sure I got the details right and then commit this in
a few days.
--
Colin Percival
Security Officer Emeritus, FreeBSD | The power to serve
Founder, Tarsnap | www.tarsnap.com | Online backups for the truly paranoid
-------------- next part --------------
A non-text attachment was scrubbed...
Name: block_suspend.patch
Type: text/x-patch
Size: 2928 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-acpi/attachments/20150926/698fd170/attachment.bin>
More information about the freebsd-acpi
mailing list