disabling sleep when shutting down
Colin Percival
cperciva at freebsd.org
Wed Sep 23 08:38:10 UTC 2015
On 09/22/15 15:38, John Baldwin wrote:
> I kind of think just setting the LID switch sysctl during shutdown
> is probably fine.
It's all a matter of how general a solution we want, I guess. My immediate
issue was the lid switch, but I never like solving a small problem if I can
address a more general issue instead. ;-)
> That said, if you want to do this in the kernel, there's no reason to
> make this x86-specific. powerpc laptops can suspend but don't use
> ACPI to do so. Can you just have an MI sysctl that init frobs? It
> doesn't hurt to do so on platforms that don't support suspending (the
> knob would just be a no-op).
This makes sense to me. kern.shutdownpending meaning "userspace has
informed the kernel that the system will be shutting down soon"? This
could conceivably be used by other systems where it doesn't make sense
to do something just before shutting down.
Or should we stick to a more restricted kern.insomniac meaning "the
kernel should not suspend"? (Or, less poetically, kern.suspend_blocked?)
Any preferences?
--
Colin Percival
Security Officer Emeritus, FreeBSD | The power to serve
Founder, Tarsnap | www.tarsnap.com | Online backups for the truly paranoid
More information about the freebsd-acpi
mailing list