From Fedora Project Wiki

Revision as of 13:45, 1 July 2020 by Chrismurphy (talk | contribs) (initial writeup)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Description

Test swap-on-zram and hibernation (suspend-to-disk).


How to test

  1. This this test case depends on existing disk-based swap, and installation of zram-generator and zram-generator-defaults followed by a reboot. Check to ensure you have two swap devices: zram and disk.
    $ swapon
    NAME       TYPE       SIZE USED PRIO
    /dev/sda5  partition 10.4G   0B   -2
    /dev/zram0 partition  3.8G   0B  100
    
  2. Switch to root user.
    $ sudo -i
    
  3. Prepare the system to test hibernation in "reboot" mode:
    # echo reboot > /sys/power/disk
    
  4. When you're ready to hibernate, initiate hibernation using this command. Following the reboot you should be returned to the desktop state as it was upon issuing this command (rather than a login screen).
    # echo disk > /sys/power/state
    
  5. Repeat a second time.
    # echo disk > /sys/power/state
    
  6. Repeat a third time.
    # echo disk > /sys/power/state
    

Expected Results

  1. The system should reboot each time and return you to the desktop state as it was at the time the hibernation was initiated.