selnk
October 27, 2020, 12:13am
1
Server Version#: 1.20.3.3483
Player Version#: 4.34.4
My server has an AMD Ryzen 3 1200 CPU with a NVIDIA GTX960 GPU. Even with nvidia-docker installed and running docker run --gpus all
, plex doesn’t use the GPU for transcoding. docker run --gpus all nvidia/cuda:9.0-base nvidia-smi
shows that the GPU can be correctly passed to the container.
Any help is welcome.
ChuckPa
October 27, 2020, 12:44am
2
You need to ensure /dev/dri is mapped through properly.
You will also need drivers version 450.66 or higher (Nvidia Protocol 10.0 support).
selnk
October 27, 2020, 1:40am
3
I’m running NVIDIA drivers 455.28 and have mapped /dev/dri with --device=/dev/dri:/dev/dri
Check the log files.
If it’s protocol, it will specifically state. 10.0 vs 9.1
If there are permission problems, it will not find it at all.
selnk
October 27, 2020, 3:00am
5
Nothing interesting in the logs for exact matches on “10.0” or “9.1”. What am I looking for? Which log files?
Enable DEBUG logging.
Disable Verbose
Start a playback which will require transcode
A. If GPU seen and protocol incorrect – it will report the error 10.0 found 9.1
B. If bad permissions – will not find the GPU.
Check the container’s runtime GUID to match that of /dev/dri (render / video group)
selnk
October 27, 2020, 4:23am
7
Not seeing any protocol error.
I’m seeing
[Transcode/ljx3un9t7ib5bb16trgbmzg9] TPU: hardware transcoding: enabled, but no hardware decode accelerator found
[Transcode/ljx3un9t7ib5bb16trgbmzg9] TPU: hardware transcoding: final decoder: , final encoder:
[Transcode/ljx3un9t7ib5bb16trgbmzg9] Job running: EAE_ROOT=‘/tmp/pms-14701642-7504-44bc-bcb1-19cc58eb1dc9/EasyAudioEncoder’ FFMPEG_EXTERNAL_LIBS=‘/config/Library/Application\ Support/Plex\ Media\ Server/Codecs/02cff92-3522-linux-x86_64/’ XDG_CACHE_HOME=‘/config/Library/Application Support/Plex Media Server/Cache’ XDG_DATA_HOME=‘/usr/lib/plexmediaserver/Resources’ X_PLEX_TOKEN=‘xxxxxxxxxxxxxxxxxxxx’ ‘/usr/lib/plexmediaserver/Plex Transcoder’ ‘-codec:0’ ‘hevc’ ‘-codec:1’ ‘mp2’ ‘-ss’ ‘2265’ ‘-analyzeduration’ ‘20000000’ ‘-probesize’ ‘20000000’ ‘-i’ ‘/data/download/others/test_video.mkv’ ‘-filter_complex’ ‘[0:0]scale=w=1280:h=720[0];[0]format=pix_fmts=yuv420p|nv12[1]’ ‘-filter_complex’ ‘[0:1] aresample=async=1:ocl=’'‘stereo’'‘:rematrix_maxval=0.000000dB:osr=48000[2]’ ‘-map’ ‘[1]’ ‘-codec:0’ ‘libx264’ ‘-crf:0’ ‘16’ ‘-maxrate:0’ ‘10269k’ ‘-bufsize:0’ ‘20538k’ ‘-r:0’ ‘59.939999999999998’ ‘-preset:0’ ‘veryfast’ ‘-x264opts:0’ ‘subme=1:me_range=4:rc_lookahead=10:me=hex:8x8dct=0:partitions=none’ ‘-force_key_frames:0’ ‘expr:gte(t,2265+n_forced*3)’ ‘-map’ ‘[2]’ ‘-metadata:s:1’ ‘language=eng’ ‘-codec:1’ ‘aac’ ‘-b:1’ ‘256k’ ‘-f’ ‘dash’ ‘-seg_duration’ ‘3’ ‘-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’ ‘756’ ‘-time_delta’ ‘0.0625’ ‘-manifest_name’ ‘http://127.0.0.1:32400/video/:/transcode/session/ljx3un9t7ib5bb16trgbmzg9/0e8b3736-8c22-4a7f-a2df-0ca5ec3e252b/manifest?X-Plex-Http-Pipeline=infinite ’ ‘-avoid_negative_ts’ ‘disabled’ ‘-map_metadata’ ‘-1’ ‘-map_chapters’ ‘-1’ ‘dash’ ‘-start_at_zero’ ‘-copyts’ ‘-y’ ‘-nostats’ ‘-loglevel’ ‘quiet’ ‘-loglevel_plex’ ‘error’ ‘-progressurl’ ‘http://127.0.0.1:32400/video/:/transcode/session/ljx3un9t7ib5bb16trgbmzg9/0e8b3736-8c22-4a7f-a2df-0ca5ec3e252b/progress ’
Plex runs as user plex. I tried chmod 777 on /dev/dri/*, also set the owner to plex (chown plex). Still no hardware transcoding.
Then your cuda drivers / opencl / card something isn’t working right.
Even though you ran a nvidia container which shows things working there’s still no guarantee you’re doing things right for your Plex container.
I can’t be of any help because I have a NUC8 (no room for a card)
head to this website and use this runtime for docker you are going to have to figure out how to set it up
i got this information from this website
and i like to run NVTOP instead of nvidia-smi easier for me to use.
cmarcx
November 6, 2020, 3:05pm
10
just set the default runtime on the daemon.json like this:
{
"default-runtime": “nvidia”,
“runtimes”: {
“nvidia”: {
“path”: “/usr/bin/nvidia-container-runtime”,
“runtimeArgs”:
}
},
}
sudo dockerd --add-runtime=nvidia=/usr/bin/nvidia-container-runtime […]
running this command to add it to the daemon.json
selnk
November 9, 2020, 2:10am
12
I used the NVIDIA Container Toolkit
The runtime is registered as shown in docker info
shows nvidia
in the runtimes.
docker container inspect
shows my plex container is using the nvidia runtime.
Still not getting hardware acceleration.
selnk
November 9, 2020, 2:26am
13
Found the issue.
Reverted to LTS kernel and it works.
in you set up your using docker try running the command ldconfig in the docker image and see if it works i ran into a similar issue and it was getting all the dir passed but was not passing library links
system
Closed
March 14, 2021, 3:52am
15
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.