Plex on Debian 11 on Intel NUC 11 not hardware transcoding

My machine has 256GB of RAM.

At each reboot , /dev/shm looks like this:

[chuck@glockner ~.2003]$ ls /dev/shm
lttng-ust-wait-8  lttng-ust-wait-8-995
[chuck@glockner ~.2004]$

I place no expectations on anything else being created so I use /dev/shm

When I start a session, things get created.

[chuck@glockner ~.2008]$ ll /dev/shm
total 12
drwxrwxrwt  2 root root  100 Feb  7 21:40 ./
drwxr-xr-x 20 root root 5580 Feb  7 19:09 ../
-rw-r--r--  1 plex plex   32 Feb  7 21:40 9334581e-7251-4ef7-a8ec-5bfe8e89ff68
-rw-rw-rw-  1 emby emby 4096 Feb  7 19:09 lttng-ust-wait-8
-rw-r-----  1 emby emby 4096 Feb  7 19:09 lttng-ust-wait-8-995
[chuck@glockner ~.2008]$ ll /dev/shm
total 12
drwxrwxrwt  3 root root  120 Feb  7 21:42 ./
drwxr-xr-x 20 root root 5580 Feb  7 19:09 ../
-rw-r--r--  1 plex plex   32 Feb  7 21:40 9334581e-7251-4ef7-a8ec-5bfe8e89ff68
-rw-rw-rw-  1 emby emby 4096 Feb  7 19:09 lttng-ust-wait-8
-rw-r-----  1 emby emby 4096 Feb  7 19:09 lttng-ust-wait-8-995
drwxr-xr-x  3 plex plex   60 Feb  7 21:42 Transcode/
[chuck@glockner ~.2008]$ ll /dev/shm/Transcode/
total 0
drwxr-xr-x 3 plex plex  60 Feb  7 21:42 ./
drwxrwxrwt 3 root root 120 Feb  7 21:42 ../
drwxr-xr-x 3 plex plex  60 Feb  7 21:42 Sessions/
[chuck@glockner ~.2009]$ ll /dev/shm/Transcode/Sessions/
total 0
drwxr-xr-x 3 plex plex   60 Feb  7 21:42 ./
drwxr-xr-x 3 plex plex   60 Feb  7 21:42 ../
drwxr-xr-x 2 plex plex 1320 Feb  7 21:42 plex-transcode-8x46fhdbh2jdqiwj1xln42ec-ef3be43e-82cc-42c0-b9e4-cd1c8e586655/
[chuck@glockner ~.2010]$ 

I suggest letting Plex create what it needs (the ‘Transcode’ directory)

Ok, got it. But that won’t solve the transcode issue, will it?

@ChuckPa so yeah, that didn’t really fix the transcode with HDR tonemapping issue I’m having with this NUC 11 PMS. The PMS version I last tested is 1.30.2.6563 (latest).

I don’t even need CUDA drivers because I don’t have a discrete NVIDIA GPU. This is an Intel NUC 11 system, so only iGPU. Unless I’m misunderstanding you when you recommended upgraded CUDA drivers earlier?

Back to 1.29.2.6364 ???

Ok, back to 1.29.2.6364 and the issue is still there. No change.

There’s something going on at the system level so let’s unwind.

I know PMS works with everything up through AlderLake.

The whole purpose of adding the ‘Drivers’ directory under ‘Plex Media Server’ was to provide a place to download and install the Intel Compute Runtime drivers needed.

Stupid question – but want to confirm:

  1. groups plex
    – should show plex is a member of group ‘render’

  2. ls -la /dev/dri
    – should show card0 and renderD128 at minimum
    – Both of these should be root:render ownership

If all this aligns,

  1. Stop Plex
  2. Delete the contents of the “Drivers” directory. (Let PMS download fresh)
  3. Start Plex
  4. After it runs 3-4 minutes, Download the logs ZIP and attach.

I want to see it detect the ASIC and get the drivers.

root@mediaserver:~# groups plex
plex : plex video users render
root@mediaserver:~# ls -la /dev/dri
total 0
drwxr-xr-x  3 root root        100 Feb  9 10:36 .
drwxr-xr-x 16 root root       3260 Feb  9 10:36 ..
drwxr-xr-x  2 root root         80 Feb  9 10:36 by-path
crw-rw----  1 root render 226,   0 Feb  9 10:36 card0
crw-rw----  1 root render 226, 128 Feb  9 10:36 renderD128

Logs: Dropbox - Plex Media Server Logs_2023-02-09_10-46-31.zip - Simplify your life

is udev installed ?

This is the packages I have

[chuck@lizum ~.1999]$ dpkg -l | grep udev
ii  gir1.2-gudev-1.0:amd64                     1:233-1                             amd64        libgudev-1.0 introspection data
ii  libgudev-1.0-0:amd64                       1:233-1                             amd64        GObject-based wrapper library for libudev
ii  libinput-bin                               1.15.5-1ubuntu0.3                   amd64        input device management and event handling library - udev quirks
ii  libu2f-udev                                1.1.10-1                            all          Universal 2nd Factor (U2F) common files
ii  libudev1:amd64                             245.4-4ubuntu3.19                   amd64        libudev shared library
ii  libudev1:i386                              245.4-4ubuntu3.19                   i386         libudev shared library
ii  system-config-printer-udev                 1.5.12-0ubuntu1.1                   amd64        Utilities to detect and configure printers automatically
ii  tpm-udev                                   0.4                                 all          udev rules for TPM modules
ii  udev                                       245.4-4ubuntu3.19                   amd64        /dev/ and hotplug management daemon
[chuck@lizum ~.2000]$

It looks like you do but transcoder isn’t detecting the nodes at all (even if wrongly identified)

[chuck@lizum ~.2012]$ cd /lib/udev/rules.d
[chuck@lizum rules.d.2013]$ ls -la *plex*
-rw-r--r-- 1 root root 47 Dec 13 21:43 60-plex-hw-transcoding.rules
[chuck@lizum rules.d.2014]$ cat 60-plex-hw-transcoding.rules 
SUBSYSTEM=="drm", GROUP="render" , MODE="0660"
[chuck@lizum rules.d.2015]$ 

Here you go:

root@mediaserver:~# dpkg -l | grep udev
ii  libgudev-1.0-0:amd64                 234-1                          amd64        GObject-based wrapper library for libudev
ii  libudev1:amd64                       247.3-7+deb11u1                amd64        libudev shared library
ii  udev                                 247.3-7+deb11u1                amd64        /dev/ and hotplug management daemon
root@mediaserver:~# cd /lib/udev/rules.d
root@mediaserver:/lib/udev/rules.d# ls -la *plex*
-rw-r--r-- 1 root root 47 Feb  9 01:39 60-plex-hw-transcoding.rules
root@mediaserver:/lib/udev/rules.d# cat 60-plex-hw-transcoding.rules
SUBSYSTEM=="drm", GROUP="render" , MODE="0660"

Looks to be similar to yours?

@ChuckPa seen my reply yet?

Yes, see it now (dealing with chestcold).

Looks good.

We’re making definitive progress with our forum diagnosis.

  1. 1.29.2.6364 seems to fully work for everything including CUDA 12.0

  2. 1.30.x is where things break.
    – Some things break with CUDA 12.0
    – Some things break with CUDA 11.7 (what previously worked)

  3. Seems the transcoder had a regression.

  4. You’re welcome to join in the other threads.

Seems we now wait for Engineering to respond to my re-opening the ticket.

I’ not sure I understand. Are you saying that 1.29.2.6364 should work for me? Because it isn’t working. And why do I need the CUDA drivers if I don’t use an Nvidia GPU?

Open a terminal and type

uname -r

If you are running Linux kernel above 5.14 and bellow 6.0 then it might be related to the Linux kernel itself since I had similar issues.
Your best bet is trying to update linux kernel first

Also, since you’re running an 11th gen you need to enable GuC

echo "options i915 enable_guc=2" > /etc/modprobe.d/i915.conf

and reboot.

Linux kernel that I have:

root@mediaserver:~# uname -r
6.0.0-0.deb11.6-amd64

Oh wow! There you go, enabling GuC fixed the issue! Thank you very much:

image

So other than the 2 option for enabling GuC, is there any other option that would be applicable? And should I also enable GuC on two of my systems with 10th gen CPU’s (Intel NUC10 and i5-10600)? These 10th gen CPU systems have their hw transcoding work without any issues.

@ChuckPa with the GuC fix, can I already upgrade my PMS to the latest version? And shouldn’t you guys incorporate this additional GuC check when installing PMS?

The weird thing though is that it looks like it failed to load GuC because I don’t have its firmware installed:

[    3.771239] i915 0000:00:02.0: firmware: direct-loading firmware i915/tgl_dmc_ver2_12.bin
[    3.771701] i915 0000:00:02.0: [drm] Finished loading DMC firmware i915/tgl_dmc_ver2_12.bin (v2.12)
[    3.772206] i915 0000:00:02.0: firmware: failed to load i915/tgl_guc_70.1.1.bin (-2)
[    3.772212] firmware_class: See https://wiki.debian.org/Firmware for information about missing firmware
[    3.772222] i915 0000:00:02.0: firmware: failed to load i915/tgl_guc_70.1.1.bin (-2)
[    3.772226] i915 0000:00:02.0: GuC firmware i915/tgl_guc_70.1.1.bin: fetch failed with error -2
[    3.772229] i915 0000:00:02.0: [drm] GuC firmware(s) can be downloaded from https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/tree/i915
[    3.772817] i915 0000:00:02.0: [drm] GuC firmware i915/tgl_guc_70.1.1.bin version 0.0
[    3.772833] i915 0000:00:02.0: [drm] GuC is uninitialized
[    3.781715] [drm] Initialized i915 1.6.0 20201103 for 0000:00:02.0 on minor 0
[    3.782541] ACPI: video: Video Device [GFX0] (multi-head: yes  rom: no  post: no)

So what did it do to Plex to fix the issue?

Ok, I removed the the whole i915.conf fomr /etc/modprobe.d just to test it out and surprisingly hw trancode with tone mapping worked. I don’t know what happened but maybe deleting the contents of the Drivers folder earlier fixed it? I don’t think I tested it after doing that. It works for both 1.29.2.6364 and 1.30.2.6563.

GuC is Linux level stuffs, it’s disabled by default on some CPU, 11th gen included. Plex includes the required non-free drivers that are needed for Intel iGPUs.
Glad it worked for you

Yeah but like I said I disabled GuC again but it still worked, so I don’t think enabling GuC was the solution here. I do want GuC enabled though but it seems that the non-free driver package that I have from the Bullseye backports do not have the required version that my new Kernel is looking for.

Can the GuC be enabled on 10th gen CPU’s too?

You forgot to “update-initramfs” before the reboot.
The mode is set as the kernel is brought up under initramfs control.

Is this what I’m missing?