Skip to content

frontend: GPU acceleration status light, startup warning and GetStats field (#846) - #894

Merged
zackees merged 6 commits into
masterfrom
fix/846-gpu-status-ui
Oct 15, 2026
Merged

zackees merged 6 commits into
masterfrom
fix/846-gpu-status-ui

Conversation

@zackees

@zackees zackees commented Oct 15, 2026 •

Copy link
Copy Markdown
Member

Completes #846 on top of the classifier in #890.

What it adds

  • Dialog text and JSON (rust/obs-gpu-status/src/report.rs). Each state gets a plain-words summary, e.g. "Your GPU (NVIDIA GeForce RTX 3060) was detected, but OBS is not using its driver. Rendering on the CPU (llvmpipe …); expect choppy video." It also lists likely causes: a sandbox missing EGL/egl-wayland, a missing or mismatched driver, an inaccessible /dev/dri.
  • C ABI obs_gpu_status_report / obs_gpu_status_free (frontend/utility/obs-gpu-status.h). The GPU probe runs once per process, since nvidia-smi is too slow for every refresh.
  • Frontend. A status-bar light (GPU plus a colored dot, refreshed every 5 s). Clicking it opens a dialog with the summary, active adapter, detected GPUs and causes. Startup logs ==== GPU acceleration: YELLOW/RED ==== with the details. The crate is linked into the frontend only when ENABLE_RUST_LIBOBS=ON, like obs-nvenc-plugin, so libobs' exported symbols do not change. OFF builds show no light.
  • obs-websocket (submodule bump to requesthandler: Report GPU acceleration status in GetStats obs-websocket#14). Adds the field GetStats.gpuAcceleration, read from the get_gpu_status proc on the global proc handler, so no public header changes. The field is null when nothing provides it. It is additive; no existing field changes.

Tests

  • Tier 1: 21 tests. RED 6ef766d (7 report tests failing on stubs), then GREEN. ffi round-trip tests are included.
  • Tier 4 RED (test: Tier 4 check …): test/websocket-tier4 starts OBS with LIBGL_ALWAYS_SOFTWARE=1 GALLIUM_DRIVER=llvmpipe. It asserts gpuAcceleration is present, has the documented shape and is not green, and that the log carries the startup warning. When the field is null (OFF build) it only asserts the key is present. It is not wired into CI, as before.
  • Tiers 2 and 3: no C sources or headers ported or changed.
  • Not verified locally: the frontend C++ build and the Tier 4 run, because this machine has no Qt build environment. This PR relies on CI's full Ubuntu (Rust) build.

Known limits

  • libobs exposes only the average frame time, so the frame-budget check uses that instead of the median.
  • Windows GPU detection uses nvidia-smi only; DXGI enumeration is a follow-up.
  • The summary text is English; the light's tooltip and dialog labels are localized.

Fixes #846

@zackees zackees added the ci-full Run every CI job on this PR, including the release-gating OBS app builds and Flatpak label Oct 15, 2026
Report::new() adds the dialog's summary and likely causes; to_json() is
the gpuAcceleration object. obs_gpu_status_report()/obs_gpu_status_free()
are the frontend's C ABI; the crate also builds as a staticlib.

Refs #846
… (RED)

Starts OBS with LIBGL_ALWAYS_SOFTWARE=1 and asserts GetStats'
gpuAcceleration is not green and the log carries the startup warning.
Fails until the frontend and obs-websocket provide the field.

Refs #846
A status-bar light (green/yellow/red, refreshed every 5 s) opens a dialog
with the summary, active adapter, detected GPUs and likely causes from
rust/obs-gpu-status. Startup logs 'GPU acceleration: YELLOW/RED' with
the details, and the get_gpu_status proc feeds obs-websocket's new
additive GetStats.gpuAcceleration field (submodule bump). The crate is
linked into the frontend only with ENABLE_RUST_LIBOBS=ON, like
obs-nvenc-plugin, so libobs' exports do not change.

Refs #846
An rlib + staticlib crate breaks its own test build (#592), as on macOS
CI here; obs-gpu-status stays a plain rlib, like obs-nvenc.

Refs #846
@zackees
zackees force-pushed the fix/846-gpu-status-ui branch from 8c57ad8 to 451fe1f Compare October 15, 2026 21:40
@zackees
zackees marked this pull request as ready for review October 15, 2026 22:13
@zackees
zackees added this pull request to the merge queue Oct 15, 2026
Merged via the queue into master with commit 74f31f2 Oct 15, 2026
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci-full Run every CI job on this PR, including the release-gating OBS app builds and Flatpak

Projects

None yet

Development

Successfully merging this pull request may close these issues.

frontend: GPU acceleration status light (green/yellow/red) in the status bar

1 participant