Package: acpid 
Version: 1.0.4-5
Severity: wishlist

acpid contains a sample entry /etc/acpi/events/powerbtn , which shuts
down the system if the power button is pressed.

I propose to add a similar entry for the sleep button, which activates
suspend-to-RAM. That way the sleep button should automatically work on most
systems :-).

Add the following files to the package:

file /etc/acpi/sleepbtn.sh
---------cut-----------------
#!/bin/sh
# /etc/acpi/sleepbtn.sh
# Initiates suspend-to-RAM when the sleep putton has been
# pressed.

# If powersaved is running, let it process the acpi event
if pidof powersaved; then
    exit 0
fi

sync # just to be safe :-)

# initiate suspend-to-RAM via sysfs interface
echo -n mem > /sys/power/state
---------cut-----------------

file /etc/acpi/events/sleepbtn
---------cut-----------------
# /etc/acpi/events/sleepbtn
# This is called when the user presses the sleep button and calls
# /etc/acpi/sleepbtn.sh for further processing.

# Optionally you can specify the placeholder %e. It will pass
# through the whole kernel event message to the program you've
# specified.

# We need to react on "button sleep.*" and "button/sleep.*" because
# of kernel changes.

event=button[ /]sleep
action=/etc/acpi/sleepbtn.sh
---------cut-----------------



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to