VA-API driver broken

well in short all applications depending on VAAPI acceleration dumps the error;

libva error: /usr/lib/dri/iHD_drv_video.so init failed

funny because till recent i remember “Ivy bridge” setups using VAAPI driver i915/i965 drivers and NOT iHD. I’m pretty sure this is after the recent VAAPI driver updates though i’m not sure exactly when.

some application errors;

chromium
libva error: /usr/lib/dri/iHD_drv_video.so init failed
[10819:10819:1008/113157.885146:ERROR:sandbox_linux.cc(374)] InitializeSandbox() called with multiple threads in process gpu-process.
libva error: /usr/lib/dri/iHD_drv_video.so init failed
[10792:11102:1008/113327.362798:ERROR:get_updates_processor.cc(257)] PostClientToServerMessage() failed during GetUpdates with error 2

cvlc --verbose 1 Downloads/ImperfectAnimatedGalago-mobile.mp4
VLC media player 3.0.11.1 Vetinari (revision 3.0.11.1-0-g52483f3ca2)
[00005631fb810be0] dummy interface: using the dummy interface module…
[00007f78b4001150] mp4 demux warning: elst box found
[00007f78b4001150] mp4 demux warning: STTS table of 1 entries
[00007f78b4001150] mp4 demux warning: CTTS table of 1566 entries
libva error: /usr/lib/dri/iHD_drv_video.so init failed
[00007f78b4c1afa0] avcodec decoder: Using Intel i965 driver for Intel® Ivybridge Mobile - 2.4.1 for hardware decoding
[h264 @ 0x7f78b4c45ac0] Using deprecated struct vaapi_context in decode.

vainfo
libva error: /usr/lib/dri/iHD_drv_video.so init failed
vainfo: VA-API version: 1.9 (libva 2.9.1)
vainfo: Driver version: Intel i965 driver for Intel® Ivybridge Mobile - 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

inxi info

