# Plex + Ubuntu Desktop 20.04 + HW Transcode

**URL:** <https://forums.plex.tv/t/plex-ubuntu-desktop-20-04-hw-transcode/773655>\
**Category:** Plex Media Server\
**Tags:** server-linux, roku\
**Created:** [January 30, 2022, 1:42am UTC](https://forums.plex.tv/t/plex-ubuntu-desktop-20-04-hw-transcode/773655 "2022-01-30T01:42:43Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![rootdet](https://avatars.discourse-cdn.com/v4/letter/r/b2d939/32.png) [@rootdet](https://forums.plex.tv/u/rootdet)\
**Post date:** [January 30, 2022, 1:42am UTC](https://forums.plex.tv/t/plex-ubuntu-desktop-20-04-hw-transcode/773655/1 "2022-01-30T01:42:43Z")

</div>

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](https://github.com/intel/compute-runtime/releases)  
)

```auto
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

```auto
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

```auto
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

```auto
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%

```auto
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?

---

<div class="post-metadata">

**Author:** ![ChuckPa](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/chuckpa/32/79710_2.png) [@ChuckPa](https://forums.plex.tv/u/ChuckPa)\
**Post date:** [January 30, 2022, 2:13am UTC](https://forums.plex.tv/t/plex-ubuntu-desktop-20-04-hw-transcode/773655/2 "2022-01-30T02:13:03Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![rootdet](https://avatars.discourse-cdn.com/v4/letter/r/b2d939/32.png) [@rootdet](https://forums.plex.tv/u/rootdet)\
**Post date:** [January 30, 2022, 2:33am UTC](https://forums.plex.tv/t/plex-ubuntu-desktop-20-04-hw-transcode/773655/3 "2022-01-30T02:33:12Z")

</div>

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

```auto
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](https://forums.plex.tv/uploads/short-url/tfZBbTTgaI40kZbMpQbIwcyEH2P.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.

---

<div class="post-metadata">

**Author:** ![ChuckPa](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/chuckpa/32/79710_2.png) [@ChuckPa](https://forums.plex.tv/u/ChuckPa)\
**Post date:** [January 30, 2022, 2:49am UTC](https://forums.plex.tv/t/plex-ubuntu-desktop-20-04-hw-transcode/773655/4 "2022-01-30T02:49:07Z")

</div>

That looks perfect.

```auto
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 )

---

<div class="post-metadata">

**Author:** ![rootdet](https://avatars.discourse-cdn.com/v4/letter/r/b2d939/32.png) [@rootdet](https://forums.plex.tv/u/rootdet)\
**Post date:** [January 30, 2022, 6:53am UTC](https://forums.plex.tv/t/plex-ubuntu-desktop-20-04-hw-transcode/773655/5 "2022-01-30T06:53:07Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Achilles](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/achilles/32/16864_2.png) [@Achilles](https://forums.plex.tv/u/Achilles)\
**Post date:** [January 30, 2022, 8:42am UTC](https://forums.plex.tv/t/plex-ubuntu-desktop-20-04-hw-transcode/773655/6 "2022-01-30T08:42:27Z")

</div>

@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.

 ![image](https://global.discourse-cdn.com/plex/original/4X/c/0/4/c043ca91731e997ceed83e30ad0fdfcfa8b9b2c2.jpeg)

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/plex/original/3X/2/a/2acb9765406f63293d357b4ec509ec39aa28f2ad.png) [@system](https://forums.plex.tv/u/system)\
**Post date:** [April 30, 2022, 8:42am UTC](https://forums.plex.tv/t/plex-ubuntu-desktop-20-04-hw-transcode/773655/7 "2022-04-30T08:42:32Z")

</div>

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