next up previous Link to 'computer' page
Next: Wicd Up: System software Previous: System software

Hibernate and suspend -- HP Elitebook 2740p and Wintec Filemate SolidGO (ExpressCard eSATA SSD)

Hibernate and suspend work well with the default settings, but hardly seems to be necessary when openSuSE can have Firefox running from cold-start/boot in thirty-two seconds (Lubuntu/Ubuntu in less than twenty seconds). Recovering from hibernation from a swap parition on the internal IDE takes about thirty seconds, which is the same as Windows 7. Resuming from hibernation from a swap partition on the SSD requires fifteen seconds (to reach the screensave/screenlock screen, another few seconds to enter the password). Recovering from a swap file (not partition) on the SSD takes openSuSE about twenty-five seconds, not much of an improvement.

Lots of work is required to get openSuSE to boot from a swap-file (rather than partition) on the SSD.

Instructions on how to create a swapfile is included in openSuSE's own help documentation, under the `Partition' section -- Reference -- Advanced Disk Setup. The openSuSE web-page pm-utils is also helpful. My existing swap partition could be disabled through the Partition tool, so that the swap partition is not mounted as a swap partition during boot. The UUID of the partition containing the swap file, and the swap file `offset' needs to be added to the kernel boot parameters. In my case...

resume=/dev/disk/by-uuid/d93d3571-07e7-4ed2-b19d-d50f449688ef resume_offset=3581952
The openSuSE kernel does not accept resume=UUID='xxx' as an argument.

The UUID of the partition containing the swapfile can be found by `ls -l /dev/disk/by-uuid'.

The swap offset can be found by the command `swap-offset /home/myswapfile'.

The default hibernation program (uswsusp, the user-space version of swsusp) does not work with swap files, and so needs to be changed. I notice that some versions of uswsusp do work with swap files, so this change may not be required in future.

Create a file `/etc/pm/config.d/config'

# The default sleep/wake system to use. Valid values are:

# kernel The built-in kernel suspend/resume support.

# Use this if nothing else is supported on your system.

# uswsusp If your system has support for the userspace

# suspend programs (s2ram/s2disk/s2both), then use this.

# tuxonice If your system has support for tuxonice, use this.


# The system defaults to kernel if this is commented out. (!!not true?? - uswsusp appears to be the default for openSuSE 11.3)


I also changed the following lines in /etc/suspend.conf...

resume device = /dev/sdb5

resume offset = 3581952 

And it is generally recommended that is swap-space is on an SSD, then you should minimise the use of swap (to reduce SSD wear, particularly if using `MLC' SSD, which is the type of SSD used in the Wintec Filemate). Change the line in /etc/sysctl.conf

vm.swappiness = 1
Although it is also possible to turn the swap on, and then off, during the hibernate/resume script. An example is given on this forum page, a potential `dummy' container script is provided on the openSuSE wiki.

I notice that /etc/suspend.conf contains the intriguing option `thread=', but it doesn't improve resume from hibernation time by much (still about twenty-five seconds).

next up previous Link to 'computer' page
Next: Wicd Up: System software Previous: System software
David Fong 2011-01-25