Differences between revisions 2 and 3
Revision 2 as of 2009-04-08 13:57:28
Size: 1371
Comment:
Revision 3 as of 2009-04-08 14:00:23
Size: 1529
Comment:
Deletions are marked like this. Additions are marked like this.
Line 28: Line 28:
(don't forget to enable memory compression).To test it: (don't forget to enable memory compression).

"resume device" must be the partition and not the swap file, so :
resume device = /dev/sda1

Don't forget to add yourself to the powerdev group.

To test it:
Line 37: Line 44:
Caveats
Line 39: Line 45:

Caveats.

How-to

First, create a swap file:

dd if=/dev/zero of=/swap bs=1024k count=256 mkswap /swap

256MB for the 512MB eeePC.Add this to /etc/fstab:

/swap swap swap defaults 0 0

Then, tell the kernel to not use the swap file for swapping:

sysctl -w vm.swappiness=1

Modify the last line of /etc/sysctl.conf so it sticks:

vm.swappiness=1

You can now activate the swap file:

swapon /swap

And now the magic ingredient: µswsusp, an alternative suspend method for the linux kernel that can use swap file instead of swap partition and also support other neat features like compression and encryption.Install it:

aptitude install uswsusp

(don't forget to enable memory compression).

"resume device" must be the partition and not the swap file, so : resume device = /dev/sda1

Don't forget to add yourself to the powerdev group.

To test it:

s2disk

It will write the content of the RAM to the swap file and shutdown the eee.Press the power button on the eee to wake it up.To enable this method as the default system for hibernation, edit the following file: /usr/lib/hal/linux/scripts/hal-system-power-hibernateThere is a bug in this script, it will look for s2disk in the wrong place, you'll have to edit it so it looks like this:

/sbin/s2disk

As this script is part of the HAL package, it means that it WILL break if this package is updated, you'll have to reedit the above file if hibernate doesn't work after an update.

Caveats. The console is apparently completely broken.