Repository navigation
The nights: a lid closed on the charger is armed too; aurora-silicon's answers - #118
Merged
Merged
Conversation
… from aurora-silicon - sleep-drain-off-after: on the charger with the lid closed pre arms the alarm, with a deadline of its own. Still on the charger at the alarm, post clears and logind suspends again; the first of those wakes on battery powers off. A lid open on the charger and a charger that can't be read stay unarmed. The night of 11-18 a lid closed on the charger, unplugged asleep, ran 19.5 hours in s2idle. - RESEARCH.md, PLAN.md: aurora-silicon/linux#2198 answered (no macOS commit state for T600x anywhere, the mailbox is the loader's and T6000's RVBAR by that account not locked, no M1 Pro or Max back from a completed entry, data welcome now), omacom/linux-aurora#351 tested on a fourth PMU, both replied to with Corey's OK. Co-Authored-By: Claude Mythos 5.2 <noreply@anthropic.com>
There was a problem hiding this comment.
✅ No new issues found.
Approach: sound — extending the existing alarm path covers charger removal during sleep while retaining the battery and lid checks before shutdown.
Reviewed changes across all five files, including the hook, regression tests, and supporting documentation.
- AC arming: Arms a closed-lid sleep on readable AC power with a fresh deadline; open or unknown lid states and unreadable charger states remain unarmed.
- Deadline transitions: Tests cover rearming on AC, unplugging during sleep, retaining deadlines after early battery wakes, and replacing older battery deadlines.
- Research notes: Updates the operating description and records upstream sleep and RTC findings.
- Validation: The hardware-free hook suite,
bash -n, and ShellCheck at warning severity passed. Hardware RTC wake and logind resuspend behavior were not exercised here.
gpt-6.1-sol | 𝕏
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

The nights. On 2026-11-18 the lid was closed at 76% on the charger, the charger was pulled while the Mac slept, and it sat in s2idle for 19.5 hours:
sleep-drain-off-afterleft a sleep that starts on the charger alone. Now a closed lid on the charger is armed too, with a deadline of its own (never an older battery sleep's). At the alarm, still on the charger:postclears as before and logind suspends again for the closed lid, so the sleep is armed afresh; the first such wake on battery powers off. A lid open on the charger, and a charger that reads neither 0 nor 1, stay unarmed. The cost is a few seconds awake every N minutes for a Mac asleep on its charger with the lid closed.tests/off_after_test.py: 191 ok. New cases: armed on the charger with the lid closed, cleared and re-armed while the charger stays, powered off at the first alarm after it is pulled, an early wake after it is pulled keeps the deadline, the older deadline of a battery sleep dropped, lid open or unknown and charger unreadable not armed.Notes. aurora-silicon/linux#2198 was answered on 2026-11-19 and omacom/linux-aurora#351 got a test on a fourth PMU; RESEARCH.md has both and the replies posted with Corey's OK.
🤖 Generated with Claude Code