PMS 1.29.x, Proxmox/LXC and HW-transcoding

I finally managed to make hw transcoding work with Proxmox and Plex in an LXC container with Jasper Lake CPU. I have managed to do this with other hardware, but these Jasper Lake CPU’s (N5105, N6005 etc.) have been causing me headaches previously. But no more! :).

  1. Update kernel within Proxmox host to 5.19:
  • apt update
  • apt install pve-kernel-5.19
  1. Avoid simplefb claiming iGPU:
  • nano /etc/default/grub
  • add initcall_blacklist=sysfb_init within GRUB_CMDLINE_LINUX_DEFAULT after quiet
  1. Enable GUC in Proxmox host:
  • echo “options i915 enable_guc=2” >> /etc/modprobe.d/i915.conf
  1. Download missing ehl_gux_70.1.1.bin to /lib/firmware/i915 within Proxmox host:
  1. Make sure iGPU is passed thru to LXC-container with following lines with it’s .conf -file:
    lxc.cgroup2.devices.allow: c 226:0 rwm
    lxc.cgroup2.devices.allow: c 226:128 rwm
    lxc.cgroup2.devices.allow: c 29:0 rwm
    lxc.mount.entry: /dev/fb0 dev/fb0 none bind,optional,create=file
    lxc.mount.entry: /dev/dri dev/dri none bind,optional,create=dir
    lxc.mount.entry: /dev/dri/renderD128 dev/renderD128 none bind,optional,create=file

  2. Within LXC-container enable GUC (maybe unnecessary):

  • echo “options i915 enable_guc=2” >> /etc/modprobe.d/i915.conf
  1. Within LXC-container install Intel’s non-free drivers:
  • apt install intel-media-va-driver-non-free
  1. Install latest Plex 1.29.x or higher, enable hw transcoding :slight_smile:

Now, the next step is to get HDR tone mapping working… I’m probably closer, since I’m getting “AVHWDeviceContext @ 0x… No matching devices found.” and that wasn’t too complicated to fix with my old hw.

The video processing features table in this chart suggests that hardware accelerated HDR (10) tone mapping may be out of reach for Jasper Lake:

I see the same AVHWDeviceContext error as you on my Plex Media Server running on a Celeron N5105 running natively on Pop_OS!

Though it’s possible I’m mis-reading that chart or not understanding the implications of the data it presents.

Yes, just noticed the same. On Jellyfin it is stated that VPP HDR10 TM is not supported by JSL (Jasper Lake CPUs) and EHL (Elkhart Lake).

They say that you can still use OpenCL Tone Mapping. And that also VPP TM doesn’t support DV Profile 5.

Not sure if that is applicable for Plex as well. From the looks of it, colors are correct with 4k HDR movies on my non-HDR player with hw transcoding, and CPU is not that much strangled… maybe it is working?

Folks:

  1. Forget Profile 5 - It has no HDR fallback layer so it won’t transcode. It was created for streaming only and to prevent it from being copied/transcoded.

  2. N5105 works. I already tested and demonstrated it on QNAP.

  1. Yep!

  2. I assume we don’t need to worry about that “AVHWDeviceContext … No matching devices found.” -error when enabling HDR Tone Mapping? I think you would recognise visually, if colors were washed out and tone mapping was not in place :stuck_out_tongue:

CPU is under around 18-22% of usage (N5105 and N6005) with either tone mapping enabled or not.

I cannot speak to proxmox because nobody here officially supports it.

I can speak to QNAP where it works.

Please look at my post here

I show it working for both NUC10 (bare Ubuntu 22.04) and N5105 (QNAP bare QTS - no container)

I understand, but it is something that I’m also getting without proxmox.

I.e. I get the same error with vanilla Ubuntu and under Pop_OS - like user @pshanew also wrote above.

I just want to make sure if this error message has any meaning under N5105? :slight_smile:

Show me the mediainfo for the video please ?

Is it HEVC HDR or H.264 or MPEG2?

If it’s HEVC HDR DV, is it HDR10 with DV (Profile 7)?

4K HDR10 (HEVC Main 10)

Again, mediainfo filename.ext please
-or-
from PMS Get Info -> View XML (preferred)

6225.xml.txt (90.6 KB)

Thank you. That’s indeed basic HDR10. This is indeed a Promox issue to which I unfortunately can’t help.

Well, like I said, I have the same issue with Ubuntu and with Pop_OS. But no worry, I’ll fall back to my nvidia-box and fiddle with this nice little mini thingie later on.

But just to clarify - if everything was working as it should, there shouldn’t be this error “AVHWDeviceContext @ 0x… No matching devices found.” at all even with these Jasper Lake -processors? Like I said, this is somewhat a issue with other media softwares than Plex also with it’s own “quirks” :slight_smile:

You are correct, if everything is working as it should, you won’t see the “No matching devices found” message

While “PopOS” is a Ubuntu derivative, I’m going to be the “stick in the mud” and point out that it’s not been tested/confirmed to work.

Plex’s official support: Redhat/Fedora and Ubuntu/Debian plus the published NAS vendors and models.

Yes, totally understandable.

I’ll reinstall my Ubuntu and make new thread if this issue persists there. However, I remember having this same issue there. It was also requiring additional steps to get even the normal transcoding work with this N5105. This was not necessary with my other hardware.

@quenthal

In the past, there were additional steps.

A few users have reported missing firmware (GuC / HuC firmware modules) but I don’t remember the particulars.

As it stands now, stock (from the distro) are all that’s required.
I’ve even gone back and tested as far as 5.10 kernel without issue.

This is base QNAP QTS which is far more minimalist than Ubuntu and it’s fine.

[/share/CACHEDEV1_DATA/.qpkg/PlexMediaServer/Library/Plex Media Server] # uname -a
Linux QNAP-TS264 5.10.60-qnap #1 SMP Wed Oct 20 01:49:14 CST 2021 x86_64 GNU/Linux
[/share/CACHEDEV1_DATA/.qpkg/PlexMediaServer/Library/Plex Media Server] # cat /proc/cpuinfo | grep 'model name' | uniq
model name	: Intel(R) Celeron(R) N5105 @ 2.00GHz
[/share/CACHEDEV1_DATA/.qpkg/PlexMediaServer/Library/Plex Media Server] #

Yes. What is strange, is that this small N5105 is under 10% even with tone mapping enabled. I assume it falls back to software/cpu, if hw is not recognized.

With tone mapping disabled strain on CPU is 3-4%, and with tone mapping enabled (with visibly more bright and balanced colors) 5-7% CPU. Nothing major is probably achieved with this system, even if tone mapping was done with igpu instead of cpu…

Edit: correction, I’m now trying out N6005, but still.

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