QA:Testcase Power Management pm hibernate
This test case tests hibernation via the pm-hibernate command.
- Check that you have
# rpm -q pm-utils
- Check that the hibernate is supported on your platform:
$ cat /sys/power/state
- If there is disk in the output, it signals that the hibernate is supported.
- Check your swap:
$ swapon -s
- You may see something like:
Filename Type Size Used Priority /dev/dm-2 partition 3997692 1856 -1
- Note the filename of the swap partition with the highest priority (/dev/dm-2 in this case). It will be your resume partition (you will need this filename later when resuming).
- In case there is no swap partition you need to create one otherwise you cannot complete this test case (or feel free to skip this test case).
How to test
- Run the following command:
- Wait for hibernation process to complete (it typycally takes cca. 5-60 seconds).
- Resume by hitting the power button.
- If you hibernated from the live media:
- Select boot from the live media.
- When the boot manager displays make sure the default option is selected (e.g. "Default" or "Start PM Test", the exact value depends on the medium/boot manager you are using) and edit the kernel boot parameters (mostly by hitting Tab).
- Append to the kernel boot parameters resume=/dev/dm-2 (replace /dev/dm-2 by your swap partition, it is the filename you previously noted during the setup).
- Boot (mostly by hitting Enter).
- System correctly hibernates.
- System correctly resumes.