Intel BayTrail-T SOC: Intel hybrid driver doesn't work

Is somebody using this “Intel hybrid driver”?

According to Wikipedia:

Partially-accelerated decoding on Linux only (Haswell Refresh to Skylake)

CPU + GPU via shaders work together to decode VP9.

Intel hybrid driver declares support for Intel BayTrail-M:

Overview

libva-intel-hybrid-driver is the VA-API implementation for Intel G45 chipsets
and Intel HD Graphics for Intel Core processor family.

Platform definitions:
HSW: Haswell
BYT: Bay-Trail-M
BDW: Broadwell
BSW: Braswell

Codecs

Hybrid VP8 Encoder
Hybrid VP9 Decoder

Requirements

libva >= 1.0.16

System info:

:~> inxi -CGSz
System:
  Kernel: 6.4.0-150600.23.25-default arch: x86_64 bits: 64 Desktop: KDE Plasma
    v: 5.27.11 Distro: openSUSE Leap 15.6
CPU:
  Info: quad core model: Intel Atom Z3735D bits: 64 type: MCP cache: L2: 2 MiB
  Speed (MHz): avg: 941 min/max: 500/1833 cores: 1: 1063 2: 732 3: 701
    4: 1270
Graphics:
  Device-1: Intel Atom Processor Z36xxx/Z37xxx Series Graphics & Display
    driver: i915 v: kernel
  Display: wayland server: X.org v: 1.21.1.11 with: Xwayland v: 24.1.1
    compositor: kwin_wayland driver: X: loaded: modesetting unloaded: fbdev,vesa
    dri: crocus gpu: i915 resolution: 1280x800
  API: OpenGL v: 4.2 Mesa 23.3.4 renderer: Mesa Intel HD Graphics (BYT)

Vainfo output before installing intel-hybrid-driver:

:~> vainfo
Trying display: wayland
libva info: VA-API version 1.20.0
libva info: Trying to open /usr/lib64/dri/iHD_drv_video.so
libva info: va_openDriver() returns -1
libva info: Trying to open /usr/lib64/dri/i965_drv_video.so
libva info: Found init function __vaDriverInit_1_13
failed to open /usr/lib64/dri/hybrid_drv_video.so
Not using hybrid_drv_video.so
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.20 (libva 2.20.1)
vainfo: Driver version: Intel i965 driver for Intel(R) Bay Trail - 2.4.1
vainfo: Supported profile and entrypoints
      VAProfileMPEG2Simple            : VAEntrypointVLD
      VAProfileMPEG2Simple            : VAEntrypointEncSlice
      VAProfileMPEG2Main              : VAEntrypointVLD
      VAProfileMPEG2Main              : VAEntrypointEncSlice
      VAProfileH264ConstrainedBaseline: VAEntrypointVLD
      VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice
      VAProfileH264Main               : VAEntrypointVLD
      VAProfileH264Main               : VAEntrypointEncSlice
      VAProfileH264High               : VAEntrypointVLD
      VAProfileH264High               : VAEntrypointEncSlice
      VAProfileH264StereoHigh         : VAEntrypointVLD
      VAProfileVC1Simple              : VAEntrypointVLD
      VAProfileVC1Main                : VAEntrypointVLD
      VAProfileVC1Advanced            : VAEntrypointVLD
      VAProfileNone                   : VAEntrypointVideoProc
      VAProfileJPEGBaseline           : VAEntrypointVLD

Vainfo output after installing intel-hybrid-driver:

:~> vainfo
Trying display: wayland
Trying display: x11
libva info: VA-API version 1.20.0
libva info: Trying to open /usr/lib64/dri/iHD_drv_video.so
libva info: va_openDriver() returns -1
libva info: Trying to open /usr/lib64/dri/i965_drv_video.so
libva info: Found init function __vaDriverInit_1_13
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.20 (libva 2.20.1)
vainfo: Driver version: Intel i965 driver for Intel(R) Bay Trail - 2.4.1
vainfo: Supported profile and entrypoints
      VAProfileMPEG2Simple            : VAEntrypointVLD
      VAProfileMPEG2Simple            : VAEntrypointEncSlice
      VAProfileMPEG2Main              : VAEntrypointVLD
      VAProfileMPEG2Main              : VAEntrypointEncSlice
      VAProfileH264ConstrainedBaseline: VAEntrypointVLD
      VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice
      VAProfileH264Main               : VAEntrypointVLD
      VAProfileH264Main               : VAEntrypointEncSlice
      VAProfileH264High               : VAEntrypointVLD
      VAProfileH264High               : VAEntrypointEncSlice
      VAProfileH264StereoHigh         : VAEntrypointVLD
      VAProfileVC1Simple              : VAEntrypointVLD
      VAProfileVC1Main                : VAEntrypointVLD
      VAProfileVC1Advanced            : VAEntrypointVLD
      VAProfileNone                   : VAEntrypointVideoProc
      VAProfileJPEGBaseline           : VAEntrypointVLD

