Re: current ACPI status in 2.6.7 kernel

Herman Sheremetyev
2004-08-11T14:10:24Z

On Wed, 2004-08-11 at 09:19, Nathan Bryant wrote:
<snip>
> Oh, and there's that annoying little problem where acpid sees the button
> press that I have to use to resume, as a shutdown event...
</snip>

I don't have this issue myself since hitting any button on my laptop
wakes it up but I think it would be possible to get around this problem
by putting something like this into your acpid script that handles the
button press:

if test ! -e /tmp/button_lock
then
/sbin/shutdown
fi

Then in your suspend script add:

touch /tmp/button_lock
echo -n mem > /sys/power/state
rm /tmp/button_lock

It would need to be tweaked a bit since the rm may get executed before
the suspend completes and maybe acpid will get the button event some
time after resume so there might need to be a sleep statement but in
general I think it would solve the problem.

-Herman