Plex not transcoding using my GPU - Linux

Server Version#: 1.25.4.5426
Player Version#: AppleTV 7.27

Hello I run Plex Media Server on by Linux Debian 10 based distro, specifically Deepin 20.4. The server runs and functions perfectly fine, but I experience a severe bottleneck with my CPU doing all the transcoding work. I have a GPU and I have Plex Pass with Hardware acceleration enabled, but it seems my video is never transcoded with my GPU, ever.

My Intel CPU supports Quick Sync Video, it’s an i7-7500U and the GPU I have is a GeForce 940 MX. I also have the latest drivers installed and everything but Plex never detects my GPU to transcode. PS I also have 32 GB RAM, in case you’re wondering.

xyz@-PC:~$ nvidia-smi
Tue Jan 25 22:08:44 2022       
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 470.86       Driver Version: 470.86       CUDA Version: 11.4     |
|-------------------------------+----------------------+----------------------+
| 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 ...  On   | 00000000:01:00.0 Off |                  N/A |
| N/A   46C    P8    N/A /  N/A |      3MiB /  4046MiB |      0%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+
                                                                               
+-----------------------------------------------------------------------------+
| Processes:                                                                  |
|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
|        ID   ID                                                   Usage      |
|=============================================================================|
|    0   N/A  N/A      3174      G   /usr/lib/xorg/Xorg                  2MiB |
+-----------------------------------------------------------------------------+ 

Xorg is the only process running on the GPU when I run super big 4k HDR videos and of course it buffers extremely because my CPU cannot handle it all.

Here’s me updating the server to the latest version as well and as you can see I pass all checks:

xyz@-PC:~/Downloads$ sudo dpkg -i plexmediaserver_1.25.4.5426-eb46d070e_amd64.deb 
[sudo] password for xyz: 
Verification successful
(Reading database ... 253167 files and directories currently installed.)
Preparing to unpack plexmediaserver_1.25.4.5426-eb46d070e_amd64.deb ...
PlexMediaServer install: Pre-installation Validation.
PlexMediaServer install: Pre-installation Validation complete.
Unpacking plexmediaserver (1.25.4.5426-eb46d070e) over (1.25.3.5409-f11334058) ...
Setting up plexmediaserver (1.25.4.5426-eb46d070e) ...
PlexMediaServer install: PlexMediaServer-1.25.4.5426-eb46d070e - Installation starting.
PlexMediaServer install: 
PlexMediaServer install: Now installing based on:
PlexMediaServer install:   Installation Type:   Update
PlexMediaServer install:   Process Control:     systemd
PlexMediaServer install:   Plex User:           plex
PlexMediaServer install:   Plex Group:          plex
PlexMediaServer install:   Video Group:         render
PlexMediaServer install:   Metadata Dir:        /var/lib/plexmediaserver/Library/Application Support
PlexMediaServer install:   Temp Directory:      /tmp 
PlexMediaServer install:   Lang Encoding:       en_US.UTF-8
PlexMediaServer install:   Intel i915 Hardware: Found
PlexMediaServer install:   Nvidia GPU card:     Found
PlexMediaServer install:  
PlexMediaServer install:   OpenCL:              Installed
PlexMediaServer install:   Beignet:             Installed
PlexMediaServer install:  
PlexMediaServer install: Completing final configuration.
PlexMediaServer install: Starting Plex Media Server.
PlexMediaServer install: PlexMediaServer-1.25.4.5426-eb46d070e - Installation successful.  Errors: 0, Warnings: 0
Processing triggers for lastore-daemon (5.3.5-1) ...
Processing triggers for bamfdaemon (0.5.4.1-1+eagle) ...
Rebuilding /usr/share/applications/bamf-2.index...
Processing triggers for desktop-file-utils (0.23-4) ...
Processing triggers for mime-support (3.62) ...
xyz@-PC:~/Downloads$ 

Can anyone please help me with this? I have no means to get Plex to “see” my GPU so it can transcode accordingly. Thank you.

Please generate DEBUG log files which capture the start of a playback session which needs transcoding.

