Anyone have been able to HW transcode on an Intel NUC 11 (Iris Xe)?

As you did, I tried many things but it always crash.
The only things I didn’t try:

  1. build a kernel myself with drm-tip and sign it for Secure Boot
  2. transcode a sample file with Intel’s custom ffmpeg build (with level zero support) to see if I can make the kernel crash outside Plex

I really want to test point 2, because if I have HW transcoding with Intel’s ffmpeg and no crash, maybe it can be embedded in Plex package and solves our issues.

@meherenow

  1. This is a Linux thread not a ProxMox thread
  2. Plex does not officially support ProxMox.
  3. All I can do is direct you to the ProxMox forums for support.

NOTE: After I finish my infrastructure upgrade (Network-> 10GbE, NAS to 8x12TB), I might be able to spin a VM for some unofficial support but that would be the limit of what I could do.

3 Likes

Add +1 looking for a resolution to hw Transcoding with NUC11TNHv50L. I’ve tried 20.04, 20.10 all with a slew of kernels from 5.8 to 5.12 at each stop. Dave green and black artifacts when Transcoding before the crash. I did install the i915 driver myself hoping that would help things along but no change in results.

ok I can’t speak to the difference between the NUC chip and the i5-11500 I have installed.
I have noticed a massive improvement in stability between my old set up on i7-7700k (IHD 630) vs the IHD750 in the i5-11500.

The steps with the [optional] token are included for completeness, but may not apply to your configuration.

I always ALWAYS backup any file before I edit it; I recommend you do the same. Typos happen and it’s always good to be able to restore the backup file and start over… :slight_smile:

I’ve put three *** at the start of any step where I think you should back up the file before you edit it.

I also judiciously use clonezilla to back up the entire disk at milestone points and have noted that too.

Here are the steps at a high level:

  1. install Ubuntu 20.10 server live iso burned to USB thumb drive
    (update to latest installer available online,
    use entire disk,
    install OpenSSH server)
  2. refresh available packages
    sudo apt update; apt list --upgradable
  3. update packages
    sudo apt upgrade
  4. [optional] install optional packages you may or may not want/need
    sudo apt install avahi-daemon mdns-scan wpasupplicant nfs-common
  5. [optional] set timezone
    sudo timedatectl set-timezone America/Vancouver
  6. [optional] adjust /etc/nsswitch.conf, /etc/netplan/ to meet needs
  7. [optional] create mount point directories and adjust /etc/fstab to nfs mount remote file systems holding media as required
  8. [optional] mount (new) file systems in /etc/fstab
    sudo mount --all -v

CLONEZILLA here - basic OS install complete

– here’s where the interesting bits are –

  1. Update to kernel 5.11.13…
    download these 4 packages and install
sudo su -

mkdir /tmp/kernel

cd /tmp/kernel

wget https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.11.13/amd64/linux-headers-5.11.13-051113-generic_5.11.13-051113.202104101231_amd64.deb

wget https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.11.13/amd64/linux-headers-5.11.13-051113_5.11.13-051113.202104101231_all.deb

wget https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.11.13/amd64/linux-image-unsigned-5.11.13-051113-generic_5.11.13-051113.202104101231_amd64.deb

