Late to the party, but I’ve also recently discovered that my Plex instance stopped doing hardware transcoding. Here’s the outputs from running it here.
This is an Intel NUC NUC6i5SYH with i5-6260U running VMWare ESXi 6.7 and doing PCI passthrough on the iGPU to the VM. This VM configuration has definitely worked with hardware transcoding previously, so I suspect I’m also hitting this issue. I’ve included a bunch of outputs below, including the output of the v7 preinst script and the generated installer log.
Hope this is vaguely helpful and not just redundant information at this time
root@jmvpms1:~/tmp# dpkg -l | grep plexmediaserver
ii plexmediaserver 1.22.0.4163-d8c4875dd amd64 Plex organizes all of your personal media so you can easily access and enjoy it.
root@jmvpms1:~/tmp# cat /proc/cpuinfo | grep "model name"
model name : Intel(R) Core(TM) i5-6260U CPU @ 1.80GHz
model name : Intel(R) Core(TM) i5-6260U CPU @ 1.80GHz
model name : Intel(R) Core(TM) i5-6260U CPU @ 1.80GHz
model name : Intel(R) Core(TM) i5-6260U CPU @ 1.80GHz
root@jmvpms1:~/tmp# ls -l /dev/dri
total 0
drwxr-xr-x 2 root root 120 Mar 13 17:30 by-path
crw-rw---- 1 root video 226, 0 Mar 13 17:30 card0
crw-rw---- 1 root video 226, 1 Mar 13 17:30 card1
crw-rw---- 1 root video 226, 128 Mar 13 17:30 renderD128
crw-rw---- 1 root video 226, 129 Mar 13 17:30 renderD129
root@jmvpms1:~/tmp# id plex
uid=107(plex) gid=113(plex) groups=113(plex),44(video)
root@jmvpms1:~/tmp# ./preinst
PlexMediaServer install: Pre-installation Validation.
PlexMediaServer install:
PlexMediaServer install: DEVELOPMENT V7 draft
PlexMediaServer install: Configuration information discovered:
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: Config file used: /etc/systemd/system/plexmediaserver.service.d/override.conf
PlexMediaServer install: Intel i915 Hardware: Found
PlexMediaServer install: Nvidia GPU card: Not Found
PlexMediaServer install:
PlexMediaServer install: OpenCL ICD: Installed
PlexMediaServer install: Beignet: Installed
PlexMediaServer install:
PlexMediaServer install: Pre-installation Validation complete.
I’ve done a fresh install of Debian 10 and installed the latest version of plex from the repository
root@jmvpms2:/zpool/media# uname -a
Linux jmvpms2 4.19.0-16-amd64 #1 SMP Debian 4.19.181-1 (2021-03-19) x86_64 GNU/Linux
root@jmvpms2:/zpool/media# cat /etc/debian_version
10.9
root@jmvpms2:/zpool/media# cat /etc/apt/sources.list.d/plexmediaserver.list
deb https://downloads.plex.tv/repo/deb/ public main
root@jmvpms2:/zpool/media# dpkg -l | grep plexmedia
ii plexmediaserver 1.22.1.4228-724c56e62 amd64 Plex organizes all of your personal media so you can easily access and enjoy it.
I’ve removed the iGPU from the previous VM and attached it to this one instead and validated that it’s not a permissions issue:
root@jmvpms2:/zpool/media# lspci | grep VGA
00:0f.0 VGA compatible controller: VMware SVGA II Adapter
13:00.0 VGA compatible controller: Intel Corporation Iris Graphics 540 (rev 0a)
root@jmvpms2:/zpool/media# ls -l /dev/dri
total 0
drwxr-xr-x 2 root root 120 Mar 30 14:11 by-path
crw-rw---- 1 root render 226, 0 Mar 30 14:13 card0
crw-rw---- 1 root render 226, 1 Mar 30 14:13 card1
crw-rw---- 1 root render 226, 128 Mar 30 14:13 renderD128
crw-rw---- 1 root render 226, 129 Mar 30 14:13 renderD129
root@jmvpms2:/zpool/media# id plex
uid=998(plex) gid=998(plex) groups=998(plex),44(video),107(render)
I’ve then tried to play WeAreGoingOnBullrun.mp4 a few times, which should be visible in the logs. The first few times, HW transcoding wasn’t actually enabled on the server. Prior to the final play, it was.
Done a bit more digging and it looks like it’s related to the in-built virtual SVGA adaptor being enabled as well. Disabling that so that only a single video card is passed through to the system now results in hw transcoding working. I’m unsure if I ever disabled that before or not when I had it working before.
Unfortunately it also kills the virtual console for the VM, and results in output only going via HDMI, which is not ideal given that it’s a headless remote host, but not a deal breaker as I have a decent backup strategy, so could always just rebuild the VM if it failed to boot for any reason.
Not allowing ESXi to use the internal GPU does allow it to pass through to the VM.
(I have that same issue here with that same loss of HDMI. Not sure how I want to proceed with that)
Apologies for not being clear, as I think you may have misunderstood.
Enabling iGPU passthrough results in ESXi no longer outputting to local screen by HDMI. This is expected and fine.
When creating a VM, a virtual VMWare SVGA adaptor is added to each VM by default. When connecting to the virtual console of the VM via the ESXi web interface, this is the graphics adaptor that’s used to display the virtual screen.
If that built in vitual SVGA adaptor is disabled, the VM no longer outputs anything to the console, and instead now only outputs to HDMI. This isn’t helpful, as there’s nothing actually attached to the HDMI port, and I’ve now not got the ability to access the console of the VM, but it’s the only way I’ve so far found to make HW transcoding work.
It’s not a huge problem, but this still feels like a (small, at least) bug where Plex is unable to correctly identify the correct /dev/dri/renderD* device to use for HW transcoding when more than one exists.
Ironically, if I was using containers (inside my VM) this would probably not be a problem.
I’m sorry, I probably agreed with you by saying it backwards.
As I understand it, ESXi 7.0 update 1d :
I must disable the SVGA output to allow passing through the iGPU to the guest.
I understand why it has to be this way. The i915 is tied to the i965 / iHD which are used for hardware transcoding.
When we enable the HDMI output, the i915 is allocated to the HDMI.
If you check /sys/module/i915, you’ll find it doesn’t resolve to (available) hardware.
The kernel sees enough to populate /dev/dri but that’s not enough for hardware transcoding. I used to check for /dev/dri/render* as validation of HW transcoding but I found that wasn’t sufficient. That’s why I switched to detecting using the i915 method (what the transcoder also uses)
I’ve since reinstalled ESXi on USB. My goal is, once this new Hades Canyon is stable, is to disable the HDMI in the USB’s config. That will make HW transcoding possible. It will also make for easy recovery to use the HDMI when I need to. My next step is to learn how to properly disable HDMI in 7.0 U1