Plex + Ubuntu Desktop 20.04 + HW Transcode

Server Version: 1.25.3.5409
OS: Ubuntu 20.04 Desktop
CPU: 11th Gen Intel(R) Core™ i9-11900K @ 3.50GHz
GPU: None
uname: Linux Homer 5.13.0-27-generic #29~20.04.1-Ubuntu SMP Fri Jan 14 00:32:30 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

Hi all,

Trying to get Hw transcode to work, but i keep being shunted to software. I installed the OpenCL software the install warned about from here (Releases · intel/compute-runtime · GitHub
)

PlexMediaServer install: Pre-installation Validation complete.
PlexMediaServer install: PlexMediaServer-1.25.3.5409-f11334058 - Installation starting.
PlexMediaServer install: Now installing based on:
PlexMediaServer install:   Installation Type:   New
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:     Not Found
PlexMediaServer install:
PlexMediaServer install:   OpenCL:              Installed
PlexMediaServer install:   Intel Gmmlib:        Not Installed
PlexMediaServer install:   Intel IGC Core:      Not Installed
PlexMediaServer install:   Intel IGC OpenCL:    Not Installed
PlexMediaServer install:   Intel OpenCL:        Not Installed
PlexMediaServer install: WARNING: The Intel GMM library, required for Intel Compute Runtime support, is missing.
PlexMediaServer install:          Please install package:  'intel-gmmlib' from https://github.com/intel/compute-runtime/releases
PlexMediaServer install: WARNING: The Intel IGC Core, required for Intel Compute Runtime support, is missing.
PlexMediaServer install:          Please install package:  'intel-igc-core' from https://github.com/intel/compute-runtime/releases
PlexMediaServer install: WARNING: The Intel IGC OpenCL library, required for Intel Compute Runtime support, is missing.
PlexMediaServer install:          Please install package:  'intel-igc-opencl' from https://github.com/intel/compute-runtime/releases
PlexMediaServer install: WARNING: The Intel OpenCL library, required for Intel Compute Runtime support, is missing.
PlexMediaServer install:          Please install package:  'intel-opencl' from https://github.com/intel/compute-runtime/releases
PlexMediaServer install: Intel Compute Runtime packages are available from:  https://github.com/intel/compute-runtime/releases
PlexMediaServer install: Please be certain to install them in the listed order.
PlexMediaServer install:
PlexMediaServer install: Completing final configuration.

The driver is loading the i915

root@Homer:/var/log# lshw -c video
  *-display
       description: VGA compatible controller
       product: Intel Corporation
       vendor: Intel Corporation
       physical id: 2
       bus info: pci@0000:00:02.0
       version: 04
       width: 64 bits
       clock: 33MHz
       capabilities: pciexpress msi pm vga_controller bus_master cap_list
       configuration: driver=i915 latency=0
       resources: irq:197 memory:a1000000-a1ffffff memory:90000000-9fffffff ioport:4000(size=64) memory:c0000-dffff
root@Homer:/var/log#

I can see my dri directory

root@Homer:/var/log# ls -ls /dev/dri
total 0
0 drwxr-xr-x  2 root root         80 Jan 29 20:22 by-path
0 crw-rw----+ 1 root render 226,   0 Jan 29 20:22 card0
0 crw-rw----+ 1 root render 226, 128 Jan 29 20:22 renderD128

I confirmed plex is in the right groups

root@Homer:/var/log# groups plex
plex : plex video render
root@Homer:/var/log#

The syslog gives me errors about no supported GPU, but that is fine since I do not have a GPU yet (have you seen those prices?!?!?!?!)

Inside plex, I have HW transcode enabled. “Use hardware acceleration when available”. I also have a plex pass (lifetime). so everything checks out.

Yuet when i do the Roku streaming the dashboard says this and the GPU from top says about 40.0%

Video
4K (HEVC Main 10 HDR)
1080P (H264)—Transcode

I did have to use Ubuntu Desktop because the /dev/dri was not even showing using the server edition. I have 128GB ram so not worried about the overhead. I am also running M.@'s soi there is plenty of fast storage for transcoding stuff, with lots of room.

any thoughts?

Ubuntu server tends to lag behind on CPUs so it’s not surprising you needed to install 20.04 Destkop

The installer is telling you which packages you need to install in order to use the INTERNAL GPU (for hardware tone mapping) in conjunction with the Intel QSV ASIC which does the actual transcoding.

Without these modules installed, PMS can’t talk to the hardware and transcoding WILL fall back to software.

