phase0: reorder priority — kwin-fourier A/B first, smoking gun identified
User runs kwin-fourier with active patch 0001-transaction-bypass-watchDmaBuf-fence-wait.patch — this bypasses KWin's implicit-sync fence wait on dmabufs. If KWin samples a hantro CAPTURE buffer before the decoder fence signals, it gets all-zeros NV12 which renders solid green in YUV→RGB. This is the most likely cause and is decisively testable via a stock-kwin A/B (item 1). Hypothesis: pre-iter5 the libva path was masked because vaSyncSurface provided ordering. iter6/7 may have changed that. Both libva and ffmpeg-v4l2request paths now expose the lack of fence-wait. Run-history breadcrumb (#51 introduce, #58 switch to 0002, #59 revert to 0001) recorded in the findings doc. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
+18
-6
@@ -55,19 +55,31 @@ Result #3 is the workaround currently in use. The campaign closes when result #1
|
||||
|
||||
## Phase 0 will deliver
|
||||
|
||||
1. **vaExportSurfaceHandle modifier capture** — small C harness in `phase0_evidence/<date>/va_modifier_probe.c` linked against libva, prints the DRM_PRIME_2 descriptor for a freshly-allocated NV12 surface on ohm. Captured output goes to `phase0_evidence/<date>/va_modifier_capture.md`.
|
||||
> **Priority reordered 2026-05-08** after the active kwin-fourier patch was identified as `0001-transaction-bypass-watchDmaBuf-fence-wait.patch` — a runtime-observable smoking gun (`watchDmaBuf` bypasses the implicit-sync fence wait, meaning KWin samples dmabufs without waiting for the producer fence; an all-zeros NV12 buffer renders solid green in YUV→RGB conversion). Stock-kwin A/B is the decisive single-step isolation.
|
||||
|
||||
2. **AVDRMFrameDescriptor modifier capture** — small C harness using ffmpeg's `av_hwframe_transfer_data` against a /dev/media0 + /dev/video1 hwdevice context, prints the modifier ffmpeg reports. Output to `phase0_evidence/<date>/av_modifier_capture.md`.
|
||||
1. **Stock-kwin A/B (was item 5)** — pin back to `extra/kwin` (drops kwin-fourier patches), restart compositor, re-run reproduction. If green clears → the campaign's iter1 narrows to `0001-transaction-bypass-watchDmaBuf-fence-wait.patch`. Output to `phase0_evidence/<date>/kwin_fourier_ab.md`.
|
||||
|
||||
3. **Wayland linux-dmabuf-v1 advertised list** — `wayland-info` snapshot + `WAYLAND_DEBUG=1 mpv ...` excerpt showing the negotiation. Output to `phase0_evidence/<date>/kwin_dmabuf_advertise.md`.
|
||||
2. **vaExportSurfaceHandle modifier capture** — small C harness in `phase0_evidence/<date>/va_modifier_probe.c` linked against libva, prints the DRM_PRIME_2 descriptor for a freshly-allocated NV12 surface on ohm. Captured output goes to `phase0_evidence/<date>/va_modifier_capture.md`. (Less urgent if item 1 already isolates the cause, but useful as parallel data.)
|
||||
|
||||
4. **Pacman upgrade timeline review** — `journalctl _COMM=pacman` or `cat /var/log/pacman.log | awk '$1>="[2026-05-05"'` on ohm to see what changed between iter5 close and now. Output to `phase0_evidence/<date>/pacman_upgrade_window.md`.
|
||||
3. **AVDRMFrameDescriptor modifier capture** — small C harness using ffmpeg's `av_hwframe_transfer_data` against a /dev/media0 + /dev/video1 hwdevice context, prints the modifier ffmpeg reports. Output to `phase0_evidence/<date>/av_modifier_capture.md`.
|
||||
|
||||
5. **Stock-kwin A/B** — temporarily swap `kwin-fourier` for stock arch `kwin`, re-run reproduction, capture result. Output to `phase0_evidence/<date>/kwin_fourier_ab.md`.
|
||||
4. **Wayland linux-dmabuf-v1 advertised list** — `wayland-info` snapshot + `WAYLAND_DEBUG=1 mpv ...` excerpt showing the negotiation. Output to `phase0_evidence/<date>/kwin_dmabuf_advertise.md`.
|
||||
|
||||
5. **Pacman upgrade timeline review** — `journalctl _COMM=pacman` or `cat /var/log/pacman.log | awk '$1>="[2026-05-05"'` on ohm to see what changed between iter5 close and now. Output to `phase0_evidence/<date>/pacman_upgrade_window.md`. (Useful to confirm kwin-fourier 0001 was already active at iter5 close — if so, the regression is somewhere else.)
|
||||
|
||||
6. **Compositor A/B (optional)** — if items 1-5 don't conclude, swap compositor (sway via TTY login session) and capture. Output to `phase0_evidence/<date>/compositor_ab.md`.
|
||||
|
||||
Items 1-2 are decoder-side captures (~30 min each). Items 3-4 are 5 min each. Items 5-6 are bigger because they require login-session swaps.
|
||||
Item 1 is ~10 minutes (downgrade + re-login + retest). Items 2-3 are decoder-side captures (~30 min each). Items 4-5 are 5 min each. Item 6 is bigger because it requires login-session swaps.
|
||||
|
||||
## kwin-fourier 0001 patch context (2026-05-08)
|
||||
|
||||
Active patch: `0001-transaction-bypass-watchDmaBuf-fence-wait.patch` in `~/src/marfrit-packages/arch/kwin-fourier/`. Run-history breadcrumb:
|
||||
|
||||
- run #51 (`84088141`, 2026-05-04): introduced as `kwin-fourier: bypass watchDmaBuf implicit-sync fence wait (experiment)`.
|
||||
- run #58 (`00aa186b`, 2026-05-04): switched active patch to `0002-transaction-poll-dmabuf-fd-directly-upstream-shape.patch`.
|
||||
- run #59 (`bc2c97d1`, 2026-05-04): reverted active patch to `0001`, bumped pkgrel=2.
|
||||
|
||||
The hypothesis if stock-kwin clears the green: the bypass introduced a subtle race where the dmabuf is sampled before the v4l2 stateless decoder's CAPTURE buffer has been written. Pre-iter5, this may have been masked because mpv's `--hwdec=vaapi` with libva-multiplanar produces buffers with explicit `vaSyncSurface` calls that block until decode-complete (libva's API contract is "buffer is valid after vaSyncSurface returns"). But the same buffers via `--hwdec=v4l2request` go through ffmpeg's `AVDRMFrameDescriptor` path which doesn't hit `vaSyncSurface` — and the implicit fence (which kwin-fourier 0001 ignores) is the only ordering primitive left. So the green showing up on **both** paths simultaneously is consistent with the hypothesis only if the libva path also somehow lost its sync, which is plausible if iter6/7 changed the libva-multiplanar `vaSyncSurface` implementation. Worth checking.
|
||||
|
||||
After Phase 0 closes, Phase 1 will reproduce on a controlled test rig (probably `mpv -v` with WAYLAND_DEBUG=1, deterministic frame count, structured output capture) so Phase 4's fix attempt has a clean signal-to-noise environment.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user