Skip to content

frontend: Quote the graphics log lines in the GPU status dialog (#944) - #963

Merged
zackees merged 3 commits into
masterfrom
feat/944-gpu-log-lines
Oct 16, 2026
Merged

zackees merged 3 commits into
masterfrom
feat/944-gpu-log-lines

Conversation

@zackees

@zackees zackees commented Oct 16, 2026

Copy link
Copy Markdown
Member

Fixes #944 (part of #939).

#846 asked the dialog to quote the log lines that explain a yellow or red state. Until now it only listed generic causes.

Change

  • LogCapture (Rust, Tier 1): keeps up to 10 deduplicated OBS log lines, each at most 300 characters, matching loading up opengl, loading up direct3d, drm render node, egl, glx, failed to initialize video or graphics module (case-insensitive).
  • C ABI: obs_gpu_status_log_line(line). The frontend's do_log() offers every formatted line, and the report carries them as logLines.
  • Dialog: a new From the log: section, with the label from en-US.ini.
  • Tier 4: the GPU check now requires logLines to contain Loading up OpenGL on adapter ….
  • Limit: libEGL's own warnings go to stderr, not the OBS log, so they cannot be quoted.

RED → GREEN

  • RED (Add failing tests for quoting graphics log lines): 3 tests fail on todo!().
  • GREEN: all obs-gpu-status tests pass, plus a C-ABI test showing a logged Unable to open DRM render node. reaches logLines. Clippy and the platform-ifdef ratchet pass, and GpuStatus.cpp compiles cleanly with -Wall.

This overlaps #960 (#943) in ffi/mod.rs and GpuStatus.cpp. Whichever merges second gets rebased.

@zackees
zackees enabled auto-merge October 16, 2026 01:52
@zackees
zackees force-pushed the feat/944-gpu-log-lines branch from e383bba to 1d46931 Compare October 16, 2026 02:21
@zackees
zackees added this pull request to the merge queue Oct 16, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to a conflict with the base branch Oct 16, 2026
@zackees

zackees commented Oct 16, 2026

Copy link
Copy Markdown
Member Author

Rebased on master after #960 (frame window + 3-argument report). Review fixes added:

  • The light's own startup warning lines (possible cause:, detected GPU:, GPU acceleration:) are no longer quoted back.
  • EGL and GLX now match only as whole words or API call names, so Negligible and regleg don't match.
  • The capture keeps the last 10 lines, not the first 10.
  • Lines are filtered before taking the lock, and do_log only offers lines at info level or above.

Each fix has a test that failed first.

@zackees
zackees force-pushed the feat/944-gpu-log-lines branch from 1d46931 to 299b943 Compare October 16, 2026 06:03
@zackees
zackees enabled auto-merge October 16, 2026 06:03
("Unable to open DRM render node.", the adapter line, EGL errors).

Refs #944
LogCapture keeps up to 10 OBS log lines about the adapter, DRM render
nodes, EGL/GLX and video init. The frontend's log handler offers each
line through obs_gpu_status_log_line(); the report carries them as
logLines and the dialog shows them under "From the log:". The Tier 4
GPU check requires the adapter line.

Fixes #944
Review findings: the light's own startup warning (causes mention EGL and
the DRM render node) was captured back; a bare "egl" substring matched
names like 'Negligible'; the first 10 matches won, so a late failure was
dropped; and every line was matched inside the lock, debug lines too.
Now the light's own lines are skipped, EGL/GLX match as words or API
call names, the last 10 lines are kept, filtering happens before the
lock, and do_log only offers lines it logs (info and above).

Refs #944
@zackees
zackees force-pushed the feat/944-gpu-log-lines branch from 299b943 to a6e01ca Compare October 16, 2026 06:04
@zackees

zackees commented Oct 16, 2026 •

Copy link
Copy Markdown
Member Author

Correction: the head here is a6e01ca, which another session had already rebased with the same three commits. My push of an equivalent rebase was correctly refused, so nothing of mine landed on this branch.

Checked locally on an equivalent rebase:

  • RED ("Add failing tests"): tests/log_lines.rs, 3 failures.
  • GREEN: soldr cargo test -p obs-gpu-status passes.

@zackees
zackees added this pull request to the merge queue Oct 16, 2026
@zackees
zackees removed this pull request from the merge queue due to a manual request Oct 16, 2026
@zackees
zackees merged commit cdca18d into master Oct 16, 2026
23 checks passed
@zackees
zackees deleted the feat/944-gpu-log-lines branch October 26, 2026 15:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

feat: GPU status dialog quotes the log lines that explain the state

1 participant