After update hw transcoding stops after 5 seconds (Solved)

PMS shows:

  1. It sees the card on the PCI bus.

Nov 08, 2024 09:52:58.936 [140524700375864] DEBUG - [GPU] Got device: TU106 [GeForce RTX 2070 Rev. A], nvidia@unknown, default true, best true, ID 10de:1f07:1458:37ad@0000:61:00.0, DevID [10de:1f07:1458:37ad], flags 0xe8

  1. When it comes to the actual transcode point, it cannot talk to it.

Nov 08, 2024 09:54:09.561 [140524515007288] DEBUG - [Req#2284/Transcode] Cleaning directory for session ahnyqv0fijw6ckbzkmxsqxr3 ()
Nov 08, 2024 09:54:09.561 [140524515007288] DEBUG - [Req#2284/Transcode] Starting a transcode session ahnyqv0fijw6ckbzkmxsqxr3 at offset -1.0 (state=3)
Nov 08, 2024 09:54:09.562 [140524515007288] DEBUG - [Req#2284/Transcode] TPU: hardware transcoding: enabled, but no hardware decode accelerator found
Nov 08, 2024 09:54:09.562 [140524515007288] INFO - [Req#2284/Transcode] CodecManager: starting EAE at “/tmp/pms-6dd5159f-ac53-4f6a-8cc3-0b5b7ea5b34d/EasyAudioEncoder”
Nov 08, 2024 09:54:09.563 [140524515007288] DEBUG - [Req#2284/Transcode/JobRunner] Job running: “/config/Library/Application Support/Plex Media Server/Codecs/EasyAudioEncoder-8f4ca5ead7783c54a4930420-linux-x86_64/EasyAudioEncoder/EasyAudioEncoder”
Nov 08, 2024 09:54:09.563 [140524515007288] DEBUG - [Req#2284/Transcode/JobRunner] In directory: “/tmp/pms-6dd5159f-ac53-4f6a-8cc3-0b5b7ea5b34d/EasyAudioEncoder”
Nov 08, 2024 09:54:09.564 [140524515007288] DEBUG - [Req#2284/Transcode/JobRunner] Jobs: Starting child process with pid 617
Nov 08, 2024 09:54:09.564 [140524515007288] DEBUG - [Req#2284/Transcode] [Universal] Using local file path instead of URL: /media/Movies/My Old Ass (2024)/My Old Ass (2024) WEBDL-1080p.mkv
Nov 08, 2024 09:54:09.564 [140524515007288] DEBUG - [Req#2284/Transcode] TPU: hardware transcoding: final decoder: , final encoder:
Nov 08, 2024 09:54:09.565 [140524515007288] DEBUG - [Req#2284/Transcode/JobRunner] Job running: EAE_ROOT=/tmp/pms-6dd5159f-ac53-4f6a-8cc3-0b5b7ea5b34d/EasyAudioEncoder FFMPEG_EXTERNAL_LIBS=‘/config/Library/Application\ Support/Plex\ Media\ Server/Codecs/db205f4-631e8759786d054613dad5b2-linux-x86_64/’ X_PLEX_TOKEN=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx “/usr/lib/plexmediaserver/Plex Transcoder” -codec:0 h264 -codec:1 eac3_eae -eae_prefix:1 ahnyqv0fijw6ckbzkmxsqxr3_ -ss 0 -noaccurate_seek -analyzeduration 20000000 -probesize 20000000 -i “/media/Movies/My Old Ass (2024)/My Old Ass (2024) WEBDL-1080p.mkv” -map 0:0 -codec:0 copy -filter_complex “[0:1] aresample=async=1:ochl=‘stereo’:rematrix_maxval=0.000000dB:osr=48000[0]” -map “[0]” -metadata:s:1 language=eng -codec:1 aac -b:1 256k -f dash -seg_duration 5 -dash_segment_type mp4 -init_seg_name ‘init-stream$RepresentationID$.m4s’ -media_seg_name ‘chunk-stream$RepresentationID$-$Number%05d$.m4s’ -window_size 5 -delete_removed false -skip_to_segment 1 -time_delta 0.0625 -manifest_name “http://127.0.0.1:32400/video/:/transcode/session/ahnyqv0fijw6ckbzkmxsqxr3/6b662b65-df3a-4616-ae88-1cf712bdb605/manifest?X-Plex-Http-Pipeline=infinite” -avoid_negative_ts disabled -map_metadata -1 -map_chapters -1 dash -start_at_zero -copyts -vsync cfr -y -nostats -loglevel quiet -loglevel_plex error -progressurl http://127.0.0.1:32400/video/:/transcode/session/ahnyqv0fijw6ckbzkmxsqxr3/6b662b65-df3a-4616-ae88-1cf712bdb605/progress

What you show in the OP is that the basic drivers are loaded.
To do hardware transcoding requires more support packages.

So… Silly question time:

  1. Are all the libnvidia packages installed on the host?
    – libnvidia-encode
    – libnvidia-decode
    – libnvidia-compute (for tone mapping)
    – etc

  2. Have the Nvidia runtime libraries been passed into the container in the spec?

  3. Does the GID used by the container have permission to access the GPU ?
    ( a member of the group which owns it )

If you look here (my LXC script to add GPU to LXC containers), you see;

  1. I get the GID of the render node
  2. I then add the GPU to the container as a physical GPU (not vGPU) and assign it the GID needed for outside the container on the host.
  3. Lastly, I tell LXC to pass all the Nvidia runtime libraries into the container so PMS can access the physical GPU passed in.
[chuck@lizum bin.1999]$ cat add-gpu
#!/bin/bash
#
# Add both Intel and Nvidia GPU passthrough to LXD/LXC container

# Argument #1 is LXC container to add
if [ "$1" = "" ]; then
 echo "Error: missing container name" 
 exit 1
fi

# Container exist ?
if [ "$(lxc list | grep "$1")" == "" ]; then
  echo "Error: Unknown container name '$1'"
  exit 2
fi

# Make certain /dev/dri/renderD128 exists
if [ ! -e /dev/dri/renderD128 ]; then
  echo Error:  This host does not have hardware transcoding ability /dev/dri/renderD128
  echo "        Drivers installed?"
  exit 3
fi

Gid="$(stat -c %g /dev/dri/renderD128)"

# Add it (Both Intel and Nvidia)
lxc config device add "$1" GPUs gpu gid=$Gid

# Add Nvidia runtime 
lxc config set "$1" nvidia.driver.capabilities all
lxc config set "$1" nvidia.require.cuda true
lxc config set "$1" nvidia.runtime true

echo GPU configuration added to \'$1\'

# Restart
if [ "$(lxc list | grep -w "$1" | grep "RUNNING")" != "" ]; then
  echo Restarting $1
  lxc restart $1
fi

[chuck@lizum bin.2000]$