From 7087d858f6d584d315adb3733252787793cb2066 Mon Sep 17 00:00:00 2001 From: Michael Aaron Murphy Date: Wed, 28 Dec 2022 19:49:43 +0100 Subject: [PATCH] fix(zram): Use udevadm settle --- usr/bin/pop-zram-config | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr/bin/pop-zram-config b/usr/bin/pop-zram-config index 600fae2..bbe3fab 100755 --- a/usr/bin/pop-zram-config +++ b/usr/bin/pop-zram-config @@ -46,14 +46,14 @@ SIZE=$(((TOTAL > MAX_SIZE)) && echo ${MAX_SIZE} || echo ${TOTAL}) # Load the zram module. modprobe zram num_devices=1 && sync -sleep 1 +udevadm settle -t 1 # Create it with our desired size and compression algorithm zramctl --size "${SIZE}M" --algorithm "${ALGO}" /dev/zram0 # Format it as a swap partition mkswap /dev/zram0 && sync -sleep 1 +udevadm settle -t 1 # Activate the zram device with a priority of 1000. # This device should have a higher priority than disk-based swap.