-   Slackware (
-   -   ACPI events (

Lockywolf 10-24-2007 02:08 PM

ACPI events
Hi all.

I have HP-Compaq 6710s laptop

wWho can advice any acpi scripts for slackware to supend it via s2ram (uswsusp) when the lid is closed, switch governors when adapter is present|is not present, etc...

I looked at ubuntu scripts, but they seem to be ubuntu-specific.

rworkman 10-24-2007 02:18 PM

Here is what I have for s2ram on lid close.
Note that I've also got a custom modification to my rc.S and rc.6 scripts to remove/create /etc/powerdown file when halt/reboot occurs - I'm impatient, and I often shutdown the system and immediately close the lid. This ugly hack prevents that from occurring. :-)


root@liberty:~# cat /etc/acpi/events/lid
action=/etc/acpi/actions/ %e


root@liberty:~# cat /etc/acpi/actions/

# Suspend to ram when the lid is closed

# First, let's make sure we're not shutting down or rebooting
if [ ! -e /etc/powerdown ]; then
  sync ; sync # Just in case...
  echo -n mem > /sys/power/state

All times are GMT -5. The time now is 01:51 AM.