Package: hibernate
Version: 1.91-2
Severity: wishlist

The hibernate package, in its wonderful new form where it
automatically tries susp2 then swsusp (which is in the stock Debian
kernel) then save to RAM, is great.  It "just works" on a stock Debian
install, with no recompilation or complex contortions.  It does
however require a tiny bit of setup, and to this end I would suggest a
brief file explaining to users what they need to do.

Here is my attempt.

I'm sure it could be improved, eg by allowing hibernate to do the
resume= bit automatically by editing hibernate's config files instead
of configuring the boot loader itself manually as I have done.

----------------------------------------------------------------
$ cat /usr/share/doc/hibernate/HOWTO.Debian.swsusp
----------------------------------------------------------------

To get the "hibernate" command to work on a stock Debian machine, you
need to do a small amount of setup.  This file attempts to walk you
through the process.  We assume you are running a stock Debian kernel,
and that hibernate will be defaulting to the "swsusp" method.

**** INSTALL AND REMOVE PACKAGES

First, you *must* have the following packages installed/removed:

 install: hibernate (version >= 1.91)
 install: initramfs-tools initrd-tools
 install: udev (reasonably recent, eg version >= 0.093)
 remove: yaird
 install: linux-image-XXX-YYY (with XXX >= 2.6.8)

Second, if you are running a kernel installed while yaird was
installed, you *must* reconfigure that kernel so its initrd.img is
rebuilt without the use of yaird:

 dpkg-reconfigure linux-image-XXX-YYY

**** REBOOT

You may now reboot into your new kernel.

**** IDENTIFY YOUR SWAP PARTITION

When awakening from hibernation, you need to pass the boot option

 resume=/dev/hdXX

to the linux kernel, where /dev/hdXX is your swap partition, as this
is where the state of the suspended system is stored.  You can figure
out your swap partition using the command

 egrep swap /etc/fstab

or

 swapon -s

**** CONFIGURE BOOT LOADER TO PASS OPTION RESUME=

The resume= option is harmless if the machine is not suspended, so you
should modify your boot scripts to always pass that option.  How to do
this depends on which boot loader you use.  If you run lilo, add the
line

 append="resume=/dev/hdXX"

at the top of the file /etc/lilo.conf and run the command

 lilo

If you run grub, edit /boot/grub/menu.lst to include the line

 # defoptions=resume=/dev/hda1

immediately following the line

 ## e.g. defoptions=vga=791 resume=/dev/hda5

and run the command

 update-grub

**** TEST THAT HIBERNATION WORKS

At this point, you should be able to run

 hibernate

and it should do some magic suspending and then halt.  When you reboot
it should magically awaken from its hibernation.

****************************************************************

**** QUESTIONS

Instead of /dev/hdXX, your swap partition might be of the form
/dev/sdXX.  That is okay.

**** TROUBLESHOOTING: HARDWARE ISSUES AFTER AWAKENING

Some kernel modules need to be unloaded prior to hibernation.  This is
largely preconfigured, but some carelessly built hardware, for
instance most Dell laptops (Dell is well known for sloppy engineering)
require that particular modules be unloaded.  For example, on my Dell
X200, a particularly worthless piece of crap laptop which is also
surprisingly slow, the 1394 (firewire) interface fails after
hibernation.  This was cured by adding the line

 UnloadModules ohci1394 ieee1394

to /etc/hibernate/common.conf immediately following the line

 # UnloadModules snd_via82cxxx usb-ohci


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to