Next Previous Contents

3. Testing hibernation

3.1 Installing the hibernate script

The best way to use TuxOnIce is to use the hibernate script. This script should be available on same site as the TuxOnIce patch. Download it to /tmp and type (replace 0.99 with the version you have downloaded):

# cd /tmp
# tar xzvf hibernate-script-0.99.tar.gz
# cd hibernate-script-0.99
# ./install.sh
# 
This will install the script, a default configuration file, and some man pages. You may wish to edit /etc/hibernate/hibernate.conf to taste, depending on how much of your hardware hibernates correctly, and how many little features you'd like.

If you are using an RPM-based system, RPMs are available from the same website.

If you are using a Debian system, you may point your apt sources at deb http://cp.yi.org/apt/hibernate ./ and apt-get install hibernate.

Gentoo packages are available in Portage.

Check that the directory of hibernate is in your PATH variable before going further.

If you want users to be able to hibernate, use visudo and add the following lines to your /etc/sudoers file, changing the /usr/local/sbin/hibernate to the path it was installed (/usr/sbin/hibernate in the Debian & RPM packages)

Host_Alias LOCALHOST=localhost,<your hostname>
ALL LOCALHOST=NOPASSWD: /usr/sbin/hibernate *

See man sudoers(5) for more information. Users will then be able to do sudo /usr/local/sbin/hibernate.

3.2 Hibernating in text mode

For testing hibernating, you should begin by testing text only suspension. Switch to a console by Ctrl-Alt F1, login as root. Under Red Hat, Fedora or Mandrake, stop the X server by typing init 3. Debian users will need to stop the xdm, gdm or kdm service by running /etc/init.d/xdm stop (substituting xdm with your display manager). Users of other distributions should do something similar.

Now try hibernate. The hibernate should take place ending with machine halting. Power on the computer and it should recover your session. If not see the troubleshooting section.

3.3 Hibernating with X running

You can now recover your graphical session (by typing init 5 for Red Hat/Mandrake users, /etc/init.d/xdm start or similar for Debian users). Log in under X. Try sudo /usr/local/sbin/hibernate and see if suspension works correctly.


Next Previous Contents
Last updated: Wed, 10 Feb 2010 08:02:58 +0800

Frozen penguins image by darkmetal
and adapted by Nigel Cunningham
"Tuxsicle" artwork by Pierre-Philippe Coupard

Copyright © 2003-2005 Bernard B