Skip to content

obs-gpu-status: NVIDIA utilization through NVML (dlopen), matched by PCI bus ID #1021

Closed

Description

@zackees

Measured in #1004: NVML takes 0.68 ms per device, while spawning nvidia-smi takes 87 ms.

  • dlopen libnvidia-ml.so.1 (Linux) or nvml.dll (Windows), and resolve symbols by name.
  • Search /run/opengl-driver/lib on NixOS.
  • Use nvmlDeviceGetHandleByPciBusId_v2 and nvmlDeviceGetUtilizationRates, plus nvmlDeviceGetProcessUtilization for the tooltip.
  • Also replace the polling use of nvidia-smi.

Acceptance

  • RED → GREEN: with a fake symbol table, utilization maps to a percent; a missing library or symbol gives Unavailable without an error.
  • Manual run on a NixOS NVIDIA host shows a plausible percentage.

Decisions (defaults from #1004; edit if the maintainer disagrees)

Activity

  1. vpacher commented on Oct 17, 2026

    @vpacher
    Member

    Claiming: branch feat/gpu-nvml, on top of #1198 (it matches the device by the PCI address from #1194; on Windows by the DXGI LUID from #1198 through the NVML PCI info). I push it once #1194/#1195/#1198 are merged. Test host for the manual run: Debian 13 LXC container with an RTX 3060 (driver 595.104.02), not NixOS; the /run/opengl-driver/lib search path is covered by a fixture.

  2. added
    claimed
    on Oct 17, 2026
  3. vpacher commented on Oct 17, 2026

    @vpacher
    Member

    Status: everything in this issue is on master through #1233 (Refs #1021), except the NixOS run.

    I filed the NixOS run as #1349 so that someone with a NixOS NVIDIA host can take it. @zackees, can you close this issue if that is OK for you?

  4. zackees commented on Oct 17, 2026

    @zackees
    MemberAuthor

    Yes i do have NixOS and yes I will run it. i'll be setting up an SOS nightly soon so we can get continuous coverage.

    🫡

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