Intel iGPU HW Transcoding
(Specific instructions and examples below are for a Hetzner dedicated server however much is useful for others as a guide):
For Hetzner server users, the following is how to get the drivers and capability installed on the Linux host.
- Comment out all line referencing i915 in this file: /etc/modprobe.d/blacklist-hetzner.conf
sudo nano /etc/modprobe.d/blacklist-hetzner.conf
- Add a # in front of the lines “blacklist i915” and “blacklist i915_bdw”
# blacklist i915
# blacklist i915_bdw
- Remove Hetzner’s default grub config “nomodeset” which blocks loading of video card drivers:
- Ubuntu 16 or earlier:
- Ubuntu 18.04 or later:
- comment out GRUB_CMDLINE_LINUX_DEFAULT=“nomodeset” (it’s okay if it also has consoleblank=0 at the end."
# GRUB_CMDLINE_LINUX_DEFAULT="nomodeset consoleblank=0"
- Ubuntu 16 or earlier:
- Update and Reload grub.
- For older Ubuntu try
sudo grub-mkconfig -o /boot/grub/grub.cfg
- Add user root (or whoever is the user running the Plex service) to the video group:
sudo usermod -a -G video root
- Reboot the server
ls -la /dev/drinow it should find the folder and list drivers
chmod -R 777 /dev/drito change permissions ( critical step for use in Docker! )
- I recommend installing and running vainfo and ensure it gives you a positive readout on your driver
sudo apt update
sudo apt install vainfo
- You want a line similar to “vainfo: Driver version: Intel i965 driver for Intel® Haswell Server - 1.7.0” somewhere in the 18-20 lines it puts out.
Note: If VAINFO works, it’s almost a sure bet you’ll be able to get the Docker Plex to work. However, as long as the /dev/dri folder with the two driver files are there, you’re probably okay even if running VAINFO throws an error.
Getting it working (optimally) inside Docker.
The following updates to the Plex Docker container are not strictly necessary - but recommended.
You’ll need to run the following commands from the HOST (to make it easier for you):
docker exec plex apt-get -y update
docker exec plex apt-get -y install i965-va-driver vainfo
docker restart plex
That updates the driver now that it can get to the files outside the container.
The following command should give a succinct info read on your iGPU:
GPU=$(lspci | grep VGA | cut -d ":" -f3);RAM=$(cardid=$(lspci | grep VGA |cut -d " " -f1);lspci -v -s $cardid | grep " prefetchable"| cut -d "=" -f2);echo $GPU $RAM
For example, on one of the dedicated servers I use (an Intel Xeon E3-1246V3), the output is:
Intel Corporation Xeon E3-1200 v3 Processor Integrated Graphics Controller (rev 06) 256M
However on a non-dedicated VPS I use the output is:
Cirrus Logic GD 5446 32M (Yeah…the emulated Cirrus Logic isn’t going to work for hardware encoding.)