Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 27 Sep 2015 17:07:50 +1000 (EST)
From:      Ian Smith <smithi@nimnet.asn.au>
To:        Colin Percival <cperciva@FreeBSD.org>
Cc:        Jung-uk Kim <jkim@FreeBSD.org>, John Baldwin <jhb@FreeBSD.org>, "freebsd-acpi@freebsd.org" <freebsd-acpi@FreeBSD.org>, Dan Lukes <dan@obluda.cz>
Subject:   Re: disabling sleep when shutting down
Message-ID:  <20150927164605.U29510@sola.nimnet.asn.au>
In-Reply-To: <5606EA4A.3090705@freebsd.org>
References:  <55FA3848.7090802@freebsd.org> <55FB233D.2080000@FreeBSD.org> <55FB48E3.20401@freebsd.org> <55FC4F13.3090603@FreeBSD.org> <55FC57F9.3050702@yahoo.com> <55FE5D54.1030806@freebsd.org> <5601A863.5070406@FreeBSD.org> <560262BF.7090107@freebsd.org> <5602DE8D.3020102@FreeBSD.org> <560648A7.4030708@freebsd.org> <20150927024553.L29510@sola.nimnet.asn.au> <5606EA4A.3090705@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, 26 Sep 2015 11:56:10 -0700, Colin Percival wrote:
 > On 09/26/15 10:59, Ian Smith wrote:
 > > On Sat, 26 Sep 2015 00:26:31 -0700, Colin Percival wrote:
 > >  > 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.
 > > 
 > > We should prevent suspending _during_ shutdown to SU, of course.  Once 
 > > happily in SU, is there any reason to disallow suspend?  I've done it.
 > 
 > I think the question here was about suspending during the shutdown to
 > single-user mode.  This seemed a bit different to me since it's not a
 > "walk away from your laptop" sort of situation.  But I've included it
 > (or rather, not *excluded* it) anyway.

Sounds good.  As all this shows, we can't assume what anyone might do :)

 > >  > * 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.)
 > > 
 > > Sorry, but that rather misrepresents my position; I was trying to deal 
 > > specifically with the LID foot-shooting potential, in the case of user- 
 > > initiated shutdown, so looking at possible mechanisms.  Not to worry, I 
 > > clearly didn't express myself clearly :^\
 > 
 > Ok, so you're satisfied with having the suspend-disabling triggered by
 > init (i.e., not happening until shutdown(8) reaches "now")?

Sure, if you're satisfied that 'shutdown [..] now' - or hitting the 
power button as Dan mentioned - then quickly closing the lid will lose 
that race.  As you say, with this mechanism in place, accessing it from 
shutdown(8) would be straightforward if deemed necessary.  So, yes.

 > Should be trivial to MFC.

Cool.

Thanks, Ian



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