HardwareDevicePath="/dev/dri/renderD129" in Preferences.xml not working with iGPU

Server Version#: 1.27.2.5929
Player Version#: web

Hi, setup as follows:
Debian 11 hosted on ESXi 7.
iGPU passed through to VM.

ls -l /dev/dri/
total 0
drwxr-xr-x 2 root root        120 Jul 22 10:04 by-path
crw-rw---- 1 root render 226,   0 Jul 22 10:04 card0
crw-rw---- 1 root render 226,   1 Jul 22 10:04 card1
crw-rw---- 1 root render 226, 128 Jul 22 10:04 renderD128
crw-rw---- 1 root render 226, 129 Jul 22 10:04 renderD129
groups plex
plex : plex video render
lspci | grep -I vga
00:0f.0 VGA compatible controller: VMware SVGA II Adapter
13:00.0 VGA compatible controller: Intel Corporation Device 9bc6 (rev 05)
lspci -v -s 13:00.0
13:00.0 VGA compatible controller: Intel Corporation Device 9bc6 (rev 05) (prog-if 00 [VGA controller])
        DeviceName: pciPassthru0
        Subsystem: Dell Device 09aa
        Physical Slot: 224
        Flags: bus master, fast devsel, latency 64, IRQ 62
        Memory at fc000000 (64-bit, non-prefetchable) [size=16M]
        Memory at d0000000 (64-bit, prefetchable) [size=256M]
        I/O ports at 6000 [size=64]
        Capabilities: [40] Vendor Specific Information: Len=0c <?>
        Capabilities: [70] Express Endpoint, MSI 00
        Capabilities: [ac] MSI: Enable+ Count=1/1 Maskable- 64bit-
        Capabilities: [d0] Power Management version 2
        Capabilities: [100] Process Address Space ID (PASID)
        Capabilities: [200] Address Translation Service (ATS)
        Capabilities: [300] Page Request Interface (PRI)
        Kernel driver in use: i915
        Kernel modules: i915`

Also installed: firmware-misc-nonfree, i965-va-driver.
The same setup works perfectly on Ubuntu 20 LTS.

I’ve tried both HardwareDevicePath="/dev/dri/renderD129" and VaapiDriver="i965" in Preferences.xml but I still cannot get it to transcode in HW.

tail -f Plex\ Media\ Server.log | grep -I 129
Jul 22, 2022 12:17:25.811 [0x7f3233f65b38] ERROR - [Req#1a9/Transcode] [FFMPEG] - No VA display found for device /dev/dri/renderD129.
 tail -f /home/chris/.config/Plex\ Media\ Server/Logs/Plex\ Media\ Server.log | grep -I hardware
Jul 22, 2022 12:17:36.302 [0x7f3233f65b38] DEBUG - [Req#20e/Transcode] Codecs: hardware transcoding: testing API nvenc
Jul 22, 2022 12:17:36.302 [0x7f3233f65b38] DEBUG - [Req#20e/Transcode] Codecs: hardware transcoding: opening hw device failed - probably not supported by this system, error: Unknown error occurred
Jul 22, 2022 12:17:36.302 [0x7f3233f65b38] DEBUG - [Req#20e/Transcode] Could not create hardware context for h264_nvenc

Edit:
If I change perms on /dev/dri it works fine:

sudo chmod a+rw /dev/dri/renderD128

I know this is temporary.

Any help would be appreciated.

You might need to add the plex user to the video group

I think it’s because I actually have Plex running under user chris rather than plex, I seem to have solved it now.

@ChrisD

I have a question.

When did you change the username PMS runs as?

I ask because I check if the PlexUser has access to the hardware (on machines with hardware)

    # If PlexUser not member of VideoGroup, flag it
    if [ "$(getent group "$VideoGroup" | grep "$PlexUser" | wc -l)" -eq 0 ]; then

      # PlexUser not a member of the Video group
      NeedVideo=1
    fi
  fi
fi # X86_64

Hi, I didn’t change the user, but I’d assumed it was running under user Plex and not my user account.

I asked because, I add $PlexGroup to the group which owns /dev/dri during the postinstall phase of package installation (“Now installing based on:” part)

If the the user Plex runs as was changed after installation, but before the next update is installed, it makes sense the username doesn’t have access to /dev/dri.

However, silently, at next package update, I’ll update the groups if needed.

The logic is:

  1. Default user: plex, default group: plex
  2. Inport and user service overrides (specificially Group= here)
  3. Check if $PlexGroup is a member of the group which owns /dev/dri
  4. If not, set the flag in /tmp/plexinstaller.log (steps to complete in phase 2 - postinstsall)
  5. Next, during phase 2 (postinstall),
  6. if the flag is set, add the $PlexGroup to $VideoGroup

This logic has not failed since the initial release of this packaging (some 2+ years ago) but, if there’s a problem, I want to fix it asap

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