System: Kernel: 5.4.69-1-MANJARO x86_64 bits: 64 compiler: gcc v: 10.2.0 Desktop: KDE Plasma 5.19.5
tk: Qt 5.15.1 wm: kwin_x11 dm: SDDM Distro: Manjaro Linux
Machine: Type: Portable System: Dell product: Inspiron 5520 v: A14 serial: Chassis: type: 8 v: A14
serial:
Mobo: Dell model: 0XWH1P v: A00 serial: UEFI: Dell v: A14 date: 05/13/2013
Memory: RAM: total: 7.65 GiB used: 1.55 GiB (20.3%)
RAM Report: permissions: Unable to run dmidecode. Root privileges required.
CPU: Topology: Quad Core model: Intel Core i7-3612QM bits: 64 type: MT MCP arch: Ivy Bridge rev: 9
L2 cache: 6144 KiB bogomips: 33537
Speed: 1198 MHz min/max: 1200/3100 MHz Core speeds (MHz): 1: 1198 2: 1198 3: 1198 4: 1199 5: 1200
6: 1208 7: 1197 8: 1199
Flags: acpi aes aperfmperf apic arat arch_perfmon avx bts clflush cmov constant_tsc cpuid
cpuid_fault cx16 cx8 de ds_cpl dtes64 dtherm dts epb ept erms est f16c flexpriority flush_l1d fpu
fsgsbase fxsr ht ibpb ibrs ida lahf_lm lm mca mce md_clear mmx monitor msr mtrr nonstop_tsc nopl nx
pae pat pbe pcid pclmulqdq pdcm pebs pge pln pni popcnt pse pse36 pti pts rdrand rdtscp rep_good sep
smep ss ssbd sse sse2 sse4_1 sse4_2 ssse3 stibp syscall tm tm2 tpr_shadow tsc tsc_deadline_timer vme
vmx vnmi vpid x2apic xsave xsaveopt xtopology xtpr
Graphics: Device-1: Intel 3rd Gen Core processor Graphics vendor: Dell driver: i915 v: kernel bus ID: 00:02.0
chip ID: 8086:0166
Device-2: Advanced Micro Devices [AMD/ATI] Thames [Radeon HD 7500M/7600M Series] vendor: Dell
driver: radeon v: kernel bus ID: 01:00.0 chip ID: 1002:6840
Device-3: Microdia type: USB driver: uvcvideo bus ID: 1-1.5:7 chip ID: 0c45:644a
Display: x11 server: X.Org 1.20.9 compositor: kwin_x11 driver: intel,radeon FAILED: ati
unloaded: modesetting alternate: fbdev,vesa s-res: 1366x768 s-dpi: 96
OpenGL: renderer: Mesa DRI Intel HD Graphics 4000 (IVB GT2) v: 4.2 Mesa 20.1.8 compat-v: 3.0
direct render: Yes
Audio: Device-1: Intel 7 Series/C216 Family High Definition Audio vendor: Dell driver: snd_hda_intel
v: kernel bus ID: 00:1b.0 chip ID: 8086:1e20
Sound Server: ALSA v: k5.4.69-1-MANJARO
Network: Device-1: Realtek RTL810xE PCI Express Fast Ethernet vendor: Dell driver: r8169 v: kernel port: 2000
bus ID: 07:00.0 chip ID: 10ec:8136
IF: enp7s0 state: down mac:
Device-2: Intel Centrino Wireless-N 2230 driver: iwlwifi v: kernel port: 2000 bus ID: 08:00.0
chip ID: 8086:0887
IF: wlp8s0 state: up mac:
IP v4: type: dynamic noprefixroute scope: global broadcast:
IP v6: scope: link
WAN IP:
Drives: Local Storage: total: 931.51 GiB used: 74.33 GiB (8.0%)
ID-1: /dev/sda vendor: Western Digital model: WD10JPVT-75A1YT0 size: 931.51 GiB speed: 3.0 Gb/s
rotation: 5400 rpm serial: rev: 1A01 scheme: GPT
Optical-1: /dev/sr0 vendor: HL-DT-ST model: DVD±RW GT80N rev: A103 dev-links: cdrom
Features: speed: 24 multisession: yes audio: yes dvd: yes rw: cd-r,cd-rw,dvd-r,dvd-ram
state: running
RAID: Message: No RAID data was found.
Partition: ID-1: / size: 36.28 GiB used: 17.56 GiB (48.4%) fs: ext4 dev: /dev/sda14 label: MANJARO
uuid: 23f73716-7cae-4913-91d9-d116d677d6ac
ID-2: /boot/efi size: 496.0 MiB used: 61.0 MiB (12.3%) fs: vfat dev: /dev/sda1 label: ESP
uuid: 9066-9859
ID-3: /mnt/reserve size: 48.53 GiB used: 32.66 GiB (67.3%) fs: ext4 dev: /dev/sda9 label: RESERVE
uuid: c89752c9-61aa-47b9-a922-2f8bbd69c36e
ID-4: /run/media/koshika/UBUNTU size: 37.39 GiB used: 24.12 GiB (64.5%) fs: ext4 dev: /dev/sda10
label: UBUNTU uuid: 6f27f719-649a-4b30-8ad8-d2641320d4a8
Swap: ID-1: swap-1 type: file size: 2.00 GiB used: 0 KiB (0.0%) priority: -2 file: /swapfile
Unmounted: ID-1: /dev/sda2 size: 40.0 MiB fs: vfat label: DIAGS uuid: 58CF-9573
ID-2: /dev/sda3 size: 128.0 MiB fs: <superuser/root required> label: N/A uuid: N/A
ID-3: /dev/sda4 size: 500.0 MiB fs: ntfs label: WINRETOOLS uuid: 86F4D0F7F4D0EB07
ID-4: /dev/sda5 size: 194.97 GiB fs: ntfs label: OS uuid: B206D56C06D53259
ID-5: /dev/sda6 size: 451.0 MiB fs: ntfs label: N/A uuid: 8ACAEB97CAEB7E37
ID-6: /dev/sda7 size: 264.37 GiB fs: ntfs label: LIVEMUSIC uuid: 28F0141EF013F0B4
ID-7: /dev/sda8 size: 44.67 GiB fs: ntfs label: LEMUSIQUE uuid: 26347E71347E43B9
USB: Hub: 1-0:1 info: Full speed (or root) Hub ports: 2 rev: 2.0 speed: 480 Mb/s chip ID: 1d6b:0002
Hub: 1-1:2 info: Intel Integrated Rate Matching Hub ports: 6 rev: 2.0 speed: 480 Mb/s
chip ID: 8087:0024
Device-1: 1-1.5:7 info: Microdia type: Video driver: uvcvideo interfaces: 2 rev: 2.0 speed: 480 Mb/s
chip ID: 0c45:644a
Hub: 2-0:1 info: Full speed (or root) Hub ports: 4 rev: 2.0 speed: 480 Mb/s chip ID: 1d6b:0002
Hub: 3-0:1 info: Full speed (or root) Hub ports: 4 rev: 3.0 speed: 5 Gb/s chip ID: 1d6b:0003
Hub: 4-0:1 info: Full speed (or root) Hub ports: 2 rev: 2.0 speed: 480 Mb/s chip ID: 1d6b:0002
Hub: 4-1:2 info: Intel Integrated Rate Matching Hub ports: 8 rev: 2.0 speed: 480 Mb/s
chip ID: 8087:0024
Device-1: 4-1.5:3 info: Intel Centrino Bluetooth Wireless Transceiver type: Bluetooth driver: btusb
interfaces: 2 rev: 2.0 speed: 12 Mb/s chip ID: 8087:07da
Sensors: System Temperatures: cpu: 52.0 C mobo: N/A gpu: radeon temp: 44 C
Fan Speeds (RPM): cpu: 2800
Info: Processes: 233 Uptime: 6h 24m Init: systemd v: 246 Compilers: gcc: 10.2.0 Packages: pacman: 1393
Shell: Bash v: 5.0.18 running in: yakuake inxi: 3.1.05

