Skip to content

Drop the resume kernel parameters when removing hibernation - #13587

Closed
manuaudio wants to merge 1 commit into
omacom:quattrofrom
manuaudio:fix/hibernation-remove-resume-params
Closed

manuaudio wants to merge 1 commit into
omacom:quattrofrom
manuaudio:fix/hibernation-remove-resume-params

Conversation

@manuaudio

Copy link
Copy Markdown
Contributor

Fixes #13583.

omarchy-hibernation-setup writes /etc/limine-entry-tool.d/resume.conf (resume=… resume_offset=…). omarchy-hibernation-remove deleted the swapfile, the /swap subvolume, the fstab entry and the mkinitcpio resume hook, but not that file. So:

  • the regenerated boot image still passes resume= and resume_offset= for a swapfile that no longer exists
  • setup only writes resume.conf when it's missing (if [[ ! -f $RESUME_DROP_IN ]]), so setting hibernation up again keeps the old offset while the new swapfile sits elsewhere, and resume silently loses the session

Removal now deletes resume.conf, right after the resume hook and before limine-mkinitcpio.

This leaves rtc-alarm.conf and the keyboard-backlight sleep hook in place. As the issue notes, both are harmless without hibernation, and changing them would be a separate decision.

Testing

  • New test/shell.d/hibernation-remove-test.sh runs the real script with /etc and /swap pointed into a temp dir, and sudo, gum, swapon, btrfs and limine-mkinitcpio stubbed. It checks that the hook and resume.conf are gone before the boot image is regenerated. On quattro it fails with hibernation remove drops the resume kernel parameters.
  • ./test/cli: the one failure (vscode generated theme references current theme file) is the same on quattro without this change.

I didn't run a real hibernation setup and remove cycle, since that rewrites the test machine's boot configuration.

🤖 Generated with Claude Code

omarchy-hibernation-setup writes /etc/limine-entry-tool.d/resume.conf with resume= and resume_offset=, but removal left it behind, so the next boot image still told the kernel to resume from a deleted swapfile. Setup only writes that file when it is missing, so setting hibernation up again kept the old offset while the new swapfile sat elsewhere, and resume silently lost the session. Removal now deletes the file before regenerating the boot image.

Fixes omacom#13583

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@manuaudio

Copy link
Copy Markdown
Contributor Author

Closing as a duplicate of #13584, which landed a few minutes earlier with the same fix and a test. Sorry for the noise.

@manuaudio manuaudio closed this Sep 28, 2026
@manuaudio
manuaudio deleted the fix/hibernation-remove-resume-params branch September 28, 2026 18:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

omarchy hibernation remove leaves resume.conf behind, so a later setup keeps a stale resume_offset

1 participant