Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

zram service not starting automatically after reboot #205

Open
PamAllay opened this issue Nov 21, 2024 · 4 comments
Open

zram service not starting automatically after reboot #205

PamAllay opened this issue Nov 21, 2024 · 4 comments

Comments

@PamAllay
Copy link

I have followed arch wiki on configuring zram using zram-generator:
https://wiki.archlinux.org/title/Zram

but the systemd-zram-setup@zram0.service service does not start on boot as stated in the wiki, i manually have to run : sudo systemctl start systemd-zram-setup@zram0.service to start the service after every boot, and i've had no luck finding a solution.

configuration =
$>cat /etc/systemd/zram-generator.conf
[zram0]
zram-size = min(ram / 2, 4096)
compression-algorithm = zstd

@keszybz
Copy link
Member

keszybz commented Nov 21, 2024

The generator makes dev-zram0.swap part of swap.target, and dev-zram0.swap pulls in systemd-zram-setup@zram0.service. If that doesn't happen for you, then it sounds like for some reason swap.target is not getting activated properly.

$ systemctl list-dependencies sysinit.target
sysinit.target
...
● ├─swap.target
● │ └─dev-zram0.swap
...

@PamAllay
Copy link
Author

@keszybz i got this ->
○ ├─swap.target
○ │ ├─dev-disk-by\x2duuid-708fd83a\x2d61fd\x2d4413\x2d9c05\x2da5d56ea0ea93.swap
● │ └─dev-zram0.swap

the first swap must be the swap on disk and is disabled by kernal parameter and zram swap is enabled as it has highlighted dot, any help..?

@keszybz
Copy link
Member

keszybz commented Nov 26, 2024

swap.target is also not active (white dot). This seems to confirm my original theory that swap.target is not getting activated. Can you show the kernel commandline?

@PamAllay
Copy link
Author

that is also a static type, so can't enable it.. any way to activate it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants