Hardware Acceleration on FreeBSD?

Server Version#: 1.17.0.1709
Player Version#: web

Just curious if my CPU/GPU is supported, it’s an Intel® Core™ i3-4150 CPU @ 3.50GHz, and according to Intel (https://ark.intel.com/content/www/us/en/ark/products/77486/intel-core-i3-4150-processor-3m-cache-3-50-ghz.html) it has the 4400 onboard GPU with Quick Sync support. I believe this meets the requirements.

I installed the following on the server:
drm-fbsd11.2-kmod-4.11g20190906
libva-intel-media-driver-19.2.1 (which pulled in other dependencies)

The kernel module is loaded, Plex was restarted, and the checkbox for hardware transcoding is checked. However, when I play an h264 video back and set it to a lower bitrate, the web status dashboard shows a transcode happening, but it doesn’t have the “(hw)” next to the transcode text.

Anything I can look for in the logs to indicate what’s failing?

One thing I didn’t see you list was, the user, plex, must be a member of the video group…

Yep:

(reverse-i-search)`pw': pw groupmod -n video -m plex

Also noting I’m on FreeBSD 11.2, not 12.

I advice you move to 12 and use drm-fbsd12-kmod has you’ll have more recent drm-kmod code (closer to upstream) and so better support.

You don’t need the libva-intel driver… plex takes care of that

Hmmm… I don’t run “.0” releases on important stuff (this is also a fileserver), I’ll revisit this when 12.1 has been out for a few weeks.

Where are the canonical docs on FreeBSD hardware offload? The “pkg-message” you see when installing the plex pass version of the server sounds pretty authoritative, but apparently it’s incorrect?

Not sure what’s wrong with “.0” releases, maybe on others but on FreeBSD 12.0 is the production RELEASE as it gets security/critical patches… in fact 10 patches so far 12.0-RELEASE-p10, so its not a bleeding edge release if that’s what you’re worried about that´s what VERSION-CURRENT is for in freebsd… i.e 13-CURRENT would be bleeding edge.

11.2 on the other end will soon be considered EOL so at most you should be in 11.3, since 11.3 still doesn’t include the most recent DRM freebsd 12 is really the best option here, regardless of if its 12.0 or 12.1, the kernel module is a separate package and usually as .1 version doesn’t introduce drastic kernel changes meaning it shouldn’t really mean much for this use case…

In any case If you want HWT in FreeBSD… 12.XX is the way to go, if you want to wait a litle bit for 12.1 that’s fine.

As for the docs we don’t cover in detail what might be needed in all the different platforms, hardware acceleration is usually enabled the same way it would be for other apps, so as long as that’s working in what matters to Plex you really just need to enable it in settings.
You can read the support article here though: https://support.plex.tv/articles/115002178853-using-hardware-accelerated-streaming/

FreeBSD docs also don’t explain this in much detail so I suggested to the port maintainer that perhaps a pkg-message would help.

It does need some polishing and I’ve submitted a PR on freebsd’s bugzilla to update the pkg-message.

There’s a few threads here in forums too that state the general requirements, the tl;dr for vanilla FreeBSD I would say is:

FreeBSD-12.x
drm-fbsd12-kmod
load the module installed from the package via rc.conf (ie.E. `kld_list="/boot/modules/i915kms.ko")

^ this would be the general config to get the most recent/stable support for drm/graphics support in freebsd and that I based mostly from https://wiki.freebsd.org/Graphics.

Another step that is also valid for any other app is that the app that wants to access the device need permissions, since the video group is the owner you need plex i.e to be added to the videogroup:
pw groupmod -n video -m plex

Now one note on the FreeBSD 12.0 “requirement” in theory it should be possible to use 11.3 with the same module installed but it wouldn’t have support for more recent gpu generations, I’ve only tried that once ages ago (IIRC with a Sandybridge intel processor), and did work but in anycase HWT performance/quality wouldn’t be that great its more of a “oh nice it works”.
In fact I will make the suggestion to add to our docs that “FreeBSD 12.0 is recommended” if you want to be able to use HWT.

1 Like

Thanks - I think most helpful would be having this info in the pkg-message, so thanks for that.

My “no dot-oh” rule is not so much about what a project labels their initial release, it’s more of a side-effect of being a sysadmin for 20+ years. Let other people (or non-production servers) work out the bugs, then come in for dot-one. :slight_smile:

This box is used for more than plex, it’s a few generations behind current hardware, so I choose to wait for things to get shook out.

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