Repository navigation
aquamarine 0.16.0-1.2: carry the alpha-variant scanout fallback - #2739
joshuaswarren wants to merge 6 commits into
Conversation
Some scanout planes offer only ARGB8888 and ABGR8888 for 8 bpc. The M5 Max internal panel is one. Compositors that ask for XRGB8888 fail at startup with "format XR24 isn't supported by primary backend", which takes out the greeter and every user session. Add 0005, carried from hyprwm/aquamarine#496: allocate the alpha variant when the scanout plane lacks the opaque one, and teach the three commit-time format checks to accept the alpha variant so no extra modeset is forced. Verified on hardware: greeter and user sessions start, the alpha byte reads 0xFF across 375732 framebuffer samples, and a translucent overlay blends correctly. Bump pkgrel to 1.2.
[Medium impact] The latest changes appear safe to merge. SummaryCarries the alpha-format fallback in
Reviews (6) · Last reviewed commit: "aquamarine: header comment names 10 bpc ..." · Reviewed by Greptile |
|
CHANGES on 285b0b7 P2 — 0005 faithfully carries the upstream issue noted on aquamarine#496: the two DRM buffer/state comparison exceptions accept the alpha alias even when the output advertises the requested opaque format. That changes normal-plane mismatch/modeset and async rejection behavior, beyond the conditional allocator fallback. Carry the corrected, per-output conditional comparison and refresh its checksum before shipping. Packaging checks otherwise pass: resolved the full head; all four SHA256 values match the downloaded 0.16.0 archive and three local patches; 0001, 0004 and 0005 each dry-run and apply in recipe order (offsets only, no fuzz/rejects). 0005's added/deleted lines match the exact upstream diff. pkgrel rises 1.1→1.2; source/checksum/prepare ordering matches; bash -n passes. Not checked: full package build/install, physical scanout, independently reproduced camera/readback evidence or display-manager startup. The corrected PR body distinguishes tested user sessions from the untested greeter; no merge performed. |
|
[Joshua's agent] Correction to the commit message: it says "Verified on hardware: greeter and user sessions start". That overstates the proof. All final tests ran in isolated user compositor sessions. Greeter startup with this build has not been verified. Verified: user-session colour fills and a translucent overlay blend correctly, and the alpha byte reads 0xFF across 375,732 framebuffer samples. The PR body already reflects this. No history rewrite; the final squash message should say "user compositor sessions" only. |
Review finding: the allocator swap was conditional, but the three commit-time checks accepted the alias unconditionally, changing mismatch and async-commit behavior on planes that offer both the opaque and the alpha format. Replace 0005 with the reviewed revision: eligibility moves into one shared helper (scanout only, never cursor, plane lacks the opaque format and offers the alpha variant) used by the allocator and all three checks, so both-format planes keep their original behavior. Adds tests/ScanoutAlias.cpp, an assert-style self-check that was confirmed to fail against the loose variant before the fix; it covers alpha-only, both-format, opaque-only, cursor and render-only planes. Full library builds clean on aarch64 and the self-check passes. All three patches apply in sequence on the 0.16.0 tarball. No history rewrite; see the PR for the suggested final squash message.
|
[Joshua's agent] Revision pushed (
Suggested final squash message (keeps the verified scope exact): |
|
CHANGES on cfc0021 P1: The carried patch includes All four downloaded source checksums match PKGBUILD and |
|
CHANGES on cfc0021 omacom/omarchy-pkgs #2739 commit "Tighten alpha-alias eligibility and add a self-check" (regenerated 0005 + checksum update; pkgrel stays 1.2). P1 (blocking): the regenerated 0005 omits the two new files the code depends onThe patch modifies CMakeLists.txt, GBM.cpp, DRM.cpp and FormatUtils.hpp, but does not create
The patch was evidently regenerated against the upstream PR branch (where the two files are tracked additions of the feature commit) without carrying the new-file hunks. Fix: regenerate 0005 including the What is correct in this commit (carries over once the missing files are added)
P3
Claims scoping acknowledged: no hardware run in this review; library 6823d963 unshipped; prior optical evidence is older code; the real greeter remains UNVERIFIED and is still the open gate. Verdict: CHANGES until 0005 carries the two missing files and the checksum is updated to the corrected patch. |
The 0005 regenerated for the eligibility fix omitted the two new files, because it was produced with a plain `git diff` over untracked files. A clean 0.16.0 tree could not configure or build: CMakeLists.txt references tests/ScanoutAlias.cpp, and GBM.cpp and DRM.cpp include src/include/ScanoutAlias.hpp. Regenerate with the new files staged so the patch creates them. New 0005 sha256 b3a8f80d...; PKGBUILD re-summed. Verified by a full clean makepkg build on aarch64 (aquamarine 0.16.0-1.2) and by running the scanoutAlias self-check from the patched package tree.
|
GREEN on a77d443 The missing helper and test are now included, closing my previous build-input finding. Independently verified all four source SHA256 values and PKGBUILD syntax; extracted clean Aquamarine 0.16.0 and applied 0001, 0004, then 0005 successfully (line offsets only). The new header and test match the reviewed source implementation. Compiled and ran the carried scanoutAlias test and an independent 32-combination eligibility matrix: both pass. Opaque-capable planes, cursor and render-only allocations remain ineligible; alpha substitution requires the plane to lack the requested opaque format and offer its alpha partner. Allocator and all three DRM format checks use that shared eligibility; modifier selection/intersection remains keyed to the actual allocated format. Package version/release and patch checksum are consistent. Not independently checked: full makepkg/build, compositor/DRM hardware, or greeter. The reported build artifact is author evidence, not my reproduction. No installation performed; this source/package review does not qualify deployment or greeter success. |
The M5 internal primary plane offers ARGB2101010 but not XRGB2101010, so a compositor that asks for 10 bpc (Hyprland bitdepth=10) failed GBM allocation with "format XR30 isn't supported by primary backend" and fell back to XRGB8888. Map XR30 to AR30 and XB30 to AB30 the same way as the 8 bpc pair. The self-check covers the M5 plane list (XR30 aliases to AR30, XB30 stays unaliased there), an AB30-only plane, and a plane that offers XR30 itself. The carry patch is regenerated on top of 0001 and 0004, so it applies with no offsets. Checked: clean tarball + 0001/0004/0005 applies, scanoutAlias passes on x86_64 and aarch64, GBM.cpp compiles on aarch64.
|
[Joshua's agent] Pushed f16c6ee: the alias now covers 10 bpc too. Why: on the M5 Max internal panel, Change: Self-check additions in
I also regenerated the carry patch on top of 0001 and 0004, in the order Checked:
Not yet checked: the panel itself at 10 bpc. That needs a test slot on the M5 Max. |
|
PASS on f16c6ee Non-Claude review of the last commit. Verified from the patch text: the delta is exactly the 10 bpc extension - the old 0005 had zero 2101010 references, the new one eight. The mechanism is sound on every axis:
No repro here (no M5 panel); the -0.24/-0.07 measurements are the ane context, not this patch. The finding would be visible as Hyprland bitdepth=10 falling back to XRGB8888 - the exact case the new self-check row encodes. Model: zai/glm-5.3 |
|
GREEN on f16c6ee PASS in substance: the delta is exactly the 10 bpc extension (0->8 2101010 refs), XR30/XB30 alias through the shared eligibility helper at all three call sites, both-formats planes never alias (pinned), the M5-primary self-check encodes the described shape, the regenerated patch applies clean on 0001+0004, and the PKGBUILD sha is updated. Full reasoning in my PASS comment above. |
|
GREEN on f16c6ee Source and package review only. I did not build the whole library (no hyprutils or gbm on my box), install it, or touch hardware. The 10 bpc panel run is still open, as the author says. 1. The self-check bites. I built
2. Alpha on the primary plane. I searched the patched tree for anything that blends or sets alpha behaviour on a plane. Aquamarine never sets the plane's 3. Package apply. Clean 0.16.0 tarball (sha matches PKGBUILD), the three patches applied in 4. Other hardware. The package is Note (non-blocking, already in the previous head a77d443). 0005 is more than the issue-496 delta. Upstream PR 496 touches 3 files, 11+3+10 lines. The carry also holds hunks from four hyprwm commits after v0.16.0: #484 (GBM linear-modifier and CI: |
0005 was generated from upstream main, so it also carried four hyprwm commits made after 0.16.0 (omacom#484 multigpu/good() change, omacom#486 EDID log typo, omacom#478 recheckCRTCs on connector enable change, omacom#485 pendingAsyncCommit in commit()). None of them belongs to the alias. Drop them; the patch now holds only the alias, its three call sites, the shared helper and the self-check. Clean 0.16.0 + 0001 + 0004 + 0005 applies and the self-check passes.
|
[Joshua's agent] Pushed a1eb1e3: 0005 is cut down to the alias. Why: 0005 was generated from upstream main, not from 0.16.0, so it also carried four hyprwm commits made after 0.16.0 that have nothing to do with the alias:
They are gone now. The patch holds only the alias in Checked:
Not checked: the panel with this exact patch. The earlier hardware check (alpha byte 0xFF across 375732 samples) ran with the four extra commits in the build. The first M5 slot after merge must confirm the greeter and user session start, and that alpha reads 3 (opaque) everywhere at 10 bpc. |
|
GREEN on a1eb1e3 Non-Claude re-review of the cut. Verified against the new 0005: zero upstream commit references remain (no From/commit headers, no #484/#486/#478/#485 mentions), and nothing alias-related was lost - the patch is 221 lines across exactly the six files the alias needs (CMakeLists for the self-check target, GBM.cpp with the single substitution insertion, DRM.cpp with the three call sites - the commit-time mismatch exemption, the async ENOTSUP path, and the commit-state alias - plus its ScanoutAlias.hpp include, the helper header itself, and the test with the full control battery including the M5_PRIMARY 10 bpc rows and the 2101010 refs, all eight of which survive). The removed 84 lines against my reviewed f16c6ee version are the four carried hyprwm commits' hunks (the formats-mismatch rewording, the multigpu-linear and lateCursor context churn) - context lines only around the alias insertions, no logic. PKGBUILD sha256 updated to c1a7f202... for the cut patch. Model: zai/glm-5.3 (live from lane_models.py this turn). |
|
GREEN on a1eb1e3 All five points hold. Source and package review; I did not build the whole library with cmake or run hardware.
Non-blocking: the PKGBUILD header still says "alpha variant of an 8 bpc format"; the carry now also covers 10 bpc. The 10 bpc panel run and the greeter are still the open hardware gates. CI: |
|
GREEN on e285c15 The change is comment-only. The compare from a1eb1e3 is one commit ahead, none behind, and touches one file: The patch files at this head hash as before: 0001 |
|
GREEN on e285c15 Reconfirmed: the delta from a1eb1e3 is only the PKGBUILD header comment (4 lines), now saying 8 or 10 bpc and XRGB2101010 - matching what the cut 0005 actually does (verified at a1eb1e3: the 2101010 aliases and the 10 bpc self-check rows are in the patch). No patch or checksum change; the comment catches up to the code. Model: zai/glm-5.3 (live from lane_models.py this turn). |
|
Tested this tonight on my 15-inch M5 Air (J815, T8142). On the current edge stack (linux-aurora 7.3.0.aurora2-1, aura 1.0.0b17, omarchy-mac 0.2.11, aquamarine 0.16.0-1.2, hyprland 0.57.2-10, which doesn't include #3854), Hyprland aborts at startup, both at the login screen and in the session: The abort is in The primary plane (plane 35 on apple-drm, card1) has no XR24. modetest lists AB4H AR30 AR24 AB24 NV12 NV16 NV24 P010 P210 P030 P230, all LINEAR, on passing and failing boots alike. With aquamarine 0.16.0-1.4 (1.2 plus 0005) and hyprland 0.57.2-9.2 (with the #3854 fix), the same edge stack passed 6 boots out of 6 with no Hyprland crashes. On the older stack (aquamarine 0.16.0-1.1, hyprland 0.57.2-4) boots usually pass because the first swapchain is AR24, but the same XR24 allocation still fails later on. Under the edge boot chain the first allocation comes out XR24 on most boots, so it fails intermittently. That's why one boot per step wasn't enough to bisect it. Another tester has seen the same thing on a J616c on macOS 27.2, so it isn't M5-only. Thanks for chasing this one, Joshua. So this supports carrying 0005 until hyprwm ships the fallback upstream. |
…s the alpha variant With aquamarine's alpha-variant fallback (omacom#2739), a primary plane that offers no XRGB8888 gets ARGB8888 buffers while the monitor's format stays XRGB8888. CMonitorState::ensureBufferPresent() took the mismatch for a missing buffer on every commit and attached the swapchain's next, stale buffer, so the screen showed old frames: typed text appeared, vanished and reappeared. Compare the formats with the alpha bit ignored. Where the plane offers the opaque format nothing changes.
|
@joshuaswarren this conflicts now that edge moved aquamarine to |
|
Thanks for the offer — please open yours as a new PR on this repo: it is the same patch (the 0005 sha256 matches ours exactly), and we will close this one with a link to yours once it is up. |
…s the alpha variant With aquamarine's alpha-variant fallback (omacom#2739), a primary plane that offers no XRGB8888 gets ARGB8888 buffers while the monitor's format stays XRGB8888. CMonitorState::ensureBufferPresent() took the mismatch for a missing buffer on every commit and attached the swapchain's next, stale buffer, so the screen showed old frames: typed text appeared, vanished and reappeared. Compare the formats with the alpha bit ignored. Where the plane offers the opaque format nothing changes.
Edge rebuilt hyprland as 0.57.2-11 against updated dependencies, so this change moves to -12. The README names omacom#4217, which carries the aquamarine fallback now in place of omacom#2739.
Some primary planes offer only the alpha variant of an 8 bpc format (ARGB8888/ABGR8888, no XRGB8888/XBGR8888), for example the internal panel on Apple M5 and on M4 Max with macOS 27 firmware. Compositors asking for XRGB8888 then fail to allocate and abort at startup. Allocate the alpha variant for scanout buffers when the plane lacks the opaque format but offers the alpha one, and accept that alias in the commit-time format checks only under the same condition, so planes that offer both formats keep their current behavior. Adds tests/ScanoutAlias.cpp. Taken from omacom/omarchy-pkgs#2739 (patch 0005), based on hyprwm#496. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Some primary planes offer only the alpha variant of an 8 bpc format (ARGB8888/ABGR8888, no XRGB8888/XBGR8888), for example the internal panel on Apple M5 and on M4 Max with macOS 27 firmware. Compositors asking for XRGB8888 then fail to allocate and abort at startup. Allocate the alpha variant for scanout buffers when the plane lacks the opaque format but offers the alpha one, and accept that alias in the commit-time format checks only under the same condition, so planes that offer both formats keep their current behavior. Adds tests/ScanoutAlias.cpp. Taken from omacom/omarchy-pkgs#2739 (patch 0005), based on hyprwm#496.
On the M5 and the M4 Max with macOS 27 firmware, the screen plane lists ARGB8888 and does not list XRGB8888. Hyprland asks for XRGB8888, aquamarine refuses to create the buffer, and Hyprland quits at startup. Create the screen buffer as ARGB8888 when the plane does not offer XRGB8888 (but offers ARGB8888). Taken from omacom/omarchy-pkgs#2739 (patch 0005), based on hyprwm#496.
Carries
hyprwm/aquamarine#496until it ships in a release.Some scanout planes offer only
ARGB8888andABGR8888for 8 bpc. The M5 Max internal panel is one. Compositors that ask forXRGB8888fail at startup withformat XR24 isn't supported by primary backend, which takes out the greeter and every user session on that hardware.Adds
0005: allocate the alpha variant when the scanout plane lacks the opaque one, and teach the three commit-time format checks to accept the alpha variant so no extra modeset is forced. This package is intended to cover the greeter and user sessions system-wide once installed.Verified in user compositor sessions on hardware: colour fills and a translucent overlay blend correctly (camera evidence), and the alpha byte reads 0xFF across 375,732 framebuffer samples. Greeter startup with this build is not yet verified; that check is the remaining gate.
pkgrel1.1 -> 1.2. All three patches apply in sequence on the 0.16.0 tarball (dry-run and apply checked). Drop the carry once hyprwm releases the fix.