At this point in the process, ignore syslog. You are far more concerned about what PMS sees and reports.

Also be advised, RocketLake (-11xxx) is leading/bleeding edge. Intel not getting it right tells us just how unstable it is.

Let’s see what’s really going on. To that end, please do the following.

  1. Install the software modules from Github . Specifically, you want the 21.49 release. Intel broke something in their latest release.

  2. Verify DEBUG logging is enabled and VERBOSE logging is disabled (DEFAULT condition)

  3. Start a playback which needs to transcode.

  4. Let it play for 20 seconds

  5. Stop Playback and wait 20 more seconds (logs to flush to disk)

  6. Settings - Server - Troubleshooting - Download Logs

  7. It will give you a ZIP file. Please attach that ZIP file here.

That did it, using the 21.49 release fixed the problem.

4K (HEVC Main 10 HDR) (hw)
1080P (H264)—Transcode (hw)

Here are the logs

Plex Media Server Logs_2022-01-29_21-32-23.zip (3.2 MB)

I picked the CPU to try and stay ahead of the curve and survive until GPU’s could be obtained. I been doing a lotto for NEwegg for months and no dice.

That looks perfect.

Jan 29, 2022 21:29:45.676 [0x7fae603acb38] DEBUG - [Transcode] [FFMPEG] - Format 0x50524742 -> unknown.
Jan 29, 2022 21:29:45.676 [0x7fae603acb38] DEBUG - [Transcode] [FFMPEG] - Created surface 0.
Jan 29, 2022 21:29:45.676 [0x7fae603acb38] DEBUG - [Transcode] [FFMPEG] - Direct mapping possible.
Jan 29, 2022 21:29:45.676 [0x7fae603acb38] DEBUG - [Transcode] TPU: hardware transcoding: final decoder: vaapi, final encoder: vaapi
Jan 29, 2022 21:29:45.676 [0x7fae603acb38] DEBUG - [Transcode/JobRunner] Job running: EnableExtendedVaFormats='1' FFMPEG_EXTERNAL_LIBS='/var/lib/plexmediaserver/Library/Application\ Support/Plex\ Media\ Server/Codecs/fb9eae3-4185-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' '-ss' '1820' '-analyzeduration' '20000000' '-probesize' '20000000' '-i' '/nfs/plex/movies-uhd/Apollo.13.1995.UHD.BluRay.2160p.DTS-X.7.1.HEVC.REMUX-FraMeSToR/Apollo.13.1995.UHD.BluRay.2160p.DTS-X.7.1.HEVC.REMUX-FraMeSToR.mkv' '-filter_complex' '[0:0]hwupload[0];[0]scale_vaapi=w=1920:h=1080: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' '36357k' '-maxrate:0' '48476k' '-bufsize:0' '78125k' '-r:0' '23.975999999999999' '-map' '0:1' '-metadata:s:1' 'language=eng' '-codec:1' 'copy' '-copypriorss:1' '0' '-f' 'segment' '-segment_format' 'matroska' '-segment_format_options' 'live=1' '-segment_time' '1' '-segment_header_filename' 'header' '-segment_start_number' '0' '-segment_list' 'http://127.0.0.1:32400/video/:/transcode/session/3f4f0559-5406-4a9d-8d71-bd6e08fe613a-1014/da415757-3201-4b2d-9953-2ec144b8b9cd/manifest?X-Plex-Http-Pipeline=infinite' '-segment_list_type' 'csv' '-segment_list_unfinished' '1' '-segment_list_size' '5' '-segment_list_separate_stream_times' '1' '-avoid_negative_ts' 'disabled' '-map_metadata' '-1' '-map_chapters' '-1' 'chunk-%05d' '-start_at_zero' '-copyts' '-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/3f4f0559-5406-4a9d-8d71-bd6e08fe613a-1014/da415757-3201-4b2d-9953-2ec144b8b9cd/progress'
Jan 29, 2022 21:29:45.676 [0x7fae603acb38] DEBUG - [Transcode/JobRunner] Jobs: Starting child process with pid 6522

Now, Do not upgrade those libraries until well after you see reports of Github fixing the problem -OR- unless you start having problems.

( If it’s not broke - don’t fix it )

The only issue i get now is during the credits, it tells me the stream unexpectedly ended. any thoughts to that?

@rootdet Since you have 128GB of DRAM consider using /dev/shm for your Transcoding temporary directory to avoid needless waste of your SSD’s write endurance.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.