Hardware transcoding not working under Debian Linux

I’m trying to get hardware transcoding to work on a Debian-based linux distro (“DietPi”). However, no matter what I try, transcoding is still handled by the CPU alone.

The hardware is an Intel Apollo Lake-based mini pc and I’ve was able to successfully use hardware transcoding running the lastest PMS under Windows 10 and Ubuntu. So the hardware is definitely capable and features Intel Quick Sync.

Any steps how I might proceed to isolate the issue why it’s not working under Debian for me?

you probably need to make sure you have the proper video drivers (and/or kernel version) that supports that igpu.

If I may augment here?

Apollo lake, being a 64 bit CPU, with a 64 bit distro installed, with 64 bit PMS installed
will have native HW transcoding ability.

No additional drivers are needed.

It would help to know which Debian-based version is in use as some are too old.

I’ve used the latest Debian 10 “Buster” rc1 build as a basis and ran the DietPi x64 on top to make the hole system run headless.

do you mean as virtual machine or docker or something?

also, you may need a dummy plug for the video port. these are often needed for headless systems.

If I may add?

Diet Pi is the ARMv8 processor?

If so, there is no hardware transcoding support in Plex.

I am aware of some special chips out there but there is no support in Plex for them and, due to the lower installed based count, not likely to be for some time.

Sorry, forgot to mention this:

DietPi is basically a lightweight Debian distro. It was originally created to run on ARM single boards, but there’s also a x64 built available that I’m using on my Intel mini pc.

In the end, the PMS is running natively on the latest Debian 10.

The dummy plug idea is interesting. Never needed one when I tried hardware transcoding under Windows 10. Can I just hook up the PMS over HDMI to a TV as a test?

DietPi / Raspberry Pi CPU.

Raspberry Pi CPU = ARMv8 architecture.

Plex doesn’t support any of the internal video capability of the CPU on Linux because Linux doesn’t.

Windows is a different video display arcitecture.

PMS is a Server, You need a client (player) to connect to HDMI.
PMS will drive (send video to) devices like a Roku or ChromeCast (which are the client plugged into the HDMI).

Does this make more sense?

EDIT: What confuses me is ApolloLake on an unsupported/untested variant of a version of Debian . Some versions of Debian are too old.

Also, If the installation does not have udev installed, Plex won’t be able to access the hardware

I think I’ve introduced some confusion. Let me try to clear this up.

  1. I’m trying to turn a small mini pc into a dedicated PMS because of the ridiculously low power consumption of around 2W during idle states.
    As an added benefit, this mini pc I’m using is x64 based with an Intel Apollo Lake N3450 quad core CPU and Intel HD Graphic GPU - and as such is capable of hardware transcoding through Quick Sync.

  2. As an OS I’m trying an Debian-based “Diet Pi” image. Diet Pi started out as a lightweight Linux image for ARM-based single board computers like the Raspberry Pi. However, there is also a x64 version of DietPi available that can run on the Intel system I’m using.

  3. I’ve been able to successfully enable and use hardware transcoding on this machine under Windows 10 x64 as well as Ubuntu 19.04.

So what I’m now trying, is to get PMS use Quick Sync when I’m using this DietPi/Debian OS instead.

It looks to me like there might be some dependency or service missing in DietPi. And I’m looking for a good approach to how I might find out what’s preventing PMS from accessing Quick Sync on this OS.

  1. install vainfo (apt-get install vainfo)
  2. use “vainfo” and give us the result.
  3. use “ls -la /dev/dri/” and give us the result
  4. use “groups plex” and give us the result.
1 Like

oh and maybe a “uname -a” for kernel version

To add to ChosenEye,

If there is a disparity between the groups Plex is in and the listing of /dev/dri,
check for the udev package (ls -la /lib/udev/rules.d)

If it doesn’t exist, PMS isn’t going to work without also installing the udev package and then reinstalling Plex.

why just not moving the plex user in the groups? worked for me like a charm :smiley:

All the config files would have to be customized at installation to switch to that group.
The current installer isn’t that intelligent. Udev is also used for USB tuners.

Udev changes the default permission, NOT the group membership. Udev rules allow Plex, a non group member to read/write the ASIC interface API.

The new installer, which I’m putting into testing this week, is more intelligent.
User plex will “Join” the group associated with /dev/dri/renderD128 if it exists which is what you suggest.

Joining the group still doesn’t solve the udev control needed for tuners. I am working on that but for now, I am tackling the installer rewrite so I can move forward with more on the next update of it.

Once the new installer has proven itself stable for Ubuntu and Debian (mainstream), it will allow us to officially support offshoot flavors / spins (which is what you have).

This gives support for Gentoo and a whole bunch of distros provided the package manager is DEB or RPM (part 2 of phase 1 ) compatible. I still won’t have Arch linux but it’s not out of the realm of possibilities at this point any longer.

Supplemental:

I am waiting for an official (CI built) build using my new installer. I will open a Forum Preview thread for everyone to try.

The goal is to verify the installer works for everyone. I have no idea bout the functionality of PMS itself but the basics should be operational. at least enough to know we got HW transcoding, etc.

Everyone is welcomed, and encouraged, to join in.

Here we go with the first batch of results:

