zramswap wont start error on boot

More
1 year 8 months ago #322145 by spina
Hardware RPi 5 8gb
IMAGE rpi-5-debian-bookworm-6.12.11-arm64-ext4-2025-01-27-0140 (1).img.xz

On a fresh image install i get failure to start service in the boot.log below is from the journalctl

i formatted and tried again same problem any ideas?Feb 20 14:49:54 raspberrypi systemd[1]: Starting zramswap.service - Linux zramswap setup...
░░ Subject: A start job for unit zramswap.service has begun execution
░░ Defined-By: systemd
░░ Support: www.debian.org/support
░░
░░ A start job for unit zramswap.service has begun execution.
░░
░░ The job identifier is 119.
Feb 20 14:49:54 raspberrypi root[738]: Starting Zram
Feb 20 14:49:54 raspberrypi zramswap[738]: <13>Feb 20 14:49:54 root: Starting Zram
Feb 20 14:49:54 raspberrypi zramswap[734]: /usr/sbin/zramswap: line 53: echo: write error: Invalid argument
Feb 20 14:49:54 raspberrypi systemd[1]: zramswap.service: Main process exited, code=exited, status=1/FAILURE
░░ Subject: Unit process exited
░░ Defined-By: systemd
░░ Support: www.debian.org/support
░░
░░ An ExecStart= process belonging to unit zramswap.service has exited.
░░
░░ The process' exit code is 'exited' and its exit status is 1.
Feb 20 14:49:54 raspberrypi systemd[1]: zramswap.service: Failed with result 'exit-code'.
░░ Subject: Unit failed
░░ Defined-By: systemd
░░ Support: www.debian.org/support
░░
░░ The unit zramswap.service has entered the 'failed' state with result 'exit-code'.
Feb 20 14:49:54 raspberrypi systemd[1]: Failed to start zramswap.service - Linux zramswap setup.
░░ Subject: A start job for unit zramswap.service has failed
░░ Defined-By: systemd
░░ Support: www.debian.org/support
░░
░░ A start job for unit zramswap.service has finished with a failure.
░░
░░ The job identifier is 119 and the job result is failed.

Please Log in to join the conversation.

More
1 year 8 months ago #322152 by unknown
First time this has come up, I've tested this image multiple times on a 4GB RPi5, so far no issues. No reported issues with 16GB either, which I guess doesn't help your issue.
Is this preventing a full boot ?
If not is zram module loaded ?
Is there any dmesg entry for zram ?
What device are you booting from SDCARD, USB or NVME.
Is your download a good download, ie: matches the sha256 file ?

Please Log in to join the conversation.

More
1 year 8 months ago #322153 by unknown

Please Log in to join the conversation.

More
1 year 8 months ago #322160 by spina
Yes the rt15 image does boot and run without failure

Please Log in to join the conversation.

More
1 year 8 months ago #322163 by unknown
OK looked into a bit further, was getting the same messages, doesn't seem to be affecting operation.
OK I think I've found out what the issue is.
systemd-zram-generator has not been installed in the image.
Code:
sudo apt install systemd-zram-generator
then
Code:
sudo systemctl mask zramswap.service
and reboot this enables enables swap via zram.

Currently it defaults to half the available ram
On my 4gb system
Code:
# /etc/systemd/zram-generator.conf [zram0] zram-size = ram / 2

Before reboot you can rotate the logs via
Code:
sudo logrotate --force /etc/logrotate.conf

And then hopefully those messages should be gone and swap will be enabled. To tell the truth no one has made any mentions regarding not having any swap.

More info here
github.com/systemd/zram-generator

Many thanks for bringing this up, if you can confirm that this fixes the issue that would be fantastic. If so I'll see about getting an update image up & loaded.

Please Log in to join the conversation.

More
1 year 8 months ago #322164 by unknown
Sorry that should be
Code:
[zram0] zram-size = ram / 4

The editor makes it a pita to edit posts.

Please Log in to join the conversation.

More
1 year 8 months ago #322233 by spina
this fixed the issue thank you!!

Please Log in to join the conversation.

Time to create page: 0.099 seconds
Powered by Kunena Forum