Repository navigation
Closed as not planned
Description
Is there an existing issue for this?
- I have searched the existing issues
Current Behavior
Trying to use hardware transcoding with nvidia.

plex uses custom libraries from /usr/lib/plexmediaserver/lib/ instead of /usr/lib/ as one would expect.
nvidia-cdi has even been modified to include libcuda.so.1 to /usr/lib.
nvidia-smi works as expected.
PS: you really miss a "custom comment" section...
Expected Behavior
No response
Steps To Reproduce
- Setup nvidia environment
- use nvidia-modprobe (if necessary)
- create required cdi file with
nvidia-ctk cdi generate --output=/etc/cdi/nvidia.yaml - recreate container
Environment
- OS: ArchLinux
- How docker service was installed: podman rootlessCPU architecture
x86-64
Docker creation
/usr/bin/podman run \
--rm \
-d \
--replace \
--name=plex \
--stop-timeout 90 \
--ulimit=nofile=65536:65536 \
--hooks-dir=/usr/share/containers/oci/hooks.d/ \
--device=/dev/dri:/dev/dri \
--device nvidia.com/gpu=all \
-e PUID=1000 \
-e PGID=1000 \
-e VERSION=docker \
-e "NVIDIA_DRIVER_CAPABILITIES=nvidia.com/gpu=all" \
-e "NVIDIA_VISIBLE_DEVICES=nvidia.com/gpu=all" \
--net slirp4netns:port_handler=slirp4netns \
-p xxx:32400:32400 \
lscr.io/linuxserver/plex:latestContainer logs
[migrations] started
[migrations] no migrations found
───────────────────────────────────────
██╗ ███████╗██╗ ██████╗
██║ ██╔════╝██║██╔═══██╗
██║ ███████╗██║██║ ██║
██║ ╚════██║██║██║ ██║
███████╗███████║██║╚██████╔╝
╚══════╝╚══════╝╚═╝ ╚═════╝
Brought to you by linuxserver.io
───────────────────────────────────────
To support LSIO projects visit:
https://www.linuxserver.io/donate/
───────────────────────────────────────
GID/UID
───────────────────────────────────────
User UID: 1000
User GID: 1000
───────────────────────────────────────
Linuxserver.io version: 1.40.5.8921-836b34c27-ls234
Build-date: 2024-09-09T09:24:02+00:00
───────────────────────────────────────
**** Server already claimed ****
Docker is used for versioning skip update check
[custom-init] No custom files found, skipping...
Starting Plex Media Server. . . (you can ignore the libusb_init error)
Connection to localhost (127.0.0.1) 32400 port [tcp/*] succeeded!
[ls.io-init] done.
Critical: libusb_init failedMetadata
Metadata
Assignees
Type
Projects
- StatusShow more project fieldsDone
Activity
github-actions commentedon Sep 11, 2024
Thanks for opening your first issue here! Be sure to follow the relevant issue templates, or risk having this issue marked as invalid.
aptalca commentedon Sep 11, 2024
You're well into
unsupportedterritory with that level of customization.Docker with
nvidia runtime(nvidia-container-toolkit) works just fine, which is the configuration we support. Podman rootless itself is considered areasonable endeavorso while we don't officially support it, we'll try and help. But podman rootless with custom nvidia bits is not something we can help with.https://docs.linuxserver.io/misc/support-policy/#reasonable-endeavours-support
HidingCherry commentedon Sep 11, 2024
Yes, that's correct.
podman + rootless is already something I don't expect to get lots of support with.
But since linux standard programs use
/usr/liblibraries and not a custom library, the issue seems to be image or plex specific. The main question is, why does plex not use/usr/libfor libraries - butnvidia-smidoes (in the same container).edit: You should be able to recreate the same issue with docker rootful.
aptalca commentedon Sep 11, 2024
No point in arguing hypothethicals. I'd rather avoid the xy problem.
Please don't expect us to do the work based on assumptions or a hunch. If you reproduce the issue with rootful docker and official nvidia-container-toolkit, let us know and we'll look into it.
Last I tested plex with nvidia-container-toolkit, following the instructions we provide in the readme, everything was working just fine and that was only a couple of months ago.
HidingCherry commentedon Sep 11, 2024
I had no issues a couple of months ago either, I use your image since at least a year.
I'll see if I can setup rootful docker in the near future.
AngellusMortis commentedon Oct 6, 2024
I am seeing the same issue in kubernetes. Same thing, use to work a few months ago and now it is broken. nvec is still working in other containers, just not Plex.
LinuxServer-CI commentedon Nov 5, 2024
This issue has been automatically marked as stale because it has not had recent activity. This might be due to missing feedback from OP. It will be closed if no further activity occurs. Thank you for your contributions.
HidingCherry commentedon Nov 9, 2024
Temporary workaround which works for me:
This symlinks all libraries (which are actually all nvidia/cuda ones) to the library folder of plex.
After a short test, hw-transcoding works again.
This script has to be run inside the container.
script for podman:
podman exec plex bash -c 'for i in /usr/lib/lib*.so.1; do ln -s $i /usr/lib/plexmediaserver/lib/; done'Currently I don't have the time to setup rootful docker to recreate the issue there.
LinuxServer-CI commentedon Dec 10, 2024
This issue has been automatically marked as stale because it has not had recent activity. This might be due to missing feedback from OP. It will be closed if no further activity occurs. Thank you for your contributions.
hanzoh commentedon Feb 3, 2025
I have the same issue, when transcoding, Plex picks the CPU because it cannot find libcuda.so.1
When I go inside the container and search for it, it can be found multiple times, but Plex does not see it:
When I do the same on a running Jellyfin container (official image jellyfin/jellyfin), I get the same output, but Jellyfin is able to use the GPU to transcode.
j0nnymoe commentedon Feb 3, 2025
@hanzoh probably want to start a fresh thread no?
hanzoh commentedon Feb 3, 2025
I can, just thought this is the same issue, because @HidingCherry 's workaround works here as well.
When I symlink the *.so.1 files from /run/opengl-driver/lib/, Plex is able to do transcoding via GPU.
j0nnymoe commentedon Feb 3, 2025
It would only be the same issue if you're attempting to run this in a rootless podman environment.
hanzoh commentedon Feb 4, 2025
Makes sense :)
I found the culprit: nvidia-container-toolkit before 1.17 had an issue with adding libcuda.so to LD_LIBRARY_PATH.
So once I have updated that, the Plex container works fine without any workarounds.
Maybe this also helps with Podman?!
LinuxServer-CI commentedon Mar 6, 2025
This issue has been automatically marked as stale because it has not had recent activity. This might be due to missing feedback from OP. It will be closed if no further activity occurs. Thank you for your contributions.
LinuxServer-CI commentedon Jun 4, 2025
This issue is locked due to inactivity