What can I do to get rid of swap and use zram only? | I made a mistake during the install

  1. zramctl will show you status of zram. If not active you will get no output from the command.

  2. sudo systemctl status [email protected]


It is this systemd service unit that automatically initializes zram devices without user intervention.

Worth noting from the archwiki linked here

The zram-generator package provides a [email protected] unit to automatically initialize zram devices without users needing to enable/start the template or its instances.

You shouldn’t have a need to run the generator, BUT, you should already have the systemd service unit ready to go. Just “enable” if needed, then start/restart the unit and your available zram will be activated by the service unit.

Here you can see an example configuration file needed for zram-generator

Note: “The generator will be invoked by systemd early at boot”, so usage is as simple as creating the appropriate configuration file(s) and rebooting. A sample configuration is provided in /usr/share/doc/zram-generator/zram-generator.conf.example

So if you need to setup zram from scratch you will need to….

  1. Make your zram config for zram-generator to use.

  2. reboot so the zram-generator & systemd unit [email protected] can do their magic (it is all automatic).

  3. Once rebooted check the systemd zram service unit status & zramctl to verify the state of your zram.