Skip to content

A masked safe entry and ref-sleep --upstream for the upstream sleep driver; the notebook to 11-30 - #138

Merged
CoreyH merged 8 commits into
mainfrom
tool/aura-trial
Nov 30, 2026
Merged

CoreyH merged 8 commits into
mainfrom
tool/aura-trial

Conversation

@CoreyH

@CoreyH CoreyH commented Nov 30, 2026

Copy link
Copy Markdown
Owner

Tooling for trying upstream's T6000 sleep port (aurora-silicon/linux#3534) on this Mac, and the record of 2026-11-27 to -30.

  • sleep-drain-safe masked-cmdline [KERNEL]: a safe entry's command line with systemd's five sleep targets masked; status says when a boot has them masked.
  • test-kernel install --safe-masked-only and boot <name> --safe-masked: a test kernel with only that entry. The upstream sleep driver makes deep the default as it probes, so the guard has to hold from the start of the boot.
  • ref-sleep --upstream check|go: the trial for upstream's sleep.c booted through aura (the masked safe boot, /chosen/aurora,s2r-mailbox, the driver's "boot object resumes" line, the PMU RTC found by name); a writable enclave store needs --xart-writable-ok.
  • ref-sleep: the previous mem_sleep selection is read before the reference driver is enabled (Pullfrog on The reference on this Mac: a deep sleep and a wake, with the stock first stage #137).
  • CLAUDE.md: the owner's decisions of 2026-11-27 (aura off the off-limits list, this Mac as a test bench, no AI attribution on Aurora's trackers).
  • RESEARCH.md, PLAN.md: the first aura trial and why it didn't wake, the system update that cost the desktop, the draft PR, and the next run.

Not run as root yet: any of the new options.

🤖 Generated with Claude Code

CoreyH and others added 6 commits November 30, 2026 10:35
…leep targets masked; status says when a boot has them

For a test kernel whose sleep driver makes deep sleep the default as it loads:
the regular line, systemd.mask= for sleep, suspend, hibernate, hybrid-sleep and
suspend-then-hibernate (one the regular line masks already isn't said twice),
then sleepdrain.safe. From the same checked regular line as sepro-cmdline
(cmd_safe_cmdline KIND), with the same refusals and the length counted with the
kernel's path; no word for the Secure Enclave's driver. No root, nothing
written. status, in a safe boot, says when the running command line masks all
five, and when only some.

Co-Authored-By: Claude Mythos 5.2 <noreply@anthropic.com>
… entry with the sleep targets masked

The same all-or-nothing install of one safe entry as --safe-only, of another
kind: the line is sleep-drain-safe masked-cmdline's. The state file records
entries=safe-masked, list shows it, boot --safe-masked selects it after the
script's own reading of the line (plain characters, no --, each of the five
masks once, sleepdrain.safe last) and the same check against what
sleep-drain-safe prints now, with the same read-back. A kernel has one kind of
safe entry; boot with the other kind's option says which it has. Install and
boot both say that such an entry asks nothing of the Secure Enclave's driver.

Co-Authored-By: Claude Mythos 5.2 <noreply@anthropic.com>
…-upstream for the upstream sleep driver

The fix. On the real boot the first go read mem_sleep's selection after it had
enabled the reference's driver, and enabling selects deep by itself: the
clean-up put deep back and switched the alarm off. go now reads the selection
before it writes anything, puts that back from the enable's write on (and only
if the selection is something else by then), and says so when deep was there
before it started.

--upstream check | go [SECONDS] [--xart-writable-ok] [--no-timed-wake]
[--rtc rtcN], for a kernel whose sleep driver makes deep the default as it
probes and whose apple_sep has no read-only switch. Preconditions: a safe boot,
systemd's five sleep targets masked on the command line, the boot loader's
mailbox node, the driver's line in the log and not its no-mailbox one, deep
offered. The store is always reported; go on a store not shown read-only needs
--xart-writable-ok, the owner's decision stated. go selects deep if it isn't,
saves, arms the RTC named as the PMU's (not a fixed rtc1; none or several
found: --no-timed-wake or --rtc), marks the log, looks once more at the mailbox
node, writes mem; it leaves mem_sleep as it is. The reference's commands are
as they were apart from the fix.

Co-Authored-By: Claude Mythos 5.2 <noreply@anthropic.com>
…read-before-enable case

Co-Authored-By: Claude Mythos 5.2 <noreply@anthropic.com>
… AI attribution on Aurora's trackers (Corey, 2026-11-27); the masked safe entry and ref-sleep --upstream

Co-Authored-By: Claude Mythos 5.2 <noreply@anthropic.com>
…e system update and its lost desktop, olivergreg's draft PR, and the next run

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.

Important

The upstream trial can report that systemd sleep is blocked or that a timed wake is available when those safeguards are ineffective.

Approach — A dedicated one-shot boot entry is an appropriate place to block automatic suspend before starting the upstream trial.

Reviewed changes

  • Boot tooling — Generates the masked command line, installs a single safe GRUB entry, and validates it before one-shot selection.
  • Suspend tooling — Adds the Aura mailbox, driver, xART, and RTC checks and restores the reference driver's original sleep selection.
  • Tests and notes — Covers the new shell paths and records the Aura trial and recovery. All three fixture suites and Bash syntax checks passed. Live boot, suspend, and wake remain unverified.

Pullfrog  | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using gpt-6.2-sol | 𝕏

Comment thread ref-sleep Resolved
Comment thread ref-sleep Resolved
CoreyH and others added 2 commits November 30, 2026 10:44
…own word; the alarm only on an RTC that is a wake source (Pullfrog on #138)

The masks. The five systemd.mask= words on the command line are a request to
systemd's debug generator; with it off they are all there and nothing is
masked. ref-sleep --upstream keeps the words as a precondition (the entry's
own guard, from the boot's start) and adds one: each of the five shows
LoadState=masked (systemctl show; RS_SYSTEMCTL for the test). sleep-drain-safe
status says what is asked for and what is in effect apart, and says "masked"
only when systemd shows it.

The alarm. rtcwake -m no doesn't look at whether the RTC's device is a wake
source, and sets an alarm that would wake nothing. An RTC is armed only if its
device/power/wakeup reads enabled: in --upstream for the one found by name and
for --rtc alike, so check and go agree, with --no-timed-wake the way on; and
for the reference mode's rtc1, which says why and goes on unarmed as it does
for an rtc1 that isn't the PMU's.

Co-Authored-By: Claude Mythos 5.2 <noreply@anthropic.com>
…Pullfrog on #138)

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. Both prior findings are addressed.

Reviewed changes

  • Verified effective masks. Upstream preflight requires all five boot arguments and confirms that systemd reports each sleep target as masked. Safe-boot status reports the requested masks and their effective state.
  • Checked RTC wake eligibility. Upstream mode checks both automatically selected and explicitly named RTCs and requires --no-timed-wake to proceed without an eligible device. Reference mode reports when it proceeds unarmed.
  • Expanded fixture coverage. The ref-sleep and safe-boot fixture suites and Bash syntax checks passed. Live boot, suspend, and timed wake remain unverified.

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

@CoreyH
CoreyH merged commit d1e6d48 into main Nov 30, 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