From owner-freebsd-acpi@freebsd.org Wed Sep 23 15:09:21 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 1B525A07723 for ; Wed, 23 Sep 2015 15:09:21 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id ECFEE1359; Wed, 23 Sep 2015 15:09:20 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (c-73-231-226-104.hsd1.ca.comcast.net [73.231.226.104]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id EB738B945; Wed, 23 Sep 2015 11:09:19 -0400 (EDT) From: John Baldwin To: Colin Percival Cc: freebsd-acpi@freebsd.org, Jung-uk Kim , Anthony Jenkins Subject: Re: disabling sleep when shutting down Date: Wed, 23 Sep 2015 08:03:15 -0700 Message-ID: <1560128.HC08lqgeSM@ralph.baldwin.cx> User-Agent: KMail/4.14.3 (FreeBSD/10.2-PRERELEASE; KDE/4.14.3; amd64; ; ) In-Reply-To: <560264E8.4060407@freebsd.org> References: <55FA3848.7090802@freebsd.org> <1905488.VHUbJhcB3l@ralph.baldwin.cx> <560264E8.4060407@freebsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Wed, 23 Sep 2015 11:09:20 -0400 (EDT) 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: Wed, 23 Sep 2015 15:09:21 -0000 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