分类: LINUX
2009-01-03 21:40:13
The default method of hibernation provided by powermanagement-interface seems to be flaky at best (it does not work on either my T41 or my T61).
Luckily uswsusp works out of the box
After installing the uswsusp package you need to make sure to "remove" ACPI hibernation as this is the first choice of hibernation selected by the HAL scripts called from GNOME. You must also make sure that no other hibernation packages are installed.
$ sudo apt-get remove hibernate
$ sudo apt-get install uswsusp
$ sudo dpkg-divert --rename --divert /etc/acpi/hibernate.sh-disabled /etc/acpi/hibernate.sh
$ sudo ln -sf /sbin/s2disk /usr/sbin/s2disk
If you want to make use of the hibernate button make the following changes:
First we divert the event script used by ACPI so our own script will not be overwritten when the acpi-support package is upgraded
$ sudo dpkg-divert --rename --divert /etc/acpi/hibernatebtn.sh-disabled /etc/acpi/hibernatebtn.sh
Then create a new /etc/acpi/hibernatebtn.sh
with
this simple content
#!/bin/bash
s2disk
Optionally, if you want the spiffy splash screens during
hibernate/restore, also install the splashy and splashy themes
(you'll have to edit /etc/uswsusp.conf
and add a line
saying "splash = y" to use them)
$ sudo apt-get install splashy splashy-themes