– no changes.

Testing intel-hybrid-driver specifically:

:~> LIBVA_DRIVER_NAME=hybrid vainfo
Trying display: wayland
libva info: VA-API version 1.20.0
libva info: User environment variable requested driver 'hybrid'
libva info: Trying to open /usr/lib64/dri/hybrid_drv_video.so
libva error: /usr/lib64/dri/hybrid_drv_video.so has no function __vaDriverInit_1_0
libva info: va_openDriver() returns -1
vaInitialize failed with error code -1 (unknown libva error),exit

– it doesn’t work.

Info from another user with working intel-hybrid-driver:

timo@Zeo ~ % export LIBVA_DRIVER_NAME=hybrid
timo@Zeo ~ % vainfo
libva info: VA-API version 0.38.0
libva info: va_getDriverName() returns 0
libva info: User requested driver 'hybrid'
libva info: Trying to open /usr/lib64/va/drivers/hybrid_drv_video.so
libva info: Found init function __vaDriverInit_0_34
libva info: va_openDriver() returns 0
vainfo: VA-API version: 0.38 (libva 1.6.1.pre1)
vainfo: Driver version: Intel hybrid driver - 1.0.1.pre1
vainfo: Supported profile and entrypoints
      VAProfileVP8Version0_3          : VAEntrypointEncSlice
      VAProfileVP9Profile0            : VAEntrypointVLD

Related issue:

Will xf86-video-intel help?

ILL driver works with libva1, doesn’t work with libva2.

:~> /usr/bin/nm --demangle -D /home/mypc/Temp/intel-hybrid-driver-1.0.2-bp156.4.4.x86_64/usr/lib64/dri/hybrid_drv_video.so | grep vaDriverInit
000000000001c530 T __vaDriverInit_0_34

New driver from 22.3.5:

:~> /usr/bin/nm --demangle -D /home/mypc/Temp/radeonsi_drv_video.so | grep vaDriverInit
0000000000068a90 T __vaDriverInit_1_16

If this is true then how to solve this?

Updated driver is needed?

ILL openSUSE devs have lost needed patch.
It was there, but now it is lost.

@Svyatko you do realize the hybrid driver is a dead project? https://github.com/intel/intel-hybrid-driver

“The one who wants, seek for possibilities, the one who don’t want, seek for reasons”.
Socrates, Sergei_Korolev.

When I needed OpenCL on AMD, I’ve created method for installing driver. I went beyond AMD constraints. Then I’ve created instructions:

https://en.opensuse.org/SDB:AMD_GPGPU

When I needed Leap on device with 32-bit EFI, I’ve created method for installing it. Then I’ve created instructions:

Elaborating Intel hybrid driver case:

Intel hybrid driver versions from Repology:

We see version 2.0.0 for some distributions, 1.0.2 for openSUSE & others.

Intel hybrid driver patches from Gentoo:

ILL patch

is needed to solve that error.

OpenSUSE uses 2 from 5 available patches.

I filed Bug 1234858 - Intel hybrid driver “hybrid_drv_video.so” for VA API (VAAPI) does not work.

ILL Intel hybrid driver doesn’t work since OS upgrade to libva2 from libva1.

@Svyatko If it’s important to you branch the package, apply the patches, test and submit?

No need to add any quotes, openSUSE is a do-ocrity…

