Bug 1612542 - vainfo said that VAAPI unavailable under Xorg session, but under Wayland session it said that VAAPI is available
Summary: vainfo said that VAAPI unavailable under Xorg session, but under Wayland sess...
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: libva
Version: 29
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Nicolas Chauvet (kwizart)
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-08-05 14:17 UTC by Mikhail
Modified: 2019-11-27 18:17 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2019-11-27 18:17:46 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
mpv full verbose output (16.93 KB, text/plain)
2018-08-05 16:27 UTC, Mikhail
no flags Details

Description Mikhail 2018-08-05 14:17:23 UTC
Description of problem:

vainfo said that VAAPI unavailable under Xorg session, but under Wayland session it said that VAAPI is available


Wayland:
$ vainfo 
libva info: VA-API version 1.2.0
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib64/dri/radeonsi_drv_video.so
libva info: Found init function __vaDriverInit_1_2
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.2 (libva 2.2.0)
vainfo: Driver version: Mesa Gallium driver 18.1.5 for Radeon RX Vega (VEGA10, DRM 3.26.0, 4.18.0-0.rc7.git1.1.fc29.x86_64, LLVM 6.0.1)
vainfo: Supported profile and entrypoints
      VAProfileMPEG2Simple            :	VAEntrypointVLD
      VAProfileMPEG2Main              :	VAEntrypointVLD
      VAProfileVC1Simple              :	VAEntrypointVLD
      VAProfileVC1Main                :	VAEntrypointVLD
      VAProfileVC1Advanced            :	VAEntrypointVLD
      VAProfileH264ConstrainedBaseline:	VAEntrypointVLD
      VAProfileH264ConstrainedBaseline:	VAEntrypointEncSlice
      VAProfileH264Main               :	VAEntrypointVLD
      VAProfileH264Main               :	VAEntrypointEncSlice
      VAProfileH264High               :	VAEntrypointVLD
      VAProfileH264High               :	VAEntrypointEncSlice
      VAProfileHEVCMain               :	VAEntrypointVLD
      VAProfileHEVCMain               :	VAEntrypointEncSlice
      VAProfileHEVCMain10             :	VAEntrypointVLD
      VAProfileNone                   :	VAEntrypointVideoProc


Xorg:
$ vainfo
libva info: VA-API version 1.2.0
libva info: va_getDriverName() returns -1
libva error: va_getDriverName() failed with unknown libva error,driver_name=(null)
vaInitialize failed with error code -1 (unknown libva error),exit

Comment 1 Nicolas Chauvet (kwizart) 2018-08-05 14:46:26 UTC
This is because you are using dri3 and the backend detection only works for dri2.
The dri3 support isn't yet ready upstream.

Comment 2 Nicolas Chauvet (kwizart) 2018-08-05 14:50:11 UTC
can you confirm that using 
export LIBVA_DRIVER=radeonsi 
and playing a video make the va-api acceleration to work ?

Comment 3 Mikhail 2018-08-05 16:05:50 UTC
No this is not helps.

$ vainfo 
libva info: VA-API version 1.2.0
libva info: va_getDriverName() returns -1
libva error: va_getDriverName() failed with unknown libva error,driver_name=(null)
vaInitialize failed with error code -1 (unknown libva error),exit

$ export LIBVA_DRIVER=radeonsi 

$ vainfo 
libva info: VA-API version 1.2.0
libva info: va_getDriverName() returns -1
libva error: va_getDriverName() failed with unknown libva error,driver_name=(null)
vaInitialize failed with error code -1 (unknown libva error),exit

Comment 4 Nicolas Chauvet (kwizart) 2018-08-05 16:09:34 UTC
Sorry, it was the wrong variable, use instead:
export LIBVA_DRIVER_NAME=radeonsi

Comment 5 Mikhail 2018-08-05 16:27:29 UTC
(In reply to Nicolas Chauvet (kwizart) from comment #4)
> Sorry, it was the wrong variable, use instead:
> export LIBVA_DRIVER_NAME=radeonsi

So much better.
I can confirm that hw acceleration begins work in mpv player with parameters `--hwdec=vaapi --vo=vaapi`

The load on the CPU has decreased with 70% to 7% this is amazing.

Comment 6 Mikhail 2018-08-05 16:27:57 UTC
Created attachment 1473459 [details]
mpv full verbose output

Comment 7 Mikhail 2018-08-05 16:32:06 UTC
And looks like hw acceleration begins work even in Totem player. Load on the CPU has decreased from 90% to 11%, wow.

Comment 8 Nicolas Chauvet (kwizart) 2018-08-05 16:46:48 UTC
(In reply to Mikhail from comment #7)
> And looks like hw acceleration begins work even in Totem player. Load on the
> CPU has decreased from 90% to 11%, wow.

Can you reproduce with wayland ? I think the gstreamer-vaapi is still disabled there.

I will try to backport the dri3 support in libva for others drivers than intel (as the dri3 support in vaapi backend isn't ready yet).

Comment 9 Mikhail 2018-08-05 17:52:06 UTC
(In reply to Nicolas Chauvet (kwizart) from comment #8)
> 
> Can you reproduce with wayland ? I think the gstreamer-vaapi is still
> disabled there.
> 
> I will try to backport the dri3 support in libva for others drivers than
> intel (as the dri3 support in vaapi backend isn't ready yet).

1) Under Xorg session all fine. I means both players Totem and mpv work with hw acceleration without issues.

2) Under Wayland session mpv works as expected. Totem stuck after 2 second playing video, but this issue can be workarounded by removing package gstreamer1-vaapi of course in this case Totem would work without hw acceleration.

I am already reported about this issue here: https://gitlab.gnome.org/GNOME/clutter-gst/issues/2

Comment 10 Jan Kurik 2018-08-14 08:39:04 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 29 development cycle.
Changing version to '29'.

Comment 11 Ben Cotton 2019-10-31 21:10:44 UTC
This message is a reminder that Fedora 29 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora 29 on 2019-11-26.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
Fedora 'version' of '29'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 29 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 12 Ben Cotton 2019-11-27 18:17:46 UTC
Fedora 29 changed to end-of-life (EOL) status on 2019-11-26. Fedora 29 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.


Note You need to log in before you can comment on or make changes to this bug.