Linux stock kernel 2.6.9 with swsusp2.1 patches, as well as ndiswrapper modules. The binaries are built solely for x86 and optimized for the 686 target. The kernel should work with a sarge (Debian 3.1) or unstable installation.
Add the following lines to your /etc/apt/sources.list:
deb http://karmafish.net/~loevborg/debian binary/
deb http://cp.yi.org/apt/hibernate ./
Then invoke apt-get update and apt-get install kernel-image-2.6.9.sws102204. Your boot loader configuration must use the included initrd image. Be sure to add append="resume2=/dev/hdXX" where hdXX is the device of you swap partition to your lilo.conf. Don't forget to run lilo after making the necessary changes. If you need ndiswrapper modules for the kernel as well, they can be conveniently installed using {{apt-get install ndiswrapper-modules}}.
To install the hibernate script that controls the suspending issue apt-get install hibernate.
You can check whether swsusp2 is included in your kernel by verifying if the directory /proc/software_suspend exists. When there are problems, use
dmesg | grep -i suspend
to see if there were errors during bootup. To get software suspend to work properly, you will likely have to tweak your /etc/hibernate/hibernate.conf. Especially LeaveXBeforeSuspend yes is often necessary in order to be able to suspend when running X11. After having a look at that file, you can try to hibernate:
/usr/sbin/hibernate
If all works well, you can install the acpid package (if you haven't already done so) and edit you /etc/acpi/powerbtn.sh to read:
#!/bin/shWhen you push the power off button of you computer, it will now "go to sleep" instead of shutting down if swsusp2 is properly loaded.
# /etc/acpi/poweroff.sh
# Initiates a shutdown when the power putton has been
# pressed.
if [ -d /proc/software_suspend ]; then
hibernate
else
poweroff
fi
If there are difficulties during the suspend/resume cycle, there are a number of places to look at:
uname -a - are you running the right kernel?
/var/log/messages - any suspicous messages, especially concerning software suspend?
cat /proc/cmdline - did you specify a good swap partition device to resume from?
the software suspend FAQ and mailing lists archives
check out the hardware compatiblty wiki page to see if some of the kernel modules you're using are known not to be hibernate-safe. If so, you can try to uncomment and modify the UnloadModules section in /etc/hibernate/hibernate.conf
If you get an error messages on resume about missing suspend core module, check /etc/mkinitrd/scripts if there's a swsusp2 script like http://swsusp.sourceforge.net/wiki/DebianInitrd. Without this script your initrd won't load the required swsusp2 kernel modules.
swsusp/software-suspend-2.1-for-2.6.9/apply
cp /boot/config-2.6.7-686-1 .config
make oldconfig
all defaults except: SOFTWARE_SUSPEND2_CORE m, SOFTWARE_SUSPEND_SWAPWRITE m, SOFTWARE_SUSPEND_LZF_COMPRESSION m, SOFTWARE_SUSPEND_GZIP_COMPRESSION m, SOFTWARE_SUSPEND_TEXT_MODE m, SOFTWARE_SUSPEND_RELAXED_PROC y, SOFTWARE_SUSPEND_DEFAULT_RESUME2 "", SOFTWARE_SUSPEND_DEBUG y
make-kpkg clean
make-kpkg --rootcmd fakeroot --append-to-version=.sws102204 kernel_image
Send questions, comments, and criticism to pesterhazy@gmx.net. For the original swsusp2 project visit http://softwaresuspend.berlios.de/, for debian-packaging-specific information http://swsusp.sourceforge.net/wiki/DebianInitrd and http://softwaresuspend.berlios.de/FAQ-6.html