mirror of
https://gitlab.postmarketos.org/postmarketOS/pmaports.git
synced 2025-07-23 23:05:10 +03:00
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
23 lines
695 B
Desktop File
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
|