From Fedora Project Wiki

Revision as of 12:45, 14 November 2013 by Jskarvad (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Description

This test case tests hybrid suspend (AKA suspend to both) via systemd. This presents both suspend to RAM and hibernation in one step. The advantage is a quick resume (in most cases) and no lost of work/unsaved data on accidental battery failure. In this case the machine will simply resume from hibernation when the power is restored. The disadvantage is slightly longer suspend (the image have to be written on disk).

Swap partition required
This test case requires swap partition to be setup on the disk. Physical swap partition should work as well as swap on LVM/LUKS. For details about the swap see Hibernate test case.

Setup

  1. Check that your platform correctly supports suspend and hibernate (i.e. Suspend and Hibernate test cases needs both to be passed and you need to have setup all the pre-requisites presented there).
  2. Check that the hybrid suspend is supported on your platform:
    $ cat /sys/power/disk
    If there is suspend in the output, it signals that the hybrid suspend is supported.

How to test

  1. Run the following command:
    # systemctl hybrid-sleep
  2. Wait until the system suspends to both (it typically takes cca. 2-60 seconds).
  3. Wake-up your system by e.g. hitting the power button (or maybe another button depending on your HW).

Expected Results

  1. System correctly suspends and also writes hibernation image.
  2. After wake-up system correctly resumes.
  3. In case power is accidentally lost, machine resumes from hibernation and no unsaved work data are lost (in case you are running from the live medium you may need to follow steps described in Hibernate test case in order to correctly resume from hibernation).
  4. NetworkManager re-establishes a network connection.