Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 23 Sep 2015 08:03:15 -0700
From:      John Baldwin <jhb@freebsd.org>
To:        Colin Percival <cperciva@freebsd.org>
Cc:        freebsd-acpi@freebsd.org, Jung-uk Kim <jkim@freebsd.org>, Anthony Jenkins <Scoobi_doo@yahoo.com>
Subject:   Re: disabling sleep when shutting down
Message-ID:  <1560128.HC08lqgeSM@ralph.baldwin.cx>
In-Reply-To: <560264E8.4060407@freebsd.org>
References:  <55FA3848.7090802@freebsd.org> <1905488.VHUbJhcB3l@ralph.baldwin.cx> <560264E8.4060407@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wednesday, September 23, 2015 01:38:00 AM Colin Percival wrote:
> 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?

I think suspend_blocked is fine for now.  We may find that there are other
use cases in the future.

-- 
John Baldwin



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1560128.HC08lqgeSM>