Skip to content

test: Manual NVML GPU utilization run on a NixOS NVIDIA host #1349

Closed

Description

@vpacher

Follow-up of #1021. Help wanted: needs a NixOS host with an NVIDIA GPU.

#1233 added NVML as the GPU utilization source. On Linux it loads libnvidia-ml.so.1, then /run/opengl-driver/lib/libnvidia-ml.so.1 (NixOS). A test asserts that the NixOS path is in the candidate list (rust/obs-gpu-status/tests/gpu_status/nvml.rs), but nobody has run it on NixOS yet. The manual run so far was on Debian 13 (LXC, RTX 3060, driver 595.104.02).

To do

  1. Build current master on NixOS with an NVIDIA GPU (the library must not be on the default loader path).
  2. Run cargo run -p obs-gpu-status --example probe --release -- /dev/dri/renderD128 (use your render node), or start OBS and look at the GPU: x% label.
  3. Compare the percentage with nvidia-smi (nvidia-smi pmon or --query-gpu=utilization.gpu) under load.

Acceptance

  • NVML loads from /run/opengl-driver/lib (no Unavailable), and the percentage is plausible against nvidia-smi. Post the probe output and the nvidia-smi values here.

Activity

  1. zackees commented on Oct 23, 2026

    @zackees
    Member

    Claiming: #1349. I have a NixOS host with an RTX 3060 and an RTX 2080 Ti (driver 595.99.02); libnvidia-ml.so.1 is only in /run/opengl-driver/lib, not on the loader path. I'll post the probe and the nvidia-smi comparison today.

  2. added
    claimed
    on Oct 23, 2026
  3. zackees commented on Oct 23, 2026

    @zackees
    Member

    Ran on NixOS: master e288a22ae, NVIDIA driver 595.99.02, two GPUs. RTX 3060 on renderD128 (06:00.0) is running a steady external load; RTX 2080 Ti on renderD129 (07:00.0) is idle. ldconfig -p has no libnvidia-ml; the library is only in /run/opengl-driver/lib.

    Loader (LD_DEBUG=libs): the bare libnvidia-ml.so.1 lookup misses the default paths, then the fallback loads /run/opengl-driver/lib/libnvidia-ml.so.1.

    Probe (soldr cargo build -p obs-gpu-status --example probe --release): each round ran the probe once on each node, then nvidia-smi --query-gpu=index,utilization.gpu right after.

    round renderD128 probe (2 samples) GPU 0 nvidia-smi renderD129 probe GPU 1 nvidia-smi
    1 40, 33 (Nvml) 34 % 0, 0 (Nvml) 0 %
    2 33, 43 (Nvml) 33 % 0, 0 (Nvml) 0 %
    3 36, 37 (Nvml) 37 % 0, 0 (Nvml) 0 %

    Every sample reports source: Nvml (never Unavailable). The values match nvidia-smi within NVML's sampling-window jitter, and each render node maps to the right PCI device on a two-GPU system. Sample latency: ~20-40 µs on the loaded GPU, ~2 ms on the idle one.

    Both acceptance points are met, so I'm closing this.

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