disabling sleep when shutting down

Hans Petter Selasky hps at selasky.org
Sat Sep 26 07:40:30 UTC 2015


Hi,

On 09/26/15 09:26, Colin Percival wrote:
> Hi all,
>
> I think there is consensus for:
> * Using a sysctl (simpler than a device node),

Presumably a read/write tunable sysctl, RWTUN?

> * 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.

+1

I think this is a good idea. I've seen this issue myself with 
non-FreeBSD OS'es.

--HPS


More information about the freebsd-acpi mailing list