I was not completely happy with the suspend function offered by Klaptop in KDE 3.5, so I decided to use s2ram from the suspend package (http://suspend.sourceforge.net/) instead.
I’m assuming here that you are using Klaptop to suspend your machine, that the suspend package is installed and working (so that typing e.g.
s2ram -f -p
from an X terminal suspends your machine), but that you’d like Klaptop to use s2ram instead of it’s own program.
- Become root:
- Look at the entry ‘Fixes’ after typing
and determine which workarounds you should use (with --force) on your machine
- Test to see whether you have the right options by invoking
from an X-terminal (in my case
s2ram -f -p --force --vbe_save
for my MacBook,
s2ram -f -p -m
for my ThinkPad)
- Write a small script that executes s2ram with the desired options:
#!/bin/bash # Call s2ram with the options needed for this machine s2ram -f -p -m
- Set the setuid bit for your script and the original s2ram binary:
chmod +s /usr/local/sbin/s2ram_local `which s2ram`
- Locate the Klaptop ACPI-helper program:
. On my Gentoo distribution, it’s in
- Back it up:
mv -i /path/klaptop_acpi_helper /path/klaptop_acpi_helper.bak
- Replace it with a symbolic link to your script:
ln -s /usr/local/sbin/s2ram_local /path/klaptop_acpi_helper