Version 23.05.0-rc1 does not work zram-swap

After flashing, zram-swap stopped working, rolled back to version 22.03.5

How to run please tell me?

/etc/init.d/zram start
zram_start: activating '/dev/zram0' for swapping (28 MiB)
zram_reset: enforcing defaults via /sys/block/zram0/reset
zram_comp_algo: set compression algorithm 'lzo' for zram '/dev/zram0'
sh: write error: Invalid argument
sh: write error: Invalid argument
mkswap: image is too small
swapon: /dev/zram0: Invalid argument

gives an error message

I figured it out myself. You need to install kmod-lib-lzo and then zram will work


I think the zram-package should have a dependence on any of the compression packages, or, if there are none installed, at least the default?

If you have 64 MB of RAM and want to use adblock, then it is better to install these two packages
zram-swap kmod-lib-lzo
works fine, will add you an additional 27 MB in compressed form
in case of memory shortage it will use this memory as additional

In my case I have 128MB RAM. I want to fsck a full 12TB drive, but it was running out of memory and would never complete.

So I installed both zram-swap and kmod-lib-lz4 (better compression than lzo) and set zram to 128M also. With ~60-70% compression, this gives a total usable RAM of ~204-218MB total. Even with terrible 50% compression, that's still ~192MB usable, so fsck can complete without issue.

zram-swap makes a HUGE difference for the 32MB RAM devices though the typical 4MB flash is the main limiter there.

1 Like

Thank you, I did just that, I didn’t know there was such a package

If you are more concerned with storage space than RAM (4/32 device) then lzo would be better as that package is only 5.36 KiB vs lz4 which is 25.09 KiB.

There is enough space, I am for better performance lz4, thank you