Debian Woody + suspend2 in Powebook
Autor: Hu gang (hugang (a|t) soulinfo dot com)
PowerBook G4 12"
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.4.tar.bz2 http://www.kernel.org/ (not need when you using tla method)
software-suspend-2 http://soulinfo.com/~hugang/swsusp2/2.6.4-1/
suspend.sh(0.18) http://developer.berlios.de/projects/softwaresuspend/ there is a newer script somewhere else...
- 2 * RAM of swap space
- A debian-based linux system with apt-get (debian, knoppix, xandros, lindows to name just a few)
The step-by-step instructions
- [Method a] 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.4.tar.bz2
$ cd linux-2.6.4
$ for NAME in /tmp/2.6.4-1/*; do patch -p1 < $NAME; done
- [Method b] usring tla geting the lastest suspend2 ppc tree.
$ tla register http://soulinfo.com/~hugang/{archives}/swsusp2/
$ tla get hugang@soulinfo.com--2004--kernel/linus--steve--2.6.4 #[stable version]
$ tla get hugang@soulinfo.com--2004--kernel/linus--steve--2.6.7 #[lastest version]
- 2.6.4 is very stable for me, I'm also working on 2.6.7, but the clean 2.6.7 seem not stable for me, I got system hang random.
- 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)
$ mkdir ~/2.6.4/
$ make O=~/2.6.4/ menuconfig
Loadable module support --->
[*] Enable loadable module support
[*] Module unloading
Processor --->
[*] 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
(swap:/dev/hda10) Default resume device name
[ ] Suspend-to-Disk Support
Device Drivers --->
Macintosh device drivers --->
[*] Using Software suspend replace broken sleep function
- Compile and install new kernel
$ make O=~/2.6.4 vmlinux modules
$ su
Password:
# make install && make modules_install
(to have modules load at boot time put their names in /etc/modules)
- Install suspend2 support script
# sh suspend.sh --install
(Edit /etc/suspend.conf and make sure to read the documentation)
- Get ready to suspend
- Reboot the computer
- Make sure nothing is broken
- 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"




