zram doesn't work on msm8953
Describe your issue
zram doesn't work:
zramctl: /dev/zram0: failed to set algorithm: Invalid argument
probably because zstd is not enabled in the kernel
How to reproduce your issue?
markw:~$ sudo service zram-init restart
zram swap: activating with size: 1403 MB
* Remove zram0 swap [ !! ]
* Unloading zram module... [ ok ]
zram swap: activating with size: 1403 MB
* Loading zram module... [ ok ]
* Swap->zram0
zramctl: /dev/zram0: failed to set algorithm: Invalid argument
zram-init:
zramctl zram0 failed [ !! ]
What device are you using?
xiaomi-markw
On what postmarketOS version did you encounter the issue?
-
edge (
master
branch) -
v24.06
-
I confirm that the issue still is present after running
sudo apk upgrade -a
On what environment did you encounter the issue?
Environments
- GNOME Shell on Mobile
- Phosh
- Plasma Mobile
-
Sxmo (Wayland/Sway) Please post the output of
sxmo_version.sh
- Other: Please fill out
How did you get postmarketOS image?
- from https://images.postmarketos.org
- I built it using pmbootstrap
- It was preinstalled on my device
What's the build date of the image? (in yyyy-mm-dd format)
2023-12-17
Additional information
zram doesn't work with the default zstd compression algorithm. Although I can enable it if I set lz4 for example:
markw:~$ sudo zramctl /dev/zram0 --algorithm zstd --size 1000MiB
zramctl: /dev/zram0: failed to set algorithm: Invalid argument
markw:~$ sudo zramctl /dev/zram0 --algorithm lz4 --size 1000MiB
markw:~$