Date: Tue, 31 Jan 2006 13:01:49 -0800 From: Nate Lawson <nate@root.org> To: Manfred Lotz <manfred.lotz@arcor.de> Cc: freebsd-acpi@freebsd.org Subject: Re: suspend/resume event Message-ID: <43DFD03D.4020002@root.org> In-Reply-To: <20060131214210.81c53b6e.manfred.lotz@arcor.de> 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>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?43DFD03D.4020002>