From owner-freebsd-acpi@FreeBSD.ORG Tue Apr 21 16:57:42 2009 Return-Path: Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 50FFC106566C for ; Tue, 21 Apr 2009 16:57:42 +0000 (UTC) (envelope-from avg@icyb.net.ua) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 82B188FC25 for ; Tue, 21 Apr 2009 16:57:41 +0000 (UTC) (envelope-from avg@icyb.net.ua) Received: from odyssey.starpoint.kiev.ua (alpha-e.starpoint.kiev.ua [212.40.38.101]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id TAA19157; Tue, 21 Apr 2009 19:57:18 +0300 (EEST) (envelope-from avg@icyb.net.ua) Message-ID: <49EDFAED.4030606@icyb.net.ua> Date: Tue, 21 Apr 2009 19:57:17 +0300 From: Andriy Gapon User-Agent: Thunderbird 2.0.0.21 (X11/20090406) MIME-Version: 1.0 To: Nate Lawson References: <49DE1F8B.2080400@earthlink.net> <49DE2E6D.5050001@icyb.net.ua> <49DE596E.2050406@earthlink.net> <49DEFF53.1040306@icyb.net.ua> <49DF7A1C.90009@root.org> <20090418043432.O34434@sola.nimnet.asn.au> <49E8D824.1000001@root.org> <20090417200726.GG3014@deviant.kiev.zoral.com.ua> <49E8E6E3.40304@root.org> In-Reply-To: <49E8E6E3.40304@root.org> X-Enigmail-Version: 0.95.7 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: sclark46@earthlink.net, freebsd-acpi@freebsd.org, Ian Smith Subject: Re: 6.x acpi powerbutton X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Apr 2009 16:57:42 -0000 on 17/04/2009 23:30 Nate Lawson said the following: > Sure. Perhaps Andriy will pick up this task after reworking the suspend > path code for S5? It seems related. Oh I think that this would be a much easier and independent task. Right now I have the following in my local tree, but I think that it might be better to limit the message to S5 state only, so that people with laptops do not complain about extra spam. diff --git a/sys/dev/acpica/acpi.c b/sys/dev/acpica/acpi.c index 8a592d2..f3e0c1f 100644 --- a/sys/dev/acpica/acpi.c +++ b/sys/dev/acpica/acpi.c @@ -2169,6 +2169,8 @@ acpi_ReqSleepState(struct acpi_softc *sc, int state) if (state < ACPI_STATE_S1 || state > ACPI_STATE_S5) return (EINVAL); + printf("acpi: request to enter S%d sleep state\n", state); + /* S5 (soft-off) should be entered directly with no waiting. */ if (state == ACPI_STATE_S5) { if (ACPI_SUCCESS(acpi_EnterSleepState(sc, state))) -- Andriy Gapon