Skip to content

kboot: hand the J516C M3 Max display and GPU over by default - #19

Merged
maralcbr merged 4 commits into
integration/aurorafrom
feat/m3max-j516c-defaults
Oct 28, 2026
Merged

maralcbr merged 4 commits into
integration/aurorafrom
feat/m3max-j516c-defaults

Conversation

@chriskearney

@chriskearney chriskearney commented Oct 27, 2026 •

Copy link
Copy Markdown

M3 Max (J516C) display and GPU on by default

On the 16-inch M3 Max with the 40-core GPU (J516C, T6031), m1n1 now requests its existing display handoff and its existing GPU handoff by default, as it does for the M3 Pros since #18. No boot.bin config line is needed. Each handoff still happens only when its existing checks pass. This alone does not make the Max's graphics run natively; see "What a native Max still needs" below.

Until now both handoffs ran only with config lines (chosen.asahi,t6031-dcp=1, chosen.asahi,t6031-gpu=1), and nothing wrote them: #18's defaults covered the Airs and Pros only, and the boot package writes no Max lines. So rebooting again changed nothing on a Max.

What changes

dt_set_m3_defaults() gets one row:

Boards Switches set by default
apple,t6031 + apple,j516c asahi,t6031-dcp, asahi,t6031-gpu
  • Each switch stands alone, as on the Pro: an owner's line for one of them leaves the other default in place.
  • Every check behind the switches is unchanged:
    • Display: the T6031 display handoff still checks the DCP, its DARTs and the display power state. Only if every check passes does it lock dart-dcp and publish apple,t6031-handoff on the dcp, display and piodma nodes, which it leaves disabled. A failed check publishes nothing, and the Mac keeps the boot framebuffer.
    • GPU: dt_set_gpu_t6031() still checks the board, the firmware family and the powered identity, then dt_set_gpu_g15() runs. A failed check leaves the GPU node disabled, and the boot continues.
    • Code: the only logic change is the table row. The rest is comments and the handoff notes in docs/m1-m3-handoff-sources.md. The display, GPU, payload, power and T6031 helper code is unchanged.
  • The kernel decides whether it takes the display over:
  • When it applies. The defaults apply on the first boot that loads a stage 2 with this change. They need no config line, no second boot and no step in the boot package.
  • Untouched boards. The J514C (a T6031 board the kernel's GPU driver refuses), the T6034 Maxes (J514M, J516M) and every other board.

Turning it off

  • chosen.asahi,t6031-dcp=0 keeps the display handoff off, and chosen.asahi,t6031-gpu=0 keeps the GPU handoff off. Each leaves the other default in place.
  • chosen.asahi,m3-defaults=0 adds no default. The owner's explicit lines stay as written, an =1 included.

Existing aurora-sep Max variant: linux-aurora#189 documents t6031-gpu-off-1. At kernel source 937b727e, tools/aurora-sep/install-aurora-sep.sh writes an explicit chosen.asahi,t6031-gpu=0 for that variant.

  • That zero still takes precedence: the GPU handoff stays off, and m1n1 never rewrites the config.
  • The display default does go in beside it, because the switches stand alone. To keep that variant's display on the boot framebuffer too, its config also needs chosen.asahi,t6031-dcp=0.

When m1n1 loses a config line

The rule from #18 covers the J516C. Every asahi,t6031- line is dropped: both defaults and the owner's lines, an =1 or =0 included. Linux boots on the boot framebuffer. The J514C, the T6034 Maxes and other Macs keep their lines, as before.

Recovery and existing aurora-sep installs

Recovery instructions for a pre-Linux GPU identity-read hang cover disabling the GPU in boot.bin from macOS Recovery, the Stage1 precedence limit, and a candidate-specific all-graphics-off fallback. Persist the desired switches in /etc/m1n1.conf once Linux is available. A known working original is the restoration fallback; boot.bin.old is not assumed to be one.

Existing install-aurora-sep.sh Max installs can keep update-m1n1 frozen, and its --m3-handoff variant explicitly keeps the GPU off. A package update alone does not migrate those installs. With linux-aurora#246, existing dcp=1 installs can gain native display while gpu=0 continues to keep the GPU off. That migration is separate from this source default.

Installer images

The defaults are in stage 2, so an installer image carries them only if its boot.bin is rebuilt from a package with this change. The current public image's stage 2 is aurora21 (7ea16980), which has no Max default.

On a Mac installed from such an image:

  • the first boot runs the image's older stage 2, so it gets no Max default;
  • if Linux setup later installs the new package and update-m1n1 writes a new boot.bin, the defaults apply on the boot after that.

That extra boot comes from the older image, not from m1n1.

What a native Max still needs (outside this PR)

This change only requests m1n1's existing handoffs. Native graphics on a fresh J516C install also depend on work this PR does not touch:

  • Kernel: drm/asahi: default J516C display on and defer GPU until ready linux-aurora#246. It adds the automatic J516C display request and T6031 GPU module loading. It also makes GPU firmware startup wait until the native display is ready, so the display handoff is needed for the GPU too.
  • Board data: linux-aurora#249 replaces the missing J516C board-file dependency with device-tree/ADT data and 14 reference words from one J516C. It must be included in the kernel delivery; its one-machine reference-value limitation remains explicit.
  • Installer image: rebuilt with the new stage 2, as above.

Until those land, m1n1 can hand the display and GPU nodes over, and the kernel's own checks still decide whether they start. The Mac boots on the framebuffer either way.

Tests

The PR has two rounds: the GPU default (2dfb9b5c, 28652907), then the display default (982e83d3, 5d17a034).

  • tests/python/test_m3_graphics_defaults.py runs dt_set_m3_defaults() against real libfdt trees. It covers:
    • the J516C getting t6031-dcp and t6031-gpu, in that order, and nothing else;
    • boards that must get nothing: J514C, J514M, J516M, a J516C name on T6034 or without its SoC, a J516S name on T6031, and the other boards;
    • J514S and J516C owner lines: gpu=0, dcp=0, both at 0, =1 and other values;
    • the master switch, alone and beside an owner's =1 for either switch;
    • free space: two free entries take both defaults, one free entry takes neither, and one free entry beside an owner's line takes the other default;
    • a full table, and an allocation failure at each of the four allocations: both defaults or neither, and a failure counts as a lost line;
    • a lost line: the J516C drops both defaults and the owner's lines, while the J514C (display and GPU lines) and J516M keep theirs;
    • default flags through deletion, an owner's takeover and preparations of several boards in turn;
    • that the switches are the ones the T6031 display handoff and dt_set_gpu_t6031() read, and that the defaults path edits only the chosen table.
  • tests/python/test_m3_defaults_optout.py runs the whole payload_run(), with the real dt_set_gpu_t6031() and t6031_board() after the defaults on a T6031. It covers:
    • the J516C defaults and nine owner configurations;
    • the J514S defaults and owner lines;
    • the J514C's manual lines, and the untouched Maxes;
    • every loss kind on the J516C, and stage 1 handing on to stage 2;
    • update-m1n1 (asahi-scripts b6f72e6c):
      • an empty config hands the J516C's display and GPU over on the boot that loads the new boot.bin;
      • an existing t6031-gpu=0 keeps the GPU off and gets only the display default;
      • t6031-dcp=0 keeps the display off;
      • t6030-gpu=0 keeps the J514S GPU off.
  • Results at 5d17a034:
    • The two files above: 145 passed, plus the known updater end-of-file failure, which is marked as expected.
    • Against 28652907's kboot.c, 13 of these tests fail: every J516C display-default case.
    • Four mutants of the table row each make tests fail: display and GPU coupled, the order swapped, J514C added, and a lost line dropping only the GPU line.
    • The build: the m1n1-aurora recipe's stage 1 and ESP stage 2 make lines (Clang/lld, Rust 1.89.0, -Os) build, with the same warnings as 28652907.
  • Earlier results at 28652907, not rerun since the display round:
    • On the base 5f95f67, 30 of that round's tests fail, and the 108 controls pass.
    • Every Python test that reads kboot.c or kboot_gpu.c: 280 passed, 1 skipped, 1 expected failure.
    • tests/run-t6031-unchanged.sh 5f95f67 passes.
    • The display round changes only the table row, comments and docs, and no test reads the changed text.
  • Host scripts not covered:
    • tests/run-kboot-gpu-g15.sh stops at t8122-j613-standin-10, on base and with this PR alike.
    • tests/run-t6031-handoff.sh needs a J516C ADT allowlist taken from a Mac, and was not run.

Hardware

Native aarch64 builds of this exact source and package pin booted successfully with the combined kernel on M3 Pro J516S, M1 J293 and M1 Air J313. Each boot showed Stage2 5d17a034-dirty; boot health, GUI smoke and short native GL/VK checks passed without an identified regression. All three returned to their captured original state. Detailed results and limits.

Not run on any M3 Max. The M3 Pro kept its explicit graphics settings; these are regression checks, not proof of the J516C defaults or native Max release qualification.

🤖 Generated with Claude Code

Owner validation: Naeem reports the combined J516C cold boot passed using the exact private 246249.2 kernel/headers and aurora22-1 loader packages, with their hashes checked. He reports an empty m1n1.conf, no kernel enable override or modules-load workaround, standalone disk cold boot, Stage2 5d17a034-dirty, both chosen defaults set, native display, GPU autoload/READY and the normal SDDM/Hyprland desktop on packaged Mesa 7c86130d. This is one owner-operated J516C using his existing unchanged local Stage1; it is not a second reference machine, a fresh installer/image test or an independent root-operated Max run. Maintainer review, coordinated kernel/loader pins and package/image delivery remain separate.

chriskearney and others added 2 commits October 27, 2026 11:58
The 16-inch M3 Max with the 40-core GPU (J516C, T6031) now gets
chosen.asahi,t6031-gpu=1 from dt_set_m3_defaults(), as the M3 Airs and
Pros get their switches, so its GPU handoff needs no boot.bin config
line. Every check behind the switch is unchanged: dt_set_gpu_t6031()
still checks the board, the firmware family and the powered identity,
and dt_set_gpu_g15() still leaves the GPU node disabled on any failure
and lets the boot continue.

Only the GPU switch is a default. The kernel's T6031 display takes the
handoff only with apple_t6031_display.enable=1 on its own command line,
so a default chosen.asahi,t6031-dcp=1 would not light it; the owner can
still set both.

The rules of the other boards apply as they are:
- chosen.asahi,t6031-gpu=0 keeps the handoff off;
- chosen.asahi,m3-defaults=0 adds no default and keeps the owner's
  explicit lines, an =1 included;
- after a lost config line, every asahi,t6031- line is dropped, the
  owner's =1 included, and Linux boots on the boot framebuffer.

The J514C (a T6031 board the kernel's GPU driver refuses), the T6034
Maxes (J514M, J516M) and every other board are untouched.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
test_m3_graphics_defaults.py, against real libfdt trees:
- the J516C gets asahi,t6031-gpu=1 and nothing else;
- the J514C, J514M, J516M, a J516C name on another SoC or none, a Pro
  board on T6031 and the other boards get nothing;
- J514S and J516C owner lines: =0 keeps a switch off, =1 or any other
  value stays the owner's, the J516C display line is kept beside the
  default and is never one;
- the master switch adds no default and keeps owner lines, =1 included;
- one free entry takes the J516C default, a full table does not, and an
  allocation failure adds it whole or not at all;
- a lost line drops every asahi,t6031- line on the J516C, the owner's =1
  included, and keeps the J514C's and the J516M's;
- default flags through deletion, an owner's takeover and preparations
  of the J516C, J516S, J613, J514C and J516M in turn;
- the switch is the one dt_set_gpu_t6031() reads, and the defaults path
  only edits the chosen table.

test_m3_defaults_optout.py, through the whole payload_run(): the real
dt_set_gpu_t6031() and t6031_board() now run after the defaults on a
T6031. It covers the J516C and J514S defaults and owner lines, the
J514C's manual line, the untouched Maxes, every loss kind on the J516C,
the chainload route, and update-m1n1: an empty config hands the J516C
GPU over on the boot that loads it, and gpu=0 keeps it off.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@greptile-apps

greptile-apps Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no actionable new defect was found.

Summary

Adds J516C to the M3 graphics defaults. The current code defaults both asahi,t6031-dcp and asahi,t6031-gpu to 1, not just the GPU switch described in the PR description.

  • The J516C gets separate default switches for its T6031 display and GPU handoffs.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[J516C with T6031] --> B{Config line lost?}
  B -- Yes --> C[Drop T6031 graphics settings]
  B -- No --> D{Defaults allowed?}
  D -- No --> E[Keep explicit settings only]
  D -- Yes --> F[Add missing display and GPU switches]
  F --> G[Run existing handoff checks]
  G --> H[Publish each handoff only when its checks pass]
Loading

Reviews (2) · Last reviewed commit: "tests: cover the J516C display default b..." · Reviewed by Greptile

chriskearney and others added 2 commits October 27, 2026 14:26
The J516C (16-inch M3 Max with the 40-core GPU, T6031) now also gets
chosen.asahi,t6031-dcp=1 from dt_set_m3_defaults(), beside its GPU
switch, as the M3 Pros get theirs. Its display handoff then needs no
boot.bin config line either.

The display handoff itself is unchanged: on a J514C or J516C it checks
the DCP, DART and display power state, and only when every check
passes does it lock dart-dcp and publish apple,t6031-handoff with the
display nodes left disabled. A failed check publishes nothing and the
Mac keeps the boot framebuffer. The kernel decides whether it takes
the display over; one that does not leaves the framebuffer.

Each switch stands alone, as on the Pro:
- chosen.asahi,t6031-gpu=0 keeps the GPU off and the display default
  still goes in; chosen.asahi,t6031-dcp=0 the other way round;
- chosen.asahi,m3-defaults=0 adds neither and keeps the owner's
  explicit lines, an =1 included;
- after a lost config line every asahi,t6031- line is dropped, the
  owner's =1 included, and Linux boots on the boot framebuffer;
- both missing switches go in, or neither.

The J514C, the T6034 Maxes (J514M, J516M) and every other board are
untouched. Only comments and the handoff notes change elsewhere.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
test_m3_graphics_defaults.py, against real libfdt trees:
- the J516C gets asahi,t6031-dcp=1 and asahi,t6031-gpu=1, in that
  order, and nothing else; t6031-dcp is no longer a never-default;
- J516C owner lines: gpu=0 keeps the GPU off and the display default
  still goes in, dcp=0 the other way round, both =0 adds nothing, and
  any owner value stays the owner's;
- the master switch adds neither and keeps an owner's =1 alone;
- two free entries take both defaults, one free entry takes neither
  (one does beside an owner's line), a full table takes none, and an
  allocation failure at each of the four allocations adds both or
  neither;
- a lost line drops both defaults and the owner's lines, an owner's
  =0 included, and keeps the J514C's display and GPU lines;
- default flags through deletion, an owner's GPU takeover and
  preparations of several boards in turn;
- the switches are the ones the T6031 display handoff and
  dt_set_gpu_t6031() read.

test_m3_defaults_optout.py, through the whole payload_run(): the J516C
defaults and owner lines (master with an owner display line, both =0),
the J514C's manual lines, a clean stage 1, and update-m1n1: an empty
config hands both over on the boot that loads it, an existing gpu=0
keeps the GPU off with only the display default added, and dcp=0
keeps the display off.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
chriskearney added a commit to chriskearney/omarchy-pkgs that referenced this pull request Oct 27, 2026
Pin omacom/m1n1 5d17a0348745e755299f2c6455f6f1c31236d66b, the reviewed
head of omacom/m1n1#19. On the 16-inch M3 Max with the 40-core GPU
(J516C), m1n1 now requests its existing display handoff by default as
well as its GPU handoff, each subject to the existing checks. An
owner's chosen.asahi,t6031-dcp=0 or chosen.asahi,t6031-gpu=0 keeps
that one off; an existing gpu=0 still gets the display default.

The version stays 1.6.1.aurora22-1: that version was never built or
published from this branch. The qualification record stays build-only:
hardware_tested is false. Native J516C graphics also need the kernel's
automatic J516C display request and display-before-GPU gate
(omacom/linux-aurora#246) and the kernel's J516C board data, outside
this package. An installer image needs its boot.bin rebuilt from this
package before its first boot carries the defaults.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@chriskearney chriskearney changed the title kboot: hand the J516C M3 Max GPU over by default kboot: hand the J516C M3 Max display and GPU over by default Oct 27, 2026

@scottjones scottjones left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

We checked this at 5d17a03. The change is the one table row at src/kboot.c:412-421, and it does what the description says.

  • The board match needs both apple,t6031 and apple,j516c. The J514C is left out on purpose, since the kernel GPU driver only admits apple,j516c.
  • chosen.asahi,t6031-dcp=0, chosen.asahi,t6031-gpu=0 and chosen.asahi,m3-defaults=0 are all still honoured, each switch on its own.
  • A lost config line drops every asahi,t6031- line on the J516C, an owner's =1 included, and leaves the J514C alone.
  • No T6031 default touches dcpext. The T6031 display handoff has no dcpext path, and dcpext0..3 only get the existing __OS_LOG reservations.

Tests: the two M3 defaults files pass (145 passed, 1 xfail), and every Python test that reads kboot.c, kboot_gpu.c or kboot_display_handoff.c passes (287 passed, 1 skipped, 1 xfail). With the base kboot.c, 38 of the new tests fail. Adding the J514C to the row fails 8, and narrowing the lost-line prefix to asahi,t6031-gpu fails 3.

Asks:

  1. linux-aurora#189 is still open. It asks how a Max recovers if the powered GPU identity read hangs a boot. This PR turns that read on for every J516C boot. The Airs already do a powered read by default, and Naeem's J516C boots with gpu=1 have not hung, so we are fine shipping it. But please answer AsahiLinux#189 with the recovery steps (how to get t6031-gpu=0 into boot.bin when Linux won't boot) and link them from the release notes. Also note that the aurora-sep script (tools/aurora-sep/install-aurora-sep.sh in linux-aurora, on integration/aurora) keeps a Max kernel-only and freezes update-m1n1 (around lines 6346-6351). Its --m3-handoff variant writes chosen.asahi,t6031-gpu=0 (lines 638-641), which this PR correctly honours. So Macs installed with that script won't get the GPU from this PR until the script changes.
  2. With linux-aurora#246, the kernel GPU waits for the native display. So t6031-dcp=0 on its own leaves m1n1 powering the GPU on every boot for a GPU that never starts. Setting rest_need_first to true for this row, as on the Air, would match the kernel. A follow-up is fine if you'd rather keep this PR as it is.

No M3 Max has run this stage 2 yet. That's why we want the J516C cold boot above before we approve: the AsahiLinux#246 + AsahiLinux#249 kernel, this stage 2, and an empty m1n1.conf.

@chriskearney

Copy link
Copy Markdown
Author

Thanks Scott. The pre-Linux recovery answer is now in #189, linked from this PR and the package PR. It covers a normal update-m1n1 trailer, a later Stage1 graphics setting, and the candidate's sticky configuration-loss fallback that suppresses every T6031 graphics handoff. The real 5d17a034 host payload parser exercised those cases, including Stage1 forwarding gpu=1; no new Recovery or Max hardware run is claimed. Existing aurora-sep freeze/GPU-off behavior is also spelled out; AsahiLinux#189 remains open for that migration decision.

I have kept the independent-switch rule in this change. As you point out, dcp=0 alone keeps the kernel GPU deferred while m1n1 still does its enabled GPU identity read. To suppress both, set both dcp=0 and gpu=0. Coupling the defaults would change the per-switch contract; it is not part of this follow-up.

Our M3 Pro/M1/M1 Air regression runs are reported here. They do not cover the J516C. The combined Max cold boot with an empty config and matching package/kernel remains outstanding, as requested.

@maralcbr maralcbr left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Approving at 5d17a034. Naeem's defaults-only J516C cold boot ran this stage 2 with an empty m1n1.conf. It published asahi,t6031-gpu=1 and asahi,t6031-dcp=1 by default, and the kernel brought up the native display, the GPU and the desktop with no overrides. Scott's table-row review and test counts (145 + 287 passing, mutants caught) cover the source.

Not blockers:

  • rest_need_first for this row stays an allowed follow-up. Until then, opting out takes both t6031-dcp=0 and t6031-gpu=0, and the recovery steps in linux-aurora#189 say so.
  • This is one J516C with a local Stage 1, so it doesn't qualify stock Stage 1 or the installer.

Next: merge this with a merge commit, repin omarchy-pkgs#1707 to that merge commit, and publish it together with the kernel pin carrying AsahiLinux#246 and AsahiLinux#249.

@maralcbr
maralcbr merged commit bc79acc into integration/aurora Oct 28, 2026
1 check passed
ryanrhughes pushed a commit to omacom/omarchy-pkgs that referenced this pull request Oct 28, 2026
)

* m1n1-aurora: 1.6.1.aurora22-1, the J516C GPU default

Pin omacom/m1n1 286529075cb5e56b574e9c8f9ebbe407e0b8de9e (omacom/m1n1#19,
on #18's merge): on the 16-inch M3 Max with the 40-core GPU (J516C),
m1n1 requests its existing GPU handoff by default, subject to the
existing checks. Nothing else changes in the source or the recipe.

The qualification record stays build-only: hardware_tested is false.
A native J516C GPU also needs the kernel's J516C board data, T6031
module loading and the native display enables, outside this package.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* m1n1-aurora: pin the J516C display and GPU defaults

Pin omacom/m1n1 5d17a0348745e755299f2c6455f6f1c31236d66b, the reviewed
head of omacom/m1n1#19. On the 16-inch M3 Max with the 40-core GPU
(J516C), m1n1 now requests its existing display handoff by default as
well as its GPU handoff, each subject to the existing checks. An
owner's chosen.asahi,t6031-dcp=0 or chosen.asahi,t6031-gpu=0 keeps
that one off; an existing gpu=0 still gets the display default.

The version stays 1.6.1.aurora22-1: that version was never built or
published from this branch. The qualification record stays build-only:
hardware_tested is false. Native J516C graphics also need the kernel's
automatic J516C display request and display-before-GPU gate
(omacom/linux-aurora#246) and the kernel's J516C board data, outside
this package. An installer image needs its boot.bin rebuilt from this
package before its first boot carries the defaults.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* m1n1-aurora: pin the merged J516C defaults and display dependency fix

Pin integration merge bc79acc4 after m1n1#19 landed, including the separately reviewed and boot-tested T6030 dependency fix in #17. Update the qualification checksum and describe the combined pin without claiming a new native build or hardware run. Keep the package build-only and retain the normal maintainer approval and coordinated kernel delivery requirements.

Generated-by: OpenAI Codex

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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.

3 participants