Skip to content

Commit

Permalink
fix(zram): Use udevadm settle
Browse files Browse the repository at this point in the history
  • Loading branch information
mmstick committed Dec 28, 2022
1 parent 5910a84 commit 7087d85
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions usr/bin/pop-zram-config
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 7087d85

Please sign in to comment.