[ltp] Hibernate on T41P

Rob Browning linux-thinkpad@linux-thinkpad.org
Wed, 16 Jun 2004 16:54:17 -0500


Matthias Himber <mhimber@gmx.net> writes:

>> Is software suspend where it suspends to swap?
> Yes.
>> Wi ll it listen to my FN-F12 request? If yes, I'll look into it.

> No, but..  Pressing Fn-F12 will toggle some bit in the NVRAM, like
> the other buttons do.  Normally, the BIOS will react to this and
> suspend, but if it has no hibernation file, it will do nothing. The
> current version of TPB does not react to FN-F12 (nor does it react
> to Fn-F4), but adding support should not be too
> difficult. Alternatively, if you use ACPI, Fn-F12 *may* generate an
> ACPI event that can be reacted to with the ACPI daemon (acpid). But
> I don't have information on that.  As usual, there seems to be some
> way to intercept the Fn-Fx keypresses and prevent the BIOS from
> acting on them, and the IBM Windows drivers do it, but, as usual,
> IBM isn't telling how. So you are pretty much on your own there. If
> you manage to hack something together that works, by all means tell
> us.  HTH,

In case this helps, I'm running 2.6.6 on a t41p using ACPI, the latest
Debian xserver-xfree86, and a fairly recent madwifi CVS driver.  I can
sleep (suspend to RAM) via Fn-F4 and suspend (swsusp -- suspend to
swap) via the power key.  In both cases, pressing the power key again
wakes the machine back up.

Both sleep and suspend are triggered by acpid according to scripts
in /etc/apci.

File /etc/acpi/events/powerbtn:

  event=button[ /]power
  action=/etc/acpi/powerbtn.sh

File /etc/acpi/events/sleepbtn:

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

The two .sh scripts mentioned also both contain an "ifdown ath0"
which, via /etc/network/interfaces, calls "modprobe -r ath0" to remove
the madwifi module before going down.  I don't know if this is still
required, but it used to be.  Otherwise, the machine would hang.  Also
note that I don't use the binary ATI drivers, and I haven't been using
USB or (lately) the 10/100 ethernet port, so I can't comment on
whether or not those would survive.  I do seem to recall that ethernet
was OK, but I'm not positive about that, and I may have been taking it
down via "ifdown eth0" before each suspend/sleep.

I *can* say that I've had the machine up for more than 23 days so far
(on the latest run) without a reboot, and that period included long (>
8-hour) suspends nearly every day, and although sleep (to RAM) seems
to work fine, I haven't used it all that often (as compared to
suspend), so I can't say as much about how well it works if used more
heavily.

-- 
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