[ltp] ACPI on T41p
Rob Browning
linux-thinkpad@linux-thinkpad.org
Sun, 04 Apr 2004 17:14:16 -0500
Daniel Jimenez <djimenez@pobox.com> writes:
> Suspend to memory
>
> Suspend to disk (AKA Hibernate)
These work fine for me with 2.6.4 (and I've just tested 2.6.5's
suspend to disk too).
There might be an official hibernate script, but for now, I just use a
very basic one I wrote. Some of the stuff in here might not still be
needed with the latest kernels:
#!/bin/bash
# /etc/acpi/powerbtn.sh
# Initiates a shutdown when the power putton has been
# pressed.
logger "power key press - hibernating"
/etc/init.d/ntp-simple stop
/etc/init.d/powernowd stop
hwclock --systohc
pushd /sys/devices/system/cpu/cpu0/cpufreq
cat scaling_max_freq > scaling_setspeed
logger "power key press - CPU set to $(cat scaling_setspeed)"
logger "power key press - freeze"
# until driver can handle suspend/resume
ifdown ath0
echo 4 > /proc/acpi/sleep
hwclock --hctosys
logger "power key press - thaw, restart power daemon"
/etc/init.d/powernowd start
/etc/init.d/ntp-simple start
logger "power key press - finished restore"
exit 0
My /etc/network/interfaces makes sure that the ath_pci module is
removed during ifdown ath0. At least a bit back, this module had to
be removed, but I'm not sure if that's still true. I believe other
people have reported something similar for USB.
> Suspend to swap (is this the same as suspend to disk?)
Yes.
> GNU/Linux to initiate a shutdown when I press the power button on
> the laptop.
Some kernels didn't continue to report acpi events after a resume from
suspend to RAM, but I don't know if that's still true. Of course you
can always invoke the scripts by hand.
--
Rob Browning
rlb @defaultvalue.org and @debian.org; previously @cs.utexas.edu
GPG starting 2002-11-03 = 14DD 432F AE39 534D B592 F9A0 25C8 D377 8C7E 73A4