From owner-freebsd-acpi@freebsd.org Fri Sep 18 19:12:07 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 B48D09D09B5 for ; Fri, 18 Sep 2015 19:12:07 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from mx2.freebsd.org (mx2.freebsd.org [8.8.178.116]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mx2.freebsd.org", Issuer "Gandi Standard SSL CA 2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A48281488; Fri, 18 Sep 2015 19:12:07 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from hammer.pct.niksun.com (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx2.freebsd.org (Postfix) with ESMTP id 3B8D84085; Fri, 18 Sep 2015 19:12:07 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Subject: Re: disabling sleep when shutting down To: Anthony Jenkins , Colin Percival , "freebsd-acpi@freebsd.org" References: <55FA3848.7090802@freebsd.org> <55FB233D.2080000@FreeBSD.org> <55FB48E3.20401@freebsd.org> <55FC4F13.3090603@FreeBSD.org> <55FC57F9.3050702@yahoo.com> From: Jung-uk Kim Message-ID: <55FC6206.8080303@FreeBSD.org> Date: Fri, 18 Sep 2015 15:12:06 -0400 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: <55FC57F9.3050702@yahoo.com> Content-Type: text/plain; charset=windows-1252 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: Fri, 18 Sep 2015 19:12:07 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 On 09/18/2015 14:29, Anthony Jenkins wrote: > On 09/18/2015 01:51 PM, Jung-uk Kim wrote: >> On 09/17/2015 19:12, Colin Percival wrote: > > 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. > > Okay. The attached patch is a quick-and-dirty > & untested hack for you. > > Jung-uk Kim > > Is it possible for /etc/rc.shutdown to complete, but shutdown not > occur? If so, there should be a mechanism to restore the ability > to suspend. Other than that, I like it. If something goes wrong, you can manually do "acpiconf -b 0". Jung-uk Kim -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBCAAGBQJV/GIBAAoJEHyflib82/FGL9EH/jLI2o2LX+8TrHY+RzwkWvq7 SEXue/Fh0wkZvwUDerqgguWDB83X3xGkP2huWkcZEQ605br9FgFBnjVu2A1sPSw+ KBh20jiggv3pEd+3uJJGp6v8Mz33HRW7Se1xCajtZhadFgbqXMT5pxXkLjELheZb H2S2b7oStkZoSw89RLGzzX0DsakvbbXUPA4RUV7niCKPR2kSKpDqER/iY1+PGzYN 6M3EnwBNGWCxWYu+j+bMR/YqoK69DdY4RlHSRd08xleLif6LaDjOQpg/Gd22HMMR 6eEPIv96KAZbN25ZV7vmw4x8a1CrU1Glp6Lg0/Kuv0usCPfmeng1gtZZqirEr5c= =jWfB -----END PGP SIGNATURE-----