Skip to content

aquamarine 0.16.0-1.2: carry the alpha-variant scanout fallback - #2739

Open
joshuaswarren wants to merge 6 commits into
omacom:masterfrom
joshuaswarren:mac/aquamarine-alpha-scanout
Open

joshuaswarren wants to merge 6 commits into
omacom:masterfrom
joshuaswarren:mac/aquamarine-alpha-scanout

Conversation

@joshuaswarren

@joshuaswarren joshuaswarren commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

Carries hyprwm/aquamarine#496 until it ships in a release.

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 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.

pkgrel 1.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.

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.
@greptile-apps

greptile-apps Bot commented Nov 14, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The latest changes appear safe to merge.

Summary

Carries the alpha-format fallback in aquamarine 0.16.0-1.2.

  • Aquamarine scanout uses an alpha format when the plane lacks its opaque match.

Reviews (6) · Last reviewed commit: "aquamarine: header comment names 10 bpc ..." · Reviewed by Greptile

@joshuaswarren

Copy link
Copy Markdown
Contributor Author

CHANGES on 285b0b7
Cross-model review (GPT)

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.

@joshuaswarren

Copy link
Copy Markdown
Contributor Author

[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.
@joshuaswarren

Copy link
Copy Markdown
Contributor Author

[Joshua's agent]

Revision pushed (cfc00214) with the review finding fixed: eligibility for the alpha alias now lives in one shared helper and is conditional everywhere — scanout only, never cursor, and only when the plane lacks the opaque format but offers the alpha variant. The allocator and all three commit-time checks (setFormat validation, mismatch detection, async commit) use it, so planes that offer both formats keep their original mismatch/async behavior.

0005 now also adds tests/ScanoutAlias.cpp, an assert-style self-check (NDEBUG-proof) covering alpha-only, both-format, opaque-only, cursor and render-only planes. It was confirmed red against the loose variant before the fix and green after. Full library builds clean on aarch64; all three patches apply in sequence on the 0.16.0 tarball.

Suggested final squash message (keeps the verified scope exact):

Carry the alpha-variant scanout fallback for aquamarine 0.16.0

Some scanout planes offer only ARGB8888 and ABGR8888 for 8 bpc. The M5
Max internal panel is one. Compositors that ask for XRGB8888 fail with
"format XR24 isn't supported by primary backend". Allocate the alpha
variant when the scanout plane lacks the opaque one, behind one shared
eligibility check also used by the commit-time format checks, with an
assert-style self-check for both-format, alpha-only, opaque-only,
cursor and render-only planes.

Verified in user compositor sessions only: colour fills and a
translucent overlay blend correctly, and the alpha byte reads 0xFF
across 375732 framebuffer samples. Greeter startup with this build is
not yet verified. Bump pkgrel to 1.2.

@joshuaswarren

Copy link
Copy Markdown
Contributor Author

CHANGES on cfc0021
Cross-model review (GPT)

P1: The carried patch includes #include "ScanoutAlias.hpp" in both production files and adds a CMake target for tests/ScanoutAlias.cpp, but includes neither new file. Applying 0001, 0004, then 0005 to the checksum-verified 0.16.0 release succeeds, but both src/include/ScanoutAlias.hpp and tests/ScanoutAlias.cpp are absent afterwards. The package cannot build. Regenerate the carry including the added files, then update its checksum.

All four downloaded source checksums match PKGBUILD and bash -n PKGBUILD passes. This is an independent source/patch check, not installation or hardware qualification; greeter success remains unverified.

@joshuaswarren

joshuaswarren commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor Author

CHANGES on cfc0021
Review provenance correction: Claude runtime was not verified; this review does not satisfy the Claude cross-model gate. Recorded runtime: zai/glm-5.3-flash (issuing session metadata). Technical findings, verdict and head are unchanged.

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 on

The patch modifies CMakeLists.txt, GBM.cpp, DRM.cpp and FormatUtils.hpp, but does not create src/include/ScanoutAlias.hpp or tests/ScanoutAlias.cpp — while the applied code includes the header (#include "ScanoutAlias.hpp" in GBM.cpp:7 and DRM.cpp:38) and CMake adds a test target whose source is the missing file (add_executable(scanoutAlias "tests/ScanoutAlias.cpp")). Verified by applying 0001 → 0004 → 0005 on a fresh v0.16.0 tree: patch applies all three cleanly, and afterwards src/include/ScanoutAlias.hpp and tests/ScanoutAlias.cpp do not exist. Consequences, both fatal to a package build:

  1. cmake configure fails at the new add_executable(scanoutAlias "tests/ScanoutAlias.cpp") — the source file is not in the tree.
  2. Even without the test target, compilation of GBM.cpp/DRM.cpp fails on the missing include.

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 src/include/ScanoutAlias.hpp and tests/ScanoutAlias.cpp additions (and their new file mode headers), update sha256sums accordingly.

What is correct in this commit (carries over once the missing files are added)

  • Checksum: recomputed sha256sum of the patch file = 21948dde6ff91580aeb3d3218a297dccd687b216d8b8afd5d0fc147ec131a180, exactly the PKGBUILD's fourth sum; 0001/0004 sums unchanged.
  • Applied hunks match the provenance branch joshuaswarren/aquamarine d1df1480: GBM.cpp identical to the branch file (the include and the scanoutAlphaAlias call with params.scanout, CURSOR are present); DRM.cpp identical except the two 0001/0004 carry blocks that the upstream branch legitimately lacks (stacking works as designed); FormatUtils.hpp byte-identical (old helper removed).
  • The alias logic itself is the fixed, plane-conditioned version — the both-format behaviour matches main (re-derived and CHECK-tested on the branch; see rev-aq-d1df1480.md: red-loose fails at the both-format line, green and NDEBUG runs pass).

P3

  • pkgrel stays 1.2 while the patch content changes. Acceptable only if no aquamarine 1.2-1.2 package was ever published (per Main: build 6823d963 unshipped, the prior optical build bbf3b9bb is older code). If a 1.2 artifact exists anywhere user-visible, bump to 1.3 with the corrected patch.
  • The patch's From header still names the upstream commit; after adding the two files it will genuinely be a superset of the upstream delta — the commit message should say the self-check and shared header are carried with it, so the next rebaser knows the patch is not a pure upstream cherry-pick.

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.
@joshuaswarren

Copy link
Copy Markdown
Contributor Author

GREEN on a77d443
Cross-model review (GPT)

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.
@joshuaswarren

Copy link
Copy Markdown
Contributor Author

[Joshua's agent] Pushed f16c6ee: the alias now covers 10 bpc too.

Why: on the M5 Max internal panel, bitdepth=10 did not take. Hyprland asks for XRGB2101010 or XBGR2101010 only. The internal primary plane offers ARGB2101010 but neither X variant, so GBM failed with format XR30 isn't supported by primary backend and the output fell back to XRGB8888 (hyprctl monitors showed XRGB8888 with cm=hdr bitdepth=10).

Change: opaqueToAlphaFormat maps XR30 to AR30 and XB30 to AB30, next to the existing XR24/XB24 pair. The per-plane eligibility check is unchanged, so a plane that offers the X format itself still gets no alias.

Self-check additions in tests/ScanoutAlias.cpp:

  • M5 primary list (AR30, AR24, AB24): XR30 aliases to AR30 and the commit check accepts it; XB30 gets no alias.
  • AB30-only plane: XB30 aliases to AB30.
  • Plane with both XR30 and AR30: no alias.

I also regenerated the carry patch on top of 0001 and 0004, in the order prepare() applies them, so 0005 now applies with no offsets.

Checked:

  • A clean 0.16.0 tarball takes 0001, 0004 and 0005 in order.
  • scanoutAlias failed before the header change and passes after it, on x86_64 and aarch64.
  • GBM.cpp compiles on aarch64.
  • bash -n PKGBUILD passes.

Not yet checked: the panel itself at 10 bpc. That needs a test slot on the M5 Max.

@joshuaswarren

Copy link
Copy Markdown
Contributor Author

PASS on f16c6ee
Model: zai/glm-5.3

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:

  • opaqueToAlphaFormat becomes a switch covering XR30->AR30 and XB30->AB30 alongside the existing 8 bpc pairs, everything else INVALID (an already-alpha request has no alias - pinned).
  • The shared eligibility helper is unchanged in shape and now inherits the new formats for free: scanout-only, never cursor, only when the plane lacks the opaque but offers the alpha, and a plane offering BOTH keeps its original behavior (pinned for the 10 bpc pair in the new checks). That last rule is what keeps a non-Apple plane that offers XR30 from ever being aliased.
  • All three call sites (the GBM allocator substitution, the commit-time format-mismatch exemption, and the async-commit ENOTSUP path) go through the same helper, so the 10 bpc formats cannot be enabled at one site and missed at another.
  • The self-check covers the M5 primary shape exactly as described (AR30+ARGB8888+ABGR8888): XR30 aliases to AR30 and is accepted, XB30 does not (no ABGR2101010 on that plane), an ABGR2101010-only plane aliases XB30, and the both-formats control refuses. Cursor and render-only controls carry from the earlier commit.
  • The regenerated patch applies on 0001+0004 with no offsets (the hunk headers moved to the rebased line numbers as expected) and the PKGBUILD sha256 is updated to the new patch.

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

@joshuaswarren

Copy link
Copy Markdown
Contributor Author

GREEN on f16c6ee
Model: zai/glm-5.3

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.

@joshuaswarren

Copy link
Copy Markdown
Contributor Author

GREEN on f16c6ee
Model: anthropic/claude-sonnet

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 tests/ScanoutAlias.cpp with the patched header from a clean 0.16.0 tree (g++ -std=c++23): scanoutAlias: all checks passed, also with -DNDEBUG -O2. Four one-line mutants of ScanoutAlias.hpp, each fails with its own line:

  • remove the XR30/XB30 cases (the state before this push): FAILED scanoutAlphaAlias(M5_PRIMARY, DRM_FORMAT_XRGB2101010, ...) == DRM_FORMAT_ARGB2101010 at line 52;
  • drop the "plane already offers the opaque format" check: fails at the both-format line 36;
  • drop the cursor guard: fails at line 43;
  • drop the "alias must be offered" check: fails at line 54 (XB30 on the M5 list).

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 pixel blend mode, alpha or zpos; the atomic code writes only geometry, fb_id, crtc_id and colour range. So blending is whatever the kernel plane default is, and the alias is safe only if the buffer's alpha stays opaque. What I can show from the code: the scanout buffer is cleared with glClearColor(0,0,0,1) after allocation (Renderer.cpp:931), the multi-GPU blit runs with GL_BLEND disabled so it copies source alpha (Renderer.cpp:1161), and the alias is limited to scanout, never cursor, and only when the plane lacks the X format. The other alpha source is what the compositor draws. The author's 0xFF alpha count (375,732 samples) is 8 bpc only. At 10 bpc the alpha field is 2 bits and nothing has measured it yet, so the 10 bpc panel run should check that alpha reads 3 (0b11) everywhere. That is the existing hardware gate, not a code defect.

3. Package apply. Clean 0.16.0 tarball (sha matches PKGBUILD), the three patches applied in prepare() order with patch -Np1: 0004 and 0005 take no offsets, no fuzz, no rejects, and src/include/ScanoutAlias.hpp and tests/ScanoutAlias.cpp exist afterwards. 0001 takes one offset (Hunk #1 succeeded at 1288 (offset 1 line)), but this PR does not touch 0001; its sha256 is unchanged. All four sha256sums in the PKGBUILD match the files (including 0005 1c26dd24...).

4. Other hardware. The package is arch=(aarch64), so x86_64 is not built. On other aarch64 GPUs, the alias needs a plane that lacks the X format and offers the A format, so a plane offering both, or only X, behaves as before (covered by the BOTH and OPAQUE_ONLY checks).

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 good() fixes), #486 (EDID log typo), #478 (recheckCRTCs() in applyCommit), #485 (drops a pendingAsyncCommit early return in commit()). They are merged upstream and apply cleanly, but the PKGBUILD comment and PR body don't say so. With the default AQ_FORCE_LINEAR_BLIT the multi-GPU allocation path is unchanged, but the good() change and the commit() change apply to every output. Either say so in the header comment, or regenerate 0005 against v0.16.0 with only the alias delta.

CI: build-isolation, check, recipes pass; self-tests was still pending and the package build job was waiting for approval when I looked.

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.
@joshuaswarren

Copy link
Copy Markdown
Contributor Author

[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 GBM.cpp, the three commit-time checks in DRM.cpp, ScanoutAlias.hpp, the FormatUtils.hpp include, the CMake test target and the self-check.

Checked:

  • A clean 0.16.0 tarball takes 0001, 0004 and 0005 in order. The patched GBM.cpp and DRM.cpp match my working tree byte for byte.
  • scanoutAlias passes on x86_64 and aarch64. GBM.cpp compiles on aarch64.
  • DRM.cpp was syntax-checked on aarch64 with a stub for the generated hwdata.hpp. The only error is the stub's missing PNPIDS, which is outside the patch.
  • PKGBUILD sha256 for 0005 is updated. bash -n PKGBUILD passes.

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.

@joshuaswarren

Copy link
Copy Markdown
Contributor Author

GREEN on a1eb1e3
Model: zai/glm-5.3

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).

@joshuaswarren

Copy link
Copy Markdown
Contributor Author

GREEN on a1eb1e3
Model: anthropic/claude-sonnet

All five points hold. Source and package review; I did not build the whole library with cmake or run hardware.

  1. Upstream hunks gone. 0005 is now 221 lines in 5 files (CMakeLists.txt, GBM.cpp, DRM.cpp, FormatUtils.hpp, plus the two new files). Searching the patch for MOD_LINEAR, white.x, pendingAsyncCommit, recheckCRTCs, attrs.success: 0 hits for each. So Add fix for swapped-out TTM resources never leaving their bulk_move range #484, Use -O3 build optimization flag for base and BORE kernels #486, Build hyprland-preview-share-picker with stable Rust #478 and Update Linux kernel release to v7.2.5-5 for base and BORE kernels #485 are out. GBM.cpp is down to the include plus the alias call, and DRM.cpp to the include and the three commit-time checks.
  2. Alias hunks unchanged. The added and removed lines of the new 0005 are a strict subset of f16c6ee's: nothing appears only in the new patch, and the lines only in the old one are exactly the upstream hunks above. The added lines of src/include/ScanoutAlias.hpp and tests/ScanoutAlias.cpp are byte-identical to f16c6ee (same md5 over each file's + lines).
  3. Apply and checksum. Clean 0.16.0 tarball (sha matches PKGBUILD). In prepare() order with patch -Np1: 0004 and 0005 apply with no offset, fuzz or reject; 0001 takes its usual 1-line offset (Hunk #1 succeeded at 1288; the PR does not touch 0001). The 0005 sha256 is c1a7f2025c0ee7e2d303141dad134fdc26b270d456549174611d69df3232d1cc, equal to the 4th PKGBUILD sum and to the claimed c1a7f202.
  4. Mutants. The self-check passes, also with -DNDEBUG -O2. It still fails under each of the four: no XR30/XB30 cases (line 52), no "plane already offers X" check (line 36), no cursor guard (line 43), no "alias must be offered" check (line 54).
  5. Compiles without the upstream commits. With the three patches applied to the pristine tarball, I compiled src/allocator/GBM.cpp and src/backend/drm/DRM.cpp to object files (zig's clang with libc++, C++23, x86_64, hyprutils and libdisplay-info headers from git, Debian gbm/pixman/libinput/libseat headers). Both compile with no errors. DRM.cpp needed three environment stand-ins that don't touch the patch: an empty PNPIDS for the generated hwdata.hpp, and two newer libdrm symbols (DRM_CAP_ATOMIC_ASYNC_PAGE_FLIP, drmModeCloseFB) that this box's libdrm 2.4.114 lacks. The alias code uses only things that exist in 0.16.0 (SDRMFormat, getRenderFormats(), STATE, params.scanout, the local CURSOR). This is not an aarch64 build or a link, and not the cmake path.

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: build-isolation, check, recipes passed on the earlier head; I did not re-read them for this one.

@joshuaswarren

Copy link
Copy Markdown
Contributor Author

[Joshua's agent] Pushed the head after a1eb1e3: comment-only change to the PKGBUILD header (it said 8 bpc; now 8 or 10 bpc). Patch files and sha256sums are unchanged from a1eb1e3, so the GREEN reviews on that head cover the same build inputs.

@joshuaswarren

Copy link
Copy Markdown
Contributor Author

GREEN on e285c15
Model: anthropic/claude-sonnet

The change is comment-only. The compare from a1eb1e3 is one commit ahead, none behind, and touches one file: pkgbuilds/aquamarine/PKGBUILD, +4 −4, all four lines in the header comment (the 8 bpc bullet now reads "8 or 10 bpc" and names XRGB2101010). No code line, pkgver, pkgrel, source or sha256sums line changed.

The patch files at this head hash as before: 0001 50e9e38f…eece7864, 0004 7fe7620c…42511a, 0005 c1a7f202…32d1cc. They equal the three patch entries in the PKGBUILD's sha256sums, and the tarball entry is unchanged. My a1eb1e3 review (patches, mutants, compile) still applies.

@joshuaswarren

Copy link
Copy Markdown
Contributor Author

GREEN on e285c15
Model: zai/glm-5.3

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).

@scottjones

Copy link
Copy Markdown
Contributor

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:

GBM: Failed to allocate a GBM buffer: format XR24 isn't supported by primary backend

The abort is in Render::IFramebuffer::alloc, called from Monitor::CMonitorResources::initFB. It failed on the first boot after I put edge's aquamarine and Hyprland back.

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.

allanclempe added a commit to allanclempe/omarchy-pkgs that referenced this pull request Nov 30, 2026
…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.
@allanclempe

Copy link
Copy Markdown
Contributor

@joshuaswarren this conflicts now that edge moved aquamarine to 0.16.0-1.2 for the boot splash (#3719). Scott would like this and #3854 (the Hyprland half, without which the fallback makes typed text flicker) to land and promote together, ahead of the hyprwm PRs he is opening. I have a rebase ready as 0.16.0-1.3: edge's 1.2 plus your 0005, unchanged (sha256 c1a7f202…), applied last with --fuzz=0; all six patches apply to the 0.16.0 tarball. The same patch set has run on a 16-inch M4 Max on macOS 27.2, and an M5 Air passed 6 of 6 boots with it. Will you rebase, or are you happy for me to push mine to my fork for you to take, or open it as a new PR crediting you? Once this lands, #2956 can close.

@joshuaswarren

Copy link
Copy Markdown
Contributor Author

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.

allanclempe added a commit to allanclempe/omarchy-pkgs that referenced this pull request Nov 30, 2026
…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.
allanclempe added a commit to allanclempe/omarchy-pkgs that referenced this pull request Nov 30, 2026
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.
@allanclempe

Copy link
Copy Markdown
Contributor

Thanks Joshua. It's up as #4217: edge's current 0.16.0-1.3 (with the new cursor patch) plus your 0005, unchanged, as 1.4, with you credited as co-author. #3854 moved to Hyprland -12 to land with it.

scottjones pushed a commit to scottjones/aquamarine that referenced this pull request Dec 1, 2026
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>
scottjones pushed a commit to scottjones/aquamarine that referenced this pull request Dec 1, 2026
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.
scottjones pushed a commit to scottjones/aquamarine that referenced this pull request Dec 1, 2026
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.

This branch has not been deployed

No deployments
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