Some news:
It is possible to get Intel hybrid driver running, but:

  1. It provides VP8 encode for Intel GPU Gen 7+, but VP8 format is not needed anymore. Gen 6+ GPUs support h.264 hw decode & encode with Intel VAAPI driver.
  2. It provides VP9 decode for Intel GPU Gen 7.5+, but my Bay Trail device has Gen 7. I’ve tried to get supported device, but cannot find it at appropriate price.
  3. Apollo Lake, Kaby Lake and newer chips have hardware VP9 decode with newer Intel Media Driver.
  4. For Haswell & newer CPUs I recommend usage of Core i3, i5, i7 chips, which have AVX2 (and x86-64-v3) support. VP9 and AV1 codecs have full support for AVX2 acceleration. Old Intel Celeron & Pentium chips lack support for AVX, change them if possible.
  5. Bay Trail chips can play VP9 and AV1 files at 720p@30 fps with software decoder. But they cannot play VP9 and AV1 at 1080p@30 or 720p@60.
  6. Libvpx VP9 decoder supports SSSE3 and SSE4.1 acceleration, Dav1d AV1 decoder supports SSSE3 acceleration.
  7. Some speedup can be achieved by using newer versions of decoders. You can get them from Experimental repos. You can get Dav1d decoder from VLC - Videolan.
  8. It is possible to use OpenCL or Vulkan GPGPU for decoding, but who needs this?
  9. Cherry Trail for tablets can use Intel hybrid driver - Gen 8LP is supported, file is available, but possibly feature is not properly implemented.

BTW, decoders (and other software) are dropping SSE2 acceleration, you need at least SSSE3 (it is newer than SSE3).
IDK how AMD Phenom CPUs will decode - by FPU?
MMX also is in dropping phase.

You can find supported devices by chip ID (= pair VID:PID) here. To get chip ID for GPU use

inxi -aG

You will get pair VID:PID. VID = vendor ID. VID = 8086 for Intel.

Part for Cherry View chips with PIDs:

#define PCI_CHIP_CHV_0		0x22B0
#define PCI_CHIP_CHV_1		0x22B1
#define PCI_CHIP_CHV_2		0x22B2
#define PCI_CHIP_CHV_3		0x22B3


#define IS_CHERRYVIEW(devid)   (devid == PCI_CHIP_CHV_0 || \
				devid == PCI_CHIP_CHV_1 || \
				devid == PCI_CHIP_CHV_2 || \
				devid == PCI_CHIP_CHV_3)

Chip ID is 8086:22B0 & etc.

Why this dead “Intel hybrid driver”?
https://wiki.archlinux.org/title/Hardware_video_acceleration

https://intel.github.io/libva/index.html

Remove intel-hybrid-driver (and intel-media-driver). Install intel-vaapi-driver and reboot your machine. Download a test video from:
https://tools.woolyss.com/html5-audio-video-tester/

Play a VP9 video in original Firefox ESR from SUSE and check hardware acceleration with intel_gpu_top (from rpm intel-gpu-tools). My Intel GPU Gen 9.5 (Kaby Lake) works well with intel-vaapi-driver.

If you need hardware acceleration for decoding H.264/AVC videos in Firefox ESR, recompile libavformat58_76 and libavcodec58_134 with H.264/AVC decode support. See:

Use a german to english translator like deepl.com.

I’m using Gen 7 GPU. Your GPU has VP9 hw acceleration, mine - not.
Reboot is not needed.
Intel media driver doesn’t work with Gen 7 GPUs and I never have installed it.
For your GPU it is better to use Intel media driver.

No need, VLC libs work OK. AVC works OK with hw acceleration.
I need VP9 acceleration.

AVC works OK with hw acceleration. I need VP9 acceleration.

Cheap Intel SoC have no hardware circuits for decoding VP9 videos. Did you check the intel datasheet(s) of your SoC for VP9 hardware accelerated Video decoding before you wrote this novels?

Intel datasheet of your SoC should looks like that:

This is a pure lie. You can see vainfo output in previous posts.

RTFM:

VP9 fixed-function decode since Broxton = Apollo Lake.

Overview

libva-intel-hybrid-driver is the VA-API implementation for Intel G45 chipsets
and Intel HD Graphics for Intel Core processor family.

Platform definitions:
HSW: Haswell
BYT: Bay-Trail-M
BDW: Broadwell
BSW: Braswell

Codecs

Hybrid VP8 Encoder
Hybrid VP9 Decoder