Skip to content

bug: build-aux: NVENC can't load from the Linux AppImage, so NVIDIA users get no GPU encoding #498

Closed

Description

@rdoupe

On an NVIDIA system, the Linux AppImage has no NVENC. The encoder lists offer only software and VAAPI encoders. A profile that was set to NVENC opens with a "Missing Encoders" dialog on every start: ffmpeg_nvenc, Module "obs-nvenc" not loaded (code: plugin_not_loaded). The OBS log shows:

[NVENC] Test process failed: cuda_lib
NVENC not supported
Failed to initialize module 'obs-nvenc.so'

A distribution build of OBS (32.2.2) on the same machine and GPU finds NVENC (NVENC version: 13.1 ... CUDA driver version: 13.30) and registers obs_nvenc_h264_tex and obs_nvenc_hevc_tex.

Affected releases

  • OBS-Studio-Rust v0.1.0-beta.20261012 (OBS-Studio-Rust-0.1.0-beta.20261012-linux-x86_64.AppImage, OBS 33.0.0-beta6-724-gdf84d45d8)
  • the continuous AppImage (OBS 33.0.0-beta6-799-gd711a972c)

Any host whose glibc is newer than the bundled glibc 2.43 is hit (seen with glibc 2.44 and NVIDIA driver 610.57.04 on an RTX 2070 desktop).

Cause

The AppImage bundles glibc and its loader (build-aux/appimage/assemble-appdir.sh), so every process it starts runs on glibc 2.43. It bundles only the parts of glibc in OBS's own library closure, though: libc.so.6, libm.so.6, libmvec.so.1, plus libresolv and the two NSS libraries it copies by name. librt.so.1, libpthread.so.0, libdl.so.2, libutil.so.1 and libanl.so.1 are not in the AppImage.

The GPU driver has to come from the host, and it is loaded into OBS on the bundled loader and libc. The NVIDIA driver links more of glibc than OBS does: libcuda.so.1, libEGL_nvidia.so.0 and libGLX_nvidia.so.0 need librt.so.1, libpthread.so.0 and libdl.so.2. Since the bundle doesn't have them, they are loaded from the host. The host's copies come from the host's glibc and use private symbols of that version, which the bundled loader doesn't export:

$ LD_DEBUG=libs squashfs-root/lib64/ld-linux-x86-64.so.2 squashfs-root/usr/bin/obs-nvenc-test
...
/usr/lib/librt.so.1: error: symbol lookup error: undefined symbol: __pointer_chk_guard, version GLIBC_PRIVATE (fatal)
Cannot load libcuda.so.1
reason=cuda_lib
nvenc_supported=false

The obs-nvenc test program can't load libcuda.so.1, so obs-nvenc.so registers no encoders.

Reproduce

On an NVIDIA machine whose glibc is newer than 2.43 (any current rolling distribution):

./OBS_Studio-*-x86_64.AppImage --appimage-extract
squashfs-root/lib64/ld-linux-x86-64.so.2 squashfs-root/usr/bin/obs-nvenc-test

It prints Cannot load libcuda.so.1 and reason=cuda_lib. No NVIDIA GPU is needed to see the missing libraries. This resolves librt.so.1 the way a host driver does and prints the host's path and the undefined symbol:

LD_TRACE_LOADED_OBJECTS=1 LD_BIND_NOW=1 LD_WARN=1 LD_PRELOAD=librt.so.1 \
    squashfs-root/lib64/ld-linux-x86-64.so.2 squashfs-root/usr/bin/obs

Proposed fix and failing test

Fix: when assemble-appdir.sh bundles libc.so.6, also bundle every shared library of the package that owns it (libc6 on the Ubuntu build host), so all of glibc comes from one build. libthread_db is the exception: it is a debugger plugin. If no package owns libc.so.6, the build fails.

RED test, in the CI's bundle scenario of test-appimage.sh (stock Debian, Ubuntu and Fedora containers): whenever libc.so.6 is bundled, each glibc library a host driver may link (libm, libmvec, librt, libpthread, libdl, libutil, libanl, libresolv, libnss_files, libnss_dns) must resolve to the AppImage's copy through obs's RPATH, as a driver's DT_NEEDED would, and bind with the bundled loader. On the current AppImage it fails for librt, libpthread, libdl, libutil and libanl in all three containers.

Activity

  1. rdoupe commented on Oct 13, 2026

    @rdoupe
    CollaboratorAuthor

    Claiming: this issue.

    1. RED: the AppImage test's bundle scenario (stock Debian 13, Ubuntu 22.04 and Fedora containers) requires that, with libc.so.6 bundled, every glibc library a host driver may link (librt, libpthread, libdl, libutil, libanl, libm, libmvec, libresolv, NSS) resolve to the AppImage's copy through obs's RPATH and bind with the bundled loader. It fails on the current AppImage in all three containers: librt, libpthread, libdl, libutil and libanl come from the host.
    2. GREEN: assemble-appdir.sh bundles every shared library of the package that owns the bundled libc.so.6 (except the debugger plugin libthread_db), so all of glibc comes from one build and NVIDIA's libcuda loads again. Checked on an RTX 2070 desktop: nvenc_supported=true, and a 10 s NVENC recording gives valid H.264.
      PR today.
  2. added
    claimed
    on Oct 13, 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