Skip to content

aurora-sep: set the M3 GPU switches as aurora.* as well as asahi.* - #533

Closed
maralcbr wants to merge 1 commit into
integration/aurorafrom
fix/aurora-sep-m3-aurora-keys
Closed

maralcbr wants to merge 1 commit into
integration/aurorafrom
fix/aurora-sep-m3-aurora-keys

Conversation

@maralcbr

Copy link
Copy Markdown
Member

Summary

Since the 7.3 line, the GPU driver is aurora.ko, and kmod passes a module only its own aurora.<name> keys. So the asahi.t8122_start=0 that aurora-sep writes to keep the GPU off is ignored there, and so are air-gpu-oneshot.sh's asahi.* knobs. The earlier releases' kernels build asahi.ko and still read asahi.*. This PR writes both keys, since each module ignores the other's.

 m3-boot-profile.py, install-aurora-sep.sh (boot profile, persistent route,
 Limine and GRUB settings, retained GPU-off entries)
-  ... asahi.t8122_start=0 mesa_m3=off
+  ... asahi.t8122_start=0 aurora.t8122_start=0 mesa_m3=off
   strip before writing: (asahi|aurora).t8122[_-]start
 air-gpu-oneshot.sh
-  asahi.t8122_start=1 asahi.<knob>=<v>
+  asahi.t8122_start=1 aurora.t8122_start=1 asahi.<knob>=<v> aurora.<knob>=<v>
   refuse a normal entry that sets either form
   kernel-image check: the bare <knob> name, which both kernels contain
 air-gpu-collect.sh
   armed: either form; refusal and probe lines: driver asahi or aurora

The pinned sha256 of the two air-gpu scripts in install-aurora-sep.sh is updated. The M3 Max kit's T6031 keys are unchanged.

Related: aurora-silicon/linux#3513 renames the driver's own docs and messages to aurora.*, carried for 7.3 in #532.

Evidence

  • Before: on a MacBook Air M3 (J613, linux-aurora 7.3.0.aurora1-1), a lab one-shot boot with asahi.t8122_pstate_cap=5 logged performance cap 8 lowered to 2 (asahi.t8122_pstate_cap).
    After: the same kernel with aurora.t8122_pstate_cap=5 logged lowered to 5, and the GPU reached state 5.
  • Tests, run on Linux (the J613), python3 -m unittest from tools/aurora-sep/tests:
    • Every file this touches (test_m3_cmdline, test_m3_boot_profile, test_m3_persistent, test_air_gpu, test_m3max_kit, test_m3_flow) passes on this branch and on integration/aurora: 314 tests in all.
    • New cases cover each switch being written under both names, aurora.* words being replaced rather than doubled, a normal entry with aurora.t8122_start=1 being refused, and aurora.t8122_start=1 counting as armed.
    • The full suite: 961 tests, with 10 errors in the SEP and sensor tests. Those 10 need kernel sources outside tools/ (drivers/iommu/apple-dart.c, drivers/soc/apple/diag_shim.c), absent from the sparse checkout used, and they fail the same way on integration/aurora.
  • No Mac was rebooted with the new tools: the boot-profile and one-shot changes are tested against the suite's made-up Macs only.

Merge Danger

Door: two-way

Blast Radius: M3 boot entries

M3 Airs that run the installer, the boot profile or the one-shot gain the aurora.* words next to the asahi.* ones. On kernels that build aurora.ko, the GPU-off entries now really keep the GPU off, and the one-shot's knobs now take effect, t8122_pstate_cap among them.

Kernels since the 7.3 line build the GPU driver as aurora.ko, and kmod
hands a module only the command line's <module>.<name> keys. The
asahi.t8122_start=0 that the boot profile, the persistent route and the
retained GPU-off entries write to keep the GPU off does nothing there,
and air-gpu-oneshot.sh's asahi.* knobs are ignored; on a MacBook Air
M3 the log still read "cap 8 lowered to 2" with asahi.t8122_pstate_cap=5
on the command line, and "lowered to 5" with aurora.t8122_pstate_cap=5.
The kernels of the earlier releases build asahi.ko and read asahi.*.

Write each switch under both names: each module ignores the other's
key. Strip both forms before writing, so an existing asahi.* word is
replaced and not doubled. air-gpu-collect.sh counts a boot as armed
with either form and matches the aurora driver's refusal and probe
lines; air-gpu-oneshot.sh refuses a normal entry that sets either
form and looks for the bare parameter name in the kernel image, which
both kernels contain. The M3 Max kit's T6031 keys are left alone.
@maralcbr
maralcbr requested a review from scottjones as a code owner November 28, 2026 11:26
@greptile-apps

greptile-apps Bot commented Nov 28, 2026 •

Copy link
Copy Markdown

Confidence Score: 4/5 · Repair existing saved Limine fallbacks before merging so GPU-off recovery also works after an update.RetriggerView in GreptileConfidence Score: 4/5

[Medium impact] The changes affect M3 boot configuration and one-shot GPU experiments.

Repair existing saved Limine fallbacks before merging so GPU-off recovery also works after an update.

Findings

  1. P1 Recovery still starts the GPU ▶

Summary

Adds aurora.* GPU switches alongside asahi.* for newer kernels while keeping older kernels supported.

  • M3 boot profiles set the GPU switch for either driver.
  • One-shot GPU boots send switches and tuning knobs to both drivers.

Reviews (1) · Last reviewed commit: "aurora-sep: set the M3 GPU switches as a..." · Reviewed by Greptile

Comment on lines +67 to +71
words = [w for w in line.split() if not re.match(r'(?:asahi|aurora)\.t8122[_-]start(?:=|$)', w)
and not w.startswith('mesa_m3=') and not w.startswith('air_gpu.oneshot=')]
return ' '.join(words + ['asahi.t8122_start=' + ('1' if armed else '0')] + ([] if armed else ['mesa_m3=off']))
# aurora.ko reads aurora.*, the older asahi.ko asahi.*; each module ignores the other's key.
value = '1' if armed else '0'
return ' '.join(words + ['asahi.t8122_start=' + value, 'aurora.t8122_start=' + value] + ([] if armed else ['mesa_m3=off']))

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Recovery still starts the GPU

The new GPU-off switches only reach newly saved fallbacks. If an older installer already retained a 7.3 kernel, retain reloads m3-known-entry.json and preserves its old asahi.t8122_start=0 command line. That kernel ignores the old key, so “Aurora previous (GPU off)” still starts the GPU after this update. Users cannot rely on that entry to recover from a GPU startup failure.

After checking ownership, update the saved command line and its matching boot entry together. Apply the same fix to the embedded helper in install-aurora-sep.sh.

@maralcbr

Copy link
Copy Markdown
Member Author

Superseded: the change goes upstream as aurora-silicon/linux#3522 and is carried for 7.3 in #534.

@maralcbr maralcbr closed this Nov 28, 2026
@maralcbr
maralcbr deleted the fix/aurora-sep-m3-aurora-keys branch November 28, 2026 12:05
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