Repository navigation
Conversation
The system-Mesa handoff admitted only the J613 and J516S, and only after a file opt-out. Without one, a T8122 Air with a working native system Mesa still got LIBGL_ALWAYS_SOFTWARE=1 whenever /opt/mesa-m3 was not used. Admit apple,j615 with apple,t8122 wherever the J613 is admitted: the hook's board case and mesa-m3-system-check's board parser. A root that names both Airs, or one twice, is still refused. Run the same bounded admission after the /opt/mesa-m3 gate on J613, J615 and J516S Hyprland sessions without requiring the opt-out, for every gate reason except not-supported and user-setup. When it passes, the session keeps system Mesa even where the gate would have used /opt/mesa-m3, because the system Mesa supersedes the legacy build. The state is inactive, reason=system-mesa, fallback=none, and the detail names the board and the gate's own decision. Any refusal leaves the gate's decision and fallback as before; mesa_m3=off and nomodeset still refuse. An automatic admission writes the same attempt as an /opt/mesa-m3 login, so an unconfirmed compositor sends the next login of the boot to software instead of looping. The file opt-out path still writes none. Without an opt-out, an explicit t8122-profile selection or a 25G83 GPU handoff node stays on the native profile's own gate. Bump mesa-m3 to 26.1.4.m3.2-9 and refresh the hook, confirm script and helper checksums.
Automatic system-Mesa admission now runs only where the /opt/mesa-m3 gate ends inactive, the cases that used to fall back to software. An active /opt/mesa-m3 is never replaced; moving those sessions would need a maintainer opt-in. The file opt-out path is unchanged. The automatic path writes its attempt before it commits the admission. If the attempt cannot be written, no unconfirmed login could send the next one to software, so the gate's decision and fallback stay and the state detail says the attempt was not recorded. Document recovery for automatic sessions (remove the attempt file, or boot with mesa_m3=off) separately from file opt-out sessions, and qualify the install message. Refresh the hook checksum.
Removing the opt-out file now restores automatic selection, which may admit the failing system Mesa again; mesa_m3=off is the immediate way back to software. A reboot makes the earlier attempt inapplicable rather than deleting it.
scottjones
left a comment
There was a problem hiding this comment.
We went through this against #213's head (5a4d693) and it looks right to us. On our J613 the system mesa-aurora passes GL, Vulkan, MSAA, texture and compute, so selecting it when admission passes is the direction we want. Thanks for keeping the change this tight.
What we checked:
- An active /opt/mesa-m3 is never replaced, and not-supported and user-setup are skipped.
- Every refusal falls through to the same else branch with the gate's own reason and fallback. The only new text is the attempt-not-recorded note.
- The attempt is written before the state and before the software pair is unset. A failed write drops the admission.
- An unconfirmed automatic login sends the next login of that boot to software. Confirm doesn't look at the decision, so it confirms these attempts unchanged.
- The C board parser still needs exactly one board and one SoC.
Tests: test-session-env.sh passes under sh and bash (280 ok each). test-system-provider.py runs 31 OK and test-system-board.c passes 28 controls. test-user-setup, test-uwsm and test-udev-rule all pass, and all 24 local checksums match. We mutated 19 guards in the hook and 5 in the board parser. All but two were caught.
Two follow-ups, neither blocking:
-
The t8122-profile guard in
_mm3_system_admit([ ! -e "$1/etc/mesa-m3/t8122-profile" ] || return 1) isn't actually tested. If we replace it with:, all 280 tests still pass.The "J613 with an explicit t8122-profile" case only refuses because the fixture lacks the 25g83 prefix's
libexec/mesa-m3-user-setupandshare/mesa-m3/user-setup.list, so the user-setup call fails. The real package installs both (the PKGBUILD loop that copies user-setup, confirm, wlcheck and the list). With both in the fixture, the test passes with the guard and fails without it, gettinginactive system-mesa none.The case that matters is a profile file present without the
apple,j613-25g83-gpu-handoffproperty. With the property, the handoff guard also refuses, and that one is tested. A case with a profile value other than j613-25g83-hal200, where_mm3_pstays /opt/mesa-m3, would cover it too. -
When an automatic login isn't confirmed, the next login's state shows the gate's reason, not why the system Mesa was refused. On a J613 or J615 that means
reason=experimentaland a detail telling the user to add t8122-gpu-experiment. Meanwhile confirm's journal line says the next login gets previous-failed, which it doesn't.SYSTEM-HANDOFF.md documents removing the attempt file, but nothing in the state or the journal points there. A short note in the detail when admission is refused for an unconfirmed attempt would cover it, the same way the attempt-not-recorded case already gets one. aurora-m3-gpu-check will read this too.
The not-supported/user-setup exclusion in mesa_m3_session_env isn't caught by any test either. It's only defense in depth, though, since --system-provider refuses the same setups, so we're fine leaving it.
We haven't done a hardware login on our side yet, so the J615 and J516S paths are still fixture-only.
Could you add the two files to that fixture for the first one, and the note in the detail for the second?
Depends on #213 (stacked on
fix/mesa-m3-append-overrides-20261025).On an M3 Air with a working native system Mesa, the login hook still exports
LIBGL_ALWAYS_SOFTWARE=1whenever it does not use/opt/mesa-m3. #211 added a checked system-Mesa path, but only after a file opt-out and only on J613 and J516S. #213 fixes the parser. Neither admits the 15-inch Air (J615), and neither stops forcing software rendering without the opt-out.What changed
apple,j615+apple,t8122passes the same checks as the J613, both in the hook's_mm3_system_admitboard case and inmesa-m3-system-check's board parser. A root that names both Airs, or one of them twice, is still refused. The 25G83 native profile gating (chosen.asahi,j615-25g83-experimental) is untouched.--system-provideruser setup, same-boot attempt,mesa-m3-system-checkon/usr, 20 s bound) without requiring the opt-out file. It runs only where the/opt/mesa-m3gate ends inactive, excludingnot-supportedanduser-setup, where the session's own Mesa setup still decides. When admission passes, the state isdecision=inactive reason=system-mesa fallback=none, and the detail names the board and the gate's verdict. Only the run id is exported. Any refusal leaves the gate's decision and fallback exactly as before.mesa_m3=offandnomodesetstill refuse./opt/mesa-m3is never replaced. A J516S, or a J613 witht8122-gpu-experiment, whose gate is active keeps/opt/mesa-m3, and the helper does not run. Moving those sessions to system Mesa would need a maintainer opt-in. The file opt-out path is unchanged from mesa-m3: allow checked system Mesa after a file opt-out #211./opt/mesa-m3login before it commits the admission.mesa-m3-session-confirmconfirms it unchanged. An unconfirmed compositor makes the next login of that boot fall back to software instead of looping. If the attempt cannot be written, the admission is dropped: the gate's decision and software fallback stay, and the detail says the attempt was not recorded. The file opt-out path still writes no attempt./etc/mesa-m3/t8122-profileselection, or a render node withapple,j613-25g83-gpu-handoff, is not admitted automatically.previous-failedwording, the confirm script header,mesa-m3.install's post-install message andtests/SYSTEM-HANDOFF.mdare updated. SYSTEM-HANDOFF.md now covers recovery separately for automatic sessions (remove the attempt file or reboot;mesa_m3=off) and file opt-out sessions.mesa-m3is bumped to26.1.4.m3.2-9, and the checksums formesa-m3-session-env,mesa-m3-session-confirmandmesa-m3-system-check.care refreshed. The state schema (aurora.mesa-m3-session/2) and journal line are unchanged.system-mesais a newreasonvalue.Tests
Run from
tools/aurora-sep/recipes/mesa-m3/testsas a non-root user in an Arch Linux ARM container, at3ab3121:sh test-session-env.shandbash test-session-env.sh: 280 ok each, 0 failed (219 before)./optgate is inactive. Checks cover the helper's exact argv and empty environment, the state file and journal line, and that only the run id is exported./optstays active and the helper does not run for an opted-in J613 and for a J516S.mesa_m3=offandnomodeset.t8122-profile, or a 25G83 handoff node.+=override, a missing installed hook, and a stalled journal refused after 20 s.python3 test-system-provider.py: 31 tests OK (22 before), includingSystemAdmissionTestfor board and node admission and refusal.test-system-board.c(cc -std=c11 -Wall -Wextra -Werror -pedantic): 28 board parser controls passed (17 before).mesa-m3-system-check.cbuilds with-std=c11 -Wall -Wextra -Werror.test-user-setup.sh51 ok,test-uwsm.sh7 ok,test-udev-rule.sh5 ok,test-confirm.sh(with a builtmesa-m3-wlcheck) 9 ok. Each was run undershandbash.sha256sums.sh -n/bash -npass on the hook, confirm script and50-mesa-m3.git diff --checkis clean.test-profile.cwas not run: it needs Mesa'sdrm-uapi/asahi_drm.h, and this change does not touch it.Not done
No hardware login was run, and the package was not built. These are host fixture tests with a stub helper. They do not show that
mesa-aurorarenders a Hyprland session on J613, J615 or J516S.aurora-m3-gpu-checkininstall-aurora-sep.shstill treats any non-activereason as inactive, so it will reportsystem-mesaas "Apple GPU is inactive". That file is outside this recipe and is left for a follow-up.