The logs will tell us what PMS sees and the decisions it makes.

  1. start playback
  2. let play 20 sec.
  3. stop
  4. wait 20
  5. Download logs zip
  6. attach ZIP

Hello,

I cleared logs, hit the play button ran it for 20seconds, stopped, run it another 20 seconds and downloaded logs, as requested.

Download: New page - Nimbus Note

I ran it again, for good measure: New page - Nimbus Note

@ChuckPa it seem my issue may be related to this, which you also recently dealt with: RPM Error Tonemapping in HW- "Unable to get number of OpenCL platforms"-- Happens with all RPM Distributions - #111 by truevibe

Sadly, however, in this topic, the solution was running Docker, which I am not so keen of :frowning: any ideas?

@Graniez

The log file you shared shows HEVC HDR → SDR tonemapping active.

Jan 25, 2022 22:53:03.227 [0x7f419fb8fb38] DEBUG - [Transcode] [FFMPEG] - Considering format 0x30313050 -> p010le.
Jan 25, 2022 22:53:03.227 [0x7f419fb8fb38] DEBUG - [Transcode] [FFMPEG] - Picked p010le (0x30313050) as best match for yuv420p10le.
Jan 25, 2022 22:53:03.228 [0x7f419fb8fb38] DEBUG - [Transcode] [FFMPEG] - Decode context initialised: 0x16/0x10000000.
Jan 25, 2022 22:53:03.228 [0x7f419fb8fb38] DEBUG - [Transcode] [FFMPEG] - Param buffer (type 0, 604 bytes) is 0.
Jan 25, 2022 22:53:03.228 [0x7f419fb8fb38] DEBUG - [Transcode] [FFMPEG] - Slice 0 param buffer (264 bytes) is 0x1.
Jan 25, 2022 22:53:03.228 [0x7f419fb8fb38] DEBUG - [Transcode] [FFMPEG] - Slice 0 data buffer (47 bytes) is 0x2.
Jan 25, 2022 22:53:03.228 [0x7f419fb8fb38] DEBUG - [Transcode] [FFMPEG] - Decode to surface 0x13.
Jan 25, 2022 22:53:03.229 [0x7f419fb8fb38] DEBUG - [Transcode] Codecs: 10-bit HEVC test succeeded
Jan 25, 2022 22:53:03.232 [0x7f419fb8fb38] DEBUG - [Transcode] Scaled up video bitrate to 65596Kbps based on 4.500000x fudge factor.
Jan 25, 2022 22:53:03.232 [0x7f419fb8fb38] DEBUG - [Transcode] Scaled maximum bitrate for resolution reduction to 41981Kbps.
Jan 25, 2022 22:53:03.232 [0x7f419fb8fb38] DEBUG - [Transcode] MDE: Cannot direct stream audio stream due to codec eac3 when profile only allows aac
Jan 25, 2022 22:53:03.232 [0x7f419fb8fb38] DEBUG - [Transcode] MDE: Resident Evil: Welcome to Raccoon City (2021): selected media 0 / 2730
Jan 25, 2022 22:53:03.233 [0x7f419fb8fb38] DEBUG - [Transcode] Streaming Resource: Adding session 0x7f419fd7bcb8:qd35tja707hq8dpo2fdpbqmq which is using transcoder slot.  Used slots is now 1
Jan 25, 2022 22:53:03.233 [0x7f419fb8fb38] DEBUG - [Transcode] Streaming Resource: Added session 0x7f419fd7bcb8:qd35tja707hq8dpo2fdpbqmq
Jan 25, 2022 22:53:03.234 [0x7f419fb8fb38] DEBUG - [Transcode] Streaming Resource: Reached Decision id=1180 codes=(General=1001,Direct play not available; Conversion OK. Direct Play=3000,App cannot direct play this item. Direct play is disabled. Transcode=1001,Direct play not available; Conversion OK.) media=(id=2730 part=(id=2775 decision=transcode container=mp4 protocol=dash streams=(Video=(id=7530 decision=transcode bitrate=41981 encoder=h264_vaapi width=3072 height=1280) Audio=(id=7531 decision=transcode bitrate=256 encoder=aac channels=2 rate=48000))))
Jan 25, 2022 22:53:03.235 [0x7f41a0666b38] DEBUG - Completed: [127.0.0.1:38038] 200 GET /video/:/transcode/universal/decision?hasMDE=1&path=%2Flibrary%2Fmetadata%2F1180&mediaIndex=0&partIndex=0&protocol=dash&fastSeek=1&directPlay=0&directStream=1&subtitleSize=100&audioBoost=100&location=lan&addDebugOverlay=0&autoAdjustQuality=1&directStreamAudio=1&mediaBufferSize=102400&session=60qbh5r0w6ykx4008fai5p6s&subtitles=burn&Accept-Language=en-GB (9 live) GZIP 66ms 3428 bytes (pipelined: 13)
Jan 25, 2022 22:53:03.240 [0x7f419fadcb38] DEBUG - Request: [127.0.0.1:38046 (Loopback)] GET /status/sessions (9 live) GZIP Signed-in Token (Graniez)
Jan 25, 2022 22:53:03.240 [0x7f419fadcb38] DEBUG - [Now] Adding 1 sessions.
Jan 25, 2022 22:53:03.243 [0x7f41a0689b38] DEBUG - Completed: [127.0.0.1:38046] 200 GET /status/sessions (9 live) GZIP 3ms 3309 bytes (pipelined: 6)
Jan 25, 2022 22:53:03.287 [0x7f419f98cb38] DEBUG - Request: [127.0.0.1:38046 (Loopback)] GET /web/js/chunk-123-ff63466dc0e6aab4ae61-plex-4.69.1.20463-d3adc51.js (9 live) GZIP Signed-in
Jan 25, 2022 22:53:03.287 [0x7f419f98cb38] DEBUG - Final path: "/usr/lib/plexmediaserver/Resources/Plug-ins-eb46d070e/WebClient.bundle/Contents/Resources/js/chunk-123-ff63466dc0e6aab4ae61-plex-4.69.1.20463-d3adc51.js"
Jan 25, 2022 22:53:03.287 [0x7f419f98cb38] DEBUG - Content-Length of /usr/lib/plexmediaserver/Resources/Plug-ins-eb46d070e/WebClient.bundle/Contents/Resources/js/chunk-123-ff63466dc0e6aab4ae61-plex-4.69.1.20463-d3adc51.js is 379365 (of total: 379365).
Jan 25, 2022 22:53:03.288 [0x7f419f98cb38] DEBUG - Request: [127.0.0.1:38052 (Loopback)] GET /web/js/chunk-686-e6ace0349b6ea8a7666f-plex-4.69.1.20463-d3adc51.js (10 live) GZIP Signed-in
Jan 25, 2022 22:53:03.288 [0x7f419f98cb38] DEBUG - Final path: "/usr/lib/plexmediaserver/Resources/Plug-ins-eb46d070e/WebClient.bundle/Contents/Resources/js/chunk-686-e6ace0349b6ea8a7666f-plex-4.69.1.20463-d3adc51.js"
Jan 25, 2022 22:53:03.288 [0x7f419f98cb38] DEBUG - Content-Length of /usr/lib/plexmediaserver/Resources/Plug-ins-eb46d070e/WebClient.bundle/Contents/Resources/js/chunk-686-e6ace0349b6ea8a7666f-plex-4.69.1.20463-d3adc51.js is 7332 (of total: 7332).
Jan 25, 2022 22:53:03.288 [0x7f41a0666b38] DEBUG - Completed: [127.0.0.1:38046] 200 GET /web/js/chunk-123-ff63466dc0e6aab4ae61-plex-4.69.1.20463-d3adc51.js (10 live) GZIP 0ms 379365 bytes (pipelined: 7)
Jan 25, 2022 22:53:03.288 [0x7f41a0666b38] DEBUG - Completed: [127.0.0.1:38052] 200 GET /web/js/chunk-686-e6ace0349b6ea8a7666f-plex-4.69.1.20463-d3adc51.js (10 live) GZIP 0ms 7332 bytes (pipelined: 1)
Jan 25, 2022 22:53:03.408 [0x7f419fadcb38] DEBUG - Request: [127.0.0.1:38038 (Loopback)] GET /video/:/transcode/universal/start.mpd?hasMDE=1&path=%2Flibrary%2Fmetadata%2F1180&mediaIndex=0&partIndex=0&protocol=dash&fastSeek=1&directPlay=0&directStream=1&subtitleSize=100&audioBoost=100&location=lan&addDebugOverlay=0&autoAdjustQuality=1&directStreamAudio=1&mediaBufferSize=102400&session=60qbh5r0w6ykx4008fai5p6s&subtitles=burn&Accept-Language=en-GB (10 live) GZIP Signed-in Token (Graniez)
Jan 25, 2022 22:53:03.408 [0x7f419fadcb38] DEBUG - [Transcode] Found session GUID of 60qbh5r0w6ykx4008fai5p6s in session start.
Jan 25, 2022 22:53:03.408 [0x7f419fadcb38] DEBUG - [Transcode] TranscodeUniversalRequest: using augmented profile Web
Jan 25, 2022 22:53:03.408 [0x7f419fadcb38] DEBUG - [Transcode] Downloading document http://127.0.0.1:32400/library/metadata/1180?checkFiles=1&includeBandwidths=1&offset=-1&X-Plex-Incomplete-Segments=1&X-Plex-Session-Identifier=qd35tja707hq8dpo2fdpbqmq
Jan 25, 2022 22:53:03.422 [0x7f419fadcb38] DEBUG - [Transcode] We're going to try to auto-select an audio stream for account 1.
Jan 25, 2022 22:53:03.423 [0x7f419fadcb38] DEBUG - [Transcode] Selecting best audio stream for part ID 2775 (autoselect: 0 language: en)
Jan 25, 2022 22:53:03.423 [0x7f419fadcb38] DEBUG - [Transcode] Audio Stream: 7531, Subtitle Stream: -1
Jan 25, 2022 22:53:03.424 [0x7f419fadcb38] DEBUG - [Transcode] Found session GUID of 60qbh5r0w6ykx4008fai5p6s in session start.
Jan 25, 2022 22:53:03.424 [0x7f419fadcb38] DEBUG - [Transcode] Cleaning directory for session 60qbh5r0w6ykx4008fai5p6s ()
Jan 25, 2022 22:53:03.425 [0x7f419fadcb38] DEBUG - [Transcode] Starting a transcode session 60qbh5r0w6ykx4008fai5p6s at offset -1.0 (state=3)
Jan 25, 2022 22:53:03.425 [0x7f419fadcb38] DEBUG - [Transcode] TPU: hardware transcoding: using hardware decode accelerator vaapi
Jan 25, 2022 22:53:03.425 [0x7f419fadcb38] DEBUG - [Transcode] TPU: hardware transcoding: zero-copy support present
Jan 25, 2022 22:53:03.425 [0x7f419fadcb38] DEBUG - [Transcode] TPU: hardware transcoding: using zero-copy transcoding
Jan 25, 2022 22:53:03.425 [0x7f419fadcb38] INFO - [Transcode] CodecManager: starting EAE at "/tmp/pms-e3058960-842d-4e92-85c0-aac3f16e0788/EasyAudioEncoder"
Jan 25, 2022 22:53:03.426 [0x7f419fadcb38] DEBUG - [Transcode/JobRunner] Job running: '/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Codecs/EasyAudioEncoder-1714-linux-x86_64/EasyAudioEncoder/EasyAudioEncoder'
Jan 25, 2022 22:53:03.426 [0x7f419fadcb38] DEBUG - [Transcode/JobRunner] Jobs: Starting child process with pid 10333
Jan 25, 2022 22:53:03.427 [0x7f419fadcb38] DEBUG - [Transcode] [Universal] Using local file path instead of URL: /media/granwille/5027d523-7057-4b72-8866-840ae5d33851/Media/Movies/Resident.Evil.Welcome.to.Raccoon.City.2021.2160p.AMZN.WEB-DL.x265.10bit.HDR10Plus.DDP5.1-CM/Resident.Evil.Welcome.to.Raccoon.City.2021.2160p.AMZN.WEB-DL.x265.10bit.HDR10Plus.DDP5.1-CM.mkv
Jan 25, 2022 22:53:03.427 [0x7f419fadcb38] DEBUG - [Transcode] Codecs: hardware transcoding: testing API vaapi
Jan 25, 2022 22:53:03.428 [0x7f419fadcb38] DEBUG - [Transcode] [FFMPEG] - Format 0x41524742 -> bgra.
Jan 25, 2022 22:53:03.428 [0x7f419fadcb38] DEBUG - [Transcode] [FFMPEG] - Format 0x42475241 -> argb.
Jan 25, 2022 22:53:03.428 [0x7f419fadcb38] DEBUG - [Transcode] [FFMPEG] - Format 0x41424752 -> rgba.
Jan 25, 2022 22:53:03.428 [0x7f419fadcb38] DEBUG - [Transcode] [FFMPEG] - Format 0x52474241 -> abgr.
Jan 25, 2022 22:53:03.428 [0x7f419fadcb38] DEBUG - [Transcode] [FFMPEG] - Format 0x58524742 -> bgr0.
Jan 25, 2022 22:53:03.428 [0x7f419fadcb38] DEBUG - [Transcode] [FFMPEG] - Format 0x42475258 -> 0rgb.
Jan 25, 2022 22:53:03.428 [0x7f419fadcb38] DEBUG - [Transcode] [FFMPEG] - Format 0x58424752 -> rgb0.
Jan 25, 2022 22:53:03.428 [0x7f419fadcb38] DEBUG - [Transcode] [FFMPEG] - Format 0x52474258 -> 0bgr.
Jan 25, 2022 22:53:03.428 [0x7f419fadcb38] DEBUG - [Transcode] [FFMPEG] - Format 0x30335241 -> unknown.
Jan 25, 2022 22:53:03.428 [0x7f419fadcb38] DEBUG - [Transcode] [FFMPEG] - Format 0x30334241 -> unknown.
Jan 25, 2022 22:53:03.428 [0x7f419fadcb38] DEBUG - [Transcode] [FFMPEG] - Format 0x30335258 -> x2rgb10le.
Jan 25, 2022 22:53:03.428 [0x7f419fadcb38] DEBUG - [Transcode] [FFMPEG] - Format 0x30334258 -> unknown.
Jan 25, 2022 22:53:03.428 [0x7f419fadcb38] DEBUG - [Transcode] [FFMPEG] - Format 0x36314752 -> unknown.
Jan 25, 2022 22:53:03.428 [0x7f419fadcb38] DEBUG - [Transcode] [FFMPEG] - Format 0x50424752 -> unknown.
Jan 25, 2022 22:53:03.428 [0x7f419fadcb38] DEBUG - [Transcode] [FFMPEG] - Format 0x50524742 -> unknown.
Jan 25, 2022 22:53:03.428 [0x7f419fadcb38] DEBUG - [Transcode] [FFMPEG] - Format 0x56555941 -> unknown.
Jan 25, 2022 22:53:03.429 [0x7f419fadcb38] DEBUG - [Transcode] [FFMPEG] - Format 0x30303859 -> gray.
Jan 25, 2022 22:53:03.429 [0x7f419fadcb38] DEBUG - [Transcode] [FFMPEG] - Format 0x3231564e -> nv12.
Jan 25, 2022 22:53:03.429 [0x7f419fadcb38] DEBUG - [Transcode] [FFMPEG] - Format 0x3132564e -> unknown.
Jan 25, 2022 22:53:03.429 [0x7f419fadcb38] DEBUG - [Transcode] [FFMPEG] - Format 0x32595559 -> yuyv422.
Jan 25, 2022 22:53:03.429 [0x7f419fadcb38] DEBUG - [Transcode] [FFMPEG] - Format 0x59565955 -> uyvy422.
Jan 25, 2022 22:53:03.429 [0x7f419fadcb38] DEBUG - [Transcode] [FFMPEG] - Format 0x32315659 -> yuv420p.
Jan 25, 2022 22:53:03.429 [0x7f419fadcb38] DEBUG - [Transcode] [FFMPEG] - Format 0x30323449 -> yuv420p.
Jan 25, 2022 22:53:03.429 [0x7f419fadcb38] DEBUG - [Transcode] [FFMPEG] - Format 0x50313134 -> yuv411p.
Jan 25, 2022 22:53:03.429 [0x7f419fadcb38] DEBUG - [Transcode] [FFMPEG] - Format 0x48323234 -> yuv422p.
Jan 25, 2022 22:53:03.429 [0x7f419fadcb38] DEBUG - [Transcode] [FFMPEG] - Format 0x56323234 -> yuv440p.
Jan 25, 2022 22:53:03.429 [0x7f419fadcb38] DEBUG - [Transcode] [FFMPEG] - Format 0x50343434 -> yuv444p.
Jan 25, 2022 22:53:03.429 [0x7f419fadcb38] DEBUG - [Transcode] [FFMPEG] - Format 0x33434d49 -> unknown.
Jan 25, 2022 22:53:03.429 [0x7f419fadcb38] DEBUG - [Transcode] [FFMPEG] - Format 0x30313050 -> p010le.
Jan 25, 2022 22:53:03.429 [0x7f419fadcb38] DEBUG - [Transcode] [FFMPEG] - Created surface 0.
Jan 25, 2022 22:53:03.429 [0x7f419fadcb38] DEBUG - [Transcode] [FFMPEG] - Direct mapping possible.
Jan 25, 2022 22:53:03.430 [0x7f419fadcb38] DEBUG - [Transcode] TPU: hardware transcoding: final decoder: vaapi, final encoder: vaapi
Jan 25, 2022 22:53:03.431 [0x7f419fadcb38] DEBUG - [Transcode/JobRunner] Job running: EAE_ROOT='/tmp/pms-e3058960-842d-4e92-85c0-aac3f16e0788/EasyAudioEncoder' EnableExtendedVaFormats='1' FFMPEG_EXTERNAL_LIBS='/var/lib/plexmediaserver/Library/Application\ Support/Plex\ Media\ Server/Codecs/62cc2bc-4226-linux-x86_64/' LIBVA_DRIVERS_PATH='/usr/lib/plexmediaserver/lib/dri' NEOReadDebugKeys='1' X_PLEX_TOKEN='xxxxxxxxxxxxxxxxxxxx' '/usr/lib/plexmediaserver/Plex Transcoder' '-codec:0' 'hevc' '-hwaccel:0' 'vaapi' '-hwaccel_fallback_threshold:0' '10' '-hwaccel_output_format:0' 'vaapi' '-hwaccel_device:0' 'vaapi' '-codec:1' 'eac3_eae' '-eae_prefix:1' '60qbh5r0w6ykx4008fai5p6s_' '-analyzeduration' '20000000' '-probesize' '20000000' '-i' '/media/granwille/5027d523-7057-4b72-8866-840ae5d33851/Media/Movies/Resident.Evil.Welcome.to.Raccoon.City.2021.2160p.AMZN.WEB-DL.x265.10bit.HDR10Plus.DDP5.1-CM/Resident.Evil.Welcome.to.Raccoon.City.2021.2160p.AMZN.WEB-DL.x265.10bit.HDR10Plus.DDP5.1-CM.mkv' '-filter_complex' '[0:0]hwupload[0];[0]scale_vaapi=w=3072:h=1280:format=p010[1];[1]hwmap=derive_device=opencl[2];[2]tonemap_opencl=tonemap=mobius:format=nv12:m=bt709:p=bt709:r=tv[3];[3]hwmap=derive_device=vaapi:reverse=1[4];[4]hwupload[5]' '-map' '[5]' '-codec:0' 'h264_vaapi' '-b:0' '31485k' '-maxrate:0' '41981k' '-bufsize:0' '83962k' '-r:0' '23.975999999999999' '-force_key_frames:0' 'expr:gte(t,n_forced*3)' '-filter_complex' '[0:1] aresample=async=1:ocl='\''stereo'\'':rematrix_maxval=0.000000dB:osr=48000[6]' '-map' '[6]' '-metadata:s:1' 'language=eng' '-codec:1' 'aac' '-b:1' '256k' '-f' 'dash' '-seg_duration' '3' '-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/60qbh5r0w6ykx4008fai5p6s/88470c05-001c-44ea-a328-5737adc0c781/manifest?X-Plex-Http-Pipeline=infinite' '-avoid_negative_ts' 'disabled' '-map_metadata' '-1' '-map_chapters' '-1' 'dash' '-start_at_zero' '-copyts' '-vsync' 'cfr' '-init_hw_device' 'vaapi=vaapi:' '-filter_hw_device' 'vaapi' '-y' '-nostats' '-loglevel' 'quiet' '-loglevel_plex' 'error' '-progressurl' 'http://127.0.0.1:32400/video/:/transcode/session/60qbh5r0w6ykx4008fai5p6s/88470c05-001c-44ea-a328-5737adc0c781/progress'

