Skip to content

frontend: GPU status runs nvidia-smi (~40 ms) on the startup path #1172

Closed

Description

@zackees

Problem

GpuStatus::Init() (after ResetVideo) calls obs_gpu_status_report, whose first call probes the system's GPUs: sysfs plus a nvidia-smi --query-gpu=... subprocess. Measured with timing around the call: 40 ms on the startup path, every launch (2× NVIDIA, KDE Wayland). Later reports reuse the OnceLock.

Fix

Start the probe on a thread at the top of OBSApp::AppInit (obs_gpu_status_prefetch()), half a second before the first report needs it. The cache (DeviceCache in rust/obs-gpu-status) keeps one probe per process: a report that arrives while the prefetch is still probing waits for it instead of probing again. Report contents do not change.

Tier 1: tests/gpu_status/device_cache.rs (RED, then GREEN).

Activity

  1. zackees commented on Oct 17, 2026

    @zackees
    MemberAuthor

    Claiming: branch fix/gpu-status-prefetch.

  2. added
    claimed
    on Oct 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    claimed

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions