   --- Software Suspend ('swsusp') for Linux, version 1.0 ---



   BIG FAT WARNING.

   Although swsusp is quite highly developed, has undergone a lot of testing
   and is relied upon to do its job, it is still considered to be in 
   development. As such, no guarantees are given about the safety of your
   data while using swsusp.

   PLEASE ENSURE YOU HAVE BACKUPS OF IMPORTANT DATA WHEN TRYING SWSUSP,
   ESPECIALLY WHEN TRYING IT FOR THE FIRST TIME.



1. What is it?
2. Why would you want it?
3. What do you need to use it?
4. How do you use it?
5. How do you get support?
6. What about 2.5 kernels?
7. When will XXX be supported?

1. What is it?

   Imagine you're sitting at your computer, working away. For some reason, you
   need to turn off your computer for a while - perhaps it's time to go home
   for the day. When you come back to your computer next, you're going to want
   to carry on where you left off. Now image that you could push a button and
   have your computer store the contents of its memory to disk and power down.
   Then, when you next start up your computer, it loads that image back into
   memory and you can carry on from where you were, just as if you'd never
   turned the compputer off. That's what Software Suspend does.

2. Why would you want it?

   Why wouldn't you want it?
   
   Being able to save the state of your system and quickly restore it improves
   your productivity - you get a useful system in far less time than through
   the normal boot process.
   
3. What do you need to use it?

   Software Suspend is part of the Linux Kernel. It is not part of Marcelo's
   2.4 tree at the moment, so you will need to download the kernel source and
   apply the latest patch. Having done that, enable the appropriate options in
   make [menu|x]config (under General Setup), compile and install your kernel.

   Software Suspend is available from www.sourceforge.net/projects/swsusp.

   Software Suspend stores the image of your memory in your swap partition,
   so you'll need a large enough swap partition to contain the largest image
   you'd want to store, plus the space you'd normally use for swap. A good
   rule of thumb would be to calculate the amount of swap you'd want without
   using Software Suspend, and then add the amount of memory you have. This
   swap space can be arranged in any way you'd like. It can be in one partition
   or spread over a number. The only requirement is that the partitions be
   activated when you start to suspend. If you want to ensure you have enough
   memory to suspend, you might want to make one swap partition for 'normal'
   use, and another to activate just before suspending and deactivate 
   afterwards.

   Using Software Suspend requires that you add an extra parameter to your
   lilo.conf or equivalent. Here's an example:

   append="resume=/dev/hda1"

   This would tell Software Suspend that /dev/hda1 is a swap partition you 
   have. It will use the swap signature of this partition as a pointer to
   your data when you suspend. This doesn't need to be _the_ swap partition
   where all your data is actually stored. It just needs to be a swap
   partition. In the example of two swap partitions given above, /dev/hda1
   could be your swap partition for normal usage.

   Once you've compiled and installed the kernel, adjusted your lilo.conf
   and rerun lilo, you should only need to reboot for the most basic part
   of Software Suspend to be ready.

   Since 2.4 kernels don't have the driver model that's being developed for
   2.5, you may need to do more, however. Users of Software Suspend usually
   start the process via a script which prepares for the suspend, tells the 
   kernel to do its stuff and then restore things afterwards. This script might
   involve:

   - Switching to a text console and back if X doesn't like the video card
     status on resume.
   - Running /sbin/hwclock [--directisa] to update the clock on resume
   - Un/reloading PCMCIA support since it doesn't play well with swsusp.
  
   Note that you might not be able to unload some drivers if there are 
   processes using them. You might have to kill off processes that hold
   devices open. Hint: if your X server accesses an USB mouse, doing a
   'chvt' to a text console releases the device and you can unload the
   module.

   Check out the latest script (available on Sourceforge).
   
4. How do you use it?

   Once your script is properly set up, you should just be able to start it
   and everything should go like clockwork. Of course things aren't always
   that easy out of the box.

   Check out (in the kernel source tree) include/linux/suspend-debug for
   settings you can use to get detailed information about what swsusp is doing.
   /proc/sys/kernel/swsusp and the kernel parameters swsusp_act, swsusp_dbg
   and swsusp_lvl allow you to set the action and debugging parameters prior
   to starting a suspend and/or at the lilo prompt before resuming. There is
   also a nice little program that should be available from Sourceforge which
   makes it easier to turn these debugging settings on and off. Note that to
   get any debugging output, you need to enable it when compiling the kernel.
   If cat /proc/sys/kernel/swsusp only shows 4 numbers, you didn't do that.

   A neat feature of Software Suspend is that you can press Shift and Alt
   together at any time during suspending, and the process will be aborted.
   Due to the way swsusp works, this means you'll have your system back and
   perfectly usable almost instantly. The only exception is when it's at
   the very end of writing the image. Then it will need to reload a small
   (usually 4-50MBs) portion first.

   If you run into problems with resuming, adding the "noresume" option to
   the kernel command line will let you skip the resume step and
   (hopefully) recover your system.

5. How do you get support?

   Glad you asked. Software Suspend is being actively maintained and supported,
   both by Nigel (the guy doing most of the coding at the moment) and its
   users. You can find the mailing list via the Sourceforge project page.

6. What about 2.5 kernels?

   There is a version of Software Suspend already included in the 2.5 kernel
   tree. Unfortunately, it lacks a large proportion of the features in 2.4.
   The hope and plan is to get the 1.0 release of the 2.4 version done, and
   then complete the port to 2.5 (which shouldn't take long). The struggle
   will then be to get it integrated into Linus' tree (don't expect this to
   be quick).
   
7. When will XXX be supported?

   Software Suspend currently lacks support for SMP, non x86, SCSI and swap 
   files.

   The last item is probably the easiest to fix. Patches for the other items
   (and anything that's been missed) are welcome. Please send to the list.

   Because Nigel's main task is definitely not Software Suspend and he doesn;t
   have the hardware, he will be unlikely to develop support for any of these
   in the near future. His development work to date has been driven by the
   desire to be a user of a more feature complete Software Suspend.
