On EEEbuntu, hibernation is possible through "swsuspend" which is told to be slower than "TuxOnIce" (true) which is told to be faster than normal booting without resuming (true, but not impressive).
TuxOnIce needs to be patched into the kernel and compiled, and can completely replace swsuspend without reconfiguration.
My steps were (mixing different guides, an EEEbuntu forum post and TuxOnIce wiki):
- check that swsuspend is working;
- check that the package hibernate is installed;
- open a terminal for the normal user;
become "root":# sudo bash
- install "git-core":
# sudo apt-get install git-core
- clone the Array kernel for Intrepid:
# git clone git://git.array.org/array/ubuntu-intrepid.git
- enter the directory:
# cd ubuntu-intrepid
- join the split config files to a .config for the kernel:
# cat debian/config/i386/config debian/config/i386/config.eeepc > .config
- check kernel version:
# uname -r
- download a suitable patch from TuxOnIce site;
- apply patches:
# bunzip2 -c path/to/patchname.patch.bz2 | patch -p1
- choose TuxOnIce options:
(press enter on all, except say Y for IGNORE_LATE_INITCALL);# make oldconfig
- install some tools:
# sudo apt-get install kernel-package libncurses5-dev fakeroot
- choose your config options:
# make menuconfig
- move config where ubuntu looks for it, and make a backup:
# cp .config debian/config/i386/config.eeepc
# cp .config config - if you want to change the config later, just do:
# cp config .config
# make menuconfig - create a file:
with the following content:# sudo nano /usr/share/initramfs-tools/scripts/local-premount/tuxonice_do_resume
#!/bin/sh
PREREQ=""
prereqs()
{
echo "$PREREQ"
}
case $1 in
# get pre-requisites
prereqs)
prereqs
exit 0
;;
esac
if [ -d /sys/power/tuxonice ]; then
echo 1 > /sys/power/tuxonice/do_resume
fi - compile:
# fakeroot make-kpkg --initrd --append-to-version=-custom kernel_image kernel_headers
- in the parent directory there are now two .deb packages to install:
# cd ..
# sudo dpkg -i *custom*.deb - reboot using the new kernel and the new initrd;
- check the new GRUB entry has the boot kernel option like "resume=swap:/dev/xxx";
- check hibernate is working, by typing in a console:
# sudo hibernate -v3 --no-suspend
- check that resuming is possible, because some buggy initramfs building scripts fail to include the tuxonice_do_resume file into the new initrd
- inspect the new initrd:
# follow this
- if not OK, add the file, create an initrd again:
# follow this
- and replace it;
- check that the hibernate button is visible; if not, use gconf-editor to tick "can_hibernate" property (go to apps -> gnome-power-manager -> can_hibernate);
- test hibernating and resuming.