How to use Plex hardware transcoding on TrueNAS

Here is how you activate Plex hardware transcoding on your TrueNAS box to offload your CPU and get those Plex videos to play butter smooth!

While researching this I ran across this forum thread about activating hardware transcoding on Plex. However I could not get the tuneable to load the kernel modules to work. It works just as well though to load it through the script so just modify the script in the thread to look like this:

#!/bin/sh

cat >>/etc/devfs.rules << 'EOF'
[devfsrules_bpfjail=101]
add path 'bpf*' unhide

[plex_drm=109]
add include $devfsrules_hide_all
add include $devfsrules_unhide_basic
add include $devfsrules_unhide_login
add include $devfsrules_jail
add include $devfsrules_bpfjail
add path 'dri*' unhide
add path 'dri/*' unhide
add path 'drm*' unhide
add path 'drm/*' unhide
EOF

kldload /boot/modules/i915kms.ko

service devfs restart

Add this script to for instance /root/scripts/plex.sh. Now go to Tasks -> Init/Shutdown scripts in TrueNAS and click Add. Use the following parameters:

  • Type: script
  • Path: /root/scripts/plex.sh
  • When: post init

Now go to Jails in TrueNAS and edit the Plex jail. Go to Jail Properties and change the devfs_ruleset to the same number as you set the plex_drm ruleset to, 109 in this case.

Now reboot your TrueNAS box. When it has booted up again and the Plex jail is running you can try to play something that needs transcoding, in the Plex dashboard you should see something like this.

Notice the (hw) next to Transcode, that indicates that Plex now is using hardware transcoding.

At time of writing I was running a 6700K and TrueNAS 12.0 so if you are using another configuration and run in to issues please comment below.

Sources:

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.