As it launches it fails to create the OpenCL device context which @Ridley is aware of and working on.

Jan 25, 2022 22:53:03.573 [0x7f419fadcb38] ERROR - [Transcoder] [AVHWDeviceContext @ 0x7fd836267fc0] Failed to get number of OpenCL platforms: -1001.
Jan 25, 2022 22:53:03.573 [0x7f419fb8fb38] ERROR - [Transcoder] [AVHWDeviceContext @ 0x7fd836267fc0] Failed to get number of OpenCL platforms: -1001.
Jan 25, 2022 22:53:03.573 [0x7f419f98cb38] ERROR - [Transcoder] [Parsed_hwmap_2 @ 0x7fd8362695c0] Failed to created derived device context: -19.
Jan 25, 2022 22:53:03.575 [0x7f419fadcb38] ERROR - [Transcoder] [Parsed_hwmap_2 @ 0x7fd8362695c0] Failed to configure output pad on Parsed_hwmap_2
Jan 25, 2022 22:53:03.576 [0x7f419fb8fb38] ERROR - [Transcoder] Error reinitializing filters!

I don’t know where she’s at with that work. I am largely offline due to illness.
I only poked in here now for a bit.

Thank you for your feedback, perhaps @Ridley may have an update for this case.

Please provide the output from
ls -l /dev/dri

