Skip to content

Show why a screen recording failed to start, in the recorder's own words - #19094

Closed
omarchybot wants to merge 4 commits into
quattrofrom
screenrecording-start-error
Closed

omarchybot wants to merge 4 commits into
quattrofrom
screenrecording-start-error

Conversation

@omarchybot

@omarchybot omarchybot commented Nov 16, 2026 •

Copy link
Copy Markdown
Collaborator

When no recorder came up, omarchy-capture-screenrecording exited 0 and said nothing: the recorder's stderr went to /dev/null unless OMARCHY_SCREENRECORD_DEBUG=true was already set, which nobody sets before the first failure. A recording that never starts looked exactly like a keybinding that does nothing.

Now a start that fails tries once more by itself with the debug log on, and shows what the recorder actually said there under a translated "Screen recording failed to start" title, then exits 1. On a machine where gpu-screen-recorder cannot use the GPU, the notification reads:

gsr error: your opengl environment is not properly setup. It's using llvmpipe (software rendering) for opengl instead of your graphics card. Please make sure your graphics driver is properly installed
gsr error: failed to load opengl

The text is the first lines each recorder wrote to the log that read as an error, with colour codes, carriage-return progress and warnings (Mesa's EGL chatter, gsr's info lines) dropped, at most two lines and 300 characters per recorder. Where wf-recorder was tried too, each line is prefixed with the recorder it came from; a recorder that printed nothing is named as giving no error message. The second try's output stays in $XDG_RUNTIME_DIR/omarchy-screenrecord.log, so a bug report has a log to attach without anyone having known to turn debugging on.

  • If the second try succeeds, the recording simply proceeds: whatever failed the first time did not fail again, and there is nothing to report. That recorder keeps writing to the debug log, as it would in debug mode.
  • A cancel is never retried or reported, and exits 0: escaping the picker, a toggle while the start is under way or while it is failing, and dismissing the portal picker (gpu-screen-recorder exits 60 for that, PORTAL_CAPTURE_CANCELED_BY_USER_EXIT_CODE). The failure is reported only after the start marker is removed and no cancel is pending, the same handoff a successful start uses, and no recorder is launched once a cancel has arrived.
  • A wf-recorder start that drops an unavailable audio source gives its "Recording without … audio" notice on each try. The shell folds an identical notice within two seconds into the card already showing, so a second one appears only when the tries are further apart, as when a recorder times out; holding the retry's notices back could hide a source that failed only the second time.
  • A start that times out (a recorder that runs but never writes its file) now waits its timeout twice before reporting.

Replaces #7189, which notified with a generic message asking the user to set OMARCHY_SCREENRECORD_DEBUG and retry themselves. The guard that keeps a cancel silent before notifying, the title, and exiting 1 on a real failure come from #18803 by ThePrimeagen; the failure notification itself was first proposed in #7189 by Literato2. #18027 reports one cause of the same failure (a missing VAAPI driver) from a bounded stderr capture; this reports whatever the recorder says, that included.

🤖 Generated by Claude Opus 5.5 in Claude Code. Reviewed by Codex Medium.

When no recorder comes up, the start now tries once more with the OMARCHY_SCREENRECORD_DEBUG log on, takes the first lines each recorder wrote there that read as an error, and shows them under a translated "Screen recording failed to start" title, exiting 1. A cancel (picker escape, a toggle during the start or while it fails, the portal picker dismissed) stays silent, exits 0 and is never retried. The failure is reported only after the start marker is gone and no cancel is pending, the same handoff a successful start uses, and the retry repeats no audio-unavailable notice.

Co-authored-by: ThePrimeagen <the.primeagen@gmail.com>
Co-authored-by: juanitoclavel <juanitoclavel@gmail.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Codex Medium <noreply@openai.com>
@greptile-apps

greptile-apps Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; both previous findings are fixed and no new actionable issues were found.

Summary

The PR retries failed recording starts with logging enabled, then shows the recorder's error and exits 1 if recording still cannot start.

  • Failed screen recordings now show what the recorder said.

Reviews (2) · Last reviewed commit: "Let each try give its own audio notice a..." · Reviewed by Greptile

Comment thread bin/omarchy-capture-screenrecording Resolved
Comment thread bin/omarchy-capture-screenrecording Resolved
omarchybot and others added 3 commits November 16, 2026 09:14
When nothing a recorder wrote reads as an error, the notification took its last line as written, which could be Mesa's EGL warning or gsr's fps info line. Drop those before either branch, so such a recorder is named as giving no error message instead.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
The second try of a failed start silenced every "Recording without audio" notice, so a loopback that loaded the first time and failed the second, possibly a whole recorder timeout later, recorded without that source and never said so. Remember which sources were reported instead.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Codex Medium <noreply@openai.com>
wf_audio_device runs in a command substitution, so the sources it remembered reporting never reached the next try, and silencing the whole retry instead could hide a loopback that failed only the second time. The shell already shows identical notifications within two seconds once, so a second notice is visible only when a recorder timeout separates the tries. Leave wf_audio_unavailable as it was.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Codex Medium <noreply@openai.com>
@omarchybot

Copy link
Copy Markdown
Collaborator Author

Closing: the maintainer would rather fix the reasons recordings fail to start than add retry-and-report machinery around the start. Those causes are being collected from the reported failures and will be fixed directly.

@omarchybot omarchybot closed this Nov 16, 2026
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