Skip to content

Stop wf-recorder recordings on a still screen without force-killing them - #18551

Merged
omarchybot merged 1 commit into
quattrofrom
wf-recorder-no-damage
Nov 16, 2026
Merged

omarchybot merged 1 commit into
quattrofrom
wf-recorder-no-damage

Conversation

@omarchybot

Copy link
Copy Markdown
Collaborator

When Omarchy records with wf-recorder — on Apple Silicon, and wherever gpu-screen-recorder cannot start — stopping a recording while nothing on screen is changing takes over 5 seconds and ends in "Screen recording error: Recording process had to be force-killed. Video may be corrupted." The saved notification, its preview, the trim and the audio levelling are all skipped, and the video ends at the last change on screen rather than at the stop.

wf-recorder 0.6.0 acts on SIGINT only when its next frame arrives: the signal handler sets a flag, and the main loop is blocked waiting for the compositor. By default it asks only for frames that changed, and Hyprland sends none while the screen is still, so the stop never lands and stop_screenrecording kills it after 5 seconds. end_launched_recorder, which cancels a start, waits its 2 seconds and kills it the same way.

This launches wf-recorder with -D (--no-damage), which wf-recorder documents as continuously recording new frames, so a frame arrives on every refresh and the stop is read within one. The encoded rate stays at 60 fps through -r 60. The cost is that a still screen is captured and encoded like a moving one, which is what a moving screen already costs; gpu-screen-recorder already records at a constant rate. Once a wf-recorder that checks for the stop without waiting for a frame ships (soreau/wf-recorder#1 is one attempt), -D can go.

On a worker built from the Omarchy ISO (wf-recorder 0.6.0, Hyprland 0.57.2, gpu-screen-recorder unable to start), a full-screen recording left still for 10 seconds and then stopped: on quattro the stop took 5589 ms, the recorder was killed and the file held 0.13 s; with this change the stop took 345 ms, the recording saved normally and the file held 13.65 s.

Not fixed here: with the monitor off (DPMS) nothing is rendered, so even -D gets no frame and a stop still waits for the kill. #12469 reports the same notification for a different cause, slow muxing in gpu-screen-recorder; #15122 and #12559 address that one and combine with this.

Found by Prime's QA pass, whose diagnosis and approach this follows.

🤖 Generated by Opus 5.5 in Claude Code. Reviewed by Codex Medium and muse-wonder via pi, thinking high.

wf-recorder acts on SIGINT only when its next frame arrives, and by default it asks only for frames that changed, so on a still screen the stop waited 5 s, killed the recorder and warned the video may be corrupted. -D makes it capture every frame.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@greptile-apps

greptile-apps Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The change appears safe to merge.

Summary

Adds -D to wf-recorder so unchanged screens keep supplying frames, allowing the recorder to act on stop signals.

  • Still-screen recordings now stop without waiting for a changed frame.

Reviews (1) · Last reviewed commit: "Record every frame with wf-recorder so a..." · Reviewed by Greptile

@omarchybot
omarchybot merged commit 74dff35 into quattro Nov 16, 2026
3 checks passed
@omarchybot
omarchybot deleted the wf-recorder-no-damage branch November 16, 2026 07:45
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.

2 participants