You should see renderD128 (Intel iGPU) and renderD129 (Nvidia dGPU) in the output.

Add this to preferences.xml

HardwareDevicePath=“/dev/dri/render129”

This is what I get @Achilles

xyz@xyz-PC:/usr/lib/plexmediaserver$ ls -l /dev/dri
total 0
drwxr-xr-x  2 root root        120 Jan 26 09:54 by-path
crw-rw----+ 1 root render 226,   0 Jan 26 10:24 card0
crw-rw----+ 1 root render 226,   1 Jan 26 09:54 card1
crw-rw----+ 1 root render 226, 128 Jan 26 09:54 renderD128
crw-rw----+ 1 root render 226, 129 Jan 26 09:54 renderD129

Can you tell me where to find preferences.xml, please?

This variable can be added/modifed using nano or vi at /var/lib/plexmediaserver/Library/Application\ Support/Plex\ Media\ Server/Preferences.xml

Done, added: @Achilles

<?xml version="1.0" encoding="utf-8"?>
<Preferences OldestPreviousVersion="1.24.0.4930-ab6e1a058" MachineIdentifier="81b0c703-c4e1-47a2-8294-05d00418f5f5" ProcessedMachineIdentifier="d86754d11d398cc90342bc46fddddbc5b1c903a6" AnonymousMachineIdentifier="fd108d97-d258-4cb3-b6b3-e5fea69db6f1" MetricsEpoch="1" AcceptedEULA="1" PublishServerOnPlexOnlineKey="0" PlexOnlineToken="UQvcQgq-LvD3bGjx_mow" PlexOnlineUsername="Graniez" PlexOnlineMail="plex@granwille.com" PlexOnlineHome="1" DlnaEnabled="0" DvrIncrementalEpgLoader="0" CertificateUUID="d758d57b3c3e4fa6aee0a99fb4b9e112" LastAutomaticMappedPort="12414" PubSubServer="139.162.215.242" PubSubServerRegion="lhr" PubSubServerPing="1559" CertificateVersion="3" FriendlyName="home.granwille.com" FSEventLibraryPartialScanEnabled="1" FSEventLibraryUpdatesEnabled="1" ScheduledLibraryUpdatesEnabled="1" LanguageInCloud="1" DisableTLSv1_0="1" EnableIPv6="0" PreferredNetworkInterface="enp3s0" TranscoderQuality="0" CloudSyncNeedsUpdate="0" HardwareAcceleratedCodecs="1" WebHooksEnabled="0" WanTotalMaxUploadRate="25000" CinemaTrailersFromBluRay="1" CinemaTrailersFromTheater="1" LogVerbose="0" TranscoderH264BackgroundPreset="veryfast" logDebug="1" allowedNetworks="192.168.50.247" LanNetworksBandwidth="" RelayEnabled="0" PushNotificationsEnabled="1" secureConnections="1" TreatWanIpAsLocal="1" HardwareAcceleratedEncoders="1" TranscoderToneMapping="1" TranscodeCountLimit="1" HardwareDevicePath="/dev/dri/render129"/>

