diff --git a/docs/superpowers/specs/2026-05-10-lid-hibernate-design.md b/docs/superpowers/specs/2026-05-10-lid-hibernate-design.md index 1de5e89..47c04eb 100644 --- a/docs/superpowers/specs/2026-05-10-lid-hibernate-design.md +++ b/docs/superpowers/specs/2026-05-10-lid-hibernate-design.md @@ -50,10 +50,10 @@ Hibernation prerequisites are NOT met: only zram swap (4 GiB, RAM-backed, can't 1. **Swap file.** `btrfs filesystem mkswapfile --size 16g /swapfile` (handles NOCOW, alignment, mkswap in one). Skip if `/swapfile` exists with size ≥14 GiB. 2. **Activate.** `swapon /swapfile`. Append `/swapfile none swap defaults 0 0` to `/etc/fstab` if absent. 3. **Compute resume params.** - - `RESUME_UUID=$(findmnt -no UUID /)` → root filesystem UUID (currently `60cbc9b9-3631-4f9a-925c-a45e0920eb17`) + - `ROOT_PARTUUID=$(findmnt -no PARTUUID /)` → root partition's GPT PARTUUID (matches the existing `root=PARTUUID=…` convention in `/etc/kernel/cmdline`) - `RESUME_OFFSET=$(btrfs inspect-internal map-swapfile -r /swapfile)` → physical offset of swap file 4. **mkinitcpio hook.** Edit `/etc/mkinitcpio.conf` HOOKS array to insert `resume` between `block` and `filesystems`. `sed` guarded so a re-run is a no-op. -5. **Kernel cmdline.** Append `resume=UUID=$RESUME_UUID resume_offset=$RESUME_OFFSET` to `/etc/kernel/cmdline` if not already present. +5. **Kernel cmdline.** Append `resume=PARTUUID=$ROOT_PARTUUID resume_offset=$RESUME_OFFSET` to `/etc/kernel/cmdline` if not already present. 6. **Regenerate UKI.** `mkinitcpio -P` → produces `/boot/EFI/Linux/arch-linux-zen.efi` with new HOOKS + cmdline baked in. 7. **Reboot.** Print explicit instruction; do not auto-reboot. @@ -106,7 +106,7 @@ After running `scripts/enable-hibernation.sh` and rebooting: ```bash swapon --show # /swapfile, ≥14 GiB, prio low -cat /proc/cmdline # contains resume=UUID=… resume_offset=… +cat /proc/cmdline # contains resume=PARTUUID=… resume_offset=… systemctl status systemd-hibernate.service ```