From Fedora Project Wiki

Description

Test disabling swap-on-zram permanently.

Setup

  1. Make sure your system has swap-on-zram installed and enabled.

How to test

  1. Remove the swap-on-zram default configuration:
    sudo dnf remove zram-generator-defaults

    Alternatively, you can override the default config file with an empty one:

    sudo touch /etc/systemd/zram-generator.conf
  2. Reboot.
  3. Confirm that swap-on-zram is not active. zramctl should not list the /dev/zram0 device:
    $ zramctl
    

    swapon should not list this device either, only disk swap partitions:

    $ swapon
    NAME      TYPE       SIZE USED PRIO
    /dev/sda5 partition 10.4G   0B   -2
    

    The service should be marked as inactive (dead):

    $ sudo systemctl status swap-create@zram0.service
    ● swap-create@zram0.service - Create swap on /dev/zram0
         Loaded: loaded (/usr/lib/systemd/system/swap-create@.service; static; vendor preset: disabled)
         Active: inactive (dead)
           Docs: man:zram-generator(8)
                 man:zram-generator.conf(5)
    
  4. Return your system back to original state (install the removed package or remove the newly created config override).

Expected Results

  1. After removing the default configuration, swap-on-zram should not be active and its device should not be visible in zramctl and swapon commands output.