From owner-freebsd-acpi@FreeBSD.ORG Fri Apr 10 08:12:11 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 3734A1065670; Fri, 10 Apr 2009 08:12:11 +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 452608FC15; Fri, 10 Apr 2009 08:12:09 +0000 (UTC) (envelope-from avg@icyb.net.ua) Received: from porto.topspin.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id LAA17254; Fri, 10 Apr 2009 11:12:06 +0300 (EEST) (envelope-from avg@icyb.net.ua) Received: from localhost.topspin.kiev.ua ([127.0.0.1] helo=edge.pp.kiev.ua) by porto.topspin.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1LsBqI-000EQ4-Jw; Fri, 10 Apr 2009 11:12:06 +0300 Message-ID: <49DEFF53.1040306@icyb.net.ua> Date: Fri, 10 Apr 2009 11:12:03 +0300 From: Andriy Gapon User-Agent: Thunderbird 2.0.0.19 (X11/20090114) MIME-Version: 1.0 To: sclark46@earthlink.net References: <49DE1F8B.2080400@earthlink.net> <49DE2E6D.5050001@icyb.net.ua> <49DE596E.2050406@earthlink.net> In-Reply-To: <49DE596E.2050406@earthlink.net> X-Enigmail-Version: 0.95.7 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-acpi@freebsd.org, freebsd-stable@freebsd.org 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: Fri, 10 Apr 2009 08:12:11 -0000 on 09/04/2009 23:24 Stephen Clark said the following: > Probably not. But I spent a couple of hours googling without much luck > so I got desperate. ;-) Let me introduce freebsd-acpi@freebsd.org > Is there a reason it doesn't send and event like Linux that can be acted > upon by user space other > than signaling init? I like to have a message written in > /var/log/messages that someone pressed > the powerbutton. I think that for all suspend states except S5 userland is notified via devd mechanism and potentially can veto the suspend. S5 (soft-off) is coded to start shutdown immediately. You can try to hack on acpi_ReqSleepState in sys/dev/acpica/acpi.c. I am not sure what is the reason for this special behavior of S5. But I like it, because it sometimes allows me to perform semi-clean shutdown when X goes crazy. But I also see when it could be useful to have S5 request go through userland. So this could be configurable. -- Andriy Gapon