Skip to content

fix: keep monitor screencasts alive while the output is gone - #12

Merged
Fi3w0 merged 2 commits into
masterfrom
fix/screencast-output-off
Oct 28, 2026
Merged

Fi3w0 merged 2 commits into
masterfrom
fix/screencast-output-off

Conversation

@Fi3w0

@Fi3w0 Fi3w0 commented Oct 28, 2026

Copy link
Copy Markdown
Owner

Stacked on #11. This branch includes the Smithay migration commit, so merge #11 first. After that, this PR reduces to one commit.

Bug: on native .198, OBS capture of HDMI-A-2 broke after that monitor was powered off.

  • Session log: Output disconnected at 01:59:29. OBS's stream went streaming → paused at the same second and stayed there, and the tidewm-screencast-HDMI-A-2 node was gone.
  • Cause: when the named output was missing, the compositor-side FrameRequested handler closed the FrameTarget. The PipeWire worker then removed its node, but the portal session was never told. That left the consumer holding a dead stream that a returning monitor could not revive.
  • Not caused by the migration: this is TideWM's own screencast code.

Fix, behaviour chosen by Fiw: keep the stream and resume.

  • A missing output now calls FrameTarget::skip(). It clears the pending flag and keeps the last frame.
  • The node stays, the SHM path keeps publishing the held frame, and each process cycle re-requests by connector name. Capture resumes on its own when the monitor returns.
  • If the monitor returns at a different mode, the existing size check still ends the stream.

Validation:

  • New test: skipped_frame_keeps_last_picture_and_allows_a_new_request.
  • Formatting, 708 locked all-feature/all-target serial tests, strict Clippy and the locked release build pass.
  • Native power-off/on retest still owed.

Fi3w0 added 2 commits October 28, 2026 02:04
Powering off a captured monitor closed the frame target, so the
PipeWire worker removed its node while the portal session stayed open,
leaving OBS on a dead stream that a returning monitor could not revive.

A missing output now skips the frame instead: the node stays, the last
frame keeps being published, and each cycle re-requests by connector
name, so capture resumes when the monitor returns. A different mode on
return still ends the stream through the existing size check.
@Fi3w0
Fi3w0 merged commit 368cb35 into master Oct 28, 2026
1 check passed
@Fi3w0
Fi3w0 deleted the fix/screencast-output-off branch October 28, 2026 01:35
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.

1 participant