[GH-ISSUE #370] NVIDIA manual volume: missing libnvrtc.so #252

Closed
opened 2026-10-15 12:58:46 +00:00 by bsakaguchi · 4 comments
Owner

Originally created by @altano on GitHub (Mar 17, 2026).
Original GitHub issue: https://github.com/games-on-whales/wolf/issues/370

I followed the NVIDIA (Manual) instructions. When i connect I get an error that libnvrtc.so is missing:

Mar 16 22:27:32 viewscreen wolf[951]: 0:00:00.302515719   106 0x5584f6c7ca00 WARN               cudanvrtc gstcudanvrtc.cpp:163:gst_cuda_nvrtc_load_library_once: Could not open nvrtc library libnvrtc.so: cannot open shared object file: No such file or directory
Mar 16 22:27:34 viewscreen wolf[951]: 0:00:01.872494800     1 0x557cfc8b6740 WARN               cudanvrtc gstcudanvrtc.cpp:163:gst_cuda_nvrtc_load_library_once: Could not open nvrtc library libnvrtc.so: cannot open shared object file: No such file or directory

I have version 580.119.02 of the drivers and was wondering if something had changed. I was able to fix the issue by injecting the needed files into the volume like so:

{
  config,
  lib,
  pkgs,
  ...
}:
let
  cfg = config.hostConfig.services.wolf;
  nvVersion = config.hardware.nvidia.package.version;
  nvidiaVolName = "nvidia-driver-vol-${nvVersion}";
+  cudaNvrtc = pkgs.cudaPackages.cuda_nvrtc.lib;
in
{
    # ...

    # Build the GoW nvidia-driver image from the host's NVIDIA driver and
    # populate a Podman volume with the extracted libraries. Wolf mounts
    # this volume into spawned child containers (games, pulseaudio) and
    # into its own container so GStreamer can find NVENC/CUDA libs.
    # See: https://games-on-whales.github.io/wolf/stable/user/quickstart.html
    systemd.services.wolf-nvidia-volume =
      let
        # Pin GoW nvidia-driver Dockerfile to a known commit (content-addressed)
        gowNvidiaDockerfile = pkgs.fetchurl {
          url = "https://raw.githubusercontent.com/games-on-whales/gow/9c486cf9f7e285fa041d9197e8d3a5275e51876f/images/nvidia-driver/Dockerfile";
          hash = "sha256-3vpJgDX70DKDIcCv4nQx0+OrQKpm3Z2Roq0avhGPRjw=";
        };
      in
      {
        description = "Build NVIDIA driver volume for Wolf";
        after = [
          "podman.service"
          "network-online.target"
        ];
        requires = [ "podman.service" ];
        wants = [ "network-online.target" ];
        before = [ "podman-wolf.service" ];
        requiredBy = [ "podman-wolf.service" ];
        serviceConfig = {
          Type = "oneshot";
          RemainAfterExit = true;
        };
        path = [ config.virtualisation.podman.package ];
        script = ''
          # Volume name is versioned — a new deploy with a different driver
          # version gets a fresh volume automatically (no marker file needed)
          if podman volume exists ${nvidiaVolName}; then
            echo "NVIDIA driver volume ${nvidiaVolName} already exists. Skipping."
            exit 0
          fi

          echo "Building NVIDIA driver volume for driver ${nvVersion}"
          podman build -t gow/nvidia-driver:${nvVersion} \
            -f ${gowNvidiaDockerfile} --build-arg NV_VERSION="${nvVersion}" .

          podman volume create ${nvidiaVolName}
          podman run --rm -v ${nvidiaVolName}:/usr/nvidia gow/nvidia-driver:${nvVersion} true 2>/dev/null || true

+         VOLPATH=$(podman volume inspect ${nvidiaVolName} --format '{{.Mountpoint}}')
+         
+         # Add libnvrtc (CUDA runtime compiler) — required by GStreamer's
+         # cudaconvertscale element, which NVENC encoding pipelines depend on.
+         # Not included in the driver package; comes from the CUDA toolkit.
+         cp -a ${cudaNvrtc}/lib/libnvrtc* "$VOLPATH/lib/"
+         
+         if [ ! -f "$VOLPATH/lib/libcuda.so" ]; then
+           echo "ERROR: NVIDIA driver volume is missing libcuda.so — copy-up failed"
+           echo "Volume contents: $(ls -la "$VOLPATH/" 2>&1)"
+           echo "Volume lib/ contents: $(ls -la "$VOLPATH/lib/" 2>&1)"
+           podman volume rm ${nvidiaVolName}
+           exit 1
+         fi

          echo "NVIDIA driver volume ${nvidiaVolName} built successfully"
        '';
      };

Sorry it's so NixOS specific but it's what I'm using.

I tested and this works perfectly, but i haven't seen mention of this problem so I thought I'd ask.

Did the old drivers have these, and the new drivers don't? Do we need to update the instructions? If so I can try to help.

Originally created by @altano on GitHub (Mar 17, 2026). Original GitHub issue: https://github.com/games-on-whales/wolf/issues/370 I followed the [NVIDIA (Manual) instructions](https://games-on-whales.github.io/wolf/stable/user/quickstart.html). When i connect I get an error that libnvrtc.so is missing: ``` Mar 16 22:27:32 viewscreen wolf[951]: 0:00:00.302515719 106 0x5584f6c7ca00 WARN cudanvrtc gstcudanvrtc.cpp:163:gst_cuda_nvrtc_load_library_once: Could not open nvrtc library libnvrtc.so: cannot open shared object file: No such file or directory Mar 16 22:27:34 viewscreen wolf[951]: 0:00:01.872494800 1 0x557cfc8b6740 WARN cudanvrtc gstcudanvrtc.cpp:163:gst_cuda_nvrtc_load_library_once: Could not open nvrtc library libnvrtc.so: cannot open shared object file: No such file or directory ``` I have version 580.119.02 of the drivers and was wondering if something had changed. I was able to fix the issue by injecting the needed files into the volume like so: ```patch { config, lib, pkgs, ... }: let cfg = config.hostConfig.services.wolf; nvVersion = config.hardware.nvidia.package.version; nvidiaVolName = "nvidia-driver-vol-${nvVersion}"; + cudaNvrtc = pkgs.cudaPackages.cuda_nvrtc.lib; in { # ... # Build the GoW nvidia-driver image from the host's NVIDIA driver and # populate a Podman volume with the extracted libraries. Wolf mounts # this volume into spawned child containers (games, pulseaudio) and # into its own container so GStreamer can find NVENC/CUDA libs. # See: https://games-on-whales.github.io/wolf/stable/user/quickstart.html systemd.services.wolf-nvidia-volume = let # Pin GoW nvidia-driver Dockerfile to a known commit (content-addressed) gowNvidiaDockerfile = pkgs.fetchurl { url = "https://raw.githubusercontent.com/games-on-whales/gow/9c486cf9f7e285fa041d9197e8d3a5275e51876f/images/nvidia-driver/Dockerfile"; hash = "sha256-3vpJgDX70DKDIcCv4nQx0+OrQKpm3Z2Roq0avhGPRjw="; }; in { description = "Build NVIDIA driver volume for Wolf"; after = [ "podman.service" "network-online.target" ]; requires = [ "podman.service" ]; wants = [ "network-online.target" ]; before = [ "podman-wolf.service" ]; requiredBy = [ "podman-wolf.service" ]; serviceConfig = { Type = "oneshot"; RemainAfterExit = true; }; path = [ config.virtualisation.podman.package ]; script = '' # Volume name is versioned — a new deploy with a different driver # version gets a fresh volume automatically (no marker file needed) if podman volume exists ${nvidiaVolName}; then echo "NVIDIA driver volume ${nvidiaVolName} already exists. Skipping." exit 0 fi echo "Building NVIDIA driver volume for driver ${nvVersion}" podman build -t gow/nvidia-driver:${nvVersion} \ -f ${gowNvidiaDockerfile} --build-arg NV_VERSION="${nvVersion}" . podman volume create ${nvidiaVolName} podman run --rm -v ${nvidiaVolName}:/usr/nvidia gow/nvidia-driver:${nvVersion} true 2>/dev/null || true + VOLPATH=$(podman volume inspect ${nvidiaVolName} --format '{{.Mountpoint}}') + + # Add libnvrtc (CUDA runtime compiler) — required by GStreamer's + # cudaconvertscale element, which NVENC encoding pipelines depend on. + # Not included in the driver package; comes from the CUDA toolkit. + cp -a ${cudaNvrtc}/lib/libnvrtc* "$VOLPATH/lib/" + + if [ ! -f "$VOLPATH/lib/libcuda.so" ]; then + echo "ERROR: NVIDIA driver volume is missing libcuda.so — copy-up failed" + echo "Volume contents: $(ls -la "$VOLPATH/" 2>&1)" + echo "Volume lib/ contents: $(ls -la "$VOLPATH/lib/" 2>&1)" + podman volume rm ${nvidiaVolName} + exit 1 + fi echo "NVIDIA driver volume ${nvidiaVolName} built successfully" ''; }; ``` Sorry it's so NixOS specific but it's what I'm using. I tested and this works perfectly, but i haven't seen mention of this problem so I thought I'd ask. Did the old drivers have these, and the new drivers don't? Do we need to update the instructions? If so I can try to help.
bsakaguchi 2026-10-15 12:58:46 +00:00
Author
Owner

@ABeltramo commented on GitHub (Mar 18, 2026):

Our docker images already bundle libnvrtc.so (even without the volume mounted):

docker run --rm -it --entrypoint /bin/bash ghcr.io/games-on-whales/wolf:stable                         
root@1f9f07156b16:/wolf# ls -la /usr/local/nvidia/lib/           
total 27112
drwxr-xr-x 1 root root       50 Nov 12 08:51 .
drwxr-xr-x 1 root root        6 Nov 12 08:50 ..
-rwxr-xr-x 1 root root  5455272 Aug 11  2020 libnvrtc-builtins.so
lrwxrwxrwx 1 root root       20 Nov 12 08:51 libnvrtc-builtins.so.11.0 -> libnvrtc-builtins.so
lrwxrwxrwx 1 root root       16 Nov 12 08:50 libnvrtc.so -> libnvrtc.so.11.0
-rwxr-xr-x 1 root root 22295312 Aug 11  2020 libnvrtc.so.11.0
root@1f9f07156b16:/wolf# 

So I guess something else is wrong on your side (and nobody reported this kind of issue before). On a normal install you'll get the following warning on startup

WARN               cudanvrtc gstcudanvrtc.cpp:179:gst_cuda_nvrtc_load_library_once: Failed to load 'nvrtcGetCUBINSize', 'nvrtcGetCUBINSize': /usr/local/nvidia/lib/libnvrtc.so: undefined symbol: nvrtcGetCUBINSize

but it'll then proceed to use cuda anyway, and it'll load up nvcodec as the HW encoder.
Can you share the full Wolf logs when starting up the container and possibly the podman configuration that you are using to run it?

As a side note 580.119.02 is outdated btw, the latest "stable" version is 580.142

<!-- gh-comment-id:4085462711 --> @ABeltramo commented on GitHub (Mar 18, 2026): Our docker images already bundle `libnvrtc.so` (even without the volume mounted): ``` docker run --rm -it --entrypoint /bin/bash ghcr.io/games-on-whales/wolf:stable root@1f9f07156b16:/wolf# ls -la /usr/local/nvidia/lib/ total 27112 drwxr-xr-x 1 root root 50 Nov 12 08:51 . drwxr-xr-x 1 root root 6 Nov 12 08:50 .. -rwxr-xr-x 1 root root 5455272 Aug 11 2020 libnvrtc-builtins.so lrwxrwxrwx 1 root root 20 Nov 12 08:51 libnvrtc-builtins.so.11.0 -> libnvrtc-builtins.so lrwxrwxrwx 1 root root 16 Nov 12 08:50 libnvrtc.so -> libnvrtc.so.11.0 -rwxr-xr-x 1 root root 22295312 Aug 11 2020 libnvrtc.so.11.0 root@1f9f07156b16:/wolf# ``` So I guess something else is wrong on your side (and nobody reported this kind of issue before). On a normal install you'll get the following warning on startup ``` WARN cudanvrtc gstcudanvrtc.cpp:179:gst_cuda_nvrtc_load_library_once: Failed to load 'nvrtcGetCUBINSize', 'nvrtcGetCUBINSize': /usr/local/nvidia/lib/libnvrtc.so: undefined symbol: nvrtcGetCUBINSize ``` but it'll then proceed to use `cuda` anyway, and it'll load up `nvcodec` as the HW encoder. Can you share the full Wolf logs when starting up the container and possibly the podman configuration that you are using to run it? As a side note `580.119.02` is outdated btw, the latest "stable" version is [580.142](https://www.nvidia.com/en-us/drivers/unix/)
Author
Owner

@altano commented on GitHub (Mar 18, 2026):

Let me do some more testing. I’ll get you a minimal repo, the full logs, and I’ll try the newer drivers in case that’s an issue. Give me a few days.

<!-- gh-comment-id:4086175667 --> @altano commented on GitHub (Mar 18, 2026): Let me do some more testing. I’ll get you a minimal repo, the full logs, and I’ll try the newer drivers in case that’s an issue. Give me a few days.
Author
Owner

@altano commented on GitHub (Jun 1, 2026):

I just got back to testing after a few upgrades:

  • NixOS 26.05
  • NVIDIA driver 595.71.05
  • Linux Kernel 6.18.33

libnvrtc.so exists in the drive volume without my adding it and it works just fine as-is. So probably an issue solved by one of these upgrades.

I'm closing since I can no longer reproduce. Thanks!

<!-- gh-comment-id:4595755706 --> @altano commented on GitHub (Jun 1, 2026): I just got back to testing after a few upgrades: - NixOS 26.05 - NVIDIA driver 595.71.05 - Linux Kernel 6.18.33 libnvrtc.so exists in the drive volume without my adding it and it works just fine as-is. So probably an issue solved by one of these upgrades. I'm closing since I can no longer reproduce. Thanks!
Author
Owner

@altano commented on GitHub (Jun 2, 2026):

Whoops, my test was bad and I'm seeing the error still:

## Wolf log: nvrtc load failure → cudaconvertscale missing → software encoder
0:00:00.157564169   141 0x5cac6d784b20 WARN               cudanvrtc gstcudanvrtc.cpp:163:gst_cuda_nvrtc_load_library_once: Could not open nvrtc library libnvrtc.so: cannot open shared object file: No such file or directory
0:00:01.045352093     1 0x5f7d8e75c030 WARN               cudanvrtc gstcudanvrtc.cpp:163:gst_cuda_nvrtc_load_library_once: Could not open nvrtc library libnvrtc.so: cannot open shared object file: No such file or directory
0:00:01.591995985     1 0x5f7d8e75c030 WARN     GST_ELEMENT_FACTORY gstelementfactory.c:713:gst_element_factory_make_with_properties: no such element factory "cudaconvertscale"!
21:14:30.292714788 INFO  | Using h264 encoder: x264
21:14:30.292847628 WARN  | Software h264 encoder detected
0:00:01.594103720     1 0x5f7d8e75c030 WARN     GST_ELEMENT_FACTORY gstelementfactory.c:713:gst_element_factory_make_with_properties: no such element factory "cudaconvertscale"!
21:14:30.295335630 INFO  | Using h265 encoder: x265
21:14:30.295361950 WARN  | Software h265 encoder detected
0:00:01.595814777     1 0x5f7d8e75c030 WARN     GST_ELEMENT_FACTORY gstelementfactory.c:713:gst_element_factory_make_with_properties: no such element factory "cudaconvertscale"!
21:14:30.295814975 INFO  | Using av1 encoder: aom
21:14:30.295838218 WARN  | Software av1 encoder detected

I'm going to try to get a simple repro still and will report back (and reopen the issue) when I have one.

<!-- gh-comment-id:4607414357 --> @altano commented on GitHub (Jun 2, 2026): Whoops, my test was bad and I'm seeing the error still: ``` ## Wolf log: nvrtc load failure → cudaconvertscale missing → software encoder 0:00:00.157564169 141 0x5cac6d784b20 WARN cudanvrtc gstcudanvrtc.cpp:163:gst_cuda_nvrtc_load_library_once: Could not open nvrtc library libnvrtc.so: cannot open shared object file: No such file or directory 0:00:01.045352093 1 0x5f7d8e75c030 WARN cudanvrtc gstcudanvrtc.cpp:163:gst_cuda_nvrtc_load_library_once: Could not open nvrtc library libnvrtc.so: cannot open shared object file: No such file or directory 0:00:01.591995985 1 0x5f7d8e75c030 WARN GST_ELEMENT_FACTORY gstelementfactory.c:713:gst_element_factory_make_with_properties: no such element factory "cudaconvertscale"! 21:14:30.292714788 INFO | Using h264 encoder: x264 21:14:30.292847628 WARN | Software h264 encoder detected 0:00:01.594103720 1 0x5f7d8e75c030 WARN GST_ELEMENT_FACTORY gstelementfactory.c:713:gst_element_factory_make_with_properties: no such element factory "cudaconvertscale"! 21:14:30.295335630 INFO | Using h265 encoder: x265 21:14:30.295361950 WARN | Software h265 encoder detected 0:00:01.595814777 1 0x5f7d8e75c030 WARN GST_ELEMENT_FACTORY gstelementfactory.c:713:gst_element_factory_make_with_properties: no such element factory "cudaconvertscale"! 21:14:30.295814975 INFO | Using av1 encoder: aom 21:14:30.295838218 WARN | Software av1 encoder detected ``` I'm going to try to get a simple repro still and will report back (and reopen the issue) when I have one.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
games-on-whales/wolf#252
No description provided.