Running Linux 2.6 and Fedora Core 2 / 3 on the IBM ThinkPad T41
Alex Fedosov

[ overview ] [ video ] [ frequency scaling ] [ suspend ] [ ACPI ] [ TV out ] [ other ]

All the nice things we take for granted from APM do not work out of the box if you use Linux 2.6 with ACPI. However, we can still suspend to RAM and to disk, it is just more tricky now. There is three different implementations of suspend to disk currently available. Read this page first, and then the ACPI page for information on automating this.

[ suspend to disk (swsusp) ] [ suspend to disk (pmdisk) ] [ suspend to disk (swsusp2) ]
[ suspend to RAM ] [ standby mode ]

Suspend to Disk (swsusp) in Linux
The Linux kernel includes two implementations of suspend to disk by default. The is the original (i.e. old) one. However, it seems to work without problems. All you have to do is enable it in your kernel config.
[*] Power Management support
  [*]   Software Suspend (EXPERIMENTAL)
Then to suspend, run echo 4 > /proc/acpi/sleep as root. When resuming, simply pass resume=/dev/<your swap partition> as a kernel argument. (In fact, it seems to be safe to leave it as an arugment permanently regardless of whether or not you are resuming.)
Note: I had a problem with the fan not turning off when suspending, requiring me to press the power button to complete shut off the laptop. Turning off Local APIC in the kernel config seems to have taken care of that.
[ ] Local APIC support on uniprocessors
Note: it appears that suspend to disk will not work if your disk drivers are built as modules, so make sure you build them into the kernel.

Fedora Core 3 update: It appears that there is a
bug in Xorg 6.8 that prevents your X session to be resumed correctly when DRI is enabled. You can either use swsusp2 (see below) which works fine as it does not rely on ACPI, disable DRI (probably not something most people want to do) or use a hack described in the bug report above. Interestingly enough, DRI currently does not work with dual-head, so if you have a dual-head setup, you are immune. :)


Suspend to Disk (pmdisk) in Linux
Note: this option has been removed from most recent kernels.

This is the second implementation of suspend to disk included in the Linux kernel.
[*] Power Management support
  [*]   Suspend-to-Disk Support
I've tried various tricks specified in the kernel documentation (no modules, no X, non-preemptive kernel, single user mode, etc.) but could not get this version to work on the ThinkPad. I believe this method uses ACPI, which may broken on the ThinkPad anyway, it seems.
It's supposed to be triggered by echo "disk" > /sys/power/state and it does try to suspend, but just immediately comes back on.


Suspend to Disk (swsusp2) in Linux
Download the most recent (2.1.5 as of 12/10/04) swsusp2 kernel patch along with the hibernate scripts from their
website. Apply the patch, recompile the kernel, reboot, and you are good to go. Two caveats to get it working properly:


Suspend to RAM with ACPI
I tried this before and couldn't get it work. The system would start suspending but then would immediately come back. However, I finally figured it out: you need to unload the USB 2.0 driver before you suspend.
# rmmod ehci_hcd
# echo "mem" > /sys/power/state
Interestingly enough, the USB 1.1 driver does not cause a problem. I hear the broken ACPI is to blame.


Standby Mode
I have been unable to put the laptop into standby mode with either echo standby > /sys/power/state or echo 1 > /proc/acpi/sleep. It looks like it tries to do something, but then just comes right back on.




Last modified Saturday December 11, 2004
Alex Fedosov
Department of Computer Science, University of San Francisco