Commands: sudo systemctl disable tvheadend sudo systemctl enable tvheadend sudo systemctl stop tvheadend sudo systemctl start tvheadend HW: NUC element with Celeron 6305 download ISO LUBUNTU 22.04: https://www.cdimage.ubuntu.com/lubuntu/releases/22.04/release/lubuntu-22.04.1-desktop-amd64.iso flash ISO to USB 32G using rufus-3.21 Note: make sure you plug the USB in USB2.0 socket (black). Install Lubuntu to PC with default settings; connect also to internet. Update some settings: Preference / LXQt setting / Power Management: Idle --> uncheck Enable Idleness Watcher : Close Preference / LXQt setting / Monitor Settings: 1280 x 720 : Save : Yes Preference / LXQt setting / LXQt Configuration Center : Openbox Settings --> Desktops : Number of desktops : 1 Preference / Screen Saver : Mode : Disable screen saver Install SSH: System Tools / QTerminal sudo apt update sudo apt install ssh check status: systemctl status sshd.service if is not working: sudo systemctl enable sshd and: sudo systemctl start sshd connect over SSH to continue: Update to latest software: sudo apt update sudo apt upgrade sudo reboot sudo apt autoremove --purge alin@alin-cm8pcb4r:~$ uname -a alin@alin-cmcm2fb:~$ uname -a Linux alin-cmcm2fb 5.15.0-57-generic #63-Ubuntu SMP Thu Nov 24 13:43:17 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux install OneVPL: https://dgpu-docs.intel.com/installation-guides/ubuntu/ubuntu-jammy-legacy.html Before you start let's check that GPU is supported in OneVPL. check: sudo lspci -nn | grep -e VGA alin@alin-cmcm2fb:~$ sudo lspci -nn | grep -e VGA 00:02.0 VGA compatible controller [0300]: Intel Corporation Device [8086:9a78] (rev 01) you can go on: https://dgpu-docs.intel.com/devices/hardware-table.html and search for: "9a78" (check after [8086:****]). and see is: IntelĀ® UHD Graphics --> Gen Xe --> Tiger Lake according to: https://www.intel.com/content/www/us/en/developer/articles/guide/onevpl-installation-guide.html GPU suported are: Hardware Intel Core process 11 generation and above, Intel Xe Max discrete graphic and above Step 1 Add package repository: To install the repositories.intel.com/graphics package repository, add the following to your Ubuntu installation. Prior to copy/pasting to your console, you may want to run sudo ls and enter your password to prevent the commands from being swallowed by the sudo password prompt: sudo apt-get install -y gpg-agent wget wget -qO - https://repositories.intel.com/graphics/intel-graphics.key | sudo gpg --dearmor --output /usr/share/keyrings/intel-graphics.gpg echo 'deb [arch=amd64 signed-by=/usr/share/keyrings/intel-graphics.gpg] https://repositories.intel.com/graphics/ubuntu jammy legacy' | \ sudo tee /etc/apt/sources.list.d/intel.gpu.jammy.list Step 2 Install run-time packages: You can install the GPU software packages by running the following: sudo apt-get update sudo apt-get install \ intel-opencl-icd \ intel-level-zero-gpu level-zero \ intel-media-va-driver-non-free libmfx1 libmfxgen1 libvpl2 Step 3 Install developer packages: sudo apt-get install -y \ libigc-dev \ intel-igc-cm \ libigdfcl-dev \ libigfxcmrt-dev \ level-zero-dev Step 4 Configuring permissions for render: To access GPU capabilities, a user needs to have the correct permissions. The following will list the group assigned ownership of the render nodes, and list the groups the active user is a member of: stat -c "%G" /dev/dri/render* --> render alin@alin-cmcm2fb:~$ stat -c "%G" /dev/dri/render* render groups ${USER} alin@alin-cmcm2fb:~$ groups ${USER} alin : alin adm cdrom sudo dip plugdev lpadmin sambashare My user doesn't have access because is not part of 'render' Now we add my user (alin) to group (render) sudo gpasswd -a ${USER} render alin@alin-cmcm2fb:~$ sudo gpasswd -a ${USER} render Adding user alin to group render newgrp render verify: groups ${USER} alin@alin-cmcm2fb:~$ groups ${USER} alin : alin adm cdrom sudo dip plugdev render lpadmin sambashare Now we see user is part of render. Review of available hw codecs: sudo apt-get install libva-drm2 vainfo sudo vainfo alin@alin-cmcm2fb:~$ sudo vainfo Trying display: wayland error: XDG_RUNTIME_DIR not set in the environment. Trying display: x11 error: can't connect to X server! Trying display: drm libva info: VA-API version 1.16.0 libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so libva info: Found init function __vaDriverInit_1_16 libva info: va_openDriver() returns 0 vainfo: VA-API version: 1.16 (libva 2.16.0) vainfo: Driver version: Intel iHD driver for Intel(R) Gen Graphics - 22.6.4 (aca8ee0) 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 VAProfileVP8Version0_3 : VAEntrypointVLD 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 the data format is: CODEC/profile : Encoder/Decoder VAProfileH264High : VAEntrypointVLD VAProfileH264High : VAEntrypointEncSlice VAProfileH264High : VAEntrypointFEI VAProfileH264High : VAEntrypointEncSliceLP This is: H264, Profile high with decoder (VAEntrypointVLD) , Encoder (VAEntrypointEncSlice) and LowPower encoder (VAEntrypointEncSliceLP) Is importand to identify if your GPU has this low power (LP) codecs available. In my case I have low power for: H264 profiles Main, High and Constrained sudo apt update sudo apt upgrade Install gpu tools (required to check the work load on GPU): sudo apt install intel-gpu-tools Enable GUC firmware (this is a must for encoding with low power codec): we need to generate a file: sudo vi /etc/modprobe.d/i915.conf with the text (only one line) --> press key 'I': options i915 enable_guc=3 --> press esc --> press key : and w --> press key : and q sudo update-initramfs -k all -u sudo update-grub sudo reboot Verify GuC was enabled: sudo dmesg | grep guc alin@alin-cmcm2fb:~$ sudo dmesg | grep guc [ 2.234080] Setting dangerous option enable_guc - tainting kernel [ 2.941075] i915 0000:00:02.0: [drm] GuC firmware i915/tgl_guc_62.0.0.bin version 62.0 submission:enabled -> it sounds scary 'dangerous option' ... but is fine. this is required to scan channels later on: sudo apt update sudo apt install w-scan sudo apt upgrade clean up: sudo apt autoremove --purge Compile tvheadend: cd ~ git clone https://github.com/tvheadend/tvheadend.git sudo apt update sudo apt install gettext libssl-dev cmake libpcre2-dev libdvbcsa-dev libva-dev liburiparser-dev libavahi-client-dev debhelper zlib1g-dev sudo apt install python-is-python3 sudo apt install python3-requests cd tvheadend ./configure $################### log output #################### alin@alin-cmcm2fb:~/tvheadend$ ./configure Checking support/features checking for cc execinfo.h ... ok checking for cc -mmmx ... ok checking for cc -msse2 ... ok checking for cc -Wunused-result ... ok checking for cc -fstack-protector ... ok checking for cc -fstack-protector-strong ... ok checking for cc -fstack-check ... ok checking for cc -fPIE ... ok checking for cc strlcat ... fail checking for cc strlcpy ... fail checking for cc fdatasync ... ok checking for cc getloadavg ... ok checking for cc atomic32 ... ok checking for cc atomic64 ... ok checking for cc atomic_time_t ... ok checking for cc atomic_ptr ... ok checking for cc bitops64 ... ok checking for cc lockowner ... ok checking for cc qsort_r ... ok checking for cc stime ... fail checking for cc gmtoff ... ok checking for cc recvmmsg ... ok checking for cc sendmmsg ... ok checking for cc libiconv ... fail ^ using build-in glibc iconv routines checking for cc ifnames ... ok checking for cc cclang_threadsan ... fail checking for py module gzip ... ok checking for pkg-config ... ok checking for xgettext ... ok checking for msgmerge ... ok checking for gzip ... ok checking for bzip2 ... ok checking for pkg openssl ... ok (detected 3.0.2) checking for cc linux/dvb/version.h ... ok checking for pkg zlib ... ok (detected 1.2.11) checking for pkg libpcre2-8 ... ok (detected 10.39) checking for pkg liburiparser ... ok (detected 0.9.6) checking for pkg avahi-client ... ok (detected 0.8) checking for cmake ... ok checking for cc -lstdc++ ... ok checking for pkg libva >=0.38.0 ... ok (detected 1.16.0) checking for pkg libva-drm >=0.38.0 ... ok (detected 1.16.0) checking for cc sys/inotify.h ... ok checking for cc inotify_init1 ... ok checking for cc dvbcsa/dvbcsa.h ... ok checking for cc -ldvbcsa ... ok fetching dvb-scan files ... ok checking for cc epoll_create1 ... ok checking for pkg dbus-1 ... ok (detected 1.12.20) Compiler: Using C compiler: cc Using LD flags: -ldvbcsa Build for arch: x86_64 Binaries: Using PYTHON: python Using GZIP: gzip Using BZIP2: bzip2 Options: pie yes ccdebug no cardclient yes cwc yes cccam yes capmt yes constcw yes linuxdvb yes satip_server yes satip_client yes hdhomerun_client yes hdhomerun_static yes iptv yes tsfile yes dvbscan yes timeshift yes trace yes avahi yes zlib yes libav yes ffmpeg_static yes libx264 yes libx264_static yes libx265 yes libx265_static yes libvpx yes libvpx_static yes libtheora yes libtheora_static yes libvorbis yes libvorbis_static yes libfdkaac no libfdkaac_static no libopus yes libopus_static yes nvenc no vaapi yes mmal no omx no inotify yes epoll yes pcre no pcre2 yes uriparser yes ccache no tvhcsa yes bundle no pngquant no kqueue no dbus_1 yes android no gtimer_check no slow_memoryinfo no libsystemd_daemon no pcloud_cache yes ddci yes cclang_threadsan no gperftools no execinfo yes mmx yes sse2 yes W_unused_result yes f_stack_protector yes f_stack_protector_strong yes f_stack_check yes f_PIE yes fdatasync yes getloadavg yes atomic32 yes atomic64 yes atomic_time_t yes atomic_ptr yes bitops64 yes lockowner yes qsort_r yes gmtoff yes recvmmsg yes sendmmsg yes ifnames yes py_gzip yes bin_pkg_config yes bin_xgettext yes bin_msgmerge yes bin_gzip yes bin_bzip2 yes ssl yes linuxdvbapi yes linuxdvb_ca yes upnp yes bin_cmake yes stdcpp yes libogg_static yes hwaccels yes inotify_h yes inotify_init1 yes dvbcsa yes epoll_create1 yes mpegts yes mpegts_dvb yes Packages: openssl 3.0.2 zlib 1.2.11 libpcre2-8 10.39 liburiparser 0.9.6 avahi-client 0.8 libva 1.16.0 libva-drm 1.16.0 dbus-1 1.12.20 Installation paths: Prefix: /usr/local Binaries: ${prefix}/bin Libraries: ${prefix}/lib Data files: ${prefix}/share Man pages: ${datadir}/man Final Binary: /home/alin/tvheadend/build.linux/tvheadend Tvheadend Data Directory: /usr/local/share/tvheadend $################### log output end #################### Build tvheadend: ./Autobuild.sh $################### log output #################### make[1]: Leaving directory '/home/alin/tvheadend' dpkg-genbuildinfo --build=binary -O../tvheadend_4.3-2070~g2beb6c9c8~jammy_amd64.buildinfo dpkg-genchanges --build=binary -O../tvheadend_4.3-2070~g2beb6c9c8~jammy_amd64.changes dpkg-genchanges: info: binary-only upload (no source code included) dpkg-source --after-build . dpkg-buildpackage: info: binary-only upload (no source included) doozer-versioned-artifact:/home/alin/tvheadend/../tvheadend_4.3-2070~g2beb6c9c8~jammy_amd64.deb:deb:application/x-deb:tvheadend_4.3-2070~g2beb6c9c8~jammy_amd64.deb doozer-versioned-artifact:/home/alin/tvheadend/../tvheadend-dbg_4.3-2070~g2beb6c9c8~jammy_amd64.deb:deb:application/x-deb:tvheadend-dbg_4.3-2070~g2beb6c9c8~jammy_amd64.deb doozer-versioned-artifact:/home/alin/tvheadend/../tvheadend_4.3-2070~g2beb6c9c8~jammy_amd64.changes:changes:text/plain:tvheadend_4.3-2070~g2beb6c9c8~jammy_amd64.changes $################### log output end #################### From this last log you need to copy the file name bolded (in your case will have a different number after '4.3-') In my case is: tvheadend_4.3-2070~g2beb6c9c8~jammy_amd64.deb cd .. Install tvheadend: sudo dpkg -i tvheadend_4.3-2070~g2beb6c9c8~jammy_amd64.deb Intel GPU: sudo apt install i965-va-driver-shaders We have to add also user hts to render (or your group that has access to GPU): sudo gpasswd -a hts render newgrp render verify: groups hts alin@alin-cmcm2fb:~$ groups hts hts : hts render Now we see user is part of render. restart: sudo reboot in browser: http://:9981 selecteaza ro-Digi (fara Timisoara) Setup GPU transcoding: --> make sure you have Expert settings selected [browser menus]: Configuration / Stream / Codec Profiles --> Add Codec: h264_vaapi Name: h264_vaapi Description: .... Deniterlace: checked (very important) Height: 0 Hardware acceleration: checked (very important) Device name: i915 v.1.6.0 (/dev/dri/renderD128) (very important) Bitrate: 0 Buffer factor: 3 Rate control: 1 (CQP) Constant QP: 27 Ignore B-Frames: 0 Quality: 1 Press Create button. [browser menus]: Configuration / Stream / Stream Profiles --> Add Type: Transcode/av-lib Profile name: h264 Enabled: checked Default: checked Comment: ... Data timeout: 5 Default priority: Normal Force priority: 0 Restart on error: checked Continue if descrambling fails: checked Descrembling timeout: 2000 Switch to another service: checked Prefered services vide type: None Container: Matroska Video codec profile: h264_vaapi (very important) Source video codec: EMPTY Audio codec profile: web-aac Source audio codec: EMPTY Subtitle codec profile: Copy Source subtitle codec: EMPTY Press Create button. Note: all 'very important' are required. Now you are ready to test: open one stream with tvh server and check the Tvheadend log: 2022-12-09 10:53:37.821 transcode: 0001: 01:MPEG2VIDEO: ==> Using profile h264_vaapi 2022-12-09 10:53:37.822 transcode: 0001: 02:AC3: ==> Using profile webtv-aac To confirm you are using GPU for trancoding you need to send: sudo intel_gpu_top When you don't have any streams open you will see all numbers: 0; after you open streams you should see values non-zero in: Render/3D , Video and VideoEnhance.