VAAPI Video Acceleration on Intel Graphics: i965 vs iHD

Technical issues/questions of an intermediate or advanced nature.
rych
Warlord
Warlord
Posts: 622
Joined: 04 Jan 2014, 04:27
Distribution: Porteus 5.0 x64 OpenBox
Location: NZ
Contact:

VAAPI Video Acceleration on Intel Graphics: i965 vs iHD

Post#1 by rych » 28 Jul 2021, 07:58

When I start a FreeTube from console it prints a message below

Code: Select all

libva error: /usr/lib64/dri/i965_drv_video.so init failed
That's on the new Intel i5-10500 which uses an Integrated Intel UHD Graphics 630 chipset. I think FreeTube (and others) will be trying to use that GPU for accelerated rendering, decoding etc.

I've searched and one hint was that "For newer Intel GPUs, intel-media-driver (iHD) replaces libva-intel-driver (i965)"

If that's correct for porteus and for my CPU, should I try and install the "Intel(R) Media Driver for VAAPI“ https://github.com/intel/media-driver/ ? How do I install it, please?

OR, should I upgrate the kernel again? (I'm on 5.0rc3 already)
Last edited by rych on 31 Jul 2021, 06:16, edited 1 time in total.

User avatar
ncmprhnsbl
DEV Team
DEV Team
Posts: 3924
Joined: 20 Mar 2012, 03:42
Distribution: v5.0-64bit
Location: australia
Contact:

i965_drv_video.so init failed

Post#2 by ncmprhnsbl » 28 Jul 2021, 12:26

rych wrote:
28 Jul 2021, 07:58
How do I install it, please?
in order for me to tell you how, i'd need to do it myself first.. and well... :) ..see if this one works for you:
intel-media-driver-21.2.3-86_64.xzm 6.3 MB
md5sum: 2b1eda9efa11498d4c451bac4bcf16fd
includes:
intel-gmmlib-21.2.1-x86_64-1ncm
intel-media-driver-21.2.3-x86_64-1ncm

Code: Select all

├── usr
│   └── lib64
│       ├── dri
│       │   └── iHD_drv_video.so
│       ├── libigdgmm.so -> libigdgmm.so.11
│       ├── libigdgmm.so.11 -> libigdgmm.so.11.3.0
│       ├── libigdgmm.so.11.3.0
│       ├── libigfxcmrt.so -> libigfxcmrt.so.7
│       ├── libigfxcmrt.so.7 -> libigfxcmrt.so.7.2.0
│       └── libigfxcmrt.so.7.2.0
└── var
         |<usual stufF>

18 directories, 11 files
afaiui kernel shouldn't be relevant..
Forum Rules : https://forum.porteus.org/viewtopic.php?f=35&t=44

rych
Warlord
Warlord
Posts: 622
Joined: 04 Jan 2014, 04:27
Distribution: Porteus 5.0 x64 OpenBox
Location: NZ
Contact:

i965_drv_video.so init failed

Post#3 by rych » 28 Jul 2021, 14:33

ncmprhnsbl, thanks, will try tomorrow and might need a vainfo command from libva-utils package (?) to validate and see that. Could you point me to a module with vainfo in it? (Actually, I have a fundamental question: how do you guys make those modules when getpkg doesn't have it? So that I don't have to ask you for modules each time)

rych
Warlord
Warlord
Posts: 622
Joined: 04 Jan 2014, 04:27
Distribution: Porteus 5.0 x64 OpenBox
Location: NZ
Contact:

i965_drv_video.so init failed

Post#4 by rych » 29 Jul 2021, 07:21

ncmprhnsbl, your module seems to work, at least the error message goes away. But I also have to (re)define an environment variable, LIBVA_DRIVER_NAME=iHD, -- I wish this were done automatically for me,

Code: Select all

root@porteus:~# vainfo
bash: vainfo: command not found
root@porteus:~# /opt/FreeTube/freetube --no-sandbox
libva error: /usr/lib64/dri/i965_drv_video.so init failed
closed
root@porteus:~# LIBVA_DRIVER_NAME=iHD /opt/FreeTube/freetube --no-sandbox
closed

User avatar
ncmprhnsbl
DEV Team
DEV Team
Posts: 3924
Joined: 20 Mar 2012, 03:42
Distribution: v5.0-64bit
Location: australia
Contact:

i965_drv_video.so init failed

Post#5 by ncmprhnsbl » 29 Jul 2021, 08:18

rych wrote:
29 Jul 2021, 07:21
But I also have to (re)define an environment variable, LIBVA_DRIVER_NAME=iHD, -- I wish this were done automatically for me,
ah yeah.. didn't read the github page closely enough..
have reuploaded (same link) with /etc/profile.d/intel-media.sh included, contents:

Code: Select all

#!/bin/sh
# Use the iHD driver for media
export LIBVA_DRIVER_NAME=iHD
that should fix the env variable at boot up ..
have also now included libva-utils in the module .. btw it's in slackware current so getpkg would get it.
Forum Rules : https://forum.porteus.org/viewtopic.php?f=35&t=44

rych
Warlord
Warlord
Posts: 622
Joined: 04 Jan 2014, 04:27
Distribution: Porteus 5.0 x64 OpenBox
Location: NZ
Contact:

VAAPI Video Acceleration on Intel Graphics: i965 vs iHD

Post#6 by rych » 31 Jul 2021, 06:28

ncmprhnsbl, Thank you so much for helping me here and in other threads. This now works without any error messages and vainfo is happy. I hope other software that wants to use the (still rather weak?) Intel Graphics chip for hardware acceleration will be happy too. For older Intel CPU-GPU I guess there is the option of LIBVA_DRIVER_NAME=i965 vainfo to revert back to the original driver. I've renamed this thread topic in broader terms to catch possible future questions.

User avatar
babam
Warlord
Warlord
Posts: 526
Joined: 16 Nov 2016, 10:30
Distribution: Porteus 5.0rc3 Xfce K6.1.1
Location: Rainy city

VAAPI Video Acceleration on Intel Graphics: i965 vs iHD

Post#7 by babam » 11 Sep 2021, 19:25

ncmprhnsbl wrote:
28 Jul 2021, 12:26
intel-media-driver-21.2.3-86_64.xzm 6.3 MB
md5sum: 2b1eda9efa11498d4c451bac4bcf16fd
includes:
intel-gmmlib-21.2.1-x86_64-1ncm
intel-media-driver-21.2.3-x86_64-1ncm

afaiui kernel shouldn't be relevant..
Can you build it for Porteus 4.0 x64

Thanks.
Sorry, my English is bad.

User avatar
ncmprhnsbl
DEV Team
DEV Team
Posts: 3924
Joined: 20 Mar 2012, 03:42
Distribution: v5.0-64bit
Location: australia
Contact:

VAAPI Video Acceleration on Intel Graphics: i965 vs iHD

Post#8 by ncmprhnsbl » 11 Sep 2021, 23:23

babam wrote:
11 Sep 2021, 19:25
Can you build it for Porteus 4.0 x64
hi, babam, here's the slackbuilds i used: intel-media-slackbuilds.tar.gz
they automatically download the source,
build and install intel-gmmlib first..
Forum Rules : https://forum.porteus.org/viewtopic.php?f=35&t=44

User avatar
babam
Warlord
Warlord
Posts: 526
Joined: 16 Nov 2016, 10:30
Distribution: Porteus 5.0rc3 Xfce K6.1.1
Location: Rainy city

VAAPI Video Acceleration on Intel Graphics: i965 vs iHD

Post#9 by babam » 12 Sep 2021, 13:43

ncmprhnsbl wrote:
11 Sep 2021, 23:23
hi, babam, here's the slackbuilds i used: intel-media-slackbuilds.tar.gz
they automatically download the source,
build and install intel-gmmlib first..
ncm, thanks for the help, finally I can build the intel-media-driver for Porteus 4.0 and it's working properly.

libva needs to be upgraded to 2.12.0 and create necessary symlinks

Code: Select all

libva.so.1 ---> libva.so.2.1200.0
libva-drm.so.1 ---> libva-drm.so.2.1200.0
libva-glx.so.1 ---> libva-glx.so.2.1200.0
libva-x11.so.1 ---> libva-x11.so.2.1200.0
intel-media-driver-21.2.3 for Porteus 4.0 x64
Sorry, my English is bad.

rych
Warlord
Warlord
Posts: 622
Joined: 04 Jan 2014, 04:27
Distribution: Porteus 5.0 x64 OpenBox
Location: NZ
Contact:

VAAPI Video Acceleration on Intel Graphics: i965 vs iHD

Post#10 by rych » 18 Oct 2022, 08:05

That driver still works on Porteus 5.0. Although there are updates available:

Code: Select all

root@porteus:~# getmod -s intel-media-driver
intel-media-driver-21.3.5-x86_64-1salix15.0  (The Intel(R) Media Driver for VAAPI)

root@porteus:~# getmod -s libva
libva-2.13.0-x86_64-2  (Video Acceleration API)
libva-utils-2.13.0-x86_64-1  (VA-API utilities)
babam, could you update your module maybe, when you have a minute?

Actually, getmod is having a difficulty with those, so maybe use pmod:

Code: Select all

root@porteus:~# pmod -s libva
The list below shows all packages with name matching "libva".
[inst] slackware64 : libva-2.13.0-x86_64-2
[unin] alienbob    : libva-vdpau-driver-0.7.4-x86_64-3alien
[unin] slackware64 : libva-utils-2.13.0-x86_64-1
I wonder what's the libva-vdpau-driver then? Anyway, prefer an expert advice and an official module update :)

Also, still, I've noticed that booting into older machines I sometimes get an error:
libva error: /usr/lib64/dri/iHD_drv_video.so init failed
In that case just precede your command with LIBVA_DRIVER_NAME=i965, as mentioned above in this thread, and here: https://github.com/intel/media-driver/issues/1298.
For example:

Code: Select all

root@porteus:~# LIBVA_DRIVER_NAME=i965 vainfo

User avatar
babam
Warlord
Warlord
Posts: 526
Joined: 16 Nov 2016, 10:30
Distribution: Porteus 5.0rc3 Xfce K6.1.1
Location: Rainy city

VAAPI Video Acceleration on Intel Graphics: i965 vs iHD

Post#11 by babam » 18 Oct 2022, 12:10

rych wrote:
18 Oct 2022, 08:05
babam, could you update your module maybe, when you have a minute?

Actually, getmod is having a difficulty with those, so maybe use pmod:
Sorry, I do not understand
Sorry, my English is bad.

rych
Warlord
Warlord
Posts: 622
Joined: 04 Jan 2014, 04:27
Distribution: Porteus 5.0 x64 OpenBox
Location: NZ
Contact:

VAAPI Video Acceleration on Intel Graphics: i965 vs iHD

Post#12 by rych » 19 Oct 2022, 08:44

babam wrote:
18 Oct 2022, 12:10
Actually, getmod is having a difficulty with those, so maybe use pmod:

Sorry, I do not understand
I don't understand either, look:

Code: Select all

root@porteus:~# pmod -m libva
produced libva-2.13.0-x86_64-2.xzm,

Code: Select all

root@porteus:~# pmod -m libva
produced libva-2.13.0-x86_64-2.xzm,
whereas getomod results in a void ".xzm" module

Code: Select all

root@porteus:~# getmod -m libva
Reading Package Lists...Done
libva is up to date.
0 upgraded, 0 reinstalled, 0 newly installed, 0 to remove, 0 not upgraded.
Do you want to continue? [y/N] y
...
====> '/tmp/.xzm' was created successfully.
It doesn't matter here which package manager succeeds, important is that intel media driver got updated

UPDATE: OK, getmod didn't want to make it because libva 2.13 is already installed, just vainfo repports wrong version of it:

Code: Select all

root@porteus:~# vainfo 
vainfo: VA-API version: 1.13 (libva 2.12.0)
Last edited by rych on 19 Oct 2022, 09:06, edited 1 time in total.

rych
Warlord
Warlord
Posts: 622
Joined: 04 Jan 2014, 04:27
Distribution: Porteus 5.0 x64 OpenBox
Location: NZ
Contact:

VAAPI Video Acceleration on Intel Graphics: i965 vs iHD

Post#13 by rych » 19 Oct 2022, 08:57

OK, I've tried with new modules and it's not so straightforward:

Code: Select all

root@porteus:~# vainfo 
libva error: dlopen of /usr/lib64/dri/iHD_drv_video.so failed: libigdgmm.so.11: cannot open shared object file: No such file or directory
vaInitialize failed with error code -1 (unknown libva error),exit

rych
Warlord
Warlord
Posts: 622
Joined: 04 Jan 2014, 04:27
Distribution: Porteus 5.0 x64 OpenBox
Location: NZ
Contact:

VAAPI Video Acceleration on Intel Graphics: i965 vs iHD

Post#14 by rych » 19 Oct 2022, 09:02

Actually, we seem to already have the libva-2.13.0-x86_64-2 included with Porteus inside 002-xorg.xzm.

Code: Select all

002-xorg.xzm/var/lib/pkgtools/packages/libva-2.13.0-x86_64-2
but that's not enough I guess because without any additional modules:

Code: Select all

root@porteus:~# vainfo 
bash: /usr/bin/vainfo: No such file or directory
and no iHD_drv_video.so driver
Last edited by rych on 20 Oct 2022, 12:33, edited 1 time in total.

User avatar
babam
Warlord
Warlord
Posts: 526
Joined: 16 Nov 2016, 10:30
Distribution: Porteus 5.0rc3 Xfce K6.1.1
Location: Rainy city

VAAPI Video Acceleration on Intel Graphics: i965 vs iHD

Post#15 by babam » 19 Oct 2022, 09:42

intel-media-driver is for Broadwell+

intel-media-driver:

Code: Select all

getmod -m intel-media-driver
libva-utils (vainfo):

Code: Select all

getmod -m libva-utils
Add /etc/profile.d/intel-media.sh

Code: Select all

#!/bin/sh

export LIBVA_DRIVER_NAME=iHD
Sorry, my English is bad.

Post Reply