wget https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.11.13/amd64/linux-modules-5.11.13-051113-generic_5.11.13-051113.202104101231_amd64.deb
  1. install with dpkg command
    sudo dpkg -i /tmp/kernel/*.deb

  2. *** Set “GRUB_CMDLINE_LINUX_DEFAULT=“i915.force_probe=4c8a” to /etc/default/grub – this depends on what PCI ID is reported for your IHD
    (comment out first line, duplicate and populate with the i915.force_probe string value as below:

How do I find out the value?

root@ubuntu02:~# lspci | grep VGA
00:02.0 VGA compatible controller: Intel Corporation Device 4c8a (rev 04)

Use the 4 character hex value reported… 4c8a in this case.

#GRUB_CMDLINE_LINUX_DEFAULT=""
# 2021-04-17 BLT; addition to find/activate i5-11500 iHD
# https://forums.plex.tv/t/4k-hdr-hevc-hw-transcoding-is-broken-on-i5-11600k-rocket-lake/707057
GRUB_CMDLINE_LINUX_DEFAULT="i915.force_probe=4c8a"
  1. update grub config
    sudo update-grub

  2. *** Update /etc/environment - add LIBVA_DRIVER_NAME variable

PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin"
# 2021-04-17 BLT; added to find/activate i5-11500 iHD
# https://forums.plex.tv/t/4k-hdr-hevc-hw-transcoding-is-broken-on-i5-11600k-rocket-lake/707057
LIBVA_DRIVER_NAME="iHD"
  1. Get the Intel Neo video drivers; two options: 1) add the Intel PPA or just download the drivers. I found the first time that the Intel PPA worked just fine, but the second time I was blocked from it and could not use (ie, 403 Forbidden HTTP status code)
sudo su -

mkdir /tmp/intel

cd /tmp/intel

wget -qO - https://repositories.intel.com/graphics/intel-graphics.key | sudo apt-key add -

apt-add-repository 'deb https://repositories.intel.com/graphics/ubuntu focal main'

https://github.com/intel/compute-runtime/releases/download/21.15.19533/intel-gmmlib_20.4.1_amd64.deb

https://github.com/intel/intel-graphics-compiler/releases/download/igc-1.0.6812/intel-igc-core_1.0.6812_amd64.deb

https://github.com/intel/intel-graphics-compiler/releases/download/igc-1.0.6812/intel-igc-opencl_1.0.6812_amd64.deb

https://github.com/intel/compute-runtime/releases/download/21.15.19533/intel-opencl_21.15.19533_amd64.deb

https://github.com/intel/compute-runtime/releases/download/21.15.19533/intel-ocloc_21.15.19533_amd64.deb

https://github.com/intel/compute-runtime/releases/download/21.15.19533/intel-level-zero-gpu_1.1.19533_amd64.deb

https://github.com/intel/compute-runtime/releases/download/21.15.19533/ww15.sum

here’s what my sources look like right now:

root@ubuntu02:~# apt-add-repository --list

deb http://ca.archive.ubuntu.com/ubuntu groovy universe main multiverse restricted

deb http://ca.archive.ubuntu.com/ubuntu groovy-updates universe main multiverse restricted

deb http://ca.archive.ubuntu.com/ubuntu groovy-backports universe main multiverse restricted

deb http://ca.archive.ubuntu.com/ubuntu groovy-security universe main multiverse restricted

deb https://repositories.intel.com/graphics/ubuntu focal main

deb http://download.webmin.com/download/repository sarge contrib
  1. Check checksums
sudo sha256sum -c ww15.sum

intel-gmmlib_20.4.1_amd64.deb: OK
intel-igc-core_1.0.6812_amd64.deb: OK
intel-igc-opencl_1.0.6812_amd64.deb: OK
intel-level-zero-gpu_1.1.19533_amd64.deb: OK
intel-ocloc_21.15.19533_amd64.deb: OK
intel-opencl_21.15.19533_amd64.deb: OK
  1. install with dpkg command
    sudo dpkg -i /tmp/intel/*.deb

  2. get any updated packages (again)
    sudo apt update; sudo apt upgrade

  3. ok… some more missing bits…
    sudo apt install intel-media-va-driver-non-free libmfx1 intel-level-zero-gpu level-zero libdrm-intel1 vainfo

  4. reboot
    sudo reboot 0

  5. check the environment:

root@ubuntu02:~# vainfo
error: XDG_RUNTIME_DIR not set in the environment.
error: can't connect to X server!
libva info: VA-API version 1.10.0
libva info: User environment variable requested driver 'iHD'
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_10
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.10 (libva 2.10.0)
vainfo: Driver version: Intel iHD driver for Intel(R) Gen Graphics - 21.1.2 (67dbfde)
vainfo: Supported profile and entrypoints
      VAProfileNone                   : VAEntrypointVideoProc
      VAProfileNone                   : VAEntrypointStats
      VAProfileMPEG2Simple            : VAEntrypointVLD
      VAProfileMPEG2Simple            : VAEntrypointEncSlice
      VAProfileMPEG2Main              : VAEntrypointVLD
      VAProfileMPEG2Main              : VAEntrypointEncSlice
      VAProfileH264Main               : VAEntrypointVLD
      VAProfileH264Main               : VAEntrypointEncSlice
      VAProfileH264Main               : VAEntrypointFEI
      VAProfileH264Main               : VAEntrypointEncSliceLP
      VAProfileH264High               : VAEntrypointVLD
      VAProfileH264High               : VAEntrypointEncSlice
      VAProfileH264High               : VAEntrypointFEI
      VAProfileH264High               : VAEntrypointEncSliceLP
      VAProfileVC1Simple              : VAEntrypointVLD
      VAProfileVC1Main                : VAEntrypointVLD
      VAProfileVC1Advanced            : VAEntrypointVLD
      VAProfileJPEGBaseline           : VAEntrypointVLD
      VAProfileJPEGBaseline           : VAEntrypointEncPicture
      VAProfileH264ConstrainedBaseline: VAEntrypointVLD
      VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice
      VAProfileH264ConstrainedBaseline: VAEntrypointFEI
      VAProfileH264ConstrainedBaseline: VAEntrypointEncSliceLP
      VAProfileHEVCMain               : VAEntrypointVLD
      VAProfileHEVCMain               : VAEntrypointEncSlice
      VAProfileHEVCMain               : VAEntrypointFEI
      VAProfileHEVCMain               : VAEntrypointEncSliceLP
      VAProfileHEVCMain10             : VAEntrypointVLD
      VAProfileHEVCMain10             : VAEntrypointEncSlice
      VAProfileHEVCMain10             : VAEntrypointEncSliceLP
      VAProfileVP9Profile0            : VAEntrypointVLD
      VAProfileVP9Profile1            : VAEntrypointVLD
      VAProfileVP9Profile2            : VAEntrypointVLD
      VAProfileVP9Profile3            : VAEntrypointVLD
      VAProfileHEVCMain12             : VAEntrypointVLD
      VAProfileHEVCMain12             : VAEntrypointEncSlice
      VAProfileHEVCMain422_10         : VAEntrypointVLD
      VAProfileHEVCMain422_10         : VAEntrypointEncSlice
      VAProfileHEVCMain422_12         : VAEntrypointVLD
      VAProfileHEVCMain422_12         : VAEntrypointEncSlice
      VAProfileHEVCMain444            : VAEntrypointVLD
      VAProfileHEVCMain444            : VAEntrypointEncSliceLP
      VAProfileHEVCMain444_10         : VAEntrypointVLD
      VAProfileHEVCMain444_10         : VAEntrypointEncSliceLP
      VAProfileHEVCMain444_12         : VAEntrypointVLD
      VAProfileHEVCSccMain            : VAEntrypointVLD
      VAProfileHEVCSccMain            : VAEntrypointEncSliceLP
      VAProfileHEVCSccMain10          : VAEntrypointVLD
      VAProfileHEVCSccMain10          : VAEntrypointEncSliceLP
      VAProfileHEVCSccMain444         : VAEntrypointVLD
      VAProfileHEVCSccMain444         : VAEntrypointEncSliceLP
      VAProfileAV1Profile0            : VAEntrypointVLD
      VAProfileHEVCSccMain444_10      : VAEntrypointVLD
      VAProfileHEVCSccMain444_10      : VAEntrypointEncSliceLP

CLONEZILLA here - OS + kernel + video drivers complete

  1. Ready to install PMS…
    I installed 1.22.0.4163 - as that seemed to be the most stable release… and I was willing to give up experimental HDR tone mapping for stability. There may be newer releases that do not crash with HDR tone mapping enabled. “YMMV”

sudo dpkg -i plexmediaserver_1.22.0.4163-d8c4875dd_amd64.deb

Other actions that may be required…

  • add users to the render group (I add myself and the media user to the group… after I create the media user.)
  • adjust the systemctl override.conf file (I set Umask=0002 so the optimized version directories don’t negatively interact with the NFS file systems I’m using.)
  • Finally I restored my Library folder from my old server to its new home at
    /var/lib/plexmediaserver
sudo su -

systemctl stop plexmediaserver

cd /var/lib/plexmediaserver

mv -v ./Library ./Library.yyyy-mm-dd_01.backup

tar xvzf ./PMS_Library_backup.tgz

CLONEZILLA here - OS + kernel + video drivers + Plex software + Plex configuration complete

  • install webmin
sudo wget -q -O- http://www.webmin.com/jcameron-key.asc | sudo apt-key add

sudo echo deb http://download.webmin.com/download/repository sarge contrib | 
sudo tee /etc/apt/sources.list.d/webmin.list

sudo apt update

sudo apt install webmin lm-sensors smartmontools

sudo sensors-detect

CLONEZILLA here - OS + kernel + video + PMS install/config + webmin admin console

So that’s about it… 20 easy steps. ha.

Let me know if you have questions… I’m not an expert, but I can expand on the steps I did and the output I got if it’s not clear.

  • Also open to suggestions for improvement.
  • Hope this complicated sequence can be rationalized once Intel, Linux & Plex catch up to 11th generation Intel CPU hardware. :sweat_smile: :face_with_head_bandage:
2 Likes

This is an awesome set of instructions mate, thank you! :smiley: … I’m also moving from an i7-7700 with the HD 630 and am super unhappy with the stability (at least on Windows). I’ll have multiple unexplained crashes a day and for some reason cannot seem to attain any kind of crash report. I was going to get myself a 10th Gen NUC instead. :slight_smile:

Yeah 6th gen onward are supposed to have the needed Intel Quick Sync Video components (or it starts with 6th gen and gets to full support for HDR 10 in 7th gen).

I went from i7-6700 to i7-7700k hoping that would be enough to get to stability. My family outside my network constantly crashed current versions of plex transcoding 4K to 1080p on the i7-7700k too though.

I landed on the bleeding edge 11th gen chips because even the 10th gen are still 600-series IHD ~ didn’t seem like I was getting a lot more QSV technology moving from 7700 to 8, 9 or 10th generation.

That’s my understanding anyway. Lots of posts in the forums about issues with 10th gen chips too.

@RoadRacer12 pointed me to this Wikipedia entry on Intel QSV which has a lot of interesting detail that summarizes the various info you can get from Intel ARK product info

https://forums.plex.tv/t/linux-packaging-developers-sandbox-hdr-tonemapping-packaging-support/698937/123

If you can hold off for a while ~ might be worth it. You’ll get more capability and more stability.

Good luck! :smiley:

Thanks’ a lot for the steps. Also had the issue with intel repository. I thought it would work after some time but still not able to use it with the same error you had.

I ran into the same issue with the Intel repo as well.

Workaround on the intel repo worked for me:

apt-get install --print-uris
libdrm-intel1 vainfo
intel-opencl-icd
intel-level-zero-gpu level-zero
intel-media-va-driver-non-free libmfx1
| awk -F’ ‘/https/{print $2}’
| sed ‘s/+/%2B/g’
| xargs sudo wget -P /var/cache/apt/archives
&& sudo apt-get install
libdrm-intel1 vainfo
intel-opencl-icd
intel-level-zero-gpu level-zero
intel-media-va-driver-non-free libmfx1

as from: Problem installing packages on ubuntu focal (repository broken) · Issue #9 · intel-gpu/documentation · GitHub

Also happy to say that after following steps from [BLiTyvr] after 30 minutes playing with HW transcoding no crashes yet. running plex on ubuntu on esxi

1 Like

So, is this issue now fixed?

I’ve been wanting to transition to an 11th gen NUC as my Plex server for some time now, it’s the first generation that finally supports 2.5Gbit Ethernet.
My current server is Ryzen+GeForce for transcoding, the NUC would consume a third the power.

But if it’s much more difficult than swapping the m.2 SSD and Intel remains sluggish with their gpu drivers I’ll hold of pulling the trigger for now.

Could someone please give me a definite response on this?

No it’s not fixed.
The topic derived to an Intel 11th gen desktop topic.
NUC11 uses a mobile CPU, different than desktop, and stills crashes, whatever you try.
Hardware accel can’t be used at all.

Thanks @geeooff

That’s a shame. I hope this will be resolved by the end of the year. At the latest when Intel’s dGPUs enter the market, one might expect…

Let me quote Intel:

[…] our support for Linux* is very limited on this platform since we have only tested and validated Windows 10*, see this URL for Operating System Compatibility reference information Supported Operating Systems for Intel® NUC Products

Also, keep in mind that we dont provide specific drivers for Linux, the drivers should be provided by the Linux distribution so I would recommend that you reach to the Ubuntu* community for support on this issue.

And here’s the Linux* Support for Intel® NUC page.
They only support officially NUC7 on Linux.

I don’t know how DELL managed to get Ubuntu support on its new XPS 13 (same CPU/iGPU as the NUC11):
Dell brings new Intel 11th gen Core processors to the XPS 13 Developer Edition | Ubuntu

Anyone with a DELL XPS 13 “9310” ?

What OS version and kernel are you running with your current setup 20.10, w/ 5.10? Thanks in advance.

Maybe a bit off-topic, but since this still isn’t officially supported – what’s the best alternative right now?

A little more to this ongoing issue, I was able to get HW transcoding to work on everything except content that uses the VC1 codec. That’s when I see the green flashes and pixelation as pictured in screen shots at the top of this thread. Everything else plays nice and Tautulli shows the HW transcoding (it does on the VC1 content just the picture issues) Hope this helps clear up any cloudiness surrounding the 11th gen chips.

@Kasper56 Can you confirm what system you have?

Is it a nuc? ((Edit, I see you have a nuc from an older post)

What os and kernel package?
Which Intel compute packages installed if any?

I’ve listed mine a few different times here already. Yes it works, sometimes even works without Atrifacts. But will always result in a crash. Sometimes needs 5 to 15 mins of testing.

Here my today’s experience:

  1. Ubuntu 20.04.2 LTS, kernel 5.10.0-1026-oem, kernel (grub+modprobe) options enable_guc=2, UEFI boot w/ Secure Boot
  2. Plex Transcoder settings are:
    • Transcoder quality: Automatic
    • Enable HDR tone mapping is OFF
    • Disable video stream transcoding is OFF
    • Use hardware acceleration when available is ON
    • Use hardware-accelerated video encoding is ON
  3. Test file (download) is 8-bit 1080p AVC 55mbps, available from https://jell.yfish.us/ (there are also HEVC 10-bit files if you’re curious, audio format varies).
  4. Played as is from Microsoft Edge 90 browser in Windows 10: only audio is transcoded, video is direct streamed
  5. Set repeat mode to “Repeat One” to loop over the same file
  6. Change playback quality to “Convert to 1080p HD (High) / 20 Mbps”, and wait a few plays
  7. If still alive, change playback to “Convert to 720p HD (High) / 4 Mbps” and wait for death

I was monitoring with htop, intel_gpu_top and dmesg --follow commands.

On step 6 I was able to HW transcode.
As soon as I choose to “Convert to 1080p”, I had big warnings in dmesg (see dmesg_warning.txt (4.2 KB)), but everything looked fine and intel_gpu_top reported hardware video processing.
htop was reporting a neglectable load on several CPU cores (the audio transcoding I guess).

On step 7, after a few successful 1080p loops, I moved to 720p transcoding. Immediately I got error in dmesg (see dmesg_error.txt (2.8 KB)) and plex crashed.
intel_gpu_top never reported activity, and now nothing can be transcoded, the NUC has to reboot to regain HW transcoding capability.

For now, I’m able to get very little HW capability with “Use hardware acceleration when available” to ON (so just HW decoding), but “Use hardware-accelerated video encoding” is just not usable.
I’m not even thinking about HDR tone-mapping for now.

1 Like

So I have 2 11th gen CPU’s, one is the Intel Nuc11 Pro i5 and a i5-11600K Desktop CPU.

The latest test for both have been using the Ubuntu 20.04 w/ kernel oem-20.04b which is 5.10.0-1021-oem.

Latest Plex BETA in a docker container.

  1. beignet-opencl-icd
  2. ocl-icd-libopencl1
  3. The Intel Compute Runtime packages listed here. Releases · intel/compute-runtime · GitHub

It still hit or miss, VC1 still causes artifacts and the NUC does lockup anywhere from 3 minutes to 20 minutes of transcoding. :confused:

Thanks for the update.

Unfortunately that is the same as it has been for months now. The quality issues change depending on different factors I’ve not bothered to test further. It isn’t important currently.

I saw improvements when moving to 5.11 and 5.12 among other things but until the crashes are fixed it’s pointless. I managed maybe 8+ concurrent sessions at one point.

The test content also makes a difference to output quality, there are still many differences to content encoding other than baseline, main and high as well as multiple levels etc that give different results. I’d say even different encoders using the same settings would give you different results to some extent.