fix: fail on refused portal requests and catch black recordings
Rust checks / windows-cross-check (push) Failing after 40s
Rust checks / linux (push) Failing after 5m38s

The portal reports refusals only in OBS's log; a denied, cancelled or failed
source selection now fails with an actionable reason instead of waiting
forever. check --expect-motion rejects black or frozen footage, and the
hardware script checks only runs that recorded, tests restore tokens in their
own step, and treats closing a window as informational: on Hyprland the
stream keeps its last frame, so sessions must end on game exit.
This commit is contained in:
2026-10-08 15:01:25 +02:00
parent 91f119e6b6
commit 06377de707
7 changed files with 208 additions and 83 deletions
+33 -2
View File
@@ -9,7 +9,7 @@ pass/fail results.
| Where | Script | Status |
| --- | --- | --- |
| Linux, headless rig (Wayland portal + Xwayland) | `scripts/validate/linux-rig.sh` | All 9 scenarios pass on devbox (Intel UHD 770, VA-API) |
| Linux, real session (CachyOS, Hyprland, RX 9070 XT, 1440p60) | `scripts/validate/linux-hardware.sh` | Not run yet |
| Linux, real session (CachyOS, Hyprland, RX 9070 XT, 1440p60) | `scripts/validate/linux-hardware.sh` | First run 2026-10-08: H.264, HEVC and AV1 all usable; restore token still to confirm |
| Windows (Game Capture, NVENC/AMF/QSV) | `scripts/validate/windows.ps1` | Not run yet; script untested |
## Probe commands
@@ -45,7 +45,11 @@ The suite covers:
3. X11 window capture (Xcomposite).
4. Failures that must end in `status=failed`: PipeWire stream lost, captured
X11 window closed, segment directory unwritable, free space below the margin.
5. A portal that grants no usable source never reports `Recording`.
5. A portal that refuses the request fails with an actionable reason and
never reports `Recording`.
Segment checks run with `--expect-motion`, so black or frozen footage (which
still makes valid segments) fails.
## Linux hardware sign-off
@@ -55,6 +59,24 @@ shows the portal picker; later runs pass the restore token and ask whether the
picker stayed away), records a window, and asks you to close a window
mid-recording. Send back `report.txt` from the output directory.
### First hardware run (2026-10-08)
CachyOS 7.2.9, Hyprland, RX 9070 XT, 1440p60, OBS 32.0.4:
- H.264, HEVC and AV1 all encode through VA-API (`*_ffmpeg_vaapi_tex`).
Monitor and window capture recorded keyframe-aligned 2 s segments that
remuxed across boundaries with no decode errors.
- The restore token came back on one of three runs, probably because the
"Allow a restore token" box in the picker was ticked only once. The script
now has a dedicated restore step.
- One run never got a portal selection: the picker either did not appear or
was not answered, and the probe stayed in `Waiting for capture` for 20 s
while writing black segments that `check` passed. `check --expect-motion`
now catches black footage; a refused request now fails at once.
- Closing the captured window (Super+W) is not visible to capture: xdph keeps
the PipeWire stream `streaming` and OBS repeats the window's last frame.
See findings.
## Windows
Run `scripts/validate/windows.ps1 -GameWindow "<title>:<class>:<exe>"` with a
@@ -102,6 +124,15 @@ Windows status:
its last frame after the stream stops, and only logs the stream state. The
engine reads that log line (stable for the pinned OBS version). A more robust
follow-up is watching the PipeWire node state directly.
- **Closed windows on Wayland.** With Hyprland's portal, closing a captured
window leaves the stream running on its last frame, with no state change or
error. Capture cannot tell this apart from a static window, so sessions must
end from game process exit (SPEC: "Stop/finalise the session when its game
exits"), which the Steam/process detection milestone provides.
- **Writing while waiting for capture.** The output starts before the source
has a picture, so a source that never arrives produces black segments. The
session timeline should show that time as missing footage, or the output
should start only once capture is usable.
- **Audio capture failures are not detected yet.** When the PulseAudio server
was unreachable, recording continued with a silent track.
- **Linux runtime dependencies.** The Linux OBS build links the system's