root@DietPi:~# vainfo
error: XDG_RUNTIME_DIR not set in the environment.
error: can't connect to X server!
libva info: VA-API version 1.4.0
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so
libva info: va_openDriver() returns -1
vaInitialize failed with error code -1 (unknown libva error),exit
root@DietPi:~# ls -la /dev/dri/
total 0
drwxr-xr-x  3 root root        100 Jun 17 21:27 .
drwxr-xr-x 18 root root       3420 Jun 17 21:27 ..
drwxr-xr-x  2 root root         80 Jun 17 21:27 by-path
crw-rw----  1 root video  226,   0 Jun 17 21:27 card0
crw-rw----  1 root render 226, 128 Jun 17 21:27 renderD128
root@DietPi:~# groups plex

plex : plex cdrom floppy audio dip video plugdev netdev dietpi
root@DietPi:~# uname -a

Linux DietPi 4.19.0-5-amd64 #1 SMP Debian 4.19.37-3 (2019-05-15) x86_64 GNU/Linux
root@DietPi:~# ls -la /lib/udev/rules.d

total 184

drwxr-xr-x 2 root root 4096 Jun 17 18:38 .

drwxr-xr-x 4 root root 4096 Jun 10 09:58 ..

-rw-r--r-- 1 root root 210 May 24 21:58 50-firmware.rules

-rw-r--r-- 1 root root 3679 May 24 21:58 50-udev-default.rules

-rw-r--r-- 1 root root 7274 Feb 3 13:55 55-dm.rules

-rw-r--r-- 1 root root 626 Feb 14 10:11 60-block.rules

-rw-r--r-- 1 root root 1071 Feb 14 10:11 60-cdrom_id.rules

-rw-r--r-- 1 root root 413 Feb 14 10:11 60-drm.rules

-rw-r--r-- 1 root root 974 Feb 14 10:11 60-evdev.rules

-rw-r--r-- 1 root root 282 Feb 14 10:11 60-input-id.rules

-rw-r--r-- 1 root root 616 Feb 14 10:11 60-persistent-alsa.rules

-rw-r--r-- 1 root root 2710 Feb 14 10:11 60-persistent-input.rules

-rw-r--r-- 1 root root 1794 Feb 3 13:55 60-persistent-storage-dm.rules

-rw-r--r-- 1 root root 6891 Feb 14 10:11 60-persistent-storage.rules

-rw-r--r-- 1 root root 2135 Feb 14 10:11 60-persistent-storage-tape.rules

-rw-r--r-- 1 root root 769 Feb 14 10:11 60-persistent-v4l.rules

-rw-r--r-- 1 root root 727 Feb 14 10:11 60-sensor.rules

-rw-r--r-- 1 root root 1190 Feb 14 10:11 60-serial.rules

-rw-r--r-- 1 root root 96 Jun 5 13:23 60-tvbutler-perms.rules

-rw-r--r-- 1 root root 612 May 24 21:58 64-btrfs.rules

-rw-r--r-- 1 root root 257 Mar 5 20:11 64-xorg-xkb.rules

-rw-r--r-- 1 root root 432 Feb 14 10:11 70-joystick.rules

-rw-r--r-- 1 root root 734 Feb 14 10:11 70-mouse.rules

-rw-r--r-- 1 root root 568 Feb 14 10:11 70-power-switch.rules

-rw-r--r-- 1 root root 473 Feb 14 10:11 70-touchpad.rules

-rw-r--r-- 1 root root 2800 May 24 21:58 70-uaccess.rules

-rw-r--r-- 1 root root 2727 May 24 21:58 71-seat.rules

-rw-r--r-- 1 root root 636 May 24 21:58 73-seat-late.rules

-rw-r--r-- 1 root root 961 May 24 21:58 73-special-net-names.rules

-rw-r--r-- 1 root root 692 May 24 21:58 73-usb-net-by-mac.rules

-rw-r--r-- 1 root root 452 Feb 14 10:11 75-net-description.rules

-rw-r--r-- 1 root root 174 Feb 14 10:11 75-probe_mtd.rules

-rw-r--r-- 1 root root 4816 Feb 14 10:11 78-sound-card.rules

-rw-r--r-- 1 root root 1375 May 24 21:58 80-debian-compat.rules

-rw-r--r-- 1 root root 615 Feb 14 10:11 80-drivers.rules

-rw-r--r-- 1 root root 190 Aug 25 2018 80-ifupdown.rules

-rw-r--r-- 1 root root 292 Feb 14 10:11 80-net-setup-link.rules

-rw-r--r-- 1 root root 82 Oct 26 2018 85-hdparm.rules

-rw-r--r-- 1 root root 204 Jan 10 08:30 85-hwclock.rules

-rw-r--r-- 1 root root 265 Oct 29 2018 90-console-setup.rules

-rw-r--r-- 1 root root 479 Feb 3 13:55 95-dm-notify.rules

-rw-r--r-- 1 root root 4363 May 24 21:58 99-systemd.rules

okay try

“usermod -a -G render plex”
then restart plexmediaserver.

when it doesnt work can we get an “dmesg” output?

for vainfo you need i965 driver (apt-get install i965-va-driver)

1 Like

install the udev package as well.
The installer relies on it.

This is a prime example why only certain distros are supported.

Ah, that did it.

46
13

Do I still need to install udev as well?

you dont need to (yeah Team member will recommend this… :wink: ).
normally udev would add the group automatically.
for me i always add this personally so just remember to put plex in the group which /dev/dri/renderD128 is in.

maybe its possible to update the Plex Article for Linux HW Transcoding? (https://support.plex.tv/articles/115002178853-using-hardware-accelerated-streaming/) so there are informations like groups and Kernel version etc. so maybe the request in forum will be much more less?