Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Plex HW Transcode Fail: 'Cannot load libcuda.so.1' - Container libs not mapped

Featured Replies

Hello everyone,

I'm hoping to get some help with a persistent issue getting NVIDIA GPU transcoding to work for my Plex container. I've been troubleshooting for a while and have gathered some specific diagnostic info that points to an issue with the NVIDIA Container Toolkit.

The Problem

Plex is successfully installed, and the container can see my NVIDIA GPU. However, when I start a transcode, it immediately fails to find the necessary hardware acceleration libraries and falls back to CPU transcoding. The CPU usage spikes, and the GPU remains idle. The primary error in the Plex logs is [FFMPEG] - Cannot load libcuda.so.1.

System Configuration

  • Unraid OS: 6.12.24-Unraid

  • GPU: NVIDIA GeForce RTX 3050 8GB

  • CPU: AMD Ryzen 5 5500

  • Plex Docker Image: linuxserver/plex:latest

Plex Docker Configuration:

  • Extra Parameters: --runtime=nvidia

  • NVIDIA_VISIBLE_DEVICES: GPU-326ae2e7-0fdf-dc63-deb1-220aacc225a2

  • NVIDIA_DRIVER_CAPABILITIES: all

Troubleshooting Steps Performed

I have already performed the following steps without success:

  1. A full uninstall and clean re-install of the Nvidia Driver plugin from Community Apps.

  2. Tested with both the "latest" (575.64.03) and the "Production Branch" (570.169) drivers, with server reboots after each change. The results are the same for both.

  3. Checked BIOS settings to ensure Above 4G Decoding and Resizable BAR are enabled.

  4. Confirmed that nvidia-smi works correctly from the Unraid host terminal.

Diagnostic Evidence

This is where it gets interesting. I have confirmed that the host driver is loaded correctly, but the libraries are not being passed into the container.

1. lspci Output (Host Level): This confirms the nvidia driver is correctly in use on the host and not bound to vfio-pci.

root@KimDotCom:~# lspci -v -s 01:00.0
01:00.0 VGA compatible controller: NVIDIA Corporation GA107 [GeForce RTX 3050 8GB] (rev a1) (prog-if 00 [VGA controller])
        Subsystem: Shenzhen Colorful Yugong Technology and Development Co. Device 1530
        Flags: bus master, fast devsel, latency 0, IRQ 80, IOMMU group 9
        Memory at fb000000 (32-bit, non-prefetchable) [size=16M]
        Memory at d0000000 (64-bit, prefetchable) [size=256M]
        Memory at e0000000 (64-bit, prefetchable) [size=32M]
        I/O ports at f000 [size=128]
        Expansion ROM at 000c0000 [virtual] [disabled] [size=128K]
        Capabilities: [60] Power Management version 3
        ...
        Kernel driver in use: nvidia
        Kernel modules: nouveau, nvidia_drm, nvidia

2. ldd Output (Inside Plex Container): This is the key finding. When checking the Plex Transcoder binary from within the container, no NVIDIA libraries are linked. This result is the same whether using the "latest" or "production" driver.

root@KimDotCom:/# ldd /usr/lib/plexmediaserver/Plex\ Transcoder
        linux-vdso.so.1 (0x00001510b3782000)
        libgcompat.so.0 => /usr/lib/plexmediaserver/lib/libgcompat.so.0 (0x00001510b371c000)
        libavfilter.so.8 => /usr/lib/plexmediaserver/lib/libavfilter.so.8 (0x00001510b3000000)
        libavformat.so.59 => /usr/lib/plexmediaserver/lib/libavformat.so.59 (0x00001510b2c00000)
        libavcodec.so.59 => /usr/lib/plexmediaserver/lib/libavcodec.so.59 (0x00001510b2400000)
        libswresample.so.4 => /usr/lib/plexmediaserver/lib/libswresample.so.4 (0x00001510b36f5000)
        libswscale.so.6 => /usr/lib/plexmediaserver/lib/libswscale.so.6 (0x00001510b2f25000)
        libavutil.so.57 => /usr/lib/plexmediaserver/lib/libavutil.so.57 (0x00001510b2216000)
        libc.so => /usr/lib/plexmediaserver/lib/libc.so (0x00001510b3650000)
        libva.so.2 => /usr/lib/plexmediaserver/lib/libva.so.2 (0x00001510b2bd4000)
        libssl.so.3 => /usr/lib/plexmediaserver/lib/libssl.so.3 (0x00001510b2b40000)
        libcrypto.so.3 => /usr/lib/plexmediaserver/lib/libcrypto.so.3 (0x00001510b1c00000)
        libva-drm.so.2 => /usr/lib/plexmediaserver/lib/libva-drm.so.2 (0x00001510b3649000)
        libdrm.so.2 => /usr/lib/plexmediaserver/lib/libdrm.so.2 (0x00001510b2f10000)
        libpciaccess.so.0 => /usr/lib/plexmediaserver/lib/libpciaccess.so.0 (0x00001510b2f05000)

3. Relevant Plex Log Snippets: These logs confirm the diagnosis from the ldd command.

// Plex correctly sees the GPU device at startup
[GPU] Got device: NVIDIA GA107 [GeForce RTX 3050 8GB], nvidia@unknown, default true, best true

// But immediately notes the core library is missing from the system
[GPU] Cuda library was not found on the system

// When a transcode starts, FFmpeg fails to load the CUDA library
ERROR - [Req#4ad/Transcode] [FFMPEG] - Cannot load libcuda.so.1
ERROR - [Req#4ad/Transcode] [FFMPEG] - Could not dynamically load CUDA
DEBUG - [Req#4ad/Transcode] Codecs: hardware transcoding: opening hw device failed - probably not supported by this system, error: Operation not permitted

// The transcoder falls back to software (CPU)
DEBUG - [Req#4e0/Transcode/...] Transcoder: session ... indicated fallback to software decoding

It seems the NVIDIA Container Toolkit is not functioning as expected on my system, as it's failing to map the host drivers into the container. Any help or insight would be greatly appreciated!

Solved by ConnerVT

  • Solution

It is usually best if you post in the support thread for the particular container you are using. Especially in this case, as your troubleshooting is pointing to a disconnect somewhere inside the container. You didn't indicate which of the many Plex containers you are using, so I can't direct you where to go for answers.

I do know with Plex there are several times where something gets broken when they add something new to the application. You may want to try going back a version or two and see if this resolves your issue. Or even try a different container. I use the Linixserverio. Binhex has many people using his container as well.

I am not 100% sure (as I don't own a nice GPU like you) but I believe you need to use the open source version of the Nvidia Driver for RTX3xxx GPU.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.