Activating Plex hardware acceleration

Yorick

Wizard
Joined
Nov 4, 2018
Messages
1,912
"00:02.0 Display controller: Intel Corporation HD Graphics P530 (rev 06) "

And there you are.

My experience with hardware transcode on FreeBSD has been mixed. There are issues with Intel drivers, as well as how Plex interacts with them.

Personally I will try again when I am migrating to Scale.
 

ornias

Wizard
Joined
Mar 6, 2020
Messages
1,458
"00:02.0 Display controller: Intel Corporation HD Graphics P530 (rev 06) "

And there you are.

My experience with hardware transcode on FreeBSD has been mixed. There are issues with Intel drivers, as well as how Plex interacts with them.

Personally I will try again when I am migrating to Scale.
Running solid on SCALE with docker-compose here for half a year now, without transcode issues on a 4000-series first and now on a 9700k :)
 

nikinp

Contributor
Joined
Sep 7, 2014
Messages
116
"00:02.0 Display controller: Intel Corporation HD Graphics P530 (rev 06) "

And there you are.

My experience with hardware transcode on FreeBSD has been mixed. There are issues with Intel drivers, as well as how Plex interacts with them.

Personally I will try again when I am migrating to Scale.
@Yorick
Thank you.
I read that you need to check that Freenas is seeing the igpu by using commands:
ls /dev/dri or ls /dev/drm - Are these correct?
Do you check this after installing the the Plex Media Server? Or should this work before that?
 

Yorick

Wizard
Joined
Nov 4, 2018
Messages
1,912
Those are correct and you can check that whenever. It's specific to FreeBSD, not the jail. That relies on the init script existing that exposes them.
 

nikinp

Contributor
Joined
Sep 7, 2014
Messages
116
Those are correct and you can check that whenever. It's specific to FreeBSD, not the jail. That relies on the init script existing that exposes them.

@Yorick - if I understand you correctly, the init script exposes them to the Jail, that's when you can check in the jail.

I have just tried the commands in FreeBSD but I get the below.

root@truenas[/]# ls /dev/dri
ls: /dev/dri: No such file or directory
root@truenas[/]# ls /dev/drm
ls: /dev/drm: No such file or directory

lspci -q shows the igpu. So is there something else that needs addressing or have I not the command correctly?
Many thanks
 
Last edited:

Yorick

Wizard
Joined
Nov 4, 2018
Messages
1,912
The script right at the end has kldload /boot/modules/i915kms.ko. The script does both, create the devfs rules for the jail and reload devfs, and make sure the iGPU is visible in FreeBSD in the first place.

You can always kldload manually and then check. The /dev/dri and /dev/drm entries should be there after kldload.
 
Last edited:

Zain

Contributor
Joined
Mar 18, 2021
Messages
124
Ive been reading a ton here and I’ve gathered there is no way to utilize an Nvidia gpu for Plex on an older R720 server running Truenas Core. It sounds like quick sync is the only option however that would entail replacing the whole server. Is there any plan, that anyone knows of, of this becoming an option in the near future? Or is Truenas Scale the option here for this capability?
 

Yorick

Wizard
Joined
Nov 4, 2018
Messages
1,912
Scale is the way to go for NVidia transcode. Plex is not going to add that to their FreeBSD code in any timeline I can see.
 

Zain

Contributor
Joined
Mar 18, 2021
Messages
124
I read that migrating from Core to Scale is to be done manually and isn’t necessarily straight forward. Is this <still> true or has a streamlined migration system been integrated into Core and or has a set of detailed instructions been laid out on how to do this? Thanks!
 

Zain

Contributor
Joined
Mar 18, 2021
Messages
124
It won't let me edit my previous post...Please disregard last message. I am going to wait until Scale is at least at BETA before I attempt any install/upgrade. Likely by then, there will be an integrated upgrade process from Core.
 

nikinp

Contributor
Joined
Sep 7, 2014
Messages
116
The script right at the end has kldload /boot/modules/i915kms.ko. The script does both, create the devfs rules for the jail and reload devfs, and make sure the iGPU is visible in FreeBSD in the first place.

You can always kldload manually and then check. The /dev/dri and /dev/drm entries should be there after kldload.

This is the output of ls/dev/d* from pms jail. Does it look good to go?

root@pms:~ # ls /dev/d*
/dev/dri:
card0 renderD128

/dev/drm:
0 121 145 169 192 215 239 32 56 8
1 122 146 17 193 216 24 33 57 80
10 123 147 170 194 217 240 34 58 81
100 124 148 171 195 218 241 35 59 82
101 125 149 172 196 219 242 36 6 83
102 126 15 173 197 22 243 37 60 84
103 127 150 174 198 220 244 38 61 85
104 128 151 175 199 221 245 39 62 86
105 129 152 176 2 222 246 4 63 87
106 13 153 177 20 223 247 40 64 88
107 130 154 178 200 224 248 41 65 89
108 131 155 179 201 225 249 42 66 9
109 132 156 18 202 226 25 43 67 90
11 133 157 180 203 227 250 44 68 91
110 134 158 181 204 228 251 45 69
 

Yorick

Wizard
Joined
Nov 4, 2018
Messages
1,912
Looks good. Now whatever you want to transcode just has to please the Plex daemon :).
 

nikinp

