From owner-freebsd-acpi@freebsd.org Sat Sep 26 07:40:30 2015 Return-Path: Delivered-To: freebsd-acpi@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 15FCBA08392 for ; Sat, 26 Sep 2015 07:40:30 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (heidi.turbocat.net [88.198.202.214]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6187FA1C; Sat, 26 Sep 2015 07:40:29 +0000 (UTC) (envelope-from hps@selasky.org) Received: from laptop015.home.selasky.org (cm-176.74.213.204.customer.telag.net [176.74.213.204]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 680D71FE023; Sat, 26 Sep 2015 09:40:26 +0200 (CEST) Subject: Re: disabling sleep when shutting down To: Colin Percival , Jung-uk Kim , John Baldwin , "freebsd-acpi@freebsd.org" , Dan Lukes , ian Smith 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> From: Hans Petter Selasky Message-ID: <56064C48.8020100@selasky.org> Date: Sat, 26 Sep 2015 09:42:00 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: <560648A7.4030708@freebsd.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 Sep 2015 07:40:30 -0000 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