Skip to content

The nights: a lid closed on the charger is armed too; aurora-silicon's answers - #118

Merged
CoreyH merged 1 commit into
mainfrom
nights/charger-lid-closed
Nov 19, 2026
Merged

CoreyH merged 1 commit into
mainfrom
nights/charger-lid-closed

Conversation

@CoreyH

@CoreyH CoreyH commented Nov 19, 2026

Copy link
Copy Markdown
Owner

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-after left 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: post clears 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

… 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>

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ 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.

Pullfrog  | View workflow run | Using gpt-6.1-sol | 𝕏

@CoreyH
CoreyH merged commit fca2d27 into main Nov 19, 2026
1 check passed
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.

1 participant