yes.

no, must be your configuration. My vainfo (ivy-bridge):

vainfo: VA-API version: 1.9 (libva 2.9.1)
vainfo: Driver version: Intel i965 driver for Intel(R) Ivybridge Mobile - 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

https://wiki.archlinux.org/index.php/Hardware_video_acceleration


https://wiki.archlinux.org/index.php/Chromium#Hardware_video_acceleration
https://bbs.archlinux.org/viewtopic.php?id=244031

cheers

1 Like

i clearly remember my vainfo output reading with no errors just as yours when i last checked (some months) back, have no idea what screwed the configuration, hence my guess its an update. anyway let me go through the reference material, just let me know if there is anything else i should check.

alright got to the bottom of this.

according to; Hardware video acceleration - ArchWiki

for intel there are two common drivers;

  • libva-intel-driver - i965 (pre-broadwell)
  • intel-media-driver - iHD (broadwell and post-broadwell)

now originally manjaro had only libva-intel-driver installed for my setup with no issues. but i do remember with my meddling to get intel openCL going, intel-media-driver was installed as part of the dependencies. the problem must have been there since then and i might have only noticed it now.

fixed the issue by explicitly selecting the i965 driver, by setting environment variable;

LIBVA_DRIVER_NAME=i965

3 Likes

I suspect, that most of the older vaapi configs and optimisations are overkill nowdays.
You need a standart manjaro install (here, I can only vote for xfce as I have it on all my notebooks), chromium from the official repo, and a
~/.config/chromium-flags.conf

--ignore-gpu-blacklist
--enable-gpu-rasterization
--disable-gpu-driver-workarounds
--enable-accelerated-video-decode
--use-gl=desktop
  • Starting in Chromium 86, there will be support for VA-API when using the ANGLE gl renderer. Use the --enable-accelerated-video-decode to enable it on an intel GPU.

…other than that no other configs needed for intel gpu.

2 Likes

