From owner-freebsd-acpi@freebsd.org Wed Sep 23 08:38:10 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 9CD28A0771E for ; Wed, 23 Sep 2015 08:38:10 +0000 (UTC) (envelope-from bounces+73574-3fe6-freebsd-acpi=freebsd.org@sendgrid.net) Received: from o3.shared.sendgrid.net (o3.shared.sendgrid.net [208.117.48.85]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2F5B41D43 for ; Wed, 23 Sep 2015 08:38:10 +0000 (UTC) (envelope-from bounces+73574-3fe6-freebsd-acpi=freebsd.org@sendgrid.net) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sendgrid.info; h=subject:to:references:cc:from:mime-version:in-reply-to:content-type:content-transfer-encoding; s=smtpapi; bh=CsXfJpWRZCBvCi2A6v82AW+WGPI=; b=iKN5Sr0QwwGcxP0BhV lXDYZvl/oUJYaUYceIKBaOJkz0dhAB5hP3uoIjnE8w/H9lDEKG9lVQsJJ3n4WUrk WEb3AKFXFEpbFNNflocbG7VDSvl9i7exQ4THVBwf3OYK/xzznwGR1YH6Ld0qZgzm gYfQMZJ0Den37CLj3xqrKfus0= Received: by filter0808p1mdw1.sendgrid.net with SMTP id filter0808p1mdw1.17274.560264EE42 2015-09-23 08:38:06.709469049 +0000 UTC Received: from mail.tarsnap.com (ec2-54-86-246-204.compute-1.amazonaws.com [54.86.246.204]) by ismtpd0004p1iad1.sendgrid.net (SG) with ESMTP id BUbMUapLQ7-8kFRa3xX04Q for ; Wed, 23 Sep 2015 08:38:06.707 +0000 (UTC) Received: (qmail 33722 invoked from network); 23 Sep 2015 08:37:57 -0000 Received: from unknown (HELO clamshell.daemonology.net) (127.0.0.1) by ec2-107-20-205-189.compute-1.amazonaws.com with ESMTP; 23 Sep 2015 08:37:57 -0000 Received: (qmail 16967 invoked from network); 23 Sep 2015 08:38:00 -0000 Received: from unknown (HELO clamshell.daemonology.net) (127.0.0.1) by clamshell.daemonology.net with SMTP; 23 Sep 2015 08:38:00 -0000 Subject: Re: disabling sleep when shutting down To: John Baldwin , freebsd-acpi@freebsd.org References: <55FA3848.7090802@freebsd.org> <55FE5D54.1030806@freebsd.org> <5601A863.5070406@FreeBSD.org> <1905488.VHUbJhcB3l@ralph.baldwin.cx> From: Colin Percival X-Enigmail-Draft-Status: N1110 Message-ID: <560264E8.4060407@freebsd.org> Date: Wed, 23 Sep 2015 01:38:00 -0700 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: <1905488.VHUbJhcB3l@ralph.baldwin.cx> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-SG-EID: t2fXfoZHCw6vGsGKHqKxJ9qWwHSlQfPdDS+3+p6rOCsKtqDhYxmSeGsi0qy355wxzdIeOZgnK6XcCq Tp4WD2HcqB9e40iE42nu4tX27ZJT43YLeWQEk1q3iN7JstJ4fflmkZMBB9MO4+XtyVqNVkPsCVryf5 QCR8fXvC7v2ocMry8438S6RnESinL0pn4jYB 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 08:38:10 -0000 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