Introduction
The purpose of this note is to outline the steps for setting up ACPI suspend to memory under Fedora Core 4 when running NetworkManager.
Installed Packages
kernel 2.6.13.-1.1526_FC4 ipw2200 version 1.0.7 (Intel PRO 2200BG) ieee80211 version 1.1.4 firmware version 2.4
The installation of the ipw2200 and ieee80211 modules are covered in a posted article. The setup of NetworkManager is covered in another posted article.
File setup
Create the file /etc/acpi/events/sleep.conf containing the lines
event=button[/]sleep action=/etc/acpi/actions/sleep.sh
Create the file /etc/acpi/events/lid.conf containing the lines
event=button[/]lid action=/etc/acpi/actions/sleep.sh
Create the file /etc/acpi/actions/sleep.sh containing the lines
#!/bin/sh
/usr/bin/dbus-send --system
--dest=org.freedesktop.NetworkManager
--type=method_call
/org/freedesktop/NetworkManager
org.freedesktop.NetworkManager.sleep
/sbin/hwclock --systohc
echo -n mem > /sys/power/state
/sbin/hwclock --hctosys
/usr/bin/dbus-send --system
--dest=org.freedesktop.NetworkManager
--type=method_call
/org/freedesktop/NetworkManager
org.freedesktop.NetworkManager.wake
and make it executable.
chmod 755 /etc/acpi/actions/sleep.sh
Usage
The hotkey combination Fn+F4 will suspend to memory. The Fn button will unsuspend the system. The hwclock commands take care of time loss or gain problems on some Thinkpad models.
Powerdrain
During suspend to ram, certain T4x Thinkpad models experience excessive powerdrain. At the Thinkpad Wiki
http://www.thinkwiki.org/wiki/
Problem_with_high_power_drain_in_ACPI_sleep
there is a partial list of the affected models. If you laptop is not on the list, add it using the Edit tab. The powerdrain occurs because the Radeon video driver fails to fully shutdown the hardware. The FC4 release and update kernels contain a radeonfb kernel module that is patched to correct this problem. The bug report
https://bugzilla.redhat.com/bugzilla/
show_bug.cgi?id=142928
explains how to load the radeonfb module. I repeat the steps here. Perform the steps in the order listed.
Step 1: Edit /etc/grub.conf. Add to the kernel line
the option
video=radeonfb
Step 2: Edit /etc/modprobe.conf. Add the line options radeonfb radeon_force_sleep=1
Step 3:
# /sbin/mkinitrd -f --with=radeonfb
/boot/initrd-$(uname -r).img $(uname -r)
After a reboot, you can test the powerdrain. The Thinkpad Wiki provides a script for this purpose or you can do it manually.
# cat /proc/acpi/battery/BAT0/state present: yes capacity state: ok charging state: charged present rate: 0 mW remaining capacity: 38010 mWh present voltage: 12270 mV
While operating on battery, record the 'remaining capacity', suspend to ram for 20 minutes, resume and record the 'remaining capacity' again. Difference the two results and multiply by 3. If the result is less than 1000 (mW), you do not have a powerdrain problem.