zramswap wont start error on boot

More
21 Feb 2025 01:07 #322145 by spina
zramswap wont start error on boot was created 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 or Create an account to join the conversation.

  • unknown
  • Away
  • Premium Member
  • Premium Member
More
21 Feb 2025 01:43 #322152 by unknown
Replied by unknown on topic zramswap wont start error on boot
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 or Create an account to join the conversation.

  • unknown
  • Away
  • Premium Member
  • Premium Member
More
21 Feb 2025 01:45 #322153 by unknown

Please Log in or Create an account to join the conversation.

More
21 Feb 2025 03:35 - 21 Feb 2025 04:34 #322160 by spina
Replied by spina on topic zramswap wont start error on boot
Yes the rt15 image does boot and run without failure
Last edit: 21 Feb 2025 04:34 by spina.

Please Log in or Create an account to join the conversation.

  • unknown
  • Away
  • Premium Member
  • Premium Member
More
21 Feb 2025 05:00 #322163 by unknown
Replied by unknown on topic zramswap wont start error on boot
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.
sudo apt install systemd-zram-generator
then
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
# /etc/systemd/zram-generator.conf
[zram0]
zram-size = ram / 2

Before reboot you can rotate the logs via
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 or Create an account to join the conversation.

  • unknown
  • Away
  • Premium Member
  • Premium Member
More
21 Feb 2025 05:02 #322164 by unknown
Replied by unknown on topic zramswap wont start error on boot
Sorry that should be
[zram0]
zram-size = ram / 4

The editor makes it a pita to edit posts.

Please Log in or Create an account to join the conversation.

More
21 Feb 2025 21:25 #322233 by spina
Replied by spina on topic zramswap wont start error on boot
this fixed the issue thank you!!

Please Log in or Create an account to join the conversation.

Time to create page: 0.067 seconds
Powered by Kunena Forum