Skip to content

Instantly share code, notes, and snippets.

@thomsh
Last active December 2, 2022 09:25
Show Gist options
  • Save thomsh/5e43dddc64d442ad86c04a5488c9c8cf to your computer and use it in GitHub Desktop.
Save thomsh/5e43dddc64d442ad86c04a5488c9c8cf to your computer and use it in GitHub Desktop.
NUC11TNHi5 setup with hardware acceleration for video decode

Intel NUC NUC11TNHi5 setup with hardware acceleration for video decode

Using Ubuntu 22.04 graphical session on x11 (but very few diff with wayland)
With this setup the nuc can play 4k60fps video in Kodi, Firefox, Chrome without any issue.

Install intel stuff

apt-get install -qy \
  intel-gpu-tools intel-media-va-driver-non-free \
  intel-microcode vainfo libva2 libva-x11-2
cat <<EOF > /etc/modprobe.d/i915.conf
options i915 enable_fbc=1 enable_guc=3 fastboot=1
EOF
echo 'LIBVA_DRIVER_NAME=iHD' >> /etc/environment
# Eventually useless
cat <<EOF > /etc/sysctl.d/i915.conf
dev.i915.perf_stream_paranoid=0
EOF

Firefox

# only if using wayland
echo 'MOZ_ENABLE_WAYLAND=1' >> /etc/environment

Parameter to enter in about:config:

  • media.ffmpeg.vaapi.enabled = true
  • gfx.webrender.all = true

Extensions

Google Chrome

Add a new launcher Or edit the existing one

cat <<EOF >/usr/share/applications/google-chrome-hw-decode.desktop
[Desktop Entry]
Version=1.0
Name=Google Chrome HW decode
GenericName=Web Browser
Comment=Access the Internet
Exec=/usr/bin/google-chrome-stable --ignore-gpu-blocklist --disable-features=UseChromeOSDirectVideoDecoder --use-gl=desktop --enable-features=VaapiVideoDecoder --ozone-platform=x11 %U
StartupNotify=true
Terminal=false
Icon=google-chrome
Type=Application
Categories=Network;WebBrowser;
MimeType=application/pdf;application/rdf+xml;application/rss+xml;application/xhtml+xml;application/xhtml_xml;application/xml;image/gif;image/jpeg;image/png;image/webp;text/html;text/xml;x-scheme-handler/http;x-scheme-handler/https;
Actions=new-window;new-private-window;

[Desktop Action new-window]
Name=New Window
Exec=/usr/bin/google-chrome-stable --ignore-gpu-blocklist --disable-features=UseChromeOSDirectVideoDecoder --use-gl=desktop --enable-features=VaapiVideoDecoder --ozone-platform=x11

[Desktop Action new-private-window]
Name=New Incognito Window
Exec=/usr/bin/google-chrome-stable --incognito --ignore-gpu-blocklist --disable-features=UseChromeOSDirectVideoDecoder --use-gl=desktop --enable-features=VaapiVideoDecoder --ozone-platform=x
EOF

Extensions

Install other tools

apt install -qy ubuntu-restricted-addons ffmpeg vainfo mpv htop software-properties-common vim-nox

Install Kodi

add-apt-repository -y ppa:team-xbmc/ppa
apt install kodi

Fix sound issue with tv Samsung Q80A

https://gist.github.com/thomsh/3f91c797dd7d9f3503ebce648ca32988

References

https://wiki.archlinux.org/title/Hardware_video_acceleration

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment