vaapi VP9 hardware decoding not working anymore in bionic

Bug #1756380 reported by Sebastian Stark
44
This bug affects 7 people
Affects Status Importance Assigned to Milestone
intel-vaapi-driver (Ubuntu)
Fix Released
Undecided
Unassigned
libva (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Hardware: Dell XPS13 9365, i7-7Y75
System: Ubuntu Bionic Beaver (development branch)

vainfo output on bionic is:

libva info: VA-API version 1.1.0
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so
libva info: Found init function __vaDriverInit_1_0
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.1 (libva 2.1.0)
vainfo: Driver version: Intel i965 driver for Intel(R) Kaby Lake - 2.0.0
vainfo: Supported profile and entrypoints
      VAProfileMPEG2Simple : VAEntrypointVLD
      VAProfileMPEG2Simple : VAEntrypointEncSlice
      VAProfileMPEG2Main : VAEntrypointVLD
      VAProfileMPEG2Main : VAEntrypointEncSlice
      VAProfileH264ConstrainedBaseline: VAEntrypointVLD
      VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice
      VAProfileH264ConstrainedBaseline: VAEntrypointEncSliceLP
      VAProfileH264Main : VAEntrypointVLD
      VAProfileH264Main : VAEntrypointEncSlice
      VAProfileH264Main : VAEntrypointEncSliceLP
      VAProfileH264High : VAEntrypointVLD
      VAProfileH264High : VAEntrypointEncSlice
      VAProfileH264High : VAEntrypointEncSliceLP
      VAProfileH264MultiviewHigh : VAEntrypointVLD
      VAProfileH264MultiviewHigh : VAEntrypointEncSlice
      VAProfileH264StereoHigh : VAEntrypointVLD
      VAProfileH264StereoHigh : VAEntrypointEncSlice
      VAProfileVC1Simple : VAEntrypointVLD
      VAProfileVC1Main : VAEntrypointVLD
      VAProfileVC1Advanced : VAEntrypointVLD
      VAProfileNone : VAEntrypointVideoProc
      VAProfileJPEGBaseline : VAEntrypointVLD
      VAProfileJPEGBaseline : VAEntrypointEncPicture
      VAProfileVP8Version0_3 : VAEntrypointVLD
      VAProfileHEVCMain : VAEntrypointVLD
      VAProfileHEVCMain : VAEntrypointEncSlice
      VAProfileHEVCMain10 : VAEntrypointVLD
      VAProfileHEVCMain10 : VAEntrypointEncSlice

As you can see, VP9 entrypoints are missing.

vainfo output on 17.10 was:

libva info: VA-API version 0.40.0
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so
libva info: Found init function __vaDriverInit_0_40
libva info: va_openDriver() returns 0
vainfo: VA-API version: 0.40 (libva )
vainfo: Driver version: Intel i965 driver for Intel(R) Kabylake - 1.8.3
vainfo: Supported profile and entrypoints
      VAProfileMPEG2Simple : VAEntrypointVLD
      VAProfileMPEG2Simple : VAEntrypointEncSlice
      VAProfileMPEG2Main : VAEntrypointVLD
      VAProfileMPEG2Main : VAEntrypointEncSlice
      VAProfileH264ConstrainedBaseline: VAEntrypointVLD
      VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice
      VAProfileH264ConstrainedBaseline: VAEntrypointEncSliceLP
      VAProfileH264Main : VAEntrypointVLD
      VAProfileH264Main : VAEntrypointEncSlice
      VAProfileH264Main : VAEntrypointEncSliceLP
      VAProfileH264High : VAEntrypointVLD
      VAProfileH264High : VAEntrypointEncSlice
      VAProfileH264High : VAEntrypointEncSliceLP
      VAProfileH264MultiviewHigh : VAEntrypointVLD
      VAProfileH264MultiviewHigh : VAEntrypointEncSlice
      VAProfileH264StereoHigh : VAEntrypointVLD
      VAProfileH264StereoHigh : VAEntrypointEncSlice
      VAProfileVC1Simple : VAEntrypointVLD
      VAProfileVC1Main : VAEntrypointVLD
      VAProfileVC1Advanced : VAEntrypointVLD
      VAProfileNone : VAEntrypointVideoProc
      VAProfileJPEGBaseline : VAEntrypointVLD
      VAProfileJPEGBaseline : VAEntrypointEncPicture
      VAProfileVP8Version0_3 : VAEntrypointVLD
      VAProfileVP8Version0_3 : VAEntrypointEncSlice
      VAProfileHEVCMain : VAEntrypointVLD
      VAProfileHEVCMain : VAEntrypointEncSlice
      VAProfileHEVCMain10 : VAEntrypointVLD
      VAProfileHEVCMain10 : VAEntrypointEncSlice
      VAProfileVP9Profile0 : VAEntrypointVLD
      VAProfileVP9Profile0 : VAEntrypointEncSlice
      VAProfileVP9Profile2 : VAEntrypointVLD

I can workaround the problem by downloading and compiling libva-2.1.0 and intel-vaapi-driver-2.1.0 from github like this:

libva:

./configure --with-drivers-path=$HOME/tmp/intel/dri --prefix=$HOME/tmp/intel

vaapi-driver:

PKG_CONFIG_PATH=$HOME/tmp/intel/lib/pkgconfig LIBVA_DRM_DEPS_CFLAGS="-I $HOME/tmp/intel/include" LIBVA_DRM_DEPS_LIBS="-L $HOME/tmp/intel/lib" LIBVA_DEPS_CFLAGS="-I $HOME/tmp/intel/include" LIBVA_DEPS_LIBS="-L $HOME/tmp/intel/lib" ./configure --prefix=$HOME/tmp/intel

After installing those I get:

> env LD_LIBRARY_PATH=/home/seb/tmp/intel/lib vainfo
libva info: VA-API version 1.1.0
libva info: va_getDriverName() returns 0
libva info: Trying to open /home/seb/tmp/intel/dri/i965_drv_video.so
libva info: Found init function __vaDriverInit_1_1
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.1 (libva 2.1.0)
vainfo: Driver version: Intel i965 driver for Intel(R) Kaby Lake - 2.1.0
vainfo: Supported profile and entrypoints
      VAProfileMPEG2Simple : VAEntrypointVLD
      VAProfileMPEG2Simple : VAEntrypointEncSlice
      VAProfileMPEG2Main : VAEntrypointVLD
      VAProfileMPEG2Main : VAEntrypointEncSlice
      VAProfileH264ConstrainedBaseline: VAEntrypointVLD
      VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice
      VAProfileH264ConstrainedBaseline: VAEntrypointEncSliceLP
      VAProfileH264Main : VAEntrypointVLD
      VAProfileH264Main : VAEntrypointEncSlice
      VAProfileH264Main : VAEntrypointEncSliceLP
      VAProfileH264High : VAEntrypointVLD
      VAProfileH264High : VAEntrypointEncSlice
      VAProfileH264High : VAEntrypointEncSliceLP
      VAProfileH264MultiviewHigh : VAEntrypointVLD
      VAProfileH264MultiviewHigh : VAEntrypointEncSlice
      VAProfileH264StereoHigh : VAEntrypointVLD
      VAProfileH264StereoHigh : VAEntrypointEncSlice
      VAProfileVC1Simple : VAEntrypointVLD
      VAProfileVC1Main : VAEntrypointVLD
      VAProfileVC1Advanced : VAEntrypointVLD
      VAProfileNone : VAEntrypointVideoProc
      VAProfileJPEGBaseline : VAEntrypointVLD
      VAProfileJPEGBaseline : VAEntrypointEncPicture
      VAProfileVP8Version0_3 : VAEntrypointVLD
      VAProfileVP8Version0_3 : VAEntrypointEncSlice
      VAProfileHEVCMain : VAEntrypointVLD
      VAProfileHEVCMain : VAEntrypointEncSlice
      VAProfileHEVCMain10 : VAEntrypointVLD
      VAProfileHEVCMain10 : VAEntrypointEncSlice
      VAProfileVP9Profile0 : VAEntrypointVLD
      VAProfileVP9Profile0 : VAEntrypointEncSlice
      VAProfileVP9Profile2 : VAEntrypointVLD

I also tested with mpv, VP9 decoding works just fine with the self-compiled libraries.

Revision history for this message
Prasad Murthy (murthy) wrote :

I can confirm this bug exists.

OS version: Ubuntu 18.04 beta rc
Hardware: Intel core i5 7400 (Kaby lake processor)
with Intel HD graphics 630 supporting VP9 10-bit and 8-bit video decoding.

In version 1.8.x of the driver the VP9 decoding is broken, the corresponding upstream patch got into 2.0.0. But since VP9 profiles are missing in 2.0.0 driver in Ubuntu, hardware acceleration is absent, so high cpu and power usage. The buggy driver 1.8.x is used in the vlc snap too and snap developers doubt the driver version in snap will be upgraded.

* VP9 decoding broken in 17.10
* VP9 decoding broken in snap packages
* VP9 decoding broken in 18.04 beta rc

Either driver version has to be updated to 2.1.0 or at-least cherry pick a one line patch to current Ubuntu core snap, a link for which I will mention below.

Upstream driver patch: https://github.com/intel/intel-vaapi-driver/commit/9d66570032fb02b1e79a883af7697b035d700a8e

Upstream bug report: https://github.com/intel/intel-vaapi-driver/issues/297

In any way kindly support VP9 hardware decoding via supported Intel hardwares in 18.04 or in 17.10(by backporting/cherry picking) or atleast via updated snap core/apps.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in intel-vaapi-driver (Ubuntu):
status: New → Confirmed
Changed in libva (Ubuntu):
status: New → Confirmed
Revision history for this message
Doug McMahon (mc3man) wrote :

18.04 should really get the new driver, whether it's easier to do before or after release I don't know but it should be done.
For some reason Debian hasn't added it yet but that shouldn't stop Ubuntu from doing so.
In addition to bug symptoms there are other advantages to going to 2.1. For example there is a new interface for EGL interop, vaAcquireSurfaceHandle() in libva 2.1 but you need the 2.1 driver to implement.
So while the 2.1.x driver will certainly be available via ppa's before too long Ubuntu should plan on providing in 18.04 as best achieved.

Changed in libva (Ubuntu):
status: Confirmed → Invalid
Revision history for this message
Sebastian Stark (sebstark) wrote :

I should mention that updating libva is not necessary. It is enough to update the intel-vaapi-driver.

Revision history for this message
Timo Aaltonen (tjaalton) wrote :

I think this could be fallout caused by stripping the shaders from the driver package.. which is why building from github works.

building 2.0.0 from github would prove this false/right

Revision history for this message
Sebastian Stark (sebstark) wrote :

I also tried running uupdate on the existing intel-vaapi-driver package and build and install this. Worked right away.

Revision history for this message
Sebastian Stark (sebstark) wrote :

@tjaalton looks like. This is with the ubuntu supplied libva and driver version 2.0.0 from github:

> vainfo
libva info: VA-API version 1.1.0
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so
libva info: Found init function __vaDriverInit_1_1
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.1 (libva 2.1.0)
vainfo: Driver version: Intel i965 driver for Intel(R) Kaby Lake - 2.0.0
vainfo: Supported profile and entrypoints
      VAProfileMPEG2Simple : VAEntrypointVLD
      VAProfileMPEG2Simple : VAEntrypointEncSlice
      VAProfileMPEG2Main : VAEntrypointVLD
      VAProfileMPEG2Main : VAEntrypointEncSlice
      VAProfileH264ConstrainedBaseline: VAEntrypointVLD
      VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice
      VAProfileH264ConstrainedBaseline: VAEntrypointEncSliceLP
      VAProfileH264Main : VAEntrypointVLD
      VAProfileH264Main : VAEntrypointEncSlice
      VAProfileH264Main : VAEntrypointEncSliceLP
      VAProfileH264High : VAEntrypointVLD
      VAProfileH264High : VAEntrypointEncSlice
      VAProfileH264High : VAEntrypointEncSliceLP
      VAProfileH264MultiviewHigh : VAEntrypointVLD
      VAProfileH264MultiviewHigh : VAEntrypointEncSlice
      VAProfileH264StereoHigh : VAEntrypointVLD
      VAProfileH264StereoHigh : VAEntrypointEncSlice
      VAProfileVC1Simple : VAEntrypointVLD
      VAProfileVC1Main : VAEntrypointVLD
      VAProfileVC1Advanced : VAEntrypointVLD
      VAProfileNone : VAEntrypointVideoProc
      VAProfileJPEGBaseline : VAEntrypointVLD
      VAProfileJPEGBaseline : VAEntrypointEncPicture
      VAProfileVP8Version0_3 : VAEntrypointVLD
      VAProfileVP8Version0_3 : VAEntrypointEncSlice
      VAProfileHEVCMain : VAEntrypointVLD
      VAProfileHEVCMain : VAEntrypointEncSlice
      VAProfileHEVCMain10 : VAEntrypointVLD
      VAProfileHEVCMain10 : VAEntrypointEncSlice
      VAProfileVP9Profile0 : VAEntrypointVLD
      VAProfileVP9Profile0 : VAEntrypointEncSlice
      VAProfileVP9Profile2 : VAEntrypointVLD

Revision history for this message
Timo Aaltonen (tjaalton) wrote :

Yeah, I've prepared a package which restores the shader files in the same package again, but it would end up in multiverse

Revision history for this message
Sebastian Stark (sebstark) wrote :

great, multiverse is still better than some ppa

Changed in intel-vaapi-driver (Ubuntu):
status: Confirmed → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package intel-vaapi-driver - 2.1.0-0ubuntu1

---------------
intel-vaapi-driver (2.1.0-0ubuntu1) bionic; urgency=medium

  * New upstream release. (LP: #1729467)
    - support Cannonlake
  * Un-split the package, restore support for shaders. (LP: #1756380)
  * control: Update maintainer, add new platforms to description.

 -- Timo Aaltonen <email address hidden> Tue, 20 Mar 2018 14:28:10 +0200

Changed in intel-vaapi-driver (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Sebastian Stark (sebstark) wrote :

Excuse me if that is a stupid question: Where can I get the package for trying it out? Or is the only way to way until it has propagated to the mirrors?

Revision history for this message
Nish Aravamudan (nacc) wrote :

@cran: you can wait for your mirror, or download the debs from archive.ubuntu.com.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

If you don't like waiting for mirrors, then you can open app 'Software & Updates' and change:
  Download from = Main server

Revision history for this message
Russell Jones (russell-jones-oxphys) wrote :

I can't find this package with "apt search intel-vaapi-driver". Is it renamed to i965-va-driver?

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Yes, the binary package is named "i965-va-driver". It is built from source package "intel-vaapi-driver".

Revision history for this message
Timo Aaltonen (tjaalton) wrote :

i965-va-driver is the binary package name, built from intel-vaapi-driver sources

Revision history for this message
DooMMasteR (winrootkit-w) wrote :

so in 18.10 this is stil the case?
I am running with i965-va-driver-shader and it is not offering VP9 decoding…

Revision history for this message
Timo Aaltonen (tjaalton) wrote :

should work in 18.10, but only if you *don't" install i965-va-driver-shaders...

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

That's right. I would recommend avoiding i965-va-driver-shaders and use only i965-va-driver. The latter should be more efficient and supported by Intel. But you do need to ensure your hardware is new enough for VP9 decoding. Only Intel 7th generation (Kaby Lake) and later chips support VP9.

That said, if you have older hardware (Sky Lake or older) then it sounds like i965-va-driver-shader might be the next best option. If you would like to discuss problems in i965-va-driver-shader then please open a new bug for it by running:

   ubuntu-bug i965-va-driver-shader

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.