1

How to disable zram at boot?

What I found was mostly to

swapoff -a
rmmod zram

but after reboot it came back

I found such question being asked at different places, e.g.,

But none seems to be able to get answered properly.

xpt
  • 1,197

1 Answers1

3

On Arch Linux-based systems, it is possible that zram is configured via zram-generator package. The generator is invoked by systemd early at boot. You can check unit status of your configuration service via systemd-zram-setup@zramN.service. N is the zram device id. To disable generator, set systemd.zram[=0|1] kernel parameter.

sudo nano /etc/default/grub

Then add systemd.zram=0 argument to GRUB_CMDLINE_LINUX_DEFAULT as follows.

GRUB_CMDLINE_LINUX_DEFAULT="systemd.zram=0"

Then generate grub config file

sudo grub-mkconfig -o /boot/grub/grub.cfg