Skip to content

Hand the M3 Air GPU to Linux on install and on update - #68

Merged
maralcbr merged 3 commits into
mainfrom
mac-boot/m3-air-gpu-handoff
Oct 26, 2026
Merged

maralcbr merged 3 commits into
mainfrom
mac-boot/m3-air-gpu-handoff

Conversation

@maralcbr

Copy link
Copy Markdown
Member

Summary

Item 3 of the M3 Air GPU plan, alongside Mesa omarchy-pkgs#1591, the kernel omarchy-pkgs#1622 plus Chris's default-start change, and the login hook in linux-aurora. The kernel's T8122 runtime starts only after m1n1 has handed the GPU over, and m1n1 does that only on chosen.asahi,t8122-gpu=1. Until now this package wrote only the display line, and only at install.

 /etc/m1n1.conf on a J613 or J615 (m1n1-aurora >= 1.6.1.aurora20-4)
 chosen.asahi,t8122-dcp=1
+chosen.asahi,t8122-gpu=1
+chosen.asahi,t8122-gpu-power-standin=1
+chosen.asahi,t8122-gpu-fuse-leakage=1

These four lines are what aurora-sep's persistent J613 profile boots (m3_air_switch_set). m1n1 checks the 14.8.3 GPU firmware before touching the GPU and leaves the node disabled on any other firmware.

 setup-boot (install, hardware rerun)
   m1n1-display.sh
+96-omarchy-mac-m3-air.hook (install/upgrade of omarchy-mac-boot or m1n1-aurora, after 95-m1n1-install.hook)
+  omarchy-mac-m3-air -> m1n1-display.sh, never fails the transaction

The owner's lines win:

  • A t8122-dcp line of the owner's, for either value, is kept.
  • GPU lines go in only while the display line is 1.
  • Nothing is added when the file has any chosen.asahi,t8122-gpu* or chosen.asahi,j61[35]-25g83* line, so gpu=0 and the native 25G83 experiment profile stay as the owner set them.

No kernel command-line flag is added: automatic startup belongs to the kernel default.

Evidence

  • Before: a fresh Air got chosen.asahi,t8122-dcp=1 only. An Air installed earlier got nothing on update.
    After: m1n1-display-test.sh checks the following:
    • a fresh J613 and J615 get all four lines once, with one update-m1n1;
    • an Air with only the display line gets the three GPU lines on the rerun, with no duplicate;
    • gpu=0, gpu=1, gpu-handoff-diag=1 and j615-25g83-experimental=1 leave the file and boot.bin untouched;
    • dcp=0 adds nothing;
    • the hook targets both packages, sorts after 95-m1n1-install.hook, and its script runs the staged leaf and exits 0 when the leaf fails.
  • Removing the GPU append makes the first case fail.
  • omarchy-mac-boot/test/all: 247 ok in an Arch Linux ARM container. One case skips without OMARCHY_TEST_RUNTIME, which CI sets.
  • No Mac booted this. The GPU needs the matching kernel and Mesa, which are qualified on edge with fresh installs and upgrades on both Air sizes.

Merge Danger

Door: two-way

The hook changes /etc/m1n1.conf and boot.bin on M3 Airs at their next update. Reverting the package stops new writes but doesn't remove lines already written. An owner, or a follow-up, sets them to 0.

Blast Radius: M3 Airs

Publish this together with, or after, a kernel that starts the T8122 runtime by default and the RC Mesa. With an older kernel, m1n1 hands over a GPU that nothing starts. The 15-inch J615 has no hardware evidence on this profile yet; aurora-sep enables it on the J613 only.

The M3 Air leaf now appends the GPU start, chosen.asahi,t8122-gpu=1, and
its power handoff, chosen.asahi,t8122-gpu-power-standin=1 and
chosen.asahi,t8122-gpu-fuse-leakage=1, beside the display line on both
Air sizes. These are the switches aurora-sep's persistent J613 profile
boots. The GPU lines go in only while the display line is 1 and the owner
has no t8122-gpu* or j61x-25g83* line, so an owner's choice or the native
25G83 experiment profile is never changed.

96-omarchy-mac-m3-air.hook runs the leaf again after an install or
upgrade of omarchy-mac-boot or m1n1-aurora, after 95-m1n1-install.hook,
so Airs installed before this, or with an older m1n1-aurora, get the
lines on update. Its script never fails the transaction, and the leaf's
own gates still leave other Macs, older m1n1 and chroots alone.
@maralcbr
maralcbr requested a review from scottjones as a code owner October 26, 2026 00:28
@greptile-apps

greptile-apps Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The reviewed changes appear safe to merge, with no outstanding findings.

Summary

Adds M3 Air GPU defaults during setup and package updates while keeping the owner's settings.

  • M3 Air setup adds GPU handoff settings beside the display setting.
  • Package updates now refresh M3 Air boot settings.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Install or hardware setup] --> C[Check M3 Air and m1n1 version]
  B[Package update hook] --> C
  C --> D{Booted target outside chroot?}
  D -->|No| E[Leave files unchanged]
  D -->|Yes| F[Check owner settings]
  F --> G{Defaults missing and allowed?}
  G -->|No| E
  G -->|Yes| H[Append missing defaults]
  H --> I[Run update-m1n1]
  I -->|Failure| J[Restore previous configuration]
Loading

Reviews (2) · Last reviewed commit: "Count an empty last display line that ha..." · Reviewed by Greptile

Comment thread omarchy-mac-boot/setup/m1n1-display.sh Resolved
arch-chroot bind-mounts the host's /run, so /run/systemd/system alone let
the new update hook edit m1n1.conf and run update-m1n1 inside an Air's
chroot; systemd-detect-virt --chroot now stops it. An owner's display line
with an empty or padded value read as absent, so the leaf added the display
and GPU anyway; any owner line now stays, and the GPU goes in only beside
display lines that are all exactly 1.
sed printed nothing for a final chosen.asahi,t8122-dcp= without its
newline, so the leaf took the file as having no display line and added
the display and GPU. Each value now carries a marker, so that line counts
as the owner's and keeps the GPU out.

@chriskearney chriskearney left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The install and upgrade wiring checks out at c85c97dab6437bb7dd9c7b573e4b4e46be32da34. The focused m1n1-display-test.sh fixture passes for J613/J615 defaults, display-only upgrades, idempotence, explicit GPU/display/profile choices, minimum-version refusal, the bound-/run chroot case and config restoration on failure. The latest no-final-newline display-value fix is included. I found no source blocker in that scope.

This is source and host-fixture validation, not a device boot or full local package-suite pass. The documented boot.bin/config rollback limitation remains unchanged. J615’s final profile still needs actual device qualification, as already noted in the PR.

For the coordinated cutover, the matching kernel-default and normal system-Mesa handoff slices are draft linux-aurora #230 and #231, alongside package PR omacom/omarchy-pkgs#1591. Those drafts still need full native build/package/device qualification; this boot setup change alone does not establish an accelerated default desktop. Pro boot defaults remain a separate slice.

@maralcbr
maralcbr merged commit dad7272 into main Oct 26, 2026
8 checks passed
ryanrhughes pushed a commit to omacom/omarchy-pkgs that referenced this pull request Oct 26, 2026
Picks up omacom/omarchy-mac-pkgs#68. An M3 MacBook Air (J613 or J615)
gets m1n1's GPU start and power handoff in /etc/m1n1.conf beside the
display line, at install and, through a new pacman hook, at the update
that brings this package or a new m1n1-aurora. An owner's own lines,
chroots and older m1n1 stay untouched.
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.

2 participants