Unable to get HW transcoding for Plex

nightingale

Cadet
Joined
Nov 7, 2021
Messages
5
Hello,

I will start from my setup:
i3 8100, SM X11SCH, 64GB, 830 Pro + 2x 860Evo + 5x WD Red 4TB. It's being run by ESXi 7.0U3 (the most recent update). My TrueNAS Scale VM (RC downloaded two days ago) has 4 vCPU, 32GB RAM and UHD 630 which is passthroughed. For unkown to me reason I can't get HW transcoding working.
I can see that TrueNAS sees the GPU alongside with VMware adapter:
Screenshot 2021-11-07 at 13.56.06.png


I am also allowed to add iGPU to Plex app (Official Chart):
Screenshot 2021-11-07 at 13.57.54.png


I've tried to debug as much as possible on my own via some threads here that sounded similar. First thing I checked were middlewares:
Code:
midclt call device.get_gpus | jq .
[
  {
    "addr": {
      "pci_slot": "0000:00:0f.0",
      "domain": "0000",
      "bus": "00",
      "slot": "0f"
    },
    "description": "VMware SVGA II Adapter",
    "devices": [
      {
        "pci_id": "8086:7190",
        "pci_slot": "0000:00:00.0",
        "vm_pci_slot": "pci_0000_00_00_0"
      },
......
      {
        "pci_id": "15AD:07A0",
        "pci_slot": "0000:00:18.7",
        "vm_pci_slot": "pci_0000_00_18_7"
      }
    ],
    "vendor": null,
    "available_to_host": true
  },
  {
    "addr": {
      "pci_slot": "0000:03:00.0",
      "domain": "0000",
      "bus": "03",
      "slot": "00"
    },
    "description": "0000:03:00.0 Display controller: Intel Corporation CoffeeLake-S GT2 [UHD Graphics 630]",
    "devices": [
      {
        "pci_id": "8086:3E91",
        "pci_slot": "0000:03:00.0",
        "vm_pci_slot": "pci_0000_03_00_0"
      }
    ],
    "vendor": "INTEL",
    "available_to_host": true
  }
]


Second thing was making sure that I have Intel GPU plugin which I have:
Code:
# k3s kubectl get pods -A
NAMESPACE            NAME                               READY   STATUS    RESTARTS   AGE
kube-system          coredns-7448499f4d-gxpbp           1/1     Running   0          3h28m
kube-system          intel-gpu-plugin-qnpjx             1/1     Running   0          3h28m
kube-system          openebs-zfs-node-j28n5             2/2     Running   0          3h28m
kube-system          openebs-zfs-controller-0           5/5     Running   0          3h28m
ix-qbittorrent       qbittorrent-67dc5cff76-8lvg8       1/1     Running   0          3h28m
ix-plexmediaserver   plexmediaserver-5b9d98c6bb-7wdw8   1/1     Running   0          24m


While trying transcode on different movies debug shows only following errors that are related to CUDA. I do not have nor had nvidia GPU in the system and it suprises me that there is random CUDA error:
Screenshot 2021-11-07 at 14.17.13.png


One thread suggested that OS does not see iGPU and it disables the plugin (case with BMC graphics) but in my case it seems to be fixed as intel-gpu-plugin is running.

OS itself is as vanilla as possible. I've just installed TrueCharts and deployed TC qBittorrent and official Plex app. No further configuration was done yet as I wanted to have ready to go system rather than have just few things work the way I want.

I can provide a debug but I am afraid that it contains too much information. Let me know if it is safe to upload it and I will do it :)

Thank you for any help :)
 

gobygoby

Dabbler
Joined
Aug 5, 2014
Messages
45
I had a lot of problems getting Plex hardware transcoding working in Truenas Core, so I recently upgraded to Scale where the HW transcoding started working right away. I would love to help, but I don't know enough about Docker or Scale or Linux to drive the troubleshooting forward. So if you can send me linux commands to try, I can send the results back and we can compare results.

In the meantime, here are some screenshots from my setup, maybe they will help:

1636354453473.png


1636354568761.png


1636354609437.png



1636354721890.png
 

penflame

Cadet
Joined
Aug 6, 2020
Messages
9
Hi,
I think option "Isolated GPU PCI ID's" it's for VM on TrueNAS not for Apps.

If you unselect "Intel Coffelake" in "Isolated GPU PCI ID's", after reboot, you can activate you Intel Card on Plex Apps.
 

nightingale

Cadet
Joined
Nov 7, 2021
Messages
5
I had a lot of problems getting Plex hardware transcoding working in Truenas Core, so I recently upgraded to Scale where the HW transcoding started working right away. I would love to help, but I don't know enough about Docker or Scale or Linux to drive the troubleshooting forward. So if you can send me linux commands to try, I can send the results back and we can compare results.

In the meantime, here are some screenshots from my setup, maybe they will help:

View attachment 50619

View attachment 50620

View attachment 50621


View attachment 50622
Yea. That is how I've set it up but still I have only CPU transcode. HW part of it doesn't want to kick in :/

Hi,
I think option "Isolated GPU PCI ID's" it's for VM on TrueNAS not for Apps.

If you unselect "Intel Coffelake" in "Isolated GPU PCI ID's", after reboot, you can activate you Intel Card on Plex Apps.
I removed it from Isolated GPU and rebooted the VM but still it doesn't work
 

truecharts

Guru
Joined
Aug 19, 2021
Messages
788
You could try our custom-app App instead, that shouldn't have this specific error :)
 

nightingale

Cadet
Joined
Nov 7, 2021
Messages
5
You could try our custom-app App instead, that shouldn't have this specific error :)
I've pinged you about this issue last Saturday on Discord I belive. I've tried to deploy your Charts once more today but funny thing is that it did not allow me to attach iGPU (Official App was stopped) while first deploying the app. I was able to add it when I edited the app. Similary to official app logs return CUDA transcode error. I might reinstall it altogether but I do not know what is causing this CUDA error in the first place.
 

rmr

Dabbler
Joined
Sep 8, 2021
Messages
17
I might completely misunderstand what you’re trying to do, but is CUDA really expected to work on anything other than Nvidia graphics?
 

nightingale

Cadet
Joined
Nov 7, 2021
Messages
5
I might completely misunderstand what you’re trying to do, but is CUDA really expected to work on anything other than Nvidia graphics?
I do not want to run CUDA. My Plex app though is trying to run CUDA for some unknown reason rather than use Intel GPU.

Have you tried this other docker container:

It says that is has good hardware transcoding support.
I might just do that. Before I've used Compose with Linux Server instances without an issue.
 

nightingale

Cadet
Joined
Nov 7, 2021
Messages
5
Update: I found it on Reddit while I chased that weird CUDA error. I've added following line to my Preferences.xml (Plex):
Code:
HardwareDevicePath="/dev/dri/renderD129"


My CPU usage is nearly the same and I can see that QuickSync works. That being said this solution is ment for multi GPU setups.
Because HW Transcode now works so technically it is solved. It seems that the culprit is VMware adapter and it is probably treated as a nvidia GPU so that's why there is this CUDA error. I guess there should be some kind of failsafe that also ignores VMware (probably KVM too) basic adapters.
 
Top