Make sure there is a space between the “ and / at the end.

Done, going to restart Plex server now and test.

No luck @Achilles Here’s my latest logs: New page - Nimbus Note

Sorry can’t look at logs right now from my phone. Can you grep TPU from the log and paste here?

Here you go:

xyz@xyz-PC:~/Downloads$ cat Plex\ Media\ Server.log | grep TPU
Jan 26, 2022 11:33:25.259 [0x7f942c184b38] DEBUG - [Transcode] TPU: hardware transcoding: enabled, but no hardware decode accelerator found
Jan 26, 2022 11:33:25.265 [0x7f942c184b38] DEBUG - [Transcode] TPU: hardware transcoding: final decoder: , final encoder: 
Jan 26, 2022 11:33:31.564 [0x7f942c184b38] DEBUG - [Transcode] TPU: hardware transcoding: enabled, but no hardware decode accelerator found
Jan 26, 2022 11:33:31.565 [0x7f942c184b38] DEBUG - [Transcode] TPU: hardware transcoding: final decoder: , final encoder: 
Jan 26, 2022 11:37:22.017 [0x7f942c124b38] DEBUG - [Transcode] TPU: hardware transcoding: enabled, but no hardware decode accelerator found
Jan 26, 2022 11:37:22.017 [0x7f942c124b38] DEBUG - [Transcode] TPU: hardware transcoding: final decoder: , final encoder: 
Jan 26, 2022 11:37:26.030 [0x7f942bef7b38] DEBUG - [Transcode] TPU: hardware transcoding: enabled, but no hardware decode accelerator found
Jan 26, 2022 11:37:26.030 [0x7f942bef7b38] DEBUG - [Transcode] TPU: hardware transcoding: final decoder: , final encoder: 
Jan 26, 2022 11:37:31.259 [0x7f942bed4b38] DEBUG - [Transcode] TPU: hardware transcoding: enabled, but no hardware decode accelerator found
Jan 26, 2022 11:37:31.259 [0x7f942bed4b38] DEBUG - [Transcode] TPU: hardware transcoding: final decoder: , final encoder: 
Jan 26, 2022 11:37:47.105 [0x7f942bed4b38] DEBUG - [Transcode] TPU: hardware transcoding: enabled, but no hardware decode accelerator found
Jan 26, 2022 11:37:47.105 [0x7f942bed4b38] DEBUG - [Transcode] TPU: hardware transcoding: final decoder: , final encoder:

Interesting it does not see the Nvidia dGPU within Plex.

https://www.nvidia.com/en-us/geforce/forums/forum-feedback/24/268614/how-to-enable-nvenc-on-940mx/

I am missing the context here to why you want to use the Nvidia over the Kaby Lake iGPU. The Intel iGPU is far more capable than the Nvidia 940MX in your scenario.

Sorry, I was not aware and just assumed my Nvidia will do a better job than my iGPU. But are you sure? I mean, hardware specs the GPU is better than the iGPU. Or how can we conclude this?