Contributor
Joined
Sep 7, 2014
Messages
116
Looks good. Now whatever you want to transcode just has to please the Plex daemon :).

Re-cap. I have been following this Guide and bought hardware that 'worked' for HW transcode and installed Truenas 12.0 on system 1 (as per signature). I have used @danb35 script to setup the Plex jail with hardware transcode being setup manually as per the guide. As per message 311, igpu is visable in the jail with relevant output folders. So I thought I was good to go.

I had some networking issues which I raised in this thread which @Redcoat helped to initially solve. And then odd instability behaviour with Plex / all jails in this thread with starting and stopping jails which @HolyK solved with many hours of troubleshooting and TENACITY which I am most grateful for.

Now back to HW transcode:

-With HW transcode not enabled in plex, software transcode of videos worked and jail could be stopped and started
-With HW transcode enabled in plex, after a single short video (30 secs) transcoded, no other video can be transcoded or played - it just crashes. The jail wont stop (not even with force flag)
-- Errors from console

Code:
root@truenas[~]# iocage stop pms
* Stopping pms
  + Executing prestop OK
  + Stopping services FAILED
ERROR:

Please use --force flag to force stop jail
root@truenas[~]# iocage stop pms --force
* Stopping pms
  + Tearing down VNET OK
  + Removing devfs_ruleset: 1000 OK
  + Removing jail process FAILED:
umount: unmount of /mnt/tank/iocage/jails/pms/root/dev failed: Device busy
jail: ioc-pms: /sbin/

root@truenas[~]# lsof /mnt/tank/iocage/jails/pms/root/dev
lsof: WARNING: compiled for FreeBSD release 12.0-RELEASE; this is 12.2-RELEASE-p3.
lsof: no pwd entry for UID 972
lsof: no pwd entry for UID 972
lsof: no pwd entry for UID 972
lsof: no pwd entry for UID 972
lsof: no pwd entry for UID 972
lsof: no pwd entry for UID 972
lsof: no pwd entry for UID 972
lsof: no pwd entry for UID 972
COMMAND    PID     USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
lsof: no pwd entry for UID 972
Plex\x20M 6031      972    0u  VCHR   0,49      0t0   49 /mnt/tank/iocage/jails/pms/root/dev (devfs) (like character special /dev/null)
lsof: no pwd entry for UID 972
Plex\x20M 6031      972    1u  VCHR   0,49      0t0   49 /mnt/tank/iocage/jails/pms/root/dev (devfs) (like character special /dev/null)
lsof: no pwd entry for UID 972
Plex\x20M 6031      972    2u  VCHR   0,49      0t0   49 /mnt/tank/iocage/jails/pms/root/dev (devfs) (like character special /dev/null)
lsof: no pwd entry for UID 972
Plex\x20M 6031      972    3r  VCHR    0,5      0t0    5 /mnt/tank/iocage/jails/pms/root/dev (devfs) (like character special /dev/fd/2)
lsof: no pwd entry for UID 972
Plex\x20T 6085      972    0u  VCHR   0,49      0t0   49 /mnt/tank/iocage/jails/pms/root/dev (devfs) (like character special /dev/null)
lsof: no pwd entry for UID 972
Plex\x20T 6085      972    1u  VCHR   0,49      0t0   49 /mnt/tank/iocage/jails/pms/root/dev (devfs) (like character special /dev/null)
lsof: no pwd entry for UID 972
Plex\x20T 6085      972    2u  VCHR   0,49      0t0   49 /mnt/tank/iocage/jails/pms/root/dev (devfs) (like character special /dev/null)
lsof: no pwd entry for UID 972
Plex\x20T 6085      972    3r  VCHR    0,5      0t0    5 /mnt/tank/iocage/jails/pms/root/dev (devfs) (like character special /dev/fd/2)
root@truenas[~]#


Really hope I get support to solve this having come so far. Thanks in advance
 
Last edited:

Yorick

Wizard
Joined
Nov 4, 2018
Messages
1,912

RegularJoe

Patron
Joined
Aug 19, 2013
Messages
330
What ever version of TrueNAS you used it is different now, I am using TrueNAS Core 12.0-U2.1 and cannot use the loaders to get drm or i915 to load.

I have a BIOS booting Dell Precision T1500 and to get the drviers to load I had to comment out the blacklist settings in the /boot/defaults/loader.conf for drm and i915

I added this as a tunable : rc.conf kld_list=/boot/modules/i915kms.ko

Your CPU: Intel(R) Core(TM) i5 CPU 650 @ 3.20GHz (3192.07-MHz K8-class CPU)
pciid to match: 0x0042
Support in the base driver: {0x8086, 0x0042, 0, "Intel IronLake"},
 

wootness

Dabbler
Joined
Apr 1, 2021
Messages
15
Hi all, to confirm, if I build a NAS with X11SSH-F and E3-1225v6 running on TrueNAS 12.0, I should be able to hw transcode 1080p -> 1080p subtitles (as long as they're not PGS/VOB) it should run without any issues?
Is it more stable running it on FreeNAS 11.3?
Worried about the jail crashing issues folks are having.
 

Yorick

Wizard
Joined
Nov 4, 2018
Messages
1,912
as long as they're not PGS/VOB

What would they be then and still require transcode? SRT is displayed without any transcoding.
 
Top