Repository navigation
kboot: hand the J516C M3 Max display and GPU over by default - #19
Conversation
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>
[Medium impact] The PR appears safe to merge; no actionable new defect was found. SummaryAdds J516C to the M3 graphics defaults. The current code defaults both
|
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>
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>
scottjones
left a comment
There was a problem hiding this comment.
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,t6031andapple,j516c. The J514C is left out on purpose, since the kernel GPU driver only admitsapple,j516c. chosen.asahi,t6031-dcp=0,chosen.asahi,t6031-gpu=0andchosen.asahi,m3-defaults=0are all still honoured, each switch on its own.- A lost config line drops every
asahi,t6031-line on the J516C, an owner's=1included, 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:
- 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=1have not hung, so we are fine shipping it. But please answer AsahiLinux#189 with the recovery steps (how to gett6031-gpu=0into 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 writeschosen.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. - With linux-aurora#246, the kernel GPU waits for the native display. So
t6031-dcp=0on its own leaves m1n1 powering the GPU on every boot for a GPU that never starts. Settingrest_need_firstto 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.
|
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 I have kept the independent-switch rule in this change. As you point out, 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
left a comment
There was a problem hiding this comment.
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_firstfor this row stays an allowed follow-up. Until then, opting out takes botht6031-dcp=0andt6031-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.
) * 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>
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.binconfig 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:apple,t6031+apple,j516casahi,t6031-dcp,asahi,t6031-gpudart-dcpand publishapple,t6031-handoffon the dcp, display and piodma nodes, which it leaves disabled. A failed check publishes nothing, and the Mac keeps the boot framebuffer.dt_set_gpu_t6031()still checks the board, the firmware family and the powered identity, thendt_set_gpu_g15()runs. A failed check leaves the GPU node disabled, and the boot continues.docs/m1-m3-handoff-sources.md. The display, GPU, payload, power and T6031 helper code is unchanged.ca6c77a0), the kernel requests the native display automatically on an exact J516C. It keepsapple_t6031_display.enable=0as an off switch.Turning it off
chosen.asahi,t6031-dcp=0keeps the display handoff off, andchosen.asahi,t6031-gpu=0keeps the GPU handoff off. Each leaves the other default in place.chosen.asahi,m3-defaults=0adds no default. The owner's explicit lines stay as written, an=1included.Existing aurora-sep Max variant: linux-aurora#189 documents
t6031-gpu-off-1. At kernel source937b727e,tools/aurora-sep/install-aurora-sep.shwrites an explicitchosen.asahi,t6031-gpu=0for that variant.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=1or=0included. 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.binfrom macOS Recovery, the Stage1 precedence limit, and a candidate-specific all-graphics-off fallback. Persist the desired switches in/etc/m1n1.confonce Linux is available. A known working original is the restoration fallback;boot.bin.oldis not assumed to be one.Existing
install-aurora-sep.shMax installs can keepupdate-m1n1frozen, and its--m3-handoffvariant explicitly keeps the GPU off. A package update alone does not migrate those installs. With linux-aurora#246, existingdcp=1installs can gain native display whilegpu=0continues 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.binis 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:
update-m1n1writes a newboot.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:
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.pyrunsdt_set_m3_defaults()against real libfdt trees. It covers:t6031-dcpandt6031-gpu, in that order, and nothing else;gpu=0,dcp=0, both at0,=1and other values;=1for either switch;dt_set_gpu_t6031()read, and that the defaults path edits only the chosen table.tests/python/test_m3_defaults_optout.pyruns the wholepayload_run(), with the realdt_set_gpu_t6031()andt6031_board()after the defaults on a T6031. It covers:update-m1n1(asahi-scriptsb6f72e6c):boot.bin;t6031-gpu=0keeps the GPU off and gets only the display default;t6031-dcp=0keeps the display off;t6030-gpu=0keeps the J514S GPU off.5d17a034:28652907'skboot.c, 13 of these tests fail: every J516C display-default case.m1n1-aurorarecipe's stage 1 and ESP stage 2 make lines (Clang/lld, Rust 1.89.0,-Os) build, with the same warnings as28652907.28652907, not rerun since the display round:5f95f67, 30 of that round's tests fail, and the 108 controls pass.kboot.corkboot_gpu.c: 280 passed, 1 skipped, 1 expected failure.tests/run-t6031-unchanged.sh 5f95f67passes.tests/run-kboot-gpu-g15.shstops att8122-j613-standin-10, on base and with this PR alike.tests/run-t6031-handoff.shneeds 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.2kernel/headers andaurora22-1loader packages, with their hashes checked. He reports an empty m1n1.conf, no kernel enable override or modules-load workaround, standalone disk cold boot, Stage25d17a034-dirty, both chosen defaults set, native display, GPU autoload/READY and the normal SDDM/Hyprland desktop on packaged Mesa7c86130d. 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.