[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Problem with acpi



Matthias Pfeifer wrote:
Hi,
i have acpid-1.0.4 (the standard testing version) and acpitool 0.4.0.
when i do a "acpitool -s" the system suspends (to ram). The only way
to wake it up seems to be to press the powerbutton. However this is
then recognized by the awakening system and... it is shutting down...
is this standard behaviour?

I had the same problem on my laptop. I made a small change to
/etc/acpi/powerbtn.sh, adding the following line right after the comment
section:

[ -e /tmp/powerbtn_flag_hibernate ] && rm -f /tmp/powerbtn_flag_hibernate && exit 0

(I have posted the whole script to http://pastebin.com/621675 to avoid
ambiguities due to line wrapping in emails; the addition is on line
number 6.)

The additional line checks if the file /tmp/powerbtn_flag_hibernate
exists; if it does exist then the file is deleted and the script will
exit without shutting down the computer. Otherwise it will work as before.

Now all you have to do before you suspend to ram is "touch
/tmp/powerbtn_flag_hibernate" to generate this file. I have included
this command in etc/hibernate/hibernate.conf (package "hibernate") and
now my laptop wakes up without problems when I press the power button.

Regards,
           Florian



Reply to: