Skip to content

test(appimage): NixOS lane checks OBS loads NVML from /run/opengl-driver (#1028) - #1971

Merged
zackees merged 1 commit into
masterfrom
test/1028-appimage-nvml
Oct 23, 2026
Merged

zackees merged 1 commit into
masterfrom
test/1028-appimage-nvml

Conversation

@zackees

@zackees zackees commented Oct 23, 2026

Copy link
Copy Markdown
Member

Fixes #1028. Follow-up for the FHS lanes: #1970.

CI runners have no NVIDIA GPU, so this adds a stand-in libnvidia-ml.so.1 (build-aux/appimage/fake-nvml.c). It exports the three functions crate::nvml requires, and its nvmlInit_v2 records the path it was loaded from in $OBS_TEST_NVML_MARKER. The NixOS lane (test-appimage-nixos.sh) now makes /run/opengl-driver a directory of links into Mesa instead of a single link, builds the stand-in into /run/opengl-driver/lib with nixpkgs' gcc, and fails unless OBS (through appimageTools.wrapType2) loaded NVML from there. OBS's usage sampler calls nvml() on every sample whatever the adapter is, so this works with no GPU.

Evidence

Run locally in CI's pinned nixos/nix image against the released OBS-Studio-Rust-0.1.0-beta.20261023-linux-x86_64.AppImage:

  • GREEN (this script): OBS after 45 s: running / NVML: loaded from /run/opengl-driver/lib / NixOS: OBS AppImage started through appimageTools.wrapType2. Exit 0.
  • RED (same script, stand-in built into /run/opengl-driver/lib64, i.e. not one of the candidates; that is the same as removing the /run/opengl-driver/lib entry from LINUX_CANDIDATES): ::error::OBS's GPU usage sampler did not load NVML from /run/opengl-driver/lib (not loaded). Exit 1.

fdinfo: the fdinfo source (#1023) is not wired into the sampler yet (rust/obs-gpu-status/src/platform/mod.rs), so there is no packaged fdinfo read to check. That assertion belongs with the PR that wires it in.

The NixOS lane runs on master pushes and platform_tests dispatches, not from a PR path (appimage.yaml test-nixos), so the local run above is its evidence for this PR. Not user-visible, so no features.md line.

…ver (#1028)

The NixOS lane now makes /run/opengl-driver a directory of links into Mesa
and builds a stand-in libnvidia-ml.so.1 (fake-nvml.c) into its lib/. The
stand-in's nvmlInit_v2 records the path it was loaded from. The lane fails
unless OBS's GPU usage sampler loaded it from /run/opengl-driver/lib, the
only copy on a NixOS host.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

test: Sandbox smoke for GPU utilization sources (AppImage, Flatpak, Nix)

1 participant