Repository navigation
Conversation
Co-authored-by: JustNak <JustNak@users.noreply.github.com>
Co-authored-by: JustNak <JustNak@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Extends hibernation removal to clean stale Limine resume configuration safely.
Changes:
- Removes resume and RTC alarm drop-ins before rebuilding initramfs.
- Adds coverage for full, partial, and absent configurations.
Tip
If you aren't ready for review, convert to a draft PR.
Click "Convert to draft" or run gh pr ready --undo.
Click "Ready for review" or run gh pr ready to reengage.
Reviewed changes
Copilot reviewed 1 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
bin/omarchy-hibernation-remove |
Removes Limine resume drop-ins while preserving the suspend hook. |
test/shell.d/hibernation-remove-test.sh |
Tests removal behavior and rebuild ordering. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
|
Reviewed at 91bd9c3 against The bug is real. On a worker built from the Omarchy ISO, I ran my own harness against The half-removed case matters most. Anyone who already ran Related: this fixes #10037, #10374 and #12096. All three report the same leftover No second opinion. The configured reviewer (Codex Medium) did not run: its daily review budget was spent when this item came up. That is why this PR is not labelled |
|
The second opinion has now run. Codex Medium reviewed this head (91bd9c3) against Re-run on a worker. I merged this head with current The open question is This waits on the maintainer for that call. It is not labelled |
`omarchy-hibernation-remove` deletes `/etc/limine-entry-tool.d/rtc-alarm.conf` when that file is the only marker. It then runs `limine-mkinitcpio`. Setup writes that file only when it is missing. Factory-reset leaves it. A machine with only the RTC alarm is not hibernation.
The presence check treated `/etc/limine-entry-tool.d/rtc-alarm.conf` as hibernation. Setup writes that file only when it is missing, and factory-reset leaves it. `omarchy-hibernation-remove` now enters for the resume hook or `resume.conf`. It deletes `resume.conf` before `limine-mkinitcpio`.
|
`omarchy-hibernation-remove` still runs `limine-mkinitcpio` and prints "Hibernation removed" when `rm` cannot delete `resume.conf`. The rebuilt UKI then keeps `resume=` and `resume_offset=`.
A failed `rm` of `/etc/limine-entry-tool.d/resume.conf` fell through to `limine-mkinitcpio`. The rebuild kept `resume=` and `resume_offset=`, and the script printed "Hibernation removed". The command now exits before that rebuild.
|
Re-reviewed at c6b0494 against
A failed deletion now stops the script. Tests on a worker. I merged this head with current Second opinion. Codex Medium reviewed both pushes and found no defect in them. Independence is not guaranteed, because it can read my notes. It raised three points:
This waits on the maintainer. It is not labelled |
`chmod a-w` does not stop `rm` when the suite runs as root. The shell test then deletes `resume.conf` and fails its own assertion. The failure case now stubs `rm` for that path.
|
Re-reviewed at b1a66d2 against The test now works as root too. The old version made the drop-in directory read-only, and root ignores that. The new version puts a stub Tests on a worker. I merged this head with current Second opinion. Codex Medium reviewed the new commit and the whole PR and found no defect. Independence is not guaranteed, because it can read my notes. It also confirmed that the failure path is reached whichever user runs the test. This waits on the maintainer. It is not labelled |
omarchy-hibernation-removesays it removes swap and boot resume settings. It deletes the swapfile and/etc/mkinitcpio.conf.d/omarchy_resume.conf, then runslimine-mkinitcpio. It never deletes/etc/limine-entry-tool.d/resume.conf. That drop-in is what setup writes forresume=andresume_offset=, and it is whatlimine-mkinitcpiobakes into the UKI. After remove, the swapfile is gone and the next UKI still tries to resume from it.Setup will not repair this. It only writes
resume.confwhen the file is absent, so a leftover file keeps the old offset. Factory-reset already deletesresume.confwhen the swapfile is gone for exactly that reason: a surviving offset drop-in "bakes the old swapfile's offset into the rebuilt UKI and breaks resume."What changed
resume.confbeforelimine-mkinitcpio, so the rebuilt UKI has noresume=and noresume_offset=.resume.confremains, remove still deletes that file and rebuilds. It does not stop at "Hibernation is not set up"./etc/limine-entry-tool.d/rtc-alarm.confstays. Setup writes it only when the file is missing, and factory-reset leaves it. Remove does not treat that file alone as hibernation, and it does not rebuild./usr/lib/systemd/system-sleep/keyboard-backlightis left alone. That hook is useful for ordinary suspend.The inverse, a hook present and the drop-in missing, is #7619.
Tests
Fixes #10037
Fixes #10374
Fixes #12096