From owner-freebsd-acpi@freebsd.org Thu Sep 17 23:14:19 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 8B1829CF8E1 for ; Thu, 17 Sep 2015 23:14:19 +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 31E6519D5 for ; Thu, 17 Sep 2015 23:14:19 +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:from:mime-version:in-reply-to:content-type:content-transfer-encoding; s=smtpapi; bh=J0P1wN3L5CXd1k1+fwJMfJ+g/XQ=; b=N+cmF7FKQJLPnHMscI tChN0cTVLn1+Sjnn9rmLtctzeDW7BNgWbL/FIbmmmXvUgWKRgalJeLf2R8pKcgLt iwYXiDTmHbsy4IVhgCIJ/Y/QnDWnxp9SNYwqgc2acUFZ7SRXvu+9JX864Fmxt6Th OmprQNokum8GjiIn5cOp3yOpY= Received: by filter0504p1mdw1.sendgrid.net with SMTP id filter0504p1mdw1.27375.55FB494326 2015-09-17 23:14:11.459744336 +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 B90NUccCT0u2HBua571owQ for ; Thu, 17 Sep 2015 23:14:11.523 +0000 (UTC) Received: (qmail 48385 invoked from network); 17 Sep 2015 23:14:08 -0000 Received: from unknown (HELO clamshell.daemonology.net) (127.0.0.1) by ec2-107-20-205-189.compute-1.amazonaws.com with ESMTP; 17 Sep 2015 23:14:08 -0000 Received: (qmail 50125 invoked from network); 17 Sep 2015 23:12:35 -0000 Received: from unknown (HELO clamshell.daemonology.net) (127.0.0.1) by clamshell.daemonology.net with SMTP; 17 Sep 2015 23:12:35 -0000 Subject: Re: disabling sleep when shutting down To: Jung-uk Kim , "freebsd-acpi@freebsd.org" References: <55FA3848.7090802@freebsd.org> <55FB233D.2080000@FreeBSD.org> From: Colin Percival X-Enigmail-Draft-Status: N1010 Message-ID: <55FB48E3.20401@freebsd.org> Date: Thu, 17 Sep 2015 16:12:35 -0700 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 MIME-Version: 1.0 In-Reply-To: <55FB233D.2080000@FreeBSD.org> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-SG-EID: t2fXfoZHCw6vGsGKHqKxJ9qWwHSlQfPdDS+3+p6rOCsiuhUvctHCO607hi8lR6x4yjaZe+LDNaLU+I lJcdGQpUf3Kl0tI9xyyY/zQfsQaGloR9gVKxiwJcp2sZltyeGDCSdPtkpxLAHV/P6KiO33yjZjRHx+ zo3i9JIg06rFyMzfF6S3ZbWhjYRJyALjIJLO 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: Thu, 17 Sep 2015 23:14:19 -0000 On 09/17/15 13:31, Jung-uk Kim wrote: > On 09/16/2015 23:49, Colin Percival wrote: >> I ran into an interesting glitch recently: I told my laptop to shut >> down, then closed the lid... and it promptly went into S3. When I >> opened the lid a couple days later, it resumed... and then finished >> the shutdown which it had started 2 days earlier. > > Please try the attached patch. No, this doesn't do what I wanted. It might be a good idea anyway, but your patch only disables suspend once the kernel is trying to reboot; what I want is to disable suspend a bit earlier -- once rc.shutdown is running and the userland is trying to shut down, because at that point unless something breaks horribly we're *about to* tell the kernel to shut down even though we haven't gotten there quite yet. -- Colin Percival Security Officer Emeritus, FreeBSD | The power to serve Founder, Tarsnap | www.tarsnap.com | Online backups for the truly paranoid