it is while checking for this i found out the issue. everything is sorted now. no errors thrown. must check acceleration if any during the weekend

For some reason this is not advertised enough. I use it on my laptop with fractional scaling at 1.5 on manjaro KDE and I was surprised that it worked pretty well.

I did install some intel drivers (maybe it was unnecessary) and after using the chromium flags i did some testing on youtube 4k videos and I am very happy with the result.

1 Like

For years this was a long yourney, with compiling, hacking, private repos, bla-bla…
It is so easy now, and that’s why I use chromium on my notebooks for years. They just run cooler !!

1 Like

have to agree, Firefox with all its fanfare here and elsewhere has yet some work to do in this department

1 Like

AFAIK (or tested main Linux distros) only Manjaro (maybe arch?) have the crhomium browser compiled with VAAPI supprot. I tried the semi official version for Ubuntu and it did not work for some reason.

With Firefox in wayland i did get some good results in browsing…etc but Youtube playback was hit and miss.

I was very surprised that it worked easily on KDE to this level. Although i don’t understand it correctly only chromium on Manjaro KDE gets this Video/0 and Videoenhance/0 going. The youtube playback is also smooher for some reason compared to firefox.

I agree. My laptop came with windows (matebook 13 2020) and although the inteface is very fast on windows and the graphics are very good it seemed to always have the fan loud when I boot it up.

With Manjaro KDE I never hear the fans ever. Unless I am doing something obvious or sometimes I think Baloo does some hardcore stuffs( I need to disable it compltely I don’t even use the search that much).

Also when I run a 4k video the fans will start on low speed after a little while but I presume the GPU would get hot.

I noticed the same on my system:

Graphics:
  Device-1: Intel 3rd Gen Core processor Graphics vendor: Hewlett-Packard 
  driver: i915 v: kernel bus ID: 00:02.0 chip ID: 8086:0166 
  Display: x11 server: X.Org 1.20.9 compositor: compton driver: intel 
  unloaded: modesetting alternate: fbdev,vesa display ID: :0.0 screens: 1 
  Screen-1: 0 s-res: 1366x768 s-dpi: 99 s-size: 352x198mm (13.9x7.8") 
  s-diag: 404mm (15.9") 
  Monitor-1: LVDS1 res: 1366x768 hz: 60 dpi: 112 size: 310x170mm (12.2x6.7") 
  diag: 354mm (13.9") 
  OpenGL: renderer: Mesa DRI Intel HD Graphics 4000 (IVB GT2) 
  v: 4.2 Mesa 20.1.8 compat-v: 3.0 direct render: Yes 

lspci -k | grep i915
Kernel driver in use: i915

And as you suggested, export LIBVA_DRIVER_NAME=i965 has removed the error.

I have libva-intel-driver and intel-media-driver installed.

I didn’t touched/changed any configuration about (i refer to @banjo which said “must be your configuration”), so… Why we got this error/warning?
What should I check? I have Manjaro installed since February 2019, maybe in the meantime has been introduced LIBVA_DRIVER_NAME=i965 ?

here is my take on this. i think even when the issue was there (the ambiguity between two installed VAAPI drivers) it still ended up using the correct driver. the reason is both VLC and vainfo though complain of “iHD_drv_video.so init failed” still manage to show the acceleration and info of the correct i915/i965 driver in affect.

i think while initializing the drivers, the system first tries to load the latest(and supporting bigger subset of iGPUs) of the two drivers which is iHD and fail. and then resort to the other installed driver which is the correct one. the environment variable LIBVA_DRIVER_NAME only explicitly load the exact driver, and thus avoiding the driver ambiguity.

like you i did not meddle in any VAAPI configuration, i didnt have to. my Manjaro KDE installation was configured correctly out-of-the-box as well. i think intel-media-driver has more than just the VAAPI driver for Haswell and after iGPUs. i remember that intel-media-driver was only installed as a dependency much later when i tried getting OpenCL to work with iGPU on my system. and the issue must have been only introduced after then.

1 Like