1
0
Fork 0
mirror of https://gitlab.postmarketos.org/postmarketOS/pmaports.git synced 2025-07-23 23:05:10 +03:00
pmaports/extra-repos/systemd/systemd-services/system-zram_swap.service
Clayton Craft 60778a8e82
systemd/systemd-services: remove zram-init -s param from zram_swap.service
This causes zram-init to write to a device attr that was dropped from the 6.15 kernel, and fail:

4127e13c93

Reported upstream:
https://github.com/vaeth/zram-init/issues/50

fixes #3677

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6443
[ci:skip-build]: already built successfully in CI
2025-04-23 13:59:59 -07:00

23 lines
695 B
Desktop File

# SPDX-License-Identifier: GPL-2.0-only
[Unit]
Description=swap with zram
DefaultDependencies=no
Before=swap.target
[Service]
Type=oneshot
RemainAfterExit=true
# Change the maximal number of parallel streams (-s), algorithm (-a) and
# size (in megabytes) to your needs.
# (In the example the size is half of the available ram.)
# Make sure to avoid collision of devices (-d...) with
# zram_tmp.service and zram_var_tmp.service and that
# num_devices in modprobe.d/zram.conf contains the maximal used number + 1
ExecStartPre=-/sbin/modprobe zram
ExecStart=/bin/sh -c "exec /usr/sbin/zram-init -azstd -Lzram_swap `zram-size-calc`"
ExecStop=/usr/sbin/zram-init 0
[Install]
WantedBy=swap.target