thinkpad t61 with gentoo & tuxonice 2.6.36
so recently i realized that i needed suspend-to-disk and suspend-to-ram on my laptop. after much research i realized that i should use the tuxonice gentoo kernels (sys-kernel/tuxonice-sources).
so first thing i did was compile 2.6.36-tuxonice with thinkpad-acpi and all the suspend-to-ram, suspend-to-disk and tuxonice configs. (grab my .conf file here for your reference)
once you have compiled the kernel, check /proc/acpi/ to make sure that dir ibm is there.
before continuing it should be noted that i dont use initramfs or genkernel, so if you plan on using fbsplash or fbcondecor make sure to make the proper changes to your kernel.
with emerging tuxonice-sources, we also have to emerge sys-apps/tuxonice-userui, which is the user interface for tuxonice.
we also have to make sure that we have acpid installed and running.
for the thinkpad keyboard events:
fn + f2 (lock screen with xscreensaver-command –lock)
/etc/acpi/events/lockscreen:
event=ibm/hotkey HKEY 00000080 00001002
action=/etc/acpi/actions/lockscreen.sh
/etc/acpi/actions/lockscreen.sh:
#!/bin/bash
su -c "xscreensaver-command -lock" user #change user to your standard user
fn + f4 (suspend to ram)
/etc/acpi/events/hibernateram:
event=ibm/hotkey HKEY 00000080 00001004
action=/etc/acpi/actions/hibernateram.sh
/etc/acpi/actions/hibernateram.sh:
#!/bin/bash
/usr/sbin/hibernate-ram
fn + f9 (eject cdrom)
/etc/acpi/events/ejectcdrom:
event=ibm/hotkey HKEY 00000080 00001009
action=/etc/acpi/actions/ejectcdrom.sh
/etc/acpi/actions/ejectcdrom.sh:
#!/bin/bash
/usr/bin/eject cdrom
fn + f12 (suspend to disk)
/etc/acpi/events/hibernate:
event=ibm/hotkey HKEY 00000080 0000100c
action=/etc/acpi/actions/hibernate.sh
/etc/acpi/actions/hibernate.sh:
#!/bin/bash
/usr/sbin/hibernate
for the power button to suspend-to-disk
power button (suspend to disk)
/etc/acpi/events/powerbutton:
event=button/power
action=/etc/acpi/actions/hibernate.sh
/etc/acpi/actions/hibernate.sh:
#!/bin/bash
/usr/sbin/hibernate
vi /etc/acpi/default.sh
change /sbin/init 0
to /usr/sbin/hibernate
save all this, now give acpid a restart and make sure that you are in your kernel.
when done, after kernel is confirmed working, dont forget to emerge --unmerge gentoo-sources
so you can free up some space.
[…] (here is my .config for reference) and configuring all the hibernate / suspend scripts referenced here i realized that after resuming from either suspend to ram or hibernating to swap that my function […]