From owner-freebsd-acpi@FreeBSD.ORG Tue Jan 31 21:01:44 2006 Return-Path: X-Original-To: freebsd-acpi@freebsd.org Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1986516A420 for ; Tue, 31 Jan 2006 21:01:44 +0000 (GMT) (envelope-from nate@root.org) Received: from www.cryptography.com (li-22.members.linode.com [64.5.53.22]) by mx1.FreeBSD.org (Postfix) with ESMTP id 41D9D43D48 for ; Tue, 31 Jan 2006 21:01:43 +0000 (GMT) (envelope-from nate@root.org) Received: from [10.0.0.53] (adsl-67-119-74-222.dsl.sntc01.pacbell.net [67.119.74.222]) by www.cryptography.com (8.12.8/8.12.8) with ESMTP id k0VL1YEr018913 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Tue, 31 Jan 2006 13:01:35 -0800 Message-ID: <43DFD03D.4020002@root.org> Date: Tue, 31 Jan 2006 13:01:49 -0800 From: Nate Lawson User-Agent: Mozilla Thunderbird 1.0.6 (Windows/20050716) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Manfred Lotz References: <20060120200410.a05870c1.manfred.lotz@arcor.de> <43D30F0F.3090703@root.org> <20060126143040.a6b1f796.manfred.lotz@arcor.de> <43D9201B.3010403@root.org> <20060131214210.81c53b6e.manfred.lotz@arcor.de> In-Reply-To: <20060131214210.81c53b6e.manfred.lotz@arcor.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-acpi@freebsd.org Subject: Re: suspend/resume event 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, 31 Jan 2006 21:01:44 -0000 Manfred Lotz wrote: > Hmmh. I got compile errors then. However with hw.ata.atapi_dma set to 0 > I could boot the 7.0 system and test it. > > First of all: Your code did work, i.e. the kern/power/resume event gets > triggered and I could call a script. > > However, what confuses me is that the power button triggers > the /etc/rc.resume in some cases (2. and 3. below) without using your > code. > > 1. hw.acpi.sleep_button_state=S3 and no Button event in /etc/devd.conf > > When suspending (Fn-ESC) and resuming (Power button) > neither /etc/rc.suspend nor /etc/rc.resume gets called. The kern/power/resume devd event should be delivered, no matter what the mechanism used to suspend/resume. It should even work for apm, if you were using that. So I really wonder what your test configuration was here. What's the new contents of your devd.conf (different from 7.x default)? You have to add a kern/power/resume event in devd.conf to run /etc/rc.resume although I plan to commit that also eventually. > 2. hw.acpi.sleep_button_state=S3 and Button event in /etc/devd.conf is > activated > > Here both /etc/rc.suspend and /etc/rc.resume gets > called. /et/rc.suspend gets called via devd.conf action. You can't count on running rc.suspend from devd. The system could suspend BEFORE the process even runs, then you'd resume and rc.suspend would run and immediately after, rc.resume would run. > 3. hw.acpi.sleep_button_state=NONE and Button event in /etc/devd.conf > is activated > > 3. seems to be the best option., I see no need for you to run rc.suspend. To restart moused, you just need rc.resume. -- Nate