Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libva-2.7.0 tries to load iris_drv_video.so #396

Closed
frantisekz opened this issue Mar 26, 2020 · 12 comments · Fixed by #406
Closed

libva-2.7.0 tries to load iris_drv_video.so #396

frantisekz opened this issue Mar 26, 2020 · 12 comments · Fixed by #406

Comments

@frantisekz
Copy link

Since upgrade from libva-2.6 to libva-2.7.0-0.1.pre1, libva tries to open /usr/lib64/dri/iris_drv_video.so by default.

I believe this is wrong. I have installed both media-driver and intel-vaapi-driver. They provide /usr/lib64/dri/iHD_drv_video.so and /usr/lib64/dri/i965_drv_video.so .

I have Kaby Lake gen GPU, so I'd expect iHD_drv_video.so to be used by default when both are present. Currently, I need to specify LIBVA_DRIVER_NAME=iHD/i965 to get VAAPI working.

@XinfengZhang
Copy link
Contributor

the "iris" should come from DRI2 query function , suppose you are not using DRM, https://github.com/intel/libva/blob/master/va/drm/va_drm_utils.c#L39, it will just get iHD and i965

@frantisekz
Copy link
Author

Don't know what do you mean by DRM, I am on F32 system with GNOME Xorg session, if that does help.

@frantisekz
Copy link
Author

frantisekz commented Mar 26, 2020

That error happenned when using vainfo. When i run vlc, it hits the error, but proceeds into using iHD driver later:

$ vlc
VLC media player 3.0.9 Vetinari (revision 3.0.8-222-g602c5525e8)
[0000556bc61a0670] main libvlc: Running vlc with the default interface. Use 'cvlc' to use vlc without interface.
[0000556bc622f7a0] main playlist: playlist is empty
libva info: VA-API version 1.7.0
libva info: Trying to open /usr/lib64/dri/iris_drv_video.so
libva info: va_openDriver() returns -1
[00007f3694005aa0] glconv_vaapi_x11 gl error: vaInitialize: unknown libva error
libva info: VA-API version 1.7.0
libva info: Trying to open /usr/lib64/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_6
libva info: va_openDriver() returns 0
[00007f36bcc0e550] avcodec decoder: Using Intel iHD driver - 1.0.0 for hardware decoding

EDIT: Sorry for accidental close and reopen, clicked the wrong button

@frantisekz
Copy link
Author

Hmm, @XinfengZhang , it seems like the culprit is in Intel driver change in Mesa 20.0: i965 to Iris driver. I've updated mesa and libva at once.

I can reproduce this issue with libva-2.6.1 too. Looks like driver name mapping needs to be updated.

@kwizart
Copy link

kwizart commented Mar 26, 2020

The driver mapping will have to be handled at the xorg-x11-server level.
https://bugzilla.redhat.com/show_bug.cgi?id=1817404

@kwizart
Copy link

kwizart commented Mar 26, 2020

Seems like the DRI2 mapping doesn't work with modesetting

@uartie
Copy link
Contributor

uartie commented Mar 26, 2020

related intel/intel-vaapi-driver#502

@uartie
Copy link
Contributor

uartie commented Mar 27, 2020

@frantisekz as a temporary workaround, you can create a iris_drv_video.so symlink to i965_drv_video.so (or iHD_drv_video.so).

@XinfengZhang @kwizart I think we should do the DRI2 to VA mapping in libVA similar to what we do for the DRM to VA mapping. I don't think this should be the responsibility of the xserver or other. We shouldn't assume, anymore, that all DRI2 driver names have a corresponding video driver of the same name. What do you think?

kwizart added a commit to kwizart/libva that referenced this issue Apr 4, 2020
As reported intel#396

Update the driver mapping to take the new Iris intel driver into account

Signed-off-by: Nicolas Chauvet <kwizart@gmail.com>
@kwizart
Copy link

kwizart commented Apr 5, 2020

@XinfengZhang @kwizart I think we should do the DRI2 to VA mapping in libVA similar to what we do for the DRM to VA mapping. I don't think this should be the responsibility of the xserver or other. We shouldn't assume, anymore, that all DRI2 driver names have a corresponding video driver of the same name. What do you think?

Sorry that I've miss-read this comment.
If we can assume any iris capable hw can use the iHD driver, maybe it will be easier to simply rely on a symlink. (and package the intel-media-driver with a symlink by default).

But @frantisekz reported to me that an iris capable hw can also use the older vaapi-intel-driver. It might be interesting for people having only that vaapi backend installed. (for any reason).

But I wonder if at some point, any iris capable hardware will not run iHD ?

A mapping will be interesting if we need to handle more than a one <-> one mapping.

@tjaalton
Copy link

tjaalton commented Apr 7, 2020

Iris and iHD are both for gen8+. There's still some feature disparity between iHD and i965 which might have some users to prefer i965 still, like this one:
intel/media-driver#717

uartie added a commit to uartie/libva that referenced this issue Apr 13, 2020
Fixes intel#396

Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
@uartie
Copy link
Contributor

uartie commented Apr 13, 2020

@frantisekz @kwizart please try #406

@frantisekz
Copy link
Author

@frantisekz @kwizart please try #406

Yes, that PR fixes the issue. Thanks!

XinfengZhang pushed a commit that referenced this issue Apr 17, 2020
Fixes #396

Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
XinfengZhang pushed a commit to XinfengZhang/libva that referenced this issue Apr 18, 2020
Fixes intel#396

Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
FurongZhang pushed a commit to FurongZhang/libva that referenced this issue Apr 7, 2023
Fixes intel#396

Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants