LXC Intel Nuc 10 GPU Transcoding not working

Server Version#: 1.25.5.5492
Player Version#: 4.69.1
I’ve setup an LXC container on Proxmox and passed through the GPU as can be seen from within the container:

root@plex:~# ls -l /dev/dri
total 0
drw-rw---- 2 root root        80 Feb  7 16:49 by-path
crw-rw---- 1 root video 226,   0 Feb  9 22:04 card0
crw-rw---- 1 root video 226, 128 Feb  9 13:43 renderD128

Plex is in group video:

root@plex:~# groups plex
plex : plex video

However, hardware transcoding isn’t working, as also confirmed from the server log:

Feb 10, 2022 07:02:06.290 [0x7fc555b29b38] DEBUG - TPU: hardware transcoding: enabled, but no hardware decode accelerator found

Where should I look further for more clues?

Does the Plex installation scripting show the i915 has been found?

Without the i915 mapping to the physical device as well, it will fail probing when the transcoder engages.

Where can I check that?

you check the expansion of /sys/module/i915/drivers/pci:i915/*:*:*.*

 # Is there an Intel i915 present (possible QSV capability)
  [ "$(echo /sys/module/i915/drivers/pci:i915/*:*:*.*)" != "/sys/module/i915/drivers/pci:i915/*:*:*.*" ] && Havei915=1

No output. What does that mean?

root@plex:~# [ "$(echo /sys/module/i915/drivers/pci:i915/*:*:*.*)" != "/sys/module/i915/drivers/pci:i915/*:*:*.*" ] && Havei915=1
root@plex:~# 

@plexmoxx

I did not mean to copy the statement verbatim.

As root, you can copy this one into the shell command line.

echo /sys/module/i915/drivers/pci:i915/*:*:*.*

If the output contains *:*:*.* then the i915 is not being seen.

@ChuckPa This is the output, so GPU is being seen I guess? How to troubleshoot further?

root@plex:~# echo /sys/module/i915/drivers/pci:i915/*:*:*.*
/sys/module/i915/drivers/pci:i915/0000:00:02.0

From the 10th gen (-10xxx) and up, you must have the Intel Compute Runtime package installed.

We’ve found version 21.49 to be the best so far. (too many bugs in the new versions)

I presume you’re making allowance for the hardware to pass through to the container?

@ChuckPa The latest Intel Compute Runtime package (22.07.22465) was already installed and is working fine with PMS running on the host.
I downgraded the runtime the version you mentioned above (21.49.21786) both on the host and the container, PMS is still not picking up the GPU passed through to the container.

@plexmoxx

Thank you for updating me on the version 22.07.22465.
I don’t have a CPU which I can use to keep abreast of their progress in fixing it.

The only thing I can think of – Is the container in privileged mode so it has permission to directly access hardware? Most container mechanisms don’t grant privileged status by default.

@ChuckPa the container has access to the card as evident by the command outputs shared above or not? Plex service doesn’t seem like to able to use it.

How can we find out why PMS can’t detect the hardware which is available from within the container?

And yes the container is running in privileged mode.

From the container’s command line, go look at /dev/dri.
It should be populated with card0 and renderD128

Also verify the i915 is visible,

echo /sys/module/i915/drivers/pci:i915/*:*:*.*

If you get *:*:*.* then the i915 is not visble.
If you get a value, such as 0000:00:02.0 then it is (the bus address of the i915)

[chuck@lizum drivers.2009]$ echo /sys/module/i915/drivers/pci:i915/*:*:*.*
/sys/module/i915/drivers/pci:i915/0000:00:02.0
[chuck@lizum drivers.2010]$ 

@ChuckPa if you scroll above the thread, I can see that I’ve already provided the outputs of the commands you mentioned on your last reply. I paste it below again for your reference:

root@plex:~# ls -l /dev/dri
total 0
drw-rw---- 2 root root        80 Feb  7 16:49 by-path
crw-rw---- 1 root video 226,   0 Feb  9 22:04 card0
crw-rw---- 1 root video 226, 128 Feb  9 13:43 renderD128
root@plex:~# echo /sys/module/i915/drivers/pci:i915/*:*:*.*
/sys/module/i915/drivers/pci:i915/0000:00:02.0

Sorry… That’s from inside the container ? (lxc exec container bash) ?

Affirmative

I REALLY wish I could setup Proxmox here.

I have tried several times to get it to run in ESXi but failed every time.

Suggestions?

If I get it to run in ESXi, I can then give it the i7-8809’s GPU and test.
We know NUC10’s work fine with Linux,

OK, so I reinstalled PMS in the container with the following output:

PlexMediaServer install: PlexMediaServer-1.25.5.5492-12f6b8c83 - 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:         video
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:        Installed
PlexMediaServer install:   Intel IGC Core:      Installed
PlexMediaServer install:   Intel IGC OpenCL:    Installed
PlexMediaServer install:   Intel OpenCL:        Installed
PlexMediaServer install:  
PlexMediaServer install: Completing final configuration.
PlexMediaServer install: Starting Plex Media Server.
PlexMediaServer install: PlexMediaServer-1.25.5.5492-12f6b8c83 - Installation successful.  Errors: 0, Warnings: 0

And Hardware transcoding seems to work but only when I have PGS subtitles on, resulting in heavy buffering. With none or SRT subtitles, I don’t see hardware transcoding being activated.

Hardware transcoding isn’t used for subtitles.
SRT subtitles are sent as the 3rd stream if the player supports it.

Yeah but can’t explain what’s happening. In the container, hardware transcoding is only activated with PGS on, and not otherwise. This of course isn’t the case when I’m running PMS on the proxmox host (bare metal).

Will sharing logs help? Can you please check if this is how PMS behaves in containers in general?

Yes, I need to see the logs.

You might be getting HW decode but definitely not getting HW encode because of the subtitle burning (PGS).