System Specs
OS: Debian GNU/Linux 12 (bookworm) x86_64 (stable)
Kernel: 6.1.0-17-amd64
Shell: bash 5.2.15
DE: GNOME 43.9
WM: Mutter
Windowing System: Wayland
systemd version:
systemd 252 (252.19-1~deb12u1)
+PAM +AUDIT +SELINUX +APPARMOR +IMA +SMACK +SECCOMP +GCRYPT -GNUTLS +OPENSSL +ACL +BLKID +CURL +ELFUTILS +FIDO2 +IDN2 -IDN +IPTC +KMOD +LIBCRYPTSETUP +LIBFDISK +PCRE2 -PWQUALITY +P11KIT +QRENCODE +TPM2 +BZIP2 +LZ4 +XZ +ZLIB +ZSTD -BPF_FRAMEWORK -XKBCOMMON +UTMP +SYSVINIT default-hierarchy=unified
____________________________________________
Issue
I don't know exactly when this issue started happening, but I only realised it today when booting my system and I saw a quick [FAILED] message popped up when systemd starts the various services and daemons. Unfortunately, I can't quite catch it with my eyes (the screen scrolls by too quickly), but I got to investigating and it is most likely the zram swap service.
Firstly, I checked the service status:Output
Then I ranOutput
Both outputs list the same error:
/usr/sbin/zramswap: line 53: echo: write error: Device or resource busy
zram: Can't change algorithm for initialized device.
Then I checked the output of zramctl:I verified the algorithm by running:The algorithm and disksize values are wrong, they are supposed to be 'zstd' and '8G' as I had originally configured them when I installed the system several months ago. I had previously verified the status of zramctl and always got the correct values. Well, up until today.
I verified the zram configuration (correct) withOutput
So I'm not sure how to go from here. Any advice on how I could fix this issue?
For the record, I don't remember any system updates related to systemd or zram in the last days, and the system has been stable running without any hiccups.
____________________________________________
Workaround
One workaround I found though is modifying zram-generator.conf and rebooting the system:zram-generator.conf
I added all the lines belowUpon reboot, the systemd errors still persist in the logs (dmesg and journalctl), but zramctl is configured as intended:
OS: Debian GNU/Linux 12 (bookworm) x86_64 (stable)
Kernel: 6.1.0-17-amd64
Shell: bash 5.2.15
DE: GNOME 43.9
WM: Mutter
Windowing System: Wayland
systemd version:
systemd 252 (252.19-1~deb12u1)
+PAM +AUDIT +SELINUX +APPARMOR +IMA +SMACK +SECCOMP +GCRYPT -GNUTLS +OPENSSL +ACL +BLKID +CURL +ELFUTILS +FIDO2 +IDN2 -IDN +IPTC +KMOD +LIBCRYPTSETUP +LIBFDISK +PCRE2 -PWQUALITY +P11KIT +QRENCODE +TPM2 +BZIP2 +LZ4 +XZ +ZLIB +ZSTD -BPF_FRAMEWORK -XKBCOMMON +UTMP +SYSVINIT default-hierarchy=unified
____________________________________________
Issue
I don't know exactly when this issue started happening, but I only realised it today when booting my system and I saw a quick [FAILED] message popped up when systemd starts the various services and daemons. Unfortunately, I can't quite catch it with my eyes (the screen scrolls by too quickly), but I got to investigating and it is most likely the zram swap service.
Firstly, I checked the service status:
Code:
$ sudo systemctl status zramswap.service
Then I ran
Code:
$ sudo dmesg
Both outputs list the same error:
/usr/sbin/zramswap: line 53: echo: write error: Device or resource busy
zram: Can't change algorithm for initialized device.
Then I checked the output of zramctl:
Code:
$ sudo zramctl[sudo] password for ory:NAMEALGORITHM DISKSIZE DATA COMPR TOTAL STREAMS MOUNTPOINT/dev/zram0lzo-rle4G 4K 80B 12K 12 [SWAP]
Code:
$ cat /sys/block/zram0/comp_algorithmlzo [lzo-rle] lz4 lz4hc zstd
I verified the zram configuration (correct) with
Code:
$ cat /etc/default/zramswap
So I'm not sure how to go from here. Any advice on how I could fix this issue?
For the record, I don't remember any system updates related to systemd or zram in the last days, and the system has been stable running without any hiccups.
____________________________________________
Workaround
One workaround I found though is modifying zram-generator.conf and rebooting the system:
Code:
$ sudo nano /etc/systemd/zram-generator.conf
I added all the lines below
Code:
[zram0]
Code:
$ sudo zramctlNAMEALGORITHM DISKSIZE DATA COMPR TOTAL STREAMS MOUNTPOINT/dev/zram0zstd 7.8G 4K 64B 4K 12 [SWAP]
Code:
$ cat /sys/block/zram0/comp_algorithmlzo lzo-rle lz4 lz4hc [zstd]
Statistics: Posted by ory — 2024-01-21 21:43 — Replies 1 — Views 93