Repository navigation
Description
Problem
When OBS ends up on a software renderer (Mesa llvmpipe/softpipe, Microsoft Basic Render Driver, SwiftShader), the UI does not tell you. Video is choppy and the user cannot see why. The only hint is a couple of lines in the log.
Proposal
Add a status-bar indicator light showing GPU acceleration state. Clicking it opens a dialog that explains the state.
| State | Criteria |
|---|---|
| GREEN | The active GL/D3D adapter is a hardware GPU. |
| YELLOW | A hardware GPU is present on the system (Linux: /sys/class/drm, PCI vendor 10de NVIDIA / 1002 AMD / 8086 Intel, a render node in /dev/dri; Windows: DXGI adapter enumeration), but the active adapter is a software renderer (llvmpipe, softpipe, Microsoft Basic Render Driver, SwiftShader). |
| RED (proposal) | No usable GPU and software rendering, or graphics init failed, or frames are far behind budget (e.g. obs_graphics_thread median > frame interval). |
Yellow dialog text, plainly: "Your GPU () was detected, but OBS is not using its driver. Rendering on the CPU (llvmpipe); expect choppy video." It also lists likely causes (sandbox/container missing the vendor EGL/GLX libs or the egl-wayland external platform config, a missing or mismatched driver, a /dev/dri render node that isn't accessible) and quotes the log lines that explain it (e.g. Unable to open DRM render node., Loading up OpenGL on adapter ..., libEGL warnings).
Also:
- Log a prominent warning at startup in the yellow and red cases.
- Expose the state through obs-websocket (a field in
GetStats, or a new vendor request) with the state, adapter name and detected GPUs, so tests can assert it.
Open questions
- Exact RED criteria: is software rendering with no GPU red, or yellow? Should frame-budget overrun be part of this light, or stay a separate signal? What threshold and window to use?
- Field name and shape in
GetStatsvs. a vendor request (protocol compatibility: additive fields only).
Motivation / evidence
Real investigation, 2026-10-15: NixOS 26.05, KDE Wayland, RTX 3060 + RTX 2080 Ti, driver 595.99.02, OBS-Studio-Rust 0.1.0-beta.20261014 launched through a Nix buildFHSEnv/bubblewrap wrapper.
- Log:
Unable to open DRM render node.thenLoading up OpenGL on adapter Mesa llvmpipe (LLVM 21.1.8, 256 bits). stderr:libEGL warning: pci id for fd 34: 10de:2504, driver (null)/egl: failed to create dri2 screen. libEGL_nvidiawas loaded, but NVIDIA's egl-wayland external platform was not found inside the sandbox, so Mesa claimed the Wayland display and fell back to llvmpipe. Stock OBS 32.1.2 on the same machine used the RTX 3060.- Impact:
obs_graphics_threadmedian 95 ms vs. a 33.3 ms budget, 2.1% of frames on time (~10 fps). perf shows 80.5% of CPU in 16 llvmpipe threads running JIT shaders. - Confirmed workaround:
__EGL_EXTERNAL_PLATFORM_CONFIG_DIRS=/run/opengl-driver/share/egl/egl_external_platform.dgives adapter NVIDIA RTX 3060, 30.00 fps, 1.3–3 ms render, 0 skipped frames. - The user had no idea why OBS was choppy, and nothing in the UI pointed to software rendering. That is the core problem this issue fixes.
- Reference report with flame graphs (private): https://claude.ai/artifact/86idqpedDE3sBXsK3XGQQ3
Testing (per docs/rust-port/testing-policy.md)
- Tier 1 (Rust unit tests): a pure classifier
classify(adapter_name, detected_devices, frame_stats) -> {Green, Yellow, Red}, with table tests for: NVIDIA/AMD/Intel adapter strings → green;llvmpipe/softpipe/Microsoft Basic Render Driver/SwiftShaderwith a10de/1002/8086device present → yellow; software adapter with no devices, or graphics init failure → red (per the resolved criteria). Device detection is parsed from a fake sysfs//dev/dritree fixture (host-specific probing lives insrc/platform/). - Tier 3 (differential): not applicable to the new classification. Confirm that existing libobs adapter-name reporting is unchanged against the C oracle.
- Tier 4 (black-box protocol): start headless OBS forced onto llvmpipe (
LIBGL_ALWAYS_SOFTWARE=1/GALLIUM_DRIVER=llvmpipe) and assert the state over obs-websocket (GetStatsor the vendor request) is not green. Assert the startup warning appears in the log. - Tier 2: existing C tests stay unchanged.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
zackees commentedon Oct 15, 2026
Claiming: GPU acceleration status light.
Plan (one PR each):
rust/obs-gpu-status: pureclassify(adapter, devices, frame_stats)plus device detection from a sysfs//dev/driroot (fixture-tested) andnvidia-smi --query-gpu=name,pci.device_id --format=csv,noheaderoutput parsing. Host probing lives insrc/platform/. Tier 1 only (new code, no C original). PR today.GetStatsfieldgpuAcceleration { state, adapter, detectedGpus }, with a Tier 4 test underLIBGL_ALWAYS_SOFTWARE=1.Decisions:
obs_graphics_threadtime over the supplied window is greater than the frame interval, as the proposal says. The window is whatever the caller passes in; PR 3 uses the last 300 frames.10de/1002/8086) with a render node, ornvidia-smilisting a GPU. The second covers sandboxes where sysfs is hidden but the NVIDIA tools are present.GetStatsfield rather than a vendor request. Decision needed only if maintainers want the vendor request instead; that affects PR 3 alone.zackees commentedon Oct 15, 2026
Research on NixOS / non-FHS hardware acceleration gaps: #891. Its main finding is that #722 fixed the driver configs, but driver libraries (
libcuda,libnvidia-encode,libwayland-client) still aren't on the loader path under nix-ld. When these fail, OBS falls back without saying so. The status light should detect each of these silent-fallback cases:GL_RENDERERmatches llvmpipe/softpipe/SwiftShader/Microsoft Basic Render Driver while/sys/class/drmshows PCI 10de/1002/8086 or a/dev/dri/renderD*exists. Today the only trace is a log line (libobs-opengl/gl-subsystem.c:277).libEGL_nvidianot loadable).libcuda.so.1orlibnvidia-encode.so.1fails to dlopen (obs-nvenc/cuda-load.c:15, obs-ffmpeg.c:262). Today the encoder just disappears from the list and simple mode falls back to x264.vaInitializefails or no VAAPI encoder gets registered, and OBS falls back to software x264.lvp) over a hardware ICD.For cases 3 to 5, the dialog should name the library that was missing and the path searched (on NixOS:
/run/opengl-driver/lib). I'd also suggest anOBS_REQUIRE_HW_GL=1opt-in that refuses to start on case 1, so CI and packagers can enforce hardware rendering.zackees commentedon Oct 15, 2026
Progress: the work is up as #890 (classifier), #894 (stacked on #890: light, dialog, startup warning,
GetStats.gpuAcceleration, Tier 4 test) and obs-rust/obs-websocket#14 (the GetStats field). I folded plan items 2–4 into #894 because they share one C ABI. The websocket data comes through aget_gpu_statusproc on the global proc handler, so no public header changes. Waiting on CI's full Ubuntu build.frontend: clang-format GpuStatus.cpp
obs-gpu-status: Move the frontend staticlib into obs-gpu-status-frontend
obs-gpu-status: Add failing tests for the status dialog text and JSON…
obs-gpu-status: Explain the state and expose it through a C ABI (GREEN)
test: Tier 4 check that GetStats reports GPU acceleration on llvmpipe…
frontend: Show GPU acceleration status in the status bar (GREEN)
frontend: clang-format GpuStatus.cpp
obs-gpu-status: Move the frontend staticlib into obs-gpu-status-frontend
docs: Tell workers how to take a feature issue with open questions (o…
test: Check the host driver search paths AppRun hands OBS (obs-rust#892…
obs-gpu-status: Classify GPU acceleration for the status light (1/4 of …
zackees commentedon Oct 15, 2026
Fixed by #890 (classifier), #894 (status-bar light and dialog, startup warning,
GetStats.gpuAcceleration, Tier 4 test) and obs-rust/obs-websocket#14. Worker docs for feature issues: #850.Left for follow-ups:
nvidia-smi).frontend: GPU acceleration status light, startup warning and GetStats…
docs: Describe the GPU acceleration status light, with a red-state mo…
obs-gpu-status: Extract median() and move the GL loader behind the pl…
frontend: Include dlfcn.h on Linux too in platform-x11.cpp
frontend: Fix the GPU light reading "OpenGL" as the adapter, and the …
obs-gpu-status: Add failing tests for quoting graphics log lines (RED)
ci: Run the Tier 4 GPU acceleration check on the Rust libobs Ubuntu b…
docs: Run the real app once before closing a user-facing feature (obs…
ci: Run the Tier 4 GPU acceleration check on the Rust libobs Ubuntu b…
requesthandler: Report GPU acceleration status in GetStats