Repository navigation
mesa-m3: allow checked system Mesa after a file opt-out - #211
Conversation
Keep qualified native /usr Mesa usable when the legacy mesa-m3 hook is still installed. Admit only J613/T8122 and J516S/T6030 after display, render-node, journal, user-setup and previous-login checks, followed by a bounded no-draw EGL device/context and implementation-path check. Keep kernel recovery flags and all failed admissions on the existing fallback. Preserve active legacy profiles and their attempt markers. Add host refusal controls and document the remaining packaged login test. Generated-by: LLM Signed-off-by: Chris Kearney <303316+chriskearney@users.noreply.github.com>
8d9e1da to
bc08b91
Compare
|
Package validation for
The helper’s exact C source previously passed unprivileged system-EGL admission on J516S. The final packaged helper and hook have not yet been exercised through a fresh M3 login, and that earlier context-only check is not a substitute. The available J293/J313 machines cannot establish the M3-only handoff; the J516S is currently offline. No installation, desktop restart or boot was attempted here. Before image use: fresh supported-M3 login with the updated legacy package, the pinned Omacom native packages and a file opt-out, without an extra fallback-unset drop-in; confirm |
The handoff probe runs in a clean environment against /usr, but the desktop keeps the session's own setup. Under --system-provider, also refuse an LD_LIBRARY_PATH entry that holds its own libEGL, libGLESv2, libGL, libGLX, libglapi or libgbm, treat a relative entry as unknown, and refuse GBM_BACKEND, __GLX_VENDOR_LIBRARY_NAME and the Mesa GL/GLES/GLSL version overrides. The legacy gate keeps its existing rules. Run the whole admission in its own sh under one 20-second timeout, so a stalled journal, home directory or scanner refuses and keeps the software fallback instead of holding the login. Run the handoff cases under the suite's own shell so the bash run covers the new path, add stall and override cases, document that the helper does not render and that a later failure is not recorded, and bump pkgrel to 7 with the new checksums. Signed-off-by: Marcelo Alcantara <maralc@gmail.com>
glibc also splits LD_LIBRARY_PATH on ";" and reads an empty entry as the current directory, so ":", "/a:" or "/a;/b" could still hide another provider from --system-provider. Split on both and treat a real empty entry as unknown. A reference to the previous value still counts as no entry. Signed-off-by: Marcelo Alcantara <maralc@gmail.com>
A placeholder for $LD_LIBRARY_PATH hid the current-directory entry that
"/a:$LD_LIBRARY_PATH" or "${LD_LIBRARY_PATH}:/a" leave when the inherited
value is unset or empty. For --system-provider, expand plain references
with the inherited value and ${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH} as the
shell does, treat any other form as unknown, and ignore a wholly empty
value as glibc does.
Signed-off-by: Marcelo Alcantara <maralc@gmail.com>
An earlier file can unset LD_LIBRARY_PATH, so its inherited value does not
show what "/a:$LD_LIBRARY_PATH" expands to. For --system-provider, take a
plain reference as empty, accept ${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH} and
its ${...} spelling, keep spaces in an entry as glibc does, and treat only
a truly empty value as no entry.
Signed-off-by: Marcelo Alcantara <maralc@gmail.com>
"${LD_LIBRARY_PATH}/x" or "/a$LD_LIBRARY_PATH" name a directory the
detector cannot see, so for --system-provider a reference counts only when
it stands alone between separators; anything else is unknown. Take the
environment's own value literally, and keep the legacy gate's parsing
exactly as it was.
Signed-off-by: Marcelo Alcantara <maralc@gmail.com>
…pend
"${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}" with nothing before it expands to
":/prev", a current-directory entry, so for --system-provider a conditional
append needs an entry before it. Do not expand ~ or $HOME in the
environment's own value either; glibc does not.
Signed-off-by: Marcelo Alcantara <maralc@gmail.com>
|
I pushed fixes on top of bc08b91 for issues found in review, and merged this at ee712c7 (CI).
The |
[Medium impact] The change affects the login and rendering path on two supported M3 board pairs. The PR appears safe to merge, with a non-blocking case where explicit system-library settings still force software rendering. Findings
SummaryAdds a checked handoff from the legacy
Acknowledged limitations from chriskearney: system-Mesa failures after admission are not recorded, and a fresh packaged-login check remains pending.
|
| return p == PREFIX or p.startswith(PREFIX + '/') | ||
| # A system-Mesa handoff must also detect the old prefix. The normal | ||
| # legacy gate deliberately accepts it and keeps its original behavior. | ||
| return not self.o['system_provider'] and (p == PREFIX or p.startswith(PREFIX + '/')) |
There was a problem hiding this comment.
System paths still trigger software
In --system-provider mode, ours() always returns false. If a user explicitly sets LD_LIBRARY_PATH=/usr/lib or LIBGL_DRIVERS_PATH=/usr/lib/dri, the scanner rejects those settings even though they select the same system Mesa that the helper checks. On a supported machine with a file opt-out, this keeps software rendering enabled unnecessarily.
Allow verified system paths in this mode while continuing to reject other providers, and add strict-mode tests for them.
|
Checked the final merged #211 head All 31 source checksums match. Native aarch64 build The merged host suites pass under both shells, and all 20 system-provider tests pass. No package installation, compositor restart, fresh M3 login or hardware test was performed for this build. I reproduced one further late-config gap: Bash |
|
Hand build replaced by the shipped Edge package: linux-aurora 7.2.11.aurora6-1 (CI run 40185970994, head 7876c8e, success; Edge bumped aurora5-1 -> aurora6-1 minutes after the run). Installed through the shipped packages and their hooks (no hand packaging), one-shot boot of the linux-aurora entry, stock default (the 12.6 preempt entry) untouched. Tested on the 14-inch M2 Max:
CI on this PR: 12 pass, 2 skipped. Regressions: none found. omarchy-m-test check list matches the stock run except: boot.kernel-package now PASS (the running kernel is the installed package, which is the point of this run), input.auto-keyboard-light PASS (already passing on the earlier tip build; stock 12.6 fails it — improvement, not regression), hardware.drivers counts the Not tested: this machine has no fingerprint reader (fprintd: "No devices available"), so the Touch ID keybag path in this PR is covered only down to the SEP/xart first-setup guard code compiled in and the SEP attach staying healthy; the actual keybag create path needs a machine with the reader. M3 paths in the other merged PRs are not exercised on this machine. |
With native Mesa installed in
/usr, a file opt-out from the legacymesa-m3package still forced software rendering. This left a working native driver unusable at login. The interaction is documented in the J613 package report.Allow a file opt-out on J613/T8122 and J516S/T6030 to keep system Mesa after the existing render-node, display, journal and previous-login checks, a stricter user-setup check, and a bounded EGL device/context check against the actual
/usrimplementation. No opt-in flags or draw/dispatch calls are used. Active legacy profiles stay unchanged; kernel recovery flags, conflicting selectors, unsupported boards, failed prior logins and failed probes retain the existing fallback. No attempt/success marker is removed or rewritten. The legacy package owns the hook, so this belongs here rather than overwriting it frommesa-aurora.Validation at
bc08b91:shandbash, including opt-out handoff, helper failure/timeout, recovery flags, fault logs, conflicting selectors, wrong/ambiguous boards and same-boot attempt protection.git diff --checkpass.7.2.11-mixtape-77648eb77168-g15and installed native Mesa source97a65d845f39418aecc693dcaf9dcb14a05849f6, the final helper returnedApple M3 Pro (G15S B1)as the desktop user with no selector/opt-in environment. No new kernel messages, package changes or reboot. Helper source SHA256:e80947130044c2dc3671c24c7bff4f523dcc033f7e96f71e334d89a663e2742e.The exact legacy recipe built successfully as
mesa-m3-26.1.4.m3.2-6-aarch64.pkg.tar.zst(SHA2560175ed4a51db3b87be35df81e0d3a237663c08ddce712132daaff1600eaecf2d); its existing qualified shader digests, compiler/plane-offset, queue, TLS and packaging checks passed. The packaged hook and detector match this source, and the new helper is an AArch64 executable installed with mode 0755. GitHubci / resultis green.Draft pending a fresh-login check on a supported M3 alongside the exact Omacom native packages. Acceptance: file opt-out present, no extra user drop-in that unsets fallback, state
inactive/opt-out/fallback=none, compositor maps native/usrMesa, and GL/Vulkan pixel checks plus the kernel fault log pass. Do not remove or rewrite prior attempt/success markers to make it pass. The helper check is device/context admission, not a packaged login, rendering/CTS qualification or support claim for other boards. No kernel, firmware, boot configuration or CODEOWNERS change. Complements Mesa #12 and package #1591; it does not change their source pins.