Server Version#: 1.32.4.7195
UBuntu 22.04 bare metal
I have been fighting to get hHW trasnscoding to work for a few days now. Moved plex from synology NAS to LInux box with Nvidea 1660s. No matter what I do if I turn on HW transcoding I get “Conversion failed. The transcoder exited due to an error.” All drivers appear to be working properly. Everything else is runnin as expected. I have attached my Nvidea driver info and the log with hopefully the relavent info. Hopefully someone has some insight. I have scoured the internet and tried many solutions but am having no luck.
Sat Jul 8 11:18:10 2023
+---------------------------------------------------------------------------------------+
| NVIDIA-SMI 535.54.03 Driver Version: 535.54.03 CUDA Version: 12.2 |
|-----------------------------------------+----------------------+----------------------+
| GPU Name Persistence-M | Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap | Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|=========================================+======================+======================|
| 0 NVIDIA GeForce GTX 1660 ... Off | 00000000:01:00.0 Off | N/A |
| 25% 29C P8 10W / 125W | 6MiB / 6144MiB | 0% Default |
| | | N/A |
+-----------------------------------------+----------------------+----------------------+
+---------------------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=======================================================================================|
| 0 N/A N/A 1184 G /usr/lib/xorg/Xorg 4MiB |
+---------------------------------------------------------------------------------------+
Jul 08, 2023 11:09:28.981 [139923539475256] Debug — TPU: hardware transcoding: final decoder: , final encoder:
Jul 08, 2023 11:09:28.982 [139923539475256] Debug — [JobRunner] Job running: EAE_ROOT=/tmp/pms-2f218898-e68a-4be9-8b36-2932003607ad/EasyAudioEncoder FFMPEG_EXTERNAL_LIBS='/var/lib/plexmediaserver/Library/Application\ Support/Plex\ Media\ Server/Codecs/8217c1c-4565-linux-x86_64/' LIBVA_DRIVERS_PATH="/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Cache/va-dri-linux-x86_64" X_PLEX_TOKEN=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx "/usr/lib/plexmediaserver/Plex Transcoder" -codec:0 h264 -codec:1 eac3_eae -eae_prefix:1 0D00E216-6749-4AF3-9AE5-C4DE99758D77_ -analyzeduration 20000000 -probesize 20000000 -i /media/bryce/Astrocloud/Plex/Movies/The.Covenant.2023.1080p.AMZN.WEB-DL.DDP5.1.Atmos.H.264-FLUX.mkv -filter_complex "[0:0]scale=w=480:h=200:force_divisible_by=4[0];[0]format=pix_fmts=yuv420p|nv12[1]" -map "[1]" -metadata:s:0 language=eng -codec:0 libx264 -crf:0 21 -maxrate:0 526k -bufsize:0 1052k -r:0 23.975999999999999 -preset:0 veryfast -x264opts:0 subme=3:me_range=4:rc_lookahead=10:me=hex -force_key_frames:0 "expr:gte(t,n_forced*8)" -filter_complex "[0:1] aresample=async=1:ochl='stereo':rematrix_maxval=0.000000dB:osr=48000[2]" -map "[2]" -metadata:s:1 language=eng -codec:1 libopus -b:1 153k -segment_format matroska -f ssegment -individual_header_trailer 0 -flags +global_header -segment_header_filename header -segment_time 8 -segment_start_number 0 -segment_copyts 1 -segment_time_delta 0.0625 -segment_list "http://127.0.0.1:32400/video/:/transcode/session/0D00E216-6749-4AF3-9AE5-C4DE99758D77/f4b14ab9-2cd5-4ca1-8443-09c8ddb18365/manifest?X-Plex-Http-Pipeline=infinite" -segment_list_type csv -segment_list_size 5 -segment_list_separate_stream_times 1 -segment_list_unfinished 1 -segment_format_options output_ts_offset=10 -max_delay 5000000 -avoid_negative_ts disabled -map_metadata:g -1 -map_metadata:c -1 -map_chapters -1 "media-%05d.ts" -start_at_zero -copyts -vsync cfr -init_hw_device vaapi=vaapi:/dev/dri/renderD129 -filter_hw_device vaapi -y -nostats -loglevel quiet -loglevel_plex error -progressurl http://127.0.0.1:32400/video/:/transcode/session/0D00E216-6749-4AF3-9AE5-C4DE99758D77/f4b14ab9-2cd5-4ca1-8443-09c8ddb18365/progress
Jul 08, 2023 11:09:28.982 [139923539475256] Debug — [JobRunner] In directory: "/media/bryce/Astrocloud/Plex/Temp/Transcode/Sessions/plex-transcode-0D00E216-6749-4AF3-9AE5-C4DE99758D77-f4b14ab9-2cd5-4ca1-8443-09c8ddb18365"
Jul 08, 2023 11:09:28.982 [139923539475256] Debug — [JobRunner] Jobs: Starting child process with pid 4616
Jul 08, 2023 11:09:28.982 [139923539475256] Debug — Started session successfully: 0D00E216-6749-4AF3-9AE5-C4DE99758D77
Jul 08, 2023 11:09:28.984 [139923675888440] Debug — Completed: [192.168.50.206:37364] 200 GET /status/sessions (11 live) #4a49 TLS GZIP 26ms 4187 bytes (pipelined: 9)
Jul 08, 2023 11:09:28.987 [139923608656696] Debug — Request: [127.0.0.1:56542 (Loopback)] PUT /video/:/transcode/session/0D00E216-6749-4AF3-9AE5-C4DE99758D77/f4b14ab9-2cd5-4ca1-8443-09c8ddb18365/progress?status=startup (12 live) #4aba Signed-in Token (alucard) (range: bytes=0-)
Jul 08, 2023 11:09:28.987 [139923677997880] Debug — Completed: [127.0.0.1:56542] 204 PUT /video/:/transcode/session/0D00E216-6749-4AF3-9AE5-C4DE99758D77/f4b14ab9-2cd5-4ca1-8443-09c8ddb18365/progress?status=startup (12 live) #4aba 0ms 203 bytes (pipelined: 1) (range: bytes=0-)
Jul 08, 2023 11:09:28.991 [139923570133816] Debug — Request: [127.0.0.1:56542 (Loopback)] POST /video/:/transcode/session/0D00E216-6749-4AF3-9AE5-C4DE99758D77/f4b14ab9-2cd5-4ca1-8443-09c8ddb18365/progress/log?level=0&message=%5BAVHWDeviceContext%20%40%200x7f325e13b440%5D%20Failed%20to%20initialise%20VAAPI%20connection%3A%20-1%20%28unknown%20libva%20error%29. (12 live) #4b9f Signed-in Token (alucard) (range: bytes=0-)
Jul 08, 2023 11:09:28.991 [139923570133816] Error — [Req#4b9f/Transcode/0D00E216-6749-4AF3-9AE5-C4DE99758D77/f4b14ab9-2cd5-4ca1-8443-09c8ddb18365] [AVHWDeviceContext @ 0x7f325e13b440] Failed to initialise VAAPI connection: -1 (unknown libva error).
Jul 08, 2023 11:09:28.991 [139923675888440] Debug — Completed: [127.0.0.1:56542] 200 POST /video/:/transcode/session/0D00E216-6749-4AF3-9AE5-C4DE99758D77/f4b14ab9-2cd5-4ca1-8443-09c8ddb18365/progress/log?level=0&message=%5BAVHWDeviceContext%20%40%200x7f325e13b440%5D%20Failed%20to%20initialise%20VAAPI%20connection%3A%20-1%20%28unknown%20libva%20error%29. (12 live) #4b9f 0ms 195 bytes (pipelined: 2) (range: bytes=0-)
Jul 08, 2023 11:09:28.991 [139923608656696] Debug — Request: [127.0.0.1:56542 (Loopback)] POST /video/:/transcode/session/0D00E216-6749-4AF3-9AE5-C4DE99758D77/f4b14ab9-2cd5-4ca1-8443-09c8ddb18365/progress/log?level=0&message=Device%20creation%20failed%3A%20-5. (12 live) #4ba6 Signed-in Token (alucard) (range: bytes=0-)
Jul 08, 2023 11:09:28.991 [139923608656696] Error — [Req#4ba6/Transcode/0D00E216-6749-4AF3-9AE5-C4DE99758D77/f4b14ab9-2cd5-4ca1-8443-09c8ddb18365] Device creation failed: -5.
Jul 08, 2023 11:09:28.991 [139923677997880] Debug — Completed: [127.0.0.1:56542] 200 POST /video/:/transcode/session/0D00E216-6749-4AF3-9AE5-C4DE99758D77/f4b14ab9-2cd5-4ca1-8443-09c8ddb18365/progress/log?level=0&message=Device%20creation%20failed%3A%20-5. (12 live) #4ba6 0ms 195 bytes (pipelined: 3) (range: bytes=0-)
Jul 08, 2023 11:09:28.992 [139923570133816] Debug — Request: [127.0.0.1:56542 (Loopback)] POST /video/:/transcode/session/0D00E216-6749-4AF3-9AE5-C4DE99758D77/f4b14ab9-2cd5-4ca1-8443-09c8ddb18365/progress/log?level=0&message=Failed%20to%20set%20value%20%27vaapi%3Dvaapi%3A%2Fdev%2Fdri%2FrenderD129%27%20for%20option%20%27init_hw_device%27%3A%20I%2FO%20error (12 live) #4bac Signed-in Token (alucard) (range: bytes=0-)
Jul 08, 2023 11:09:28.992 [139923570133816] Error — [Req#4bac/Transcode/0D00E216-6749-4AF3-9AE5-C4DE99758D77/f4b14ab9-2cd5-4ca1-8443-09c8ddb18365] Failed to set value 'vaapi=vaapi:/dev/dri/renderD129' for option 'init_hw_device': I/O error
Jul 08, 2023 11:09:28.992 [139923675888440] Debug — Completed: [127.0.0.1:56542] 200 POST /video/:/transcode/session/0D00E216-6749-4AF3-9AE5-C4DE99758D77/f4b14ab9-2cd5-4ca1-8443-09c8ddb18365/progress/log?level=0&message=Failed%20to%20set%20value%20%27vaapi%3Dvaapi%3A%2Fdev%2Fdri%2FrenderD129%27%20for%20option%20%27init_hw_device%27%3A%20I%2FO%20error (12 live) #4bac 0ms 195 bytes (pipelined: 4) (range: bytes=0-)
Jul 08, 2023 11:09:28.992 [139923608656696] Debug — Request: [192.168.50.206:37364
Moderator formatted for legibility </>
What do you get from groups plex
and ls -la /dev/dri
?
Also check: dpkg -l | grep nvidia
, look for libnvidia-decode and libnvidia-encode.
bryce@Astro-Cloud:~$ groups plex
plex : plex video render
bryce@Astro-Cloud:~$ ls -la /dev/dri
total 0
drwxr-xr-x 3 root root 140 Jul 8 09:00 .
drwxr-xr-x 20 root root 4580 Jul 8 09:00 ..
drwxr-xr-x 2 root root 120 Jul 8 09:00 by-path
crw-rw----+ 1 root render 226, 0 Jul 8 09:00 card0
crw-rw----+ 1 root render 226, 1 Jul 8 09:00 card1
crw-rw----+ 1 root render 226, 128 Jul 8 09:00 renderD128
crw-rw----+ 1 root render 226, 129 Jul 8 09:00 renderD129
bryce@Astro-Cloud:~$ dpkg -l | grep nvidia
ii libnvidia-cfg1-535:amd64 535.54.03-0ubuntu0.22.04.1 amd64 NVIDIA binary OpenGL/GLX configuration library
ii libnvidia-common-535 535.54.03-0ubuntu0.22.04.1 all Shared files used by the NVIDIA libraries
ii libnvidia-compute-535:amd64 535.54.03-0ubuntu0.22.04.1 amd64 NVIDIA libcompute package
ii libnvidia-compute-535:i386 535.54.03-0ubuntu0.22.04.1 i386 NVIDIA libcompute package
ii libnvidia-decode-535:amd64 535.54.03-0ubuntu0.22.04.1 amd64 NVIDIA Video Decoding runtime libraries
ii libnvidia-decode-535:i386 535.54.03-0ubuntu0.22.04.1 i386 NVIDIA Video Decoding runtime libraries
ii libnvidia-encode-535:amd64 535.54.03-0ubuntu0.22.04.1 amd64 NVENC Video Encoding runtime library
ii libnvidia-encode-535:i386 535.54.03-0ubuntu0.22.04.1 i386 NVENC Video Encoding runtime library
ii libnvidia-extra-535:amd64 535.54.03-0ubuntu0.22.04.1 amd64 Extra libraries for the NVIDIA driver
ii libnvidia-fbc1-535:amd64 535.54.03-0ubuntu0.22.04.1 amd64 NVIDIA OpenGL-based Framebuffer Capture runtime library
ii libnvidia-fbc1-535:i386 535.54.03-0ubuntu0.22.04.1 i386 NVIDIA OpenGL-based Framebuffer Capture runtime library
ii libnvidia-gl-535:amd64 535.54.03-0ubuntu0.22.04.1 amd64 NVIDIA OpenGL/GLX/EGL/GLES GLVND libraries and Vulkan ICD
ii libnvidia-gl-535:i386 535.54.03-0ubuntu0.22.04.1 i386 NVIDIA OpenGL/GLX/EGL/GLES GLVND libraries and Vulkan ICD
ii nvidia-compute-utils-535 535.54.03-0ubuntu0.22.04.1 amd64 NVIDIA compute utilities
ii nvidia-dkms-535 535.54.03-0ubuntu0.22.04.1 amd64 NVIDIA DKMS package
ii nvidia-driver-535 535.54.03-0ubuntu0.22.04.1 amd64 NVIDIA driver metapackage
ii nvidia-firmware-535-535.54.03 535.54.03-0ubuntu0.22.04.1 amd64 Firmware files used by the kernel module
ii nvidia-kernel-common-535 535.54.03-0ubuntu0.22.04.1 amd64 Shared files used with the kernel module
ii nvidia-kernel-source-535 535.54.03-0ubuntu0.22.04.1 amd64 NVIDIA kernel source package
ii nvidia-prime 0.8.17.1 all Tools to enable NVIDIA's Prime
ii nvidia-settings 510.47.03-0ubuntu1 amd64 Tool for configuring the NVIDIA graphics driver
ii nvidia-utils-535 535.54.03-0ubuntu0.22.04.1 amd64 NVIDIA driver support binaries
ii screen-resolution-extra 0.18.2 all Extension for the nvidia-settings control panel
ii xserver-xorg-video-nvidia-535 535.54.03-0ubuntu0.22.04.1 amd64 NVIDIA binary Xorg driver
Moderator formatted for legibility </>
Now please provide the logs ZIP which captures the attempt to play/transcode.
It’s not possible to diagnose further from a snippet
Stupid question time:
Since having installed all the kernel modules, has the machine been restarted?
Might you consider using the 525 drivers (CUDA 12.0) ? Asking because 535 drivers have not yet been tested.
This is known to work:
[chuck@lizum ~.1999]$ nvidia-smi
Sat Jul 8 14:46:24 2023
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 525.125.06 Driver Version: 525.125.06 CUDA Version: 12.0 |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|===============================+======================+======================|
| 0 Quadro P2200 On | 00000000:07:00.0 Off | N/A |
| 49% 39C P8 4W / 75W | 1MiB / 5120MiB | 0% Default |
| | | N/A |
+-------------------------------+----------------------+----------------------+
+-----------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=============================================================================|
| No running processes found |
+-----------------------------------------------------------------------------+
[chuck@lizum ~.2000]$
https://launchpad.net/ubuntu/+source/nvidia-graphics-drivers-525
Supplemental: (Hold up on the 525 drivers thought for a moment … )
You’re calling out /dev/dri/renderD129. (which is the Nvidia)
Jul 08, 2023 09:00:40.477 [139923646143288] DEBUG - [GPU] Got device: TU116 [GeForce GTX 1660 SUPER], nvidia@unknown, default true, best true, ID /dev/dri/renderD129, DevID [10de:21c4:1043:8756], flags 0x70
Jul 08, 2023 09:00:40.477 [139923646143288] DEBUG - [GPU] Got device: HD Graphics 530, intel@builtin, default false, best false, ID /dev/dri/renderD128, DevID [8086:1912:1043:8694], flags 0x1c57
but PMS is calling for VAAPI . It should be calling out NVDEC and NVENC
Where do you have something set manually ? (Preferences.xml ?)
If nothing is set then the issue is the Nvidia 535 driver.
I didnt manually make any changes. I tried to open the preferences.xml but the system wont even allow me to. I downgraded to the 525 driver and still no luck. ive attached the log after switching to 525 and attempting HW transcoding again.
Plex Media Server Logs_2023-07-08_13-14-33.zip (4.0 MB)
That’s definite progress.
Jul 08, 2023 13:00:49.198 [140695309826872] DEBUG - [Req#1f1/Transcode/1DAAADC2-11F2-4009-BD10-5FABEFE06F8B] [FFMPEG] - Created surface 0.
Jul 08, 2023 13:00:49.198 [140695309826872] DEBUG - [Req#1f1/Transcode/1DAAADC2-11F2-4009-BD10-5FABEFE06F8B] [FFMPEG] - Direct mapping possible.
Jul 08, 2023 13:00:49.199 [140695309826872] DEBUG - [Req#1f1/Transcode/1DAAADC2-11F2-4009-BD10-5FABEFE06F8B] TPU: hardware transcoding: final decoder: nvdec, final encoder: vaapi
Jul 08, 2023 13:00:49.200 [140695309826872] DEBUG - [Req#1f1/Transcode/1DAAADC2-11F2-4009-BD10-5FABEFE06F8B/JobRunner] Job running: FFMPEG_EXTERNAL_LIBS='/var/lib/plexmediaserver/Library/Application\ Support/Plex\ Media\ Server/Codecs/8217c1c-4565-linux-x86_64/' LIBVA_DRIVERS_PATH="/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Cache/va-dri-linux-x86_64" X_PLEX_TOKEN=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx "/usr/lib/plexmediaserver/Plex Transcoder" -codec:0 hevc -hwaccel:0 nvdec -hwaccel_fallback_threshold:0 10 -threads:0 1 -hwaccel_device:0 cuda -codec:1 aac -analyzeduration 20000000 -probesize 20000000 -i /media/bryce/Astrocloud/Plex/Movies/Guardians.of.the.Galaxy.Vol.3.2023.1080p.10bit.WEBRip.6CH.x265.HEVC-PSA.mkv -filter_complex "[0:0]scale=w=480:h=254:force_divisible_by=4[0];[0]format=pix_fmts=nv12[1];[1]hwupload[2]" -map "[2]" -codec:0 h264_vaapi -b:0 409k -maxrate:0 546k -bufsize:0 1092k -r:0 23.975999999999999 -force_key_frames:0 "expr:gte(t,n_forced*8)" -filter_complex "[0:1] aresample=async=1:ochl='stereo':rematrix_maxval=0.000000dB:osr=48000[3]" -map "[3]" -metadata:s:1 language=eng -codec:1 libopus -b:1 130k -segment_format matroska -f ssegment -individual_header_trailer 0 -flags +global_header -segment_header_filename header -segment_time 8 -segment_start_number 0 -segment_copyts 1 -segment_time_delta 0.0625 -segment_list "http://127.0.0.1:32400/video/:/transcode/session/1DAAADC2-11F2-4009-BD10-5FABEFE06F8B/51e6f13c-e536-4219-b931-2b63d42ff58c/manifest?X-Plex-Http-Pipeline=infinite" -segment_list_type csv -segment_list_size 5 -segment_list_separate_stream_times 1 -segment_list_unfinished 1 -segment_format_options output_ts_offset=10 -max_delay 5000000 -avoid_negative_ts disabled -map_metadata:g -1 -map_metadata:c -1 -map_chapters -1 "media-%05d.ts" -start_at_zero -copyts -vsync cfr -init_hw_device vaapi=vaapi:/dev/dri/renderD129 -filter_hw_device vaapi -y -nostats -loglevel quiet -loglevel_plex error -progressurl http://127.0.0.1:32400/video/:/transcode/session/1DAAADC2-11F2-4009-BD10-5FABEFE06F8B/51e6f13c-e536-4219-b931-2b63d42ff58c/progress
Jul 08, 2023 13:00:49.200 [140695309826872] DEBUG - [Req#1f1/Transcode/1DAAADC2-11F2-4009-BD10-5FABEFE06F8B/JobRunner] In directory: "/media/bryce/Astrocloud/Plex/Temp/Transcode/Sessions/plex-transcode-1DAAADC2-11F2-4009-BD10-5FABEFE06F8B-51e6f13c-e536-4219-b931-2b63d42ff58c"
Jul 08, 2023 13:00:49.201 [140695309826872] DEBUG - [Req#1f1/Transcode/1DAAADC2-11F2-4009-BD10-5FABEFE06F8B/JobRunner] Jobs: Starting child process with pid 4023
Jul 08, 2023 13:00:49.220 [140695275559736] DEBUG - Request: [127.0.0.1:47862 (Loopback)] PUT /video/:/transcode/session/1DAAADC2-11F2-4009-BD10-5FABEFE06F8B/51e6f13c-e536-4219-b931-2b63d42ff58c/progress?status=startup (24 live) #1f8 Signed-in Token (alucard) (range: bytes=0-)
Jul 08, 2023 13:00:49.221 [140695387978552] DEBUG - Completed: [127.0.0.1:47862] 204 PUT /video/:/transcode/session/1DAAADC2-11F2-4009-BD10-5FABEFE06F8B/51e6f13c-e536-4219-b931-2b63d42ff58c/progress?status=startup (24 live) #1f8 1ms 203 bytes (pipelined: 1) (range: bytes=0-)
Jul 08, 2023 13:00:49.231 [140695279778616] DEBUG - Request: [127.0.0.1:47862 (Loopback)] POST /video/:/transcode/session/1DAAADC2-11F2-4009-BD10-5FABEFE06F8B/51e6f13c-e536-4219-b931-2b63d42ff58c/progress/log?level=0&message=%5BAVHWDeviceContext%20%40%200x7fedfb6f88c0%5D%20Failed%20to%20initialise%20VAAPI%20connection%3A%20-1%20%28unknown%20libva%20error%29. (24 live) #1fa Signed-in Token (alucard) (range: bytes=0-)
Jul 08, 2023 13:00:49.231 [140695279778616] ERROR - [Req#1fa/Transcode/1DAAADC2-11F2-4009-BD10-5FABEFE06F8B/51e6f13c-e536-4219-b931-2b63d42ff58c] [AVHWDeviceContext @ 0x7fedfb6f88c0] Failed to initialise VAAPI connection: -1 (unknown libva error).
It’s calling out libnvidia-decode (nvdec)
It’s still trying to use VAAPI (QSV) on the Nvidia.
Please check and make certain libnvidia-encode is also installed ?
Then, when complete, Make certain the transcoder is selecting the Nvidia.
“Auto” can cause it to split the loading (which will fail here due to Nvidia protocol)
GPU selection is new in these last 2 releases. There are a few implementation issues we’re working through.
Libnvidia-encode is installed. Where do I select which encoder to use? I dont see that option.
So… installed latest beta and selected Nvidia. It works!
system
Closed
October 6, 2023, 8:45pm
12
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.