Debian Unstable (sid) with software suspend2 + bootsplash
Autor: Olivier Dragon (dragonoe (a|t) mcmaster . ca). Some parts were blatantly ripped from Alessandro Barbosa's [../FedoraCore] guide.
Reference PC used for this customization: Compaq Presario 2140CA, Athlon Mobility 2200+, 512MB ram, ATI Radeon Mobility U1 (64MB shared).
Notes before your start
At this stage suspend2 is still very experimental so be ready to experience errors, driver failures and maybe worse. Use at your own risk.
Requirements
linux-2.6.7.tar.bz2 http://www.kernel.org/
software-suspend-2.0.0.93-for-2.6.7.tar.bz2 http://developer.berlios.de/projects/softwaresuspend/
suspend.sh(0.95) http://developer.berlios.de/projects/softwaresuspend/
- 1GB of swap space (note that at the time of this writing the swap space must be a partition. Swap files have known issues with 2.6 kernel)
- A debian-based linux system with apt-get (debian, knoppix, xandros, lindows to name just a few)
The step-by-step instructions
- Unpack the sources and patches
$ cd
$ mkdir src
(download the linux kernel and software suspend files in ~/src)
$ cd src
$ tar xjf linux-2.6.7.tar.bz2
$ tar xjf software-suspend-2.0.0.93-for-2.6.7.tar.bz2
$ cd linux-2.6.7
$ for NAME in ../software-suspend-2.0.0.93/*; do patch -p1 < $NAME; done
$ # for newer software-suspend-versions you can use the apply script by calling
$ # ../software-suspend-xxx/apply
- Configure the Linux Kernel
- Make sure that the rest of the configuration matches your computer's hardware
- It should be noted that compiling drivers as modules will make things easier as many drivers don't come back properly after a suspend and must be reloaded. This is impossible if the driver isn't compiled as a module. *Do not compile IDE/SCSI or filesystem drivers as modules* (the ones your system uses) or your computer might not reboot. They must be compiled in (*, not M)
$ make clean
$ make menuconfig
Loadable module support --->
[*] Enable loadable module support
[*] Module unloading
Power management options (ACPI. APM) --->
[*] Power Management support
[ ] Software Sspend (EXPERIMENTAL)
Software Suspend 2 --->
--- Image Storage (you need at least one writer)
[*] Swap Writer
[ ] Null Writer
--- Page Transformers
[*] LZF image compression
[ ] GZIP image compression
[ ] Null Page Transformer (For debugging)
--- General Options
[ ] Compile in debugging output
[ ] Variation Analysis
[ ] Metadata dump
[ ] Allow keep Image Mode
[*] Relaxed /proc/swsusp permissions
() Default resume device name
[ ] Suspend-to-Disk Support
Device Drivers --->
Block devices --->
<*> RAM disk support
(4096) Default RAM disk size (kbytes)
[*] Initial RAM disk (initrd) support
Graphics support --->
[*] Support for frame buffer devices
<M> VGA 16-color graphics support
[*] VESA VGA graphics support'
Console display driver support --->
--- VGA text console
[*] Video mode selection support
< > MDA text console (dual-headed) (EXPERIMENTAL)
<*> Framebuffer Console support
Bootsplash configuration --->
[*] Bootup splash screen
- Compile and install new kernel
$ make bzImage && make modules
$ su
Password:
# make install && make modules_install
(to have modules load at boot time put their names in /etc/modules)
- Setup bootsplash
# echo "deb http://www.bootsplash.de/files/debian unstable main contrib non-free" >> /etc/apt/sources.list
# apt-get update
# apt-get install bootsplash bootsplash-theme-debian-tux sysv-rc-bootsplash
(follow the instructions, choose /etc/initrd.splash as the initrd image)
(modify your lilo.conf as suggested)
# lilo
- Setup suspend2
# cat /proc/swaps
(was cat /proc/swsusp/headerlocations - but swsusp is not yet in the kernel)
(add the proper resume2 parameter to the append="" of your lilo.conf)
# lilo
- Install suspend2 support script (hibernate-script)
# tar xzf hibernate-script-0.96.tar.gz
# cd hibernate-script-0.96
# sh install.sh
(Edit /etc/hibernate/hibernate.conf and make sure to read `hibernate -h`)
- Get ready to suspend
- Reboot the computer
- Make sure nothing is broken
- Did you see the pretty bootsplash?
- Type "dmesg | more" and check for the Software Suspend messages
- If all is well try to suspend your computer with "sudo /usr/local/sbin/hibernate"




