[snap] vaapi chromium no video hardware decoding

Bug #1816497 reported by Aaron
210
This bug affects 34 people
Affects Status Importance Assigned to Milestone
chromium-browser (Ubuntu)
In Progress
Medium
Nathan Teodosio

Bug Description

To test the snap with VA-API changes,

1. Install the Chromium snap from either beta or edge channels,

   sudo snap install --beta chromium

2. Start Chromium,

   snap run chromium

3. Open a video, e.g. one from https://github.com/chthomos/video-media-samples.

4.Check with intel_gpu_top (from intel-gpu-tools package) that the video engine bars are non zero during playback.

----------Original Bug report ---------

Libva is no longer working for snap installed chromium 72.0.3626.109 (Official Build) snap (64-bit)

I followed this instruction
sudo snap install --channel=candidate/vaapi chromium

My amdgpu can use libva

`vainfo: Driver version: Mesa Gallium driver 18.3.3 for AMD STONEY (DRM 3.27.0, 4.20.0-10.1-liquorix-amd64, LLVM 7.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
      VAProfileHEVCMain10 : VAEntrypointVLD
      VAProfileJPEGBaseline : VAEntrypointVLD
      VAProfileNone : VAEntrypointVideoProc`

Aaron (aaronuk5)
description: updated
Revision history for this message
hovakim grabski (hovakim-grabski) wrote :

VAAPI in Chromium snap 71 worked really well,
after update to 72 It does not work anymore.

I have also reinstalled snap with sudo snap install --channel=candidate/vaapi chromium
yet does not work.

CPU 6700HQ:

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) Skylake - 2.1.0
vainfo: Supported profile and entrypoints
      VAProfileMPEG2Simple : VAEntrypointVLD
      VAProfileMPEG2Simple : VAEntrypointEncSlice
      VAProfileMPEG2Main : VAEntrypointVLD
      VAProfileMPEG2Main : VAEntrypointEncSlice
      VAProfileH264ConstrainedBaseline: VAEntrypointVLD
      VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice
      VAProfileH264ConstrainedBaseline: VAEntrypointEncSliceLP
      VAProfileH264ConstrainedBaseline: VAEntrypointFEI
      VAProfileH264ConstrainedBaseline: VAEntrypointStats
      VAProfileH264Main : VAEntrypointVLD
      VAProfileH264Main : VAEntrypointEncSlice
      VAProfileH264Main : VAEntrypointEncSliceLP
      VAProfileH264Main : VAEntrypointFEI
      VAProfileH264Main : VAEntrypointStats
      VAProfileH264High : VAEntrypointVLD
      VAProfileH264High : VAEntrypointEncSlice
      VAProfileH264High : VAEntrypointEncSliceLP
      VAProfileH264High : VAEntrypointFEI
      VAProfileH264High : VAEntrypointStats
      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

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

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

Changed in chromium-browser (Ubuntu):
status: New → Confirmed
Olivier Tilloy (osomon)
summary: - snap vaapi chromium no video hardware decoding.
+ [snap] vaapi chromium no video hardware decoding
Revision history for this message
Matt Lee (matthewclee) wrote :

It appears that the candidate/vaapi channel has either been broken or abandoned, since the last build was on February 15th: https://code.launchpad.net/~osomon/+snap/chromium-snap-from-source-enable-vaapi

Is it possible to get the channel added to the 'Built automatically' build schedule since is currently set to the 'Built on request' build schedule?

Revision history for this message
Olivier Tilloy (osomon) wrote :

I have resurrected the candidate/vaapi channel with an up-to-date build, however it's currently pending a manual review in the store.

Revision history for this message
Matt Lee (matthewclee) wrote :

Some updates:

- I can confirm that 'sudo snap install --channel=candidate/vaapi chromium' installs correctly, as of today, with the same version indicated in the build log.
- HW accelerated decode is not available when I apply the '--ignore-gpu-blacklist' flag
- HW accelerated encode is available whether or not I apply '--ignore-gpu-blacklist' flag
- I've attached the following three files, in a tar.bz2 archive, to show my system config:
     1) vainfo output
     2) chrome://gpu default value
     3) chrome://gpu value after applying '--ignore-gpu-blacklist' flag

Revision history for this message
Sirius1977 (sirius1977) wrote :

As far as i know, Chromium uses a new video decoding backend. If chrome://media-internals is showing MojoVideoDecoder as VideoDecoder it's using VA-API. Otherwise it falls back to FFMpegVideoDecoder or VPXVideoDecoder.

With the latest snap from candidate/vaapi (73.0.3683.86 REV-686) media-internals show that it's using MojoVideoDecoder. CPU-Usage around 10$ - 15% on an i3 Broadwell and HD5500-Graphics. Video Decode under chrome://gpu is also showing "Hardware accelerated"

Revision history for this message
Matt Lee (matthewclee) wrote :

Interesting. Since I'm only getting VpxVideoDecoder decode, I guess I have an installation issue of some kind.

Revision history for this message
Matt Lee (matthewclee) wrote :

I wonder if my problem may be related to this error in the chrome://gpu log:

- [20257:20257:0414/133034.932196:ERROR:gl_implementation.cc(280)] : Failed to load /snap/chromium/686/usr/lib/chromium-browser/libGLESv2.so: /snap/chromium/686/usr/lib/chromium-browser/libGLESv2.so: cannot open shared object file: No such file or directory

Oddly I get this bug in both the main chromium snap and the vaapi candidate snap. No problems in Chromium when installed via apt. Since I'm not able to update the snap file, I can't correct this issue unfortunately.

Revision history for this message
Sirius1977 (sirius1977) wrote :

@Matt have you tried h264ify extension from the chrome store? It ensures that only h264 videos are loaded. On my Broadwell hardware decoding of VP9 is not supported.

Revision history for this message
Matt Lee (matthewclee) wrote :

I have a slightly newer chipset (Kabylake) so VP9 is supported in my case. Thanks for the suggestion though.

Revision history for this message
hovakim grabski (hovakim-grabski) wrote :

Hi,

with Version 74.0.3729.131 the decoder has become FFmpegVideoDecoder
 once again and does not turn gpu decoder.

Revision history for this message
Matt Lee (matthewclee) wrote :

The landing page for the build has disappeared: https://code.launchpad.net/~osomon/+snap/chromium-snap-from-source-enable-vaapi so it's possible that your installation has reverted to the main branch again.

For what it's worth, there is another working option available that we can try: https://launchpad.net/~saiarcot895/+archive/ubuntu/chromium-beta

I'd honestly prefer to use an official Ubuntu build but the one above has served me consistently well on previous system so I'll probably stick with that until we see a main branch build with vaapi support.

Revision history for this message
Nicolás Abel Carbone (nicocarbone) wrote :

Can confirm it is still not working. I don't like the idea of using a ppa in software as sensitive as a browser. But also, vaapi acceleration makes a really important deference, specially in a laptop. The snap was a great solution, it is a shame it is not longer working.

Revision history for this message
Andrej Zirko (andrej-zirko) wrote :

I can also confirm this. Is VAAPI Chromium snap abandoned? It really makes a huge difference.

Revision history for this message
Matt Lee (matthewclee) wrote :

It does appear to be abandoned, unfortunately. I had hoped that the official addition of VAAPI support to Firefox would be an alternative but it is dependent on Wayland, which is not currently default supported by Ubuntu.

Revision history for this message
Aaron (aaronuk5) wrote :

If anyone doesn't mind, Brave has vaapi support out the box.
1. install gstreamer-vaapi
2. go to brave://flags and enable Override software rendering list, restart browser.
3. go to brave://gpu/ and look at Video Acceleration Information:

Revision history for this message
Andrej Zirko (andrej-zirko) wrote :

Thank you for the recommendation.

Brave is now my default browser. First impression is quite good.

Revision history for this message
Olivier Tilloy (osomon) wrote :

I have updated the enable-vaapi branch and test snaps are currently building for amd64 and i386 at https://code.launchpad.net/~chromium-team/+snap/chromium-snap-from-source-enable-vaapi.

Changed in chromium-browser (Ubuntu):
assignee: nobody → Olivier Tilloy (osomon)
importance: Undecided → Medium
status: Confirmed → In Progress
Revision history for this message
Matt Lee (matthewclee) wrote :

Hi Olivier,

Many thanks for starting that back up! I have install Chromium from the candidate/vaapi channel and the HW acceleration is working for me.

Revision history for this message
Olivier Tilloy (osomon) wrote :

Thanks for the testing and feedback Matt, much appreciated!

Revision history for this message
Michel-Ekimia (michel.ekimia) wrote :

Here is my few tests from yesterday :

Platform : pentium Kabylake mobile

- YouTube VP90 1080p : MojoVideoDecoder - 15% CPU - 8-10W battery

- Netflix H264 720p ? ( https://bit.ly/3apopqR) : DecryptingVideoDecoder - 20% CPU - 12-15W battery

I'm then looking for info about DecryptingVideoDecoder when Widevine is used , how is video decoded.

Bacause when looking to compare LinuxLaptops with MacBooks on "Netflix battery time"

description: updated
Revision history for this message
Michel-Ekimia (michel.ekimia) wrote :

Test on 20.04 on Pentium N5000 :

- Chromium show "unknown libva error" from the start.
- VAAPI is not used

Revision history for this message
Miguel Rodríguez (migrax) wrote :

I have tried the 81.0.4044.113 vaap candidate, but it is showing this warning at startup:
libva error: va_getDriverName() failed with unknown libva error,driver_name=(null)

For reference, this is the output of vainfo:
libva info: VA-API version 1.7.0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_7
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.7 (libva 2.6.0)
vainfo: Driver version: Intel iHD driver for Intel(R) Gen Graphics - 20.1.1 ()
vainfo: Supported profile and entrypoints
      VAProfileNone : VAEntrypointVideoProc
      VAProfileNone : VAEntrypointStats
      VAProfileMPEG2Simple : VAEntrypointVLD
      VAProfileMPEG2Simple : VAEntrypointEncSlice
      VAProfileMPEG2Main : VAEntrypointVLD
      VAProfileMPEG2Main : VAEntrypointEncSlice
      VAProfileH264Main : VAEntrypointVLD
      VAProfileH264Main : VAEntrypointEncSlice
      VAProfileH264Main : VAEntrypointFEI
      VAProfileH264Main : VAEntrypointEncSliceLP
      VAProfileH264High : VAEntrypointVLD
      VAProfileH264High : VAEntrypointEncSlice
      VAProfileH264High : VAEntrypointFEI
      VAProfileH264High : VAEntrypointEncSliceLP
      VAProfileVC1Simple : VAEntrypointVLD
      VAProfileVC1Main : VAEntrypointVLD
      VAProfileVC1Advanced : VAEntrypointVLD
      VAProfileJPEGBaseline : VAEntrypointVLD
      VAProfileJPEGBaseline : VAEntrypointEncPicture
      VAProfileH264ConstrainedBaseline: VAEntrypointVLD
      VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice
      VAProfileH264ConstrainedBaseline: VAEntrypointFEI
      VAProfileH264ConstrainedBaseline: VAEntrypointEncSliceLP
      VAProfileVP8Version0_3 : VAEntrypointVLD
      VAProfileVP8Version0_3 : VAEntrypointEncSlice
      VAProfileHEVCMain : VAEntrypointVLD
      VAProfileHEVCMain : VAEntrypointEncSlice
      VAProfileHEVCMain : VAEntrypointFEI
      VAProfileHEVCMain10 : VAEntrypointVLD
      VAProfileHEVCMain10 : VAEntrypointEncSlice
      VAProfileVP9Profile0 : VAEntrypointVLD
      VAProfileVP9Profile2 : VAEntrypointVLD

Revision history for this message
Olivier Tilloy (osomon) wrote :

@Michel: sorry for the late feedback. On that Pentium N5000 system, could you please include the full output of running "chromium --enable-logging=stderr", and the corresponding journalctl entries, filtered on "chromium"?

@Miguel: which OS/version are you running the chromium snap on? Can you please include the output of "snap info --abs-time chromium" ?

For reference, I tested on my HD Graphics 4000 (Ivy bridge, Core i7) and I'm seeing similar numbers as Michel in comment #21.

Revision history for this message
Miguel Rodríguez (migrax) wrote :

I am using Ubuntu 20.04. Here is the output of snap info:

name: chromium
summary: Chromium web browser, open-source version of Chrome
publisher: Canonical✓
store-url: https://snapcraft.io/chromium
contact: https://bugs.launchpad.net/ubuntu/+source/chromium-browser/+bugs?field.tag=snap
license: unset
description: |
  An open-source browser project that aims to build a safer, faster, and more stable way for all
  Internet users to experience the web.
commands:
  - chromium.chromedriver
  - chromium
snap-id: XKEcBqPM06H1Z7zGOdG5fbICuf8NWK5R
tracking: latest/candidate/vaapi
refresh-date: 2020-05-09T15:52:01+02:00
channels:
  latest/stable: 81.0.4044.138 2020-05-06T18:11:18Z (1143) 161MB -
  latest/candidate: 81.0.4044.138 2020-05-06T14:20:15Z (1143) 161MB -
  latest/beta: 83.0.4103.44 2020-05-08T01:02:43Z (1144) 163MB -
  latest/edge: 84.0.4128.3 2020-04-29T05:50:21Z (1136) 164MB -
installed: 81.0.4044.113 (1117) 165MB -

Revision history for this message
Alain Rouet (alainrouet-deactivatedaccount) wrote :

Same "libva error" issue here, with an Intel Core i5-7200U CPU (Intel HD 620). I attached the output of running "chromium --enable-logging=stderr", the chromium's journalctl entries (from installation to first and second launch) and vainfo.

The iHD VAAPI driver wasn't available until Ubuntu 19.04. If the Chromium snap is build with Ubuntu 18.04 libraries, wouldn't that explain the error?

Revision history for this message
Alain Rouet (alainrouet-deactivatedaccount) wrote :
Revision history for this message
Alain Rouet (alainrouet-deactivatedaccount) wrote :
Revision history for this message
Olivier Tilloy (osomon) wrote :

@Alain: thanks for the info. That might explain it, indeed.

intel-media-va-driver{,non-free} depends on libva-driver-abi-1.7, but libva in bionic only provides up to libva-driver-abi-1.1.

I'll look into building the snap with a newer version of libva.

Revision history for this message
Olivier Tilloy (osomon) wrote :

Still working on this. I had to patch chromium's vaapi code to enable it to build against a custom libva: https://chromium-review.googlesource.com/c/chromium/src/+/2204178.

Revision history for this message
Anton Alexandrenok (the-spyke) wrote :

@osomon If bionic provides only libva-driver-abi-1.1, maybe its time to move chromium snap to core20?

Revision history for this message
Matt Lee (matthewclee) wrote :
Download full text (3.5 KiB)

HW acceleration doesn't work for me in the latest build. I noted that Olivier was going to build with a newer version of libva so I went ahead an installed the latest version, as per this guide: https://github.com/intel/media-driver/wiki/How-to-build-and-use-media-driver%3F. Unfortunately that did not change the behavior, so I still see kVideoDecoderName="VpxVideoDecoder"

snap info --abs-time chromium & vainfo dumps below:

name: chromium
summary: Chromium web browser, open-source version of Chrome
publisher: Canonical*
store-url: https://snapcraft.io/chromium
contact: https://bugs.launchpad.net/ubuntu/+source/chromium-browser/+bugs?field.tag=snap
license: unset
description: |
  An open-source browser project that aims to build a safer, faster, and more stable way for all
  Internet users to experience the web.
commands:
  - chromium.chromedriver
  - chromium
snap-id: XKEcBqPM06H1Z7zGOdG5fbICuf8NWK5R
tracking: latest/candidate/vaapi
refresh-date: 2020-05-17T17:46:48-07:00
channels:
  latest/stable: 81.0.4044.138 2020-05-06T18:11:18Z (1143) 161MB -
  latest/candidate: 81.0.4044.138 2020-05-06T14:20:15Z (1143) 161MB -
  latest/beta: 83.0.4103.56 2020-05-15T02:46:16Z (1155) 163MB -
  latest/edge: 84.0.4143.2 2020-05-13T04:57:20Z (1154) 164MB -
installed: 81.0.4044.138 (1162) 162MB -

libva info: VA-API version 1.8.0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_8
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.8 (libva 2.1.0)
vainfo: Driver version: Intel iHD driver for Intel(R) Gen Graphics - 20.2.pre (f403839f)
vainfo: Supported profile and entrypoints
      VAProfileNone : VAEntrypointVideoProc
      VAProfileNone : VAEntrypointStats
      VAProfileMPEG2Simple : VAEntrypointVLD
      VAProfileMPEG2Simple : VAEntrypointEncSlice
      VAProfileMPEG2Main : VAEntrypointVLD
      VAProfileMPEG2Main : VAEntrypointEncSlice
      VAProfileH264Main : VAEntrypointVLD
      VAProfileH264Main : VAEntrypointEncSlice
      VAProfileH264Main : VAEntrypointFEI
      VAProfileH264Main : VAEntrypointEncSliceLP
      VAProfileH264High : VAEntrypointVLD
      VAProfileH264High : VAEntrypointEncSlice
      VAProfileH264High : VAEntrypointFEI
      VAProfileH264High : VAEntrypointEncSliceLP
      VAProfileVC1Simple : VAEntrypointVLD
      VAProfileVC1Main : VAEntrypointVLD
      VAProfileVC1Advanced : VAEntrypointVLD
      VAProfileJPEGBaseline : VAEntrypointVLD
      VAProfileJPEGBaseline : VAEntrypointEncPicture
      VAProfileH264ConstrainedBaseline: VAEntrypointVLD
      VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice
      VAProfileH264ConstrainedBaseline: VAEntrypointFEI
      VAProfileH264ConstrainedBaseline: VAEntrypointEncSliceLP
      VAProfileVP8Version0_3 : VAEntrypointVLD
      VAProfileVP8Version0_3 : VAEntrypointEncSl...

Read more...

Revision history for this message
Olivier Tilloy (osomon) wrote :

@Matt and others: I'm still working on this. I got chromium to build with the latest libva release, and there's an ongoing build with the latest releases of the corresponding drivers, which in my local tests is working fine. If everything goes well this should be available to test in the candidate/vaapi channel within less than 24 hours.

Revision history for this message
Olivier Tilloy (osomon) wrote :

A note of interest: when testing the snap, use this command line to output more libva debug information:

    LIBVA_MESSAGING_LEVEL=2 snap run chromium

Revision history for this message
Matt Lee (matthewclee) wrote :

Thanks Olivier. I'll keep my eye out for that, so I can test

Revision history for this message
Olivier Tilloy (osomon) wrote :

Everyone: a new snap is ready for testing in the candidate/vaapi channel (revision 1163):

    snap refresh chromium --channel=candidate/vaapi

Please test and report CPU usage while playing back HD video in the browser (you might want to use the h264ify extension for youtube and the like). Run the browser like this, and attach the output here:

    LIBVA_MESSAGING_LEVEL=2 snap run chromium

Thanks!

Revision history for this message
Alain Rouet (alainrouet-deactivatedaccount) wrote :

It's working here with an Intel Core i5-7200U CPU (Intel HD 620); "intel-gpu-top" confirms it is. Both VP9 and h264 are accelerated. CPU usage is around 20 to 35% while playing a 1080p video on Youtube (VP9), and a bit higher on Twitch (h264). Though it's way better than with software decoding.

$ LIBVA_MESSAGING_LEVEL=2 snap run chromium
Gtk-Message: 12:18:38.213: Failed to load module "canberra-gtk-module"
Gtk-Message: 12:18:38.215: Failed to load module "canberra-gtk-module"
libva info: VA-API version 1.7.0
libva info: Trying to open /snap/chromium/1163/usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_7
libva info: va_openDriver() returns 0
[14314:14314:0520/121838.333051:ERROR:sandbox_linux.cc(374)] InitializeSandbox() called with multiple threads in process gpu-process.
libva info: VA-API version 1.7.0
libva info: Trying to open /snap/chromium/1163/usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_7
libva info: va_openDriver() returns 0
[14175:14175:0520/121838.439652:ERROR:browser_switcher_service.cc(238)] XXX Init()

Revision history for this message
Nicolás Abel Carbone (nicocarbone) wrote : Re: [Bug 1816497] Re: [snap] vaapi chromium no video hardware decoding

It doesn't work here.
Intel i5-7200u running Ubuntu 20.04 on wayland. Maybe wayland is the issue?

$ LIBVA_MESSAGING_LEVEL=2 snap run chromium
/bin/bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
Gtk-Message: 10:15:51.783: Failed to load module "appmenu-gtk-module"
Gtk-Message: 10:15:51.986: Failed to load module "canberra-gtk-module"
Gtk-Message: 10:15:52.002: Failed to load module "canberra-gtk-module"
[12405:12405:0520/101552.253222:ERROR:edid_parser.cc(102)] Too short EDID
data: manufacturer id
libva info: VA-API version 1.7.0
libva error: vaGetDriverNameByIndex() failed with unknown libva error,
driver_name = (null)
[12641:12641:0520/101553.290076:ERROR:vaapi_wrapper.cc(482)] vaInitialize
failed: unknown libva error

El mié., 20 de may. de 2020 a la(s) 09:41, Alain Rouet (
<email address hidden>) escribió:

> It's working here with an Intel Core i5-7200U CPU (Intel HD 620);
> "intel-gpu-top" confirms it is. Both VP9 and h264 are accelerated. CPU
> usage is around 20 to 35% while playing a 1080p video on Youtube (VP9),
> and a bit higher on Twitch (h264). Though it's way better than with
> software decoding.
>
> $ LIBVA_MESSAGING_LEVEL=2 snap run chromium
> Gtk-Message: 12:18:38.213: Failed to load module "canberra-gtk-module"
> Gtk-Message: 12:18:38.215: Failed to load module "canberra-gtk-module"
> libva info: VA-API version 1.7.0
> libva info: Trying to open
> /snap/chromium/1163/usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so
> libva info: Found init function __vaDriverInit_1_7
> libva info: va_openDriver() returns 0
> [14314:14314:0520/121838.333051:ERROR:sandbox_linux.cc(374)]
> InitializeSandbox() called with multiple threads in process gpu-process.
> libva info: VA-API version 1.7.0
> libva info: Trying to open
> /snap/chromium/1163/usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so
> libva info: Found init function __vaDriverInit_1_7
> libva info: va_openDriver() returns 0
> [14175:14175:0520/121838.439652:ERROR:browser_switcher_service.cc(238)]
> XXX Init()
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1816497
>
> Title:
> [snap] vaapi chromium no video hardware decoding
>
> To manage notifications about this bug go to:
>
> https://bugs.launchpad.net/ubuntu/+source/chromium-browser/+bug/1816497/+subscriptions
>

--

Nicolás Abel Carbone

Doctor en Física - Becario Posdoctoral

CIFICEN-CONICET-UNCPBA

https://www.researchgate.net/profile/Nicolas_Carbone

*Mi horario de trabajo puede no coincidir con el suyo. Salvo que así lo
indique el mail, por favor no se sienta obligado a responder este mensaje
fuera de su horario de trabajo habitual.*

*My working hours may not be your working hours. Unless otherwise specified
in the mail, please do not feel obligated to reply outside of your normal
work schedule.*

Revision history for this message
Olivier Tilloy (osomon) wrote :

Yes, I suspect chromium (or at least the vaapi patches we apply) isn't sufficiently wayland-aware. Nicolás, could you test in an X11 session just to let us know whether accelerated HW video decoding works there? That would be a useful data point.

Revision history for this message
Nicolás Abel Carbone (nicocarbone) wrote :

I just tried in X11. It seems to be working :)
Sadly, most videos in YouTube seem to be av1 so it took me a while to get a vp9 video, but that's another issue altogether.

Thanks!

LIBVA_MESSAGING_LEVEL=2 snap run chromium
/bin/bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
Gtk-Message: 10:43:53.358: Failed to load module "appmenu-gtk-module"
Gtk-Message: 10:43:53.358: Failed to load module "appmenu-gtk-module"
Gtk-Message: 10:43:53.613: Failed to load module "canberra-gtk-module"
Gtk-Message: 10:43:53.638: Failed to load module "canberra-gtk-module"
libva info: VA-API version 1.7.0
libva info: Trying to open /snap/chromium/1163/usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_7
libva info: va_openDriver() returns 0
[19302:19302:0520/104355.042209:ERROR:sandbox_linux.cc(374)] InitializeSandbox() called with multiple threads in process gpu-process.
libva info: VA-API version 1.7.0
libva info: Trying to open /snap/chromium/1163/usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_7
libva info: va_openDriver() returns 0
[19157:19157:0520/104355.269741:ERROR:browser_switcher_service.cc(238)] XXX Init()

Revision history for this message
Michel-Ekimia (michel.ekimia) wrote :

@nicolas :that s because of https://bugs.launchpad.net/libva/+bug/1698287

I guess

Revision history for this message
Olivier Tilloy (osomon) wrote :

@Nicolás: thanks, that's very useful feedback.

@Michel: thanks, that's the problem indeed.

Revision history for this message
Nicolás Abel Carbone (nicocarbone) wrote :

Vaapi seems to be working for mpv and Firefox under wayland though.

Glad to be of help! :)

El mié., 20 de may. de 2020 a la(s) 11:21, Olivier Tilloy (
<email address hidden>) escribió:

> @Nicolás: thanks, that's very useful feedback.
>
> @Michel: thanks, that's the problem indeed.
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1816497
>
> Title:
> [snap] vaapi chromium no video hardware decoding
>
> To manage notifications about this bug go to:
>
> https://bugs.launchpad.net/ubuntu/+source/chromium-browser/+bug/1816497/+subscriptions
>

--

Nicolás Abel Carbone

Doctor en Física - Becario Posdoctoral

CIFICEN-CONICET-UNCPBA

https://www.researchgate.net/profile/Nicolas_Carbone

*Mi horario de trabajo puede no coincidir con el suyo. Salvo que así lo
indique el mail, por favor no se sienta obligado a responder este mensaje
fuera de su horario de trabajo habitual.*

*My working hours may not be your working hours. Unless otherwise specified
in the mail, please do not feel obligated to reply outside of your normal
work schedule.*

Revision history for this message
Matt Lee (matthewclee) wrote :

Looks like it's working for me on 18.04 with upgraded libva since I see MojoVideoDecoder again. CPU usage seemed fair for a 2k video, details as follows:

CPU Usage
*****
~20%
Current / Optimal Res3840x1976@24 / 3840x1976@24
Codecsvp09.00.51.08.01.01.01.01.00 (313) / opus (251)
*****

LIBVA_MESSAGING_LEVEL=2 snap run chromium
*****
libva info: VA-API version 1.7.0
libva info: Trying to open /snap/chromium/1163/usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_7
libva info: va_openDriver() returns 0
[4410:4410:0520/195642.417532:ERROR:sandbox_linux.cc(374)] InitializeSandbox() called with multiple threads in process gpu-process.
libva info: VA-API version 1.7.0
libva info: Trying to open /snap/chromium/1163/usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_7
libva info: va_openDriver() returns 0
[4269:4269:0520/195642.435879:ERROR:browser_switcher_service.cc(238)] XXX Init()
[4269:4414:0520/195652.100085:ERROR:object_proxy.cc(632)] Failed to call method: org.freedesktop.PowerManagement.Inhibit.Inhibit: object_path= /org/freedesktop/PowerManagement/Inhibit: org.freedesktop.DBus.Error.AccessDenied: An AppArmor policy prevents this sender from sending this message to this recipient; type="method_call", sender=":1.559" (uid=1000 pid=4269 comm="/snap/chromium/1163/usr/lib/chromium-browser/chrom" label="snap.chromium.chromium (enforce)") interface="org.freedesktop.PowerManagement.Inhibit" member="Inhibit" error name="(unset)" requested_reply="0" destination="org.freedesktop.PowerManagement" (uid=1000 pid=1552 comm="xfce4-power-manager " label="unconfined")
[4269:4414:0520/195652.100117:ERROR:power_save_blocker_linux.cc(373)] No response to Inhibit() request!
[4269:4414:0520/195652.248926:ERROR:object_proxy.cc(632)] Failed to call method: org.freedesktop.PowerManagement.Inhibit.Inhibit: object_path= /org/freedesktop/PowerManagement/Inhibit: org.freedesktop.DBus.Error.AccessDenied: An AppArmor policy prevents this sender from sending this message to this recipient; type="method_call", sender=":1.564" (uid=1000 pid=4269 comm="/snap/chromium/1163/usr/lib/chromium-browser/chrom" label="snap.chromium.chromium (enforce)") interface="org.freedesktop.PowerManagement.Inhibit" member="Inhibit" error name="(unset)" requested_reply="0" destination="org.freedesktop.PowerManagement" (uid=1000 pid=1552 comm="xfce4-power-manager " label="unconfined")
[4269:4414:0520/195652.249213:ERROR:power_save_blocker_linux.cc(373)] No response to Inhibit() request!
*****

Revision history for this message
Matt Lee (matthewclee) wrote :

Just for comparison, I disabled hardware acceleration and see CPU usage up at ~70%

Revision history for this message
André Correia (andre30correia) wrote :

hw is working now, 4k vp9 youtube video 8 to 15 % cpu usage, without that jumps to 80%

Revision history for this message
Pietrek B. (ptrbrzozowski) wrote :

Hi,

I can't get MojoVideoDecoder to work on an AMD Ryzen laptop.
LIBVA_MESSAGING_LEVEL=2 snap run chromium spits:

libva info: Trying to open /snap/chromium/1163/usr/lib/x86_64-linux-gnu/dri/radeonsi_drv_video.so
libva info: va_openDriver() returns -1
[7926:7926:0603/095431.761821:ERROR:vaapi_wrapper.cc(482)] vaInitialize failed: unknown libva error

and radeonsi_drv_video.so is simply missing:

ll /snap/chromium/1163/usr/lib/x86_64-linux-gnu/dri/radeonsi_drv_video.so
ls: cannot access '/snap/chromium/1163/usr/lib/x86_64-linux-gnu/dri/radeonsi_drv_video.so': No such file or directory

Could you please update the snap to add missing the missing radeonsi library?
Thanks.

description: updated
Revision history for this message
Olivier Tilloy (osomon) wrote :

Pietrek: https://git.launchpad.net/~chromium-team/chromium-browser/+git/snap-from-source/commit/?id=77dc6ad516a8f5ce9dbf8306f4d4f8297a1c7654 should do the trick. I'll trigger a rebuild in a moment, if you're still on the candidate/vaapi channel you should be getting a refresh within the next 24 hours. Please retest and report here when you do.

Revision history for this message
Olivier Tilloy (osomon) wrote :

This is now ready for testing again in the candidate/vaapi channel (rebased on the latest stable chromium release, 83.0.4103.97): revision 1191.

description: updated
Revision history for this message
Michel-Ekimia (michel.ekimia) wrote :

Failure report :

- distro version : Ubuntu 20.04
- GPU Hardware used : Intel pentium 5000 so HD630 ?
- Codec used : VP9 On youtube , H264 on vimeo

video is totally scrambled on H264/VP9 or even does not start on vimeo.

Netflix and bitmovin DRM test Works great, which means that Widevine does not use GPU.

Revision history for this message
Liz Fong-Jones (lizthegrey) wrote :

I'm unable to find the channel/branch on arm64. Can you also publish an arm64 snap in that branch?

```
$ sudo snap switch --channel=latest/candidate/vaapi chromium
"chromium" switched to the "latest/candidate/vaapi" channel
$ sudo snap refresh chromium
error: requested a non-existing branch on latest/candidate for snap "chromium":
       vaapi
$ sudo snap refresh --revision=1191 chromium
error: cannot refresh "chromium": Access by specifying a revision is not
       allowed for this Snap.
```

Revision history for this message
Olivier Tilloy (osomon) wrote :

@Michel: can you share the output of "LIBVA_MESSAGING_LEVEL=2 snap run chromium" ?

@Liz: that channel is built for amd64 only, I'll attempt an arm64 build.

Revision history for this message
Liz Fong-Jones (lizthegrey) wrote :

@osomon: did you build for arm64? should I try again?

Revision history for this message
Olivier Tilloy (osomon) wrote :

Sorry for the lack of feedback Liz. I attempted a build on arm64 and ran into errors (https://code.launchpad.net/~chromium-team/+snap/chromium-snap-from-source-enable-vaapi/+build/995860) when building the intel-gmmlib part. I spent a bit of time trying to figure those out, unsuccessfully.

Revision history for this message
Liz Fong-Jones (lizthegrey) wrote :

No worries, let me see if @jon-nettleton can have a look.

Revision history for this message
Liz Fong-Jones (lizthegrey) wrote :

@osomon: I see linux-libc-dev is installed in the snap build process but not libc6-dev. I know that normally libc6-dev is included in build-essentials when building .deb files, but is it possible that it isn't in the default set of things for a snap build environment?

Revision history for this message
Liz Fong-Jones (lizthegrey) wrote :

Oddly enough, you do include it in the snap definition as of May 13...

```
    build-packages:
      - gcc
      - libc6-dev
      - libdrm-dev
      - libgl1-mesa-dev
      - libwayland-dev
      - libx11-dev
      - libxext-dev
      - libxfixes-dev
      - pkg-config
```

Revision history for this message
Liz Fong-Jones (lizthegrey) wrote :

As was pointed out by @jon-nettleton, the intel parts are not required to build, and only are used for intel onboard graphics, which necessarily won't be present on ARM64. Is it possible to make it conditional to build those parts depending upon architecture?

https://launchpad.net/~lizthegrey/+snap/chromium/+build/1043865 is a build where I simply deleted the intel-specific parts for now.

Revision history for this message
Olivier Tilloy (osomon) wrote :
Revision history for this message
Liz Fong-Jones (lizthegrey) wrote :

`stage-packages libdrm-intel1` still fails despite skipping the build steps. Needs a selector to skip it on !amd64/i386.

Revision history for this message
Olivier Tilloy (osomon) wrote :
Revision history for this message
Liz Fong-Jones (lizthegrey) wrote :

Now we're getting somewhere!
chrome://gpu shows:
```
Vulkan: Disabled
...
Video Acceleration Information
Vulkan Information
Device Performance Information
Log Messages
[4784:4784:0719/142605.755018:ERROR:vaapi_wrapper.cc(511)] : vaInitialize failed: unknown libva error
[4784:4784:0719/142605.967571:ERROR:sandbox_linux.cc(374)] : InitializeSandbox() called with multiple threads in process gpu-process.
[4784:4784:0719/142607.971915:ERROR:gl_surface_presentation_helper.cc(258)] : GetVSyncParametersIfAvailable() failed for 1 times!
[4784:4784:0719/142607.987560:ERROR:gl_surface_presentation_helper.cc(258)] : GetVSyncParametersIfAvailable() failed for 2 times!
[4784:4784:0719/142607.990878:ERROR:gl_surface_presentation_helper.cc(258)] : GetVSyncParametersIfAvailable() failed for 3 times!
[4784:4784:0719/142858.879624:WARNING:ipc_message_attachment_set.cc(49)] : MessageAttachmentSet destroyed with unconsumed attachments: 0/1
[4784:4784:0719/142858.880096:WARNING:ipc_message_attachment_set.cc(49)] : MessageAttachmentSet destroyed with unconsumed attachments: 0/1
[4784:4784:0719/142951.806243:WARNING:ipc_message_attachment_set.cc(49)] : MessageAttachmentSet destroyed with unconsumed attachments: 0/1
```

Yet my native non-snap environment shows:
$ vainfo
libva info: VA-API version 1.7.0
libva info: Trying to open /usr/lib/aarch64-linux-gnu/dri/radeonsi_drv_video.so
libva info: Found init function __vaDriverInit_1_7
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.7 (libva 2.6.0)
vainfo: Driver version: Mesa Gallium driver 20.0.8 for AMD Radeon (TM) Pro WX 3200 Series (POLARIS12, DRM 3.37.0, 5.7.0-050700-generic, LLVM 10.0.0)
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
      VAProfileJPEGBaseline : VAEntrypointVLD
      VAProfileNone : VAEntrypointVideoProc

Revision history for this message
Liz Fong-Jones (lizthegrey) wrote :

Can we try pulling in https://packages.ubuntu.com/bionic-updates/mesa-va-drivers instead of the base bionic package pulled right now by the https://launchpad.net/~chromium-team/+snap/chromium-snap-from-source-enable-vaapi build config (which doesn't use Bionic-Updates)?

Revision history for this message
Liz Fong-Jones (lizthegrey) wrote :

The problem also might be that I'm running Chromium inside XWayland rather than natively on X11. I'll try popping over to X11 to see whether it works...

Revision history for this message
Liz Fong-Jones (lizthegrey) wrote :

From X11 without Wayland:
Vulkan still shows as disabled but the init error doesn't turn up.

Log Messages
[18061:18061:0719/145212.290039:ERROR:sandbox_linux.cc(374)] : InitializeSandbox() called with multiple threads in process gpu-process.
[18061:18061:0719/145432.791528:ERROR:shared_image_manager.cc(212)] : SharedImageManager::ProduceSkia: Trying to Produce a Skia representation from a non-existent mailbox.
[18061:18061:0719/145432.793618:ERROR:shared_image_manager.cc(212)] : SharedImageManager::ProduceSkia: Trying to Produce a Skia representation from a non-existent mailbox.

Revision history for this message
Olivier Tilloy (osomon) wrote :

Thanks for testing and the feedback Liz.

The version of mesa-va-drivers in the snap is the one from bionic-updates (20.0.8-0ubuntu1~18.04.1), as confirmed from the build log and by comparing checksums after unpacking the snap.

What's the output of `LIBVA_MESSAGING_LEVEL=2 snap run chromium` ?

Revision history for this message
Liz Fong-Jones (lizthegrey) wrote :

```
Gtk-Message: 12:30:13.823: Failed to load module "canberra-gtk-module"
Gtk-Message: 12:30:13.826: Failed to load module "canberra-gtk-module"
/usr/share/libdrm/amdgpu.ids: No such file or directory
libva info: VA-API version 1.7.0
libva error: vaGetDriverNameByIndex() failed with unknown libva error, driver_name = (null)
[88603:88603:0720/123014.054495:ERROR:vaapi_wrapper.cc(511)] vaInitialize failed: unknown libva error
[88603:88603:0720/123014.127389:ERROR:sandbox_linux.cc(374)] InitializeSandbox() called with multiple threads in process gpu-process.
[88603:88603:0720/123016.338346:ERROR:gl_surface_presentation_helper.cc(258)] GetVSyncParametersIfAvailable() failed for 1 times!
[88603:88603:0720/123016.415428:ERROR:gl_surface_presentation_helper.cc(258)] GetVSyncParametersIfAvailable() failed for 2 times!
[88603:88603:0720/123016.506070:ERROR:gl_surface_presentation_helper.cc(258)] GetVSyncParametersIfAvailable() failed for 3 times!
[88724:24:0720/123021.662653:ERROR:batching_media_log.cc(38)] MediaEvent: {"error":"{\"causes\":[{\"causes\":[],\"data\":{},\"stack\":[{\"file\":\"../../media/filters/decrypting_video_decoder.cc\",\"line\":53}],\"status_code\":264,\"status_message\":\"\"}],\"data\":{\"Decoder name\":\"DecryptingVideoDecoder\"},\"stack\":[{\"file\":\"../../media/filters/decoder_selector.cc\",\"line\":172}],\"status_code\":265,\"status_message\":\"\"}"}
[88724:24:0720/123021.663088:ERROR:batching_media_log.cc(38)] MediaEvent: {"error":"{\"causes\":[{\"causes\":[],\"data\":{},\"stack\":[{\"file\":\"../../media/mojo/clients/mojo_video_decoder.cc\",\"line\":158}],\"status_code\":261,\"status_message\":\"\"}],\"data\":{\"Decoder name\":\"MojoVideoDecoder\"},\"stack\":[{\"file\":\"../../media/filters/decoder_selector.cc\",\"line\":172}],\"status_code\":265,\"status_message\":\"\"}"}

```

libdrm-common on the host has /usr/share/libdrm/amdgpu.ids, and /snap/chromium/current/usr/share/libdrm/amdgpu.ids does in fact also exist so I'm not sure why it's not finding it.

```
 lizf  ~  sha256sum /snap/chromium/current/usr/share/libdrm/amdgpu.ids
ba7b77c3864d691cf4577df1fda8dc3696c6a31a79ae36f8daf69d6e250c7ec8 /snap/chromium/current/usr/share/libdrm/amdgpu.ids
 lizf  ~  sha256sum /usr/share/libdrm/amdgpu.ids
ba7b77c3864d691cf4577df1fda8dc3696c6a31a79ae36f8daf69d6e250c7ec8 /usr/share/libdrm/amdgpu.ids
```

Revision history for this message
Liz Fong-Jones (lizthegrey) wrote :

from x11 without wayland:

```
LIBVA_MESSAGING_LEVEL=2 snap run chromium
Gtk-Message: 12:36:55.257: Failed to load module "canberra-gtk-module"
Gtk-Message: 12:36:55.262: Failed to load module "canberra-gtk-module"
/usr/share/libdrm/amdgpu.ids: No such file or directory
libva info: VA-API version 1.7.0
libva info: Trying to open /snap/chromium/1239/usr/lib/aarch64-linux-gnu/dri/radeonsi_drv_video.so
libva info: Found init function __vaDriverInit_1_1
libva info: va_openDriver() returns 0
[94812:94812:0720/123655.693366:ERROR:sandbox_linux.cc(374)] InitializeSandbox() called with multiple threads in process gpu-process.
mesa: for the --simplifycfg-sink-common option: may only occur zero or one times!
mesa: for the --global-isel-abort option: may only occur zero or one times!
mesa: for the --amdgpu-atomic-optimizations option: may only occur zero or one times!
```

Revision history for this message
Liz Fong-Jones (lizthegrey) wrote :

Aha, it's a detection issue on wayland. passing `LIBVA_DRIVER_NAME=radeonsi` does a trick.

```
LIBVA_DRIVER_NAME=radeonsi LIBVA_MESSAGING_LEVEL=2 snap run chromiumGtk-Message: 12:41:29.046: Failed to load module "canberra-gtk-module"
Gtk-Message: 12:41:29.049: Failed to load module "canberra-gtk-module"
/usr/share/libdrm/amdgpu.ids: No such file or directory
libva info: VA-API version 1.7.0
libva info: User environment variable requested driver 'radeonsi'
libva info: Trying to open /snap/chromium/1239/usr/lib/aarch64-linux-gnu/dri/radeonsi_drv_video.so
libva info: Found init function __vaDriverInit_1_1
libva info: va_openDriver() returns 0
[99885:99885:0720/124129.484972:ERROR:sandbox_linux.cc(374)] InitializeSandbox() called with multiple threads in process gpu-process.
mesa: for the --simplifycfg-sink-common option: may only occur zero or one times!
mesa: for the --global-isel-abort option: may only occur zero or one times!
mesa: for the --amdgpu-atomic-optimizations option: may only occur zero or one times!
[99885:99885:0720/124131.408722:ERROR:gl_surface_presentation_helper.cc(258)] GetVSyncParametersIfAvailable() failed for 1 times!
[99885:99885:0720/124131.525064:ERROR:gl_surface_presentation_helper.cc(258)] GetVSyncParametersIfAvailable() failed for 2 times!
[99885:99885:0720/124131.601912:ERROR:gl_surface_presentation_helper.cc(258)] GetVSyncParametersIfAvailable() failed for 3 times!
```

Revision history for this message
Liz Fong-Jones (lizthegrey) wrote :

although Vulkan is showing as off in chrome://gpu, I _am_ seeing better performance now when switching tabs, watching youtube, and using webgl :)

or maybe that's the placebo effect at work.

Revision history for this message
Olivier Tilloy (osomon) wrote :

That's great news Liz!

What does chrome://media-internals report as the video decoder when watching H264 videos?

Revision history for this message
Liz Fong-Jones (lizthegrey) wrote :
Download full text (3.5 KiB)

VP9 decodes in software with VpxVideoDecoder

```
00:00:00.294 error "{\"causes\":[{\"causes\":[],\"data\":{},\"stack\":[{\"file\":\"../../media/filters/decrypting_video_decoder.cc\",\"line\":53}],\"status_code\":264,\"status_message\":\"\"}],\"data\":{\"Decoder name\":\"DecryptingVideoDecoder\"},\"stack\":[{\"file\":\"../../media/filters/decoder_selector.cc\",\"line\":172}],\"status_code\":265,\"status_message\":\"\"}"
00:00:00.295 error "{\"causes\":[{\"causes\":[],\"data\":{},\"stack\":[{\"file\":\"../../media/mojo/clients/mojo_video_decoder.cc\",\"line\":158}],\"status_code\":261,\"status_message\":\"\"}],\"data\":{\"Decoder name\":\"MojoVideoDecoder\"},\"stack\":[{\"file\":\"../../media/filters/decoder_selector.cc\",\"line\":172}],\"status_code\":265,\"status_message\":\"\"}"
```

AV1 decodes with Dav1dVideoDecoder (likewise in software, I believe)
```
00:00:00.105 error "{\"causes\":[{\"causes\":[],\"data\":{},\"stack\":[{\"file\":\"../../media/filters/decrypting_video_decoder.cc\",\"line\":53}],\"status_code\":264,\"status_message\":\"\"}],\"data\":{\"Decoder name\":\"DecryptingVideoDecoder\"},\"stack\":[{\"file\":\"../../media/filters/decoder_selector.cc\",\"line\":172}],\"status_code\":265,\"status_message\":\"\"}"
00:00:00.105 error "{\"causes\":[{\"causes\":[],\"data\":{},\"stack\":[{\"file\":\"../../media/mojo/clients/mojo_video_decoder.cc\",\"line\":158}],\"status_code\":261,\"status_message\":\"\"}],\"data\":{\"Decoder name\":\"MojoVideoDecoder\"},\"stack\":[{\"file\":\"../../media/filters/decoder_selector.cc\",\"line\":172}],\"status_code\":265,\"status_message\":\"\"}"
00:00:00.106 error "{\"causes\":[{\"causes\":[],\"data\":{},\"stack\":[{\"file\":\"../../media/filters/vpx_video_decoder.cc\",\"line\":135}],\"status_code\":265,\"status_message\":\"\"}],\"data\":{\"Decoder name\":\"VpxVideoDecoder\"},\"stack\":[{\"file\":\"../../media/filters/decoder_selector.cc\",\"line\":172}],\"status_code\":265,\"status_message\":\"\"}"
```

H264 decodes with Mojo.
```
00:00:00.687 kVideoTracks [{"alpha mode":"is_opaque","codec":"h264","coded size":"300x224","color space":"{primaries:SMPTE170M, transfer:SMPTE170M, matrix:SMPTE170M, range:LIMITED}","encryption scheme":"Unencrypted","has extra data":true,"hdr metadata":"unset","natural size":"300x224","orientation":"0°","profile":"h264 main","visible rect":"0,0 300x224"}]
00:00:00.688 kMaxDuration 3
00:00:00.688 kStartTime 0
00:00:00.688 kBitrate 207274
00:00:00.688 pipeline_state "kSuspended"
00:00:01.018 event "kSuspended"
00:00:01.018 pipeline_buffering_state {"for_suspended_start":true,"state":"BUFFERING_HAVE_ENOUGH"}
00:00:01.193 pipeline_state "kResuming"
00:00:01.194 error "{\"causes\":[{\"causes\":[],\"data\":{},\"stack\":[{\"file\":\"../../media/filters/decrypting_video_decoder.cc\",\"line\":53}],\"status_code\":264,\"status_message\":\"\"}],\"data\":{\"Decoder name\":\"DecryptingVideoDecoder\"},\"stack\":[{\"file\":\"../../media/filters/decoder_selector.cc\",\"line\":172}],\"status_code\":265,\"status_message\":\"\"}"
00:00:00.687 duration 3
00:00:01.427 kIsVideoDecryptingDemuxerStream false
00:00:01.427 kVideoDecoderName "MojoVideoDecoder"
00:00:01.427 kIsPlatformVideoDecoder true
...

Read more...

Revision history for this message
Olivier Tilloy (osomon) wrote :

Mojo is the decoder you want for hardware-accelerated video decoding. So you're good with H264. As for VP9 and AV1, I suppose your GPU doesn't support those?

Revision history for this message
Liz Fong-Jones (lizthegrey) wrote :

Correct. I'ts a Polaris chip = UVD6.3 (https://en.wikipedia.org/wiki/Unified_Video_Decoder#UVD_6). no vp9 or av1.

Revision history for this message
Liz Fong-Jones (lizthegrey) wrote :

can I beg the favor of having `rtc_use_pipewire` turned on for your branch? otherwise I'm happy to fork, just let me know :)

Revision history for this message
Marc Lijour (marclijour) wrote :

This used to do the trick for me. Since an upgrade to 20.04 the decoding is not working properly. Chromium (86 here) is not calling MojoVideoDecoder.
https://www.linuxuprising.com/2018/08/how-to-enable-hardware-accelerated.html

That may be related to a switch to the iHD driver (active now according to vainfo). I noticed other problems with ffpmeg for screengrabbing.

Revision history for this message
Marc Lijour (marclijour) wrote :
Download full text (5.6 KiB)

Tested the snap package and it works fine!
Running on DELL XPS13
Version 84.0.4147.89 (Official Build) snap (64-bit)
+ using the h264ify extension in the browser to force Youtube (VP9 by default) to run on h264

$ sudo snap install --channel=candidate/vaapi chromium

$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=20.04
DISTRIB_CODENAME=focal
DISTRIB_DESCRIPTION="Ubuntu 20.04.1 LTS"

$ vainfo
libva info: VA-API version 1.7.0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_7
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.7 (libva 2.6.0)
vainfo: Driver version: Intel iHD driver for Intel(R) Gen Graphics - 20.1.1 ()
vainfo: Supported profile and entrypoints
      VAProfileMPEG2Simple : VAEntrypointVLD
      VAProfileMPEG2Main : VAEntrypointVLD
      VAProfileH264Main : VAEntrypointVLD
      VAProfileH264Main : VAEntrypointEncSliceLP
      VAProfileH264High : VAEntrypointVLD
      VAProfileH264High : VAEntrypointEncSliceLP
      VAProfileJPEGBaseline : VAEntrypointVLD
      VAProfileJPEGBaseline : VAEntrypointEncPicture
      VAProfileH264ConstrainedBaseline: VAEntrypointVLD
      VAProfileH264ConstrainedBaseline: VAEntrypointEncSliceLP
      VAProfileVP8Version0_3 : VAEntrypointVLD
      VAProfileHEVCMain : VAEntrypointVLD
      VAProfileHEVCMain10 : VAEntrypointVLD
      VAProfileVP9Profile0 : VAEntrypointVLD
      VAProfileVP9Profile2 : VAEntrypointVLD

chrome://media-internals/

Timestamp Property Value
00:00:00.000 origin_url "https://www.youtube.com/"
00:00:00.000 kFrameUrl "https://www.youtube.com/watch?v=LXb3EKWsInQ"
00:00:00.000 kFrameTitle "COSTA RICA IN 4K 60fps HDR (ULTRA HD) - YouTube"
00:00:00.000 url "blob:https://www.youtube.com/bd1489d5-5381-4f8a-b3c0-90023da92ae9"
00:00:00.000 info "ChunkDemuxer"
00:00:00.000 pipeline_state "kStarting"
00:00:00.036 kVideoTracks [{"alpha mode":"is_opaque","codec":"h264","coded size":"1920x1080","color space":"{primaries:BT709, transfer:BT709, matrix:BT709, range:LIMITED}","encryption scheme":"Unencrypted","has extra data":false,"hdr metadata":"unset","natural size":"1920x1080","orientation":"0°","profile":"h264 high","visible rect":"0,0 1920x1080"}]
00:00:00.036 kAudioTracks [{"bytes per channel":2,"bytes per frame":4,"channel layout":"STEREO","channels":2,"codec":"aac","codec delay":0,"discard decoder delay":false,"encryption scheme":"Unencrypted","has extra data":false,"profile":"unknown","sample format":"Signed 16-bit","samples per second":44100,"seek preroll":"0us"}]
00:00:00.039 info "Effective playback rate changed from 0 to 1"
00:00:00.039 event "kPlay"
00:00:00.045 kIsAudioDecryptingDemuxerStream false
00:00:00.045 kAudioDecoderName "FFmpegAudioDecoder"
00:00:00.045 kIsPlatformAudioDecoder false
00:00:00.045 info "Selected FFmpegAudioDecoder for audio decoding, config: codec: aac, profile: unknown, bytes_per_channel: 2, channel_layout: STEREO, channels: 2, samples_per_second: 44100, sample_format: Signed 16-bit, bytes_per_frame: 4, ...

Read more...

Revision history for this message
sean (sean666888) wrote :
Download full text (3.3 KiB)

Was working last week even with vp9:

vainfo output:
libva info: VA-API version 1.7.0
libva info: User environment variable requested driver 'iHD'
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_7
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.7 (libva 2.9.0.pre1)
vainfo: Driver version: Intel iHD driver for Intel(R) Gen Graphics - 20.1.1 ()
vainfo: Supported profile and entrypoints
      VAProfileNone : VAEntrypointVideoProc
      VAProfileNone : VAEntrypointStats
      VAProfileMPEG2Simple : VAEntrypointVLD
      VAProfileMPEG2Simple : VAEntrypointEncSlice
      VAProfileMPEG2Main : VAEntrypointVLD
      VAProfileMPEG2Main : VAEntrypointEncSlice
      VAProfileH264Main : VAEntrypointVLD
      VAProfileH264Main : VAEntrypointEncSlice
      VAProfileH264Main : VAEntrypointFEI
      VAProfileH264Main : VAEntrypointEncSliceLP
      VAProfileH264High : VAEntrypointVLD
      VAProfileH264High : VAEntrypointEncSlice
      VAProfileH264High : VAEntrypointFEI
      VAProfileH264High : VAEntrypointEncSliceLP
      VAProfileVC1Simple : VAEntrypointVLD
      VAProfileVC1Main : VAEntrypointVLD
      VAProfileVC1Advanced : VAEntrypointVLD
      VAProfileJPEGBaseline : VAEntrypointVLD
      VAProfileJPEGBaseline : VAEntrypointEncPicture
      VAProfileH264ConstrainedBaseline: VAEntrypointVLD
      VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice
      VAProfileH264ConstrainedBaseline: VAEntrypointFEI
      VAProfileH264ConstrainedBaseline: VAEntrypointEncSliceLP
      VAProfileVP8Version0_3 : VAEntrypointVLD
      VAProfileVP8Version0_3 : VAEntrypointEncSlice
      VAProfileHEVCMain : VAEntrypointVLD
      VAProfileHEVCMain : VAEntrypointEncSlice
      VAProfileHEVCMain : VAEntrypointFEI
      VAProfileHEVCMain10 : VAEntrypointVLD
      VAProfileHEVCMain10 : VAEntrypointEncSlice
      VAProfileVP9Profile0 : VAEntrypointVLD
      VAProfileVP9Profile2 : VAEntrypointVLD

media-internals Stuff:

render_id: 24
player_id: 43
origin_url: https://www.youtube.com/
kFrameUrl: https://www.youtube.com/watch?v=tEK7GIefwZE
kFrameTitle:
url: blob:https://www.youtube.com/28d56b05-cb4e-4d58-abc1-a85d8b4d578a
info: Selected video track: [1]
pipeline_state: kPlaying
kVideoTracks: [object Object]
kAudioTracks: [object Object]
kIsAudioDecryptingDemuxerStream: false
kAudioDecoderName: FFmpegAudioDecoder
kIsPlatformAudioDecoder: false
error: {"causes":[{"causes":[],"data":{},"stack":[{"file":"../../media/filters/decrypting_video_decoder.cc","line":53}],"status_code":264,"status_message":""}],"data":{"Decoder name":"DecryptingVideoDecoder"},"stack":[{"file":"../../media/filters/decoder_selector.cc","line":172}],"status_code":265,"status_message":""}
kIsVideoDecryptingDemuxerStream: false
kVideoDecoderName: VpxVideoDecoder
kIsP...

Read more...

Revision history for this message
sean (sean666888) wrote :

* now not working

Revision history for this message
Matt Lee (matthewclee) wrote :
Download full text (6.2 KiB)

I'm seeing the same problem. Debug information below.

LIBVA_MESSAGING_LEVEL=2 snap run chromium
[20382:20382:0821/200854.560443:ERROR:sandbox_linux.cc(374)] InitializeSandbox() called with multiple threads in process gpu-process.
[20548:13:0821/200904.074169:ERROR:batching_media_log.cc(38)] MediaEvent: {"error":"{\"causes\":[{\"causes\":[],\"data\":{},\"stack\":[{\"file\":\"../../media/filters/decrypting_video_decoder.cc\",\"line\":53}],\"status_code\":264,\"status_message\":\"\"}],\"data\":{\"Decoder name\":\"DecryptingVideoDecoder\"},\"stack\":[{\"file\":\"../../media/filters/decoder_selector.cc\",\"line\":172}],\"status_code\":265,\"status_message\":\"\"}"}
[20248:20383:0821/200904.173566:ERROR:object_proxy.cc(622)] Failed to call method: org.freedesktop.PowerManagement.Inhibit.Inhibit: object_path= /org/freedesktop/PowerManagement/Inhibit: org.freedesktop.DBus.Error.AccessDenied: An AppArmor policy prevents this sender from sending this message to this recipient; type="method_call", sender=":1.504" (uid=1000 pid=20248 comm="/snap/chromium/1260/usr/lib/chromium-browser/chrom" label="snap.chromium.chromium (enforce)") interface="org.freedesktop.PowerManagement.Inhibit" member="Inhibit" error name="(unset)" requested_reply="0" destination="org.freedesktop.PowerManagement" (uid=1000 pid=1571 comm="xfce4-power-manager " label="unconfined")
[20248:20383:0821/200904.173588:ERROR:power_save_blocker_linux.cc(373)] No response to Inhibit() request!
[20248:20383:0821/200904.379145:ERROR:object_proxy.cc(622)] Failed to call method: org.freedesktop.PowerManagement.Inhibit.Inhibit: object_path= /org/freedesktop/PowerManagement/Inhibit: org.freedesktop.DBus.Error.AccessDenied: An AppArmor policy prevents this sender from sending this message to this recipient; type="method_call", sender=":1.505" (uid=1000 pid=20248 comm="/snap/chromium/1260/usr/lib/chromium-browser/chrom" label="snap.chromium.chromium (enforce)") interface="org.freedesktop.PowerManagement.Inhibit" member="Inhibit" error name="(unset)" requested_reply="0" destination="org.freedesktop.PowerManagement" (uid=1000 pid=1571 comm="xfce4-power-manager " label="unconfined")
[20248:20383:0821/200904.379183:ERROR:power_save_blocker_linux.cc(373)] No response to Inhibit() request!
[20248:20248:0821/200913.822437:ERROR:event_router.cc(713)] Event dispatched while shutting down extensions browser client.

libva info: VA-API version 1.8.0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_8
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.8 (libva 2.1.0)
vainfo: Driver version: Intel iHD driver for Intel(R) Gen Graphics - 20.2.pre (f403839f)
vainfo: Supported profile and entrypoints
      VAProfileNone : VAEntrypointVideoProc
      VAProfileNone : VAEntrypointStats
      VAProfileMPEG2Simple : VAEntrypointVLD
      VAProfileMPEG2Simple : VAEntrypointEncSlice
      VAProfileMPEG2Main : VAEntrypointVLD
      VAProfileMPEG2Main : VAEntrypointEncSlice
      VAProfileH264Main : VAEntrypointVLD
      VAProfileH264Main ...

Read more...

Revision history for this message
Mateusz Stachowski (stachowski-mateusz) wrote :

I also can't get the hardware acceleration on Youtube.

With Netflix I do get DecryptingVideoDecoder.

Also there is no "Hardware-accelerated video decode" in flags.

Chromium snap version 84.0.4147.135 from candidate/vaapi channel.

$ vainfo
libva info: VA-API version 1.7.0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/radeonsi_drv_video.so
libva info: Found init function __vaDriverInit_1_7
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.7 (libva 2.6.0)
vainfo: Driver version: Mesa Gallium driver 20.0.8 for AMD Radeon RX 5600 XT (NAVI10, DRM 3.38.0, 5.8.3-xanmod1, LLVM 10.0.0)
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
      VAProfileJPEGBaseline : VAEntrypointVLD
      VAProfileVP9Profile0 : VAEntrypointVLD
      VAProfileVP9Profile2 : VAEntrypointVLD
      VAProfileNone : VAEntrypointVideoProc

chrome://media-internals/

render_id: 9
player_id: 24
origin_url: https://www.youtube.com/
kFrameUrl: https://www.youtube.com/watch?v=LXb3EKWsInQ
kFrameTitle: COSTA RICA IN 4K 60fps HDR (ULTRA HD) - YouTube
url: blob:https://www.youtube.com/61c207f8-ceac-4af4-ab57-2e6c0526d53b
info: Effective playback rate changed from 0 to 1
pipeline_state: kPlaying
kAudioTracks: [object Object]
duration: 313.840907
kVideoTracks: [object Object]
kIsAudioDecryptingDemuxerStream: false
kAudioDecoderName: FFmpegAudioDecoder
kIsPlatformAudioDecoder: false
error: {"causes":[{"causes":[],"data":{"codec":"h264"},"stack":[{"file":"../../media/filters/dav1d_video_decoder.cc","line":165}],"status_code":260,"status_message":""}],"data":{"Decoder name":"Dav1dVideoDecoder"},"stack":[{"file":"../../media/filters/decoder_selector.cc","line":172}],"status_code":265,"status_message":""}
kIsVideoDecryptingDemuxerStream: false
kVideoDecoderName: FFmpegVideoDecoder
kIsPlatformVideoDecoder: false
audio_buffering_state: [object Object]
dimensions: 1920x1080
kResolution: 1920x1080
video_buffering_state: [object Object]
pipeline_buffering_state: [object Object]
event: kPlay

Revision history for this message
Tim Richardson (tim-richardson) wrote :

If you want to test this, force YouTube to serve H264, which your card supports judging by the vainfo results. A 4k 60fps YouTube video won't be in a codec your hardware can handle, I guess. There are 'h264ify' extensions for Chromium.

Revision history for this message
sean (sean666888) wrote :

Most of us have tryed h264ify it dose not help the issue seem to be with the build

Revision history for this message
Matt Lee (matthewclee) wrote :

Hi Olivier,

Have you had a chance to look into why hardware decoding seems to broken now?

Thanks, Matt.

Revision history for this message
Marc Peña (pachulo) wrote :
Download full text (3.9 KiB)

Hi Olivier,

As per your comment here: https://discourse.ubuntu.com/t/desktop-team-updates-monday-2nd-november-2020/19154/7 I tried this with the latest/edge version of the snap:

$ snap info chromium

...

tracking: latest/edge
refresh-date: today at 10:13 CET
channels:
  latest/stable: 86.0.4240.183 2020-11-04 (1382) 252MB -
  latest/candidate: 86.0.4240.183 2020-11-04 (1382) 252MB -
  latest/beta: 87.0.4280.47 2020-11-05 (1385) 254MB -
  latest/edge: 88.0.4315.5 2020-11-06 (1386) 256MB -
installed: 88.0.4300.0 (1380) 256MB -

I'm on Ubuntu 20.04.1 and when I run it, I see the following errors:

$ LIBVA_MESSAGING_LEVEL=2 snap run chromium

...

libva info: VA-API version 1.9.0
libva info: Trying to open /snap/chromium/1380/usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so
libva info: va_openDriver() returns -1
libva info: Trying to open /snap/chromium/1380/usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so
libva info: va_openDriver() returns -1
[130715:130715:1106/111245.061240:ERROR:vaapi_wrapper.cc(549)] vaInitialize failed: unknown libva error

...

I don't really get why it's searching for the *_drv_video.so when the files there all of the *_dri.so kind:

$ ls /snap/chromium/1380/usr/lib/x86_64-linux-gnu/dri/
i915_dri.so kms_swrast_dri.so r200_dri.so radeon_dri.so virtio_gpu_dri.so
i965_dri.so nouveau_dri.so r300_dri.so radeonsi_dri.so vmwgfx_dri.so
iris_dri.so nouveau_vieux_dri.so r600_dri.so swrast_dri.so

I do have an Intel HD Graphics 620 and here is my vainfo:

$ vainfo
libva info: VA-API version 1.7.0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_7
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.7 (libva 2.6.0)
vainfo: Driver version: Intel iHD driver for Intel(R) Gen Graphics - 20.1.1 ()
vainfo: Supported profile and entrypoints
      VAProfileNone : VAEntrypointVideoProc
      VAProfileNone : VAEntrypointStats
      VAProfileMPEG2Simple : VAEntrypointVLD
      VAProfileMPEG2Simple : VAEntrypointEncSlice
      VAProfileMPEG2Main : VAEntrypointVLD
      VAProfileMPEG2Main : VAEntrypointEncSlice
      VAProfileH264Main : VAEntrypointVLD
      VAProfileH264Main : VAEntrypointEncSlice
      VAProfileH264Main : VAEntrypointFEI
      VAProfileH264Main : VAEntrypointEncSliceLP
      VAProfileH264High : VAEntrypointVLD
      VAProfileH264High : VAEntrypointEncSlice
      VAProfileH264High : VAEntrypointFEI
      VAProfileH264High : VAEntrypointEncSliceLP
      VAProfileVC1Simple : VAEntrypointVLD
      VAProfileVC1Main : VAEntrypointVLD
      VAProfileVC1Advanced : VAEntrypointVLD
      VAProfileJPEGBaseline : VAEntrypointVLD
      VAProfileJPEGBaseline ...

Read more...

Revision history for this message
Olivier Tilloy (osomon) wrote :

You're right Marc, the snap currently in the edge channel is missing pieces (specifically building and bundling recent versions of the drivers), I'm still working on merging my changes from the experimental VA-API support branch.

Revision history for this message
Matt Lee (matthewclee) wrote :

Hi Olivier,

Is this branch (and thread) dead? From your last comment, it sounds like the VA-API code is getting merged into a more mainline branch

Revision history for this message
Michel-Ekimia (michel.ekimia) wrote :

For once I'll make some noise :

It's been months , we are using chromium snap and Vaapi support is still not really there on the stable branch, what's wrong ?

Migrating to snap has been painful to some users and the point for canonical was to free some time to polish things , which I totally understand , but then , if we still lack behind mac and windows in terms of features like battery life , is this worth the hassle ?

Simple question : does canonical run automatic vaapi test ( amd , nvidia , intel ) on each snap release to be sure support is here ?

Revision history for this message
Marc Peña (pachulo) wrote :

Hi again Olivier,

Now that the 88.x version hit stable, can we expect to have this in place in the foreseeable future?

Thanks for your work on this!

Revision history for this message
Marc Peña (pachulo) wrote :

Hi Olivier. Sorry to insist, but it's been now 4 months since the last news on this and I think people would like to know if this is still on the roadmap, or if those who want video decoding acceleration should move to Chrome or PPAs.

Thanks again!

Revision history for this message
Michel-Ekimia (michel.ekimia) wrote :

Sorry to use this bug report as a forum but IMO it is useless to spend more time on chromium.

Ubuntu & users should define a Blink-based open source browser like Brave that could be supported nicely upstream unlike whats google is doing by removing sync API access with google services

Revision history for this message
Tim Richardson (tim-richardson) wrote :

Google has not removed API access. They have stopped a google key from
working.

It works fine, as far as I can tell. But you need to get your own key. The
well known PPA with VAAPI,
https://launchpad.net/~saiarcot895/+archive/ubuntu/chromium-dev, has always
worked like this.
I use Fedora on another machine, and with my own keys, Chromium works
exactly as before.

On Sat, 6 Mar 2021 at 03:00, Michel-Ekimia <email address hidden>
wrote:

> Sorry to use this bug report as a forum but IMO it is useless to spend
> more time on chromium.
>
> Ubuntu & users should define a Blink-based open source browser like
> Brave that could be supported nicely upstream unlike whats google is
> doing by removing sync API access with google services
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1816497
>
> Title:
> [snap] vaapi chromium no video hardware decoding
>
> To manage notifications about this bug go to:
>
> https://bugs.launchpad.net/ubuntu/+source/chromium-browser/+bug/1816497/+subscriptions
>

--
Tim Richardson

Revision history for this message
Olivier Tilloy (osomon) wrote :

I am testing this again (this is supposed to work OOTB now, at least on Intel GPUs), and I'm seeing the following:

    libva info: VA-API version 1.9.0
    libva info: User environment variable requested driver 'i965'
    libva info: Trying to open /snap/chromium/1568/gnome-platform/usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so
    libva info: va_openDriver() returns -1

even when I explicitly export LIBVA_DRIVERS_PATH=/snap/chromium/current/usr/lib/x86_64-linux-gnu/dri.

This is caused by the snapcraft gnome-3-28 extension unconditionally overriding LIBVA_DRIVERS_PATH here: https://github.com/snapcore/snapcraft/blob/master/extensions/desktop/common/desktop-exports#L92

Revision history for this message
Marc Peña (pachulo) wrote :

So what are the next steps then @osomon?
Thanks!

Revision history for this message
Marc Peña (pachulo) wrote :

Hi again @osomon, hope you are doing well. Are there any news regarding this? Should the extension be modified?

Thanks!

Revision history for this message
Marc Peña (pachulo) wrote :

Ping @osomon

Revision history for this message
Olivier Tilloy (osomon) wrote :

A small step in the right direction: bug #1947180, and a proposed fix https://github.com/snapcore/snapcraft/pull/3591

Revision history for this message
Olivier Tilloy (osomon) wrote :

After rebuilding the chromium snap with the above patch applied to snap/command-chain/desktop-launch, and running it with the following command line:

    LIBVA_DRIVER_NAME=iHD LIBVA_DRIVERS_PATH=/snap/chromium/x1/usr/lib/x86_64-linux-gnu/dri LIBVA_MESSAGING_LEVEL=2 snap run chromium --enable-features=VaapiVideoDecoder

I'm seeing "Video Decode: Hardware accelerated" in chrome://gpu, but FFmpegVideoDecoder is still being used for decoding H264 videos, and consequently the decoding is *not* hardware accelerated.

This is the relevant excerpt from chrome://media-internals:

info "Failed to initialize DecryptingVideoDecoder"
info "Failed to initialize Unknown Video Decoder"
info "Failed to initialize VpxVideoDecoder"
info "Failed to initialize Dav1dVideoDecoder"
kIsVideoDecryptingDemuxerStream false
kVideoDecoderName "FFmpegVideoDecoder"
kIsPlatformVideoDecoder false
info "Selected FFmpegVideoDecoder for video decoding, config: codec: h264, profile: h264 high, level: not available, alpha_mode: is_opaque, coded size: [1920,1080], visible rect: [0,0,1920,1080], natural size: [1920,1080], has extra data: false, encryption scheme: Unencrypted, rotation: 0°, flipped: 0, color space: {primaries:BT709, transfer:BT709, matrix:BT709, range:LIMITED}"

Revision history for this message
Marc Peña (pachulo) wrote :

Hi again! @Olivier, maybe I'm a bit lost, but don't we need "use_vaapi = true" in the GN arguments? https://chromium.googlesource.com/chromium/src/+/refs/heads/main/docs/gpu/vaapi.md#vaapi-on-linux

I don't see it set here: https://git.launchpad.net/~chromium-team/chromium-browser/+git/snap-from-source/tree/build/args.gn?h=stable

Or maybe is it set by default since 2020? https://chromium.googlesource.com/chromium/src.git/+/d658439002fc9bc6b4deeec71738600402ea9742

Sorry for the noise if that's the case!

Revision history for this message
Olivier Tilloy (osomon) wrote :

That's correct, use_vaapi is enabled by default on Linux x64 (see https://source.chromium.org/chromium/chromium/src/+/main:media/gpu/args.gni;l=32?q=%22use_vaapi%22).

Revision history for this message
Liz Fong-Jones (lizthegrey) wrote :

Some of us would like to have use_vaapi on Linux arm64 though :)

Revision history for this message
Nathan Teodosio (nteodosio) wrote :

I get the same result as Olivier: about://gpu says "Hardware accelerated", but about://media-internals says FFmpegVideoDecoder.

Complete report
---------------

*GPU:

  00:02.0 VGA compatible controller: Intel Corporation WhiskeyLake-U GT2 [UHD Graphics 620] (prog-if 00 [VGA controller])

*lsb_release:

  Distributor ID: Ubuntu
  Description: Ubuntu Kinetic Kudu (development branch)
  Release: 22.10
  Codename: kinetic

*vdainfo:

  libva info: VA-API version 1.14.0
  libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so
  libva info: Found init function __vaDriverInit_1_14
  libva info: va_openDriver() returns 0
  vainfo: VA-API version: 1.14 (libva 2.12.0)
  vainfo: Driver version: Intel iHD driver for Intel(R) Gen Graphics - 22.4.2 ()
  vainfo: Supported profile and entrypoints
        VAProfileMPEG2Simple : VAEntrypointVLD
        VAProfileMPEG2Main : VAEntrypointVLD
        VAProfileH264Main : VAEntrypointVLD
        VAProfileH264Main : VAEntrypointEncSliceLP
        VAProfileH264High : VAEntrypointVLD
        VAProfileH264High : VAEntrypointEncSliceLP
        VAProfileJPEGBaseline : VAEntrypointVLD
        VAProfileJPEGBaseline : VAEntrypointEncPicture
        VAProfileH264ConstrainedBaseline: VAEntrypointVLD
        VAProfileH264ConstrainedBaseline: VAEntrypointEncSliceLP
        VAProfileVP8Version0_3 : VAEntrypointVLD
        VAProfileHEVCMain : VAEntrypointVLD
        VAProfileHEVCMain10 : VAEntrypointVLD
        VAProfileVP9Profile0 : VAEntrypointVLD
        VAProfileVP9Profile2 : VAEntrypointVLD

*Codec: H264

*Command line:

  LIBVA_DRIVER_NAME=iHD LIBVA_DRIVERS_PATH=/snap/chromium/current/usr/lib/x86_64-linux-gnu/dri LIBVA_MESSAGING_LEVEL=2 snap run chromium --enable-features=VaapiVideoDecoder

*about://gpu

  Video Decode: Hardware accelerated

*about://media-internals

  00:00:00.286 info "Failed to initialize DecryptingVideoDecoder"
  00:00:00.286 info "Failed to initialize VaapiVideoDecoder"
  00:00:00.286 info "Failed to initialize VpxVideoDecoder"
  00:00:00.286 info "Failed to initialize Dav1dVideoDecoder"
  00:00:00.289 kIsVideoDecryptingDemuxerStream false
  00:00:00.289 kVideoDecoderName "FFmpegVideoDecoder"
  00:00:00.289 kIsPlatformVideoDecoder false
  00:00:00.289 info "Selected FFmpegVideoDecoder for video decoding, config: codec: h264, profile: h264 high, level: not available, alpha_mode: is_opaque, coded size: [1920,1080], visible rect: [0,0,1920,1080], natural size: [1920,1080], has extra data: false, encryption scheme: Unencrypted, rotation: 0°, flipped: 0, color space: {primaries:BT709, transfer:BT709, matrix:BT709, range:LIMITED}"

Revision history for this message
Nathan Teodosio (nteodosio) wrote :

Those following this bug will probably want to follow this also: <https://bugs.chromium.org/p/chromium/issues/detail?id=1236697>

Revision history for this message
li (minye) wrote :

I use this vaapi version: latest/candidate: 103.0.5060.53 2022-06-21 (2020) 139MB

LIBVA_MESSAGING_LEVEL=2 snap run chromium --enable-features=VaapiVideoDecoder

There is no any libva inform displayed. The

Video Decode: Hardware accelerated

but

Video Acceleration Information
Decoding nothing.

The same PC using chromium will have

Decoding
Decode h264 baseline 16x16 to 4096x4096 pixels
Decode h264 main 16x16 to 4096x4096 pixels
Decode h264 high 16x16 to 4096x4096 pixels
Decode vp8 16x16 to 4096x4096 pixels

I think the snap build has problem.

Revision history for this message
li (minye) wrote :

I tried the hwacc version. I think it is better than standard.

This is the snap version: (It is first time I see the libva log. other version I could not see any log from libVA.)

LIBVA_MESSAGING_LEVEL=2 snap run chromium --enable-features=VaapiVideoDecoder
Gtk-Message: 11:58:25.684: Failed to load module "canberra-gtk-module"
Gtk-Message: 11:58:25.685: Failed to load module "canberra-gtk-module"
libva info: VA-API version 1.7.0
libva info: User environment variable requested driver 'iHD'
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so
libva info: va_openDriver() returns -1
WARNING: Kernel has no file descriptor comparison support: Operation not permitted
[55025:55121:0626/115829.128097:ERROR:udev_watcher.cc(98)] Failed to begin udev enumeration.

My native chromium-browser running log:

 LIBVA_MESSAGING_LEVEL=2 chromium-browser --enable-features=VaapiVideoDecoder
Opening in existing browser session.
libva info: VA-API version 1.14.0
libva info: User environment variable requested driver 'i965'
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so
libva info: Found init function __vaDriverInit_1_6
libva info: va_openDriver() returns 0
MESA-INTEL: warning: Performance support disabled, consider sysctl dev.i915.perf_stream_paranoid=0

(I am confused why the native driver is choose i965).

My environment using vainfo
vainfo
libva info: VA-API version 1.14.0
libva info: User environment variable requested driver 'iHD'
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_7
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.14 (libva 2.14.0)
vainfo: Driver version: Intel iHD driver for Intel(R) Gen Graphics - 20.1.1 ()
vainfo: Supported profile and entrypoints
      VAProfileMPEG2Simple : VAEntrypointVLD
      VAProfileMPEG2Main : VAEntrypointVLD
      VAProfileH264Main : VAEntrypointVLD
      VAProfileH264Main : VAEntrypointEncSliceLP
      VAProfileH264High : VAEntrypointVLD
      VAProfileH264High : VAEntrypointEncSliceLP
      VAProfileJPEGBaseline : VAEntrypointVLD
      VAProfileJPEGBaseline : VAEntrypointEncPicture
      VAProfileH264ConstrainedBaseline: VAEntrypointVLD
      VAProfileH264ConstrainedBaseline: VAEntrypointEncSliceLP
      VAProfileVP8Version0_3 : VAEntrypointVLD
      VAProfileHEVCMain : VAEntrypointVLD

It still using iHD.

My PC is old: Thinkpad T-460P (nvida is main driver but without any video decoder, the intel driver is iHD.)

Revision history for this message
li (minye) wrote :

It seems libva and libva-dev has different version in 22.04.

Revision history for this message
li (minye) wrote :

I tried the latest hwacc version.

libva info: VA-API version 1.14.0
libva info: User environment variable requested driver 'i965'
libva info: Trying to open /usr/local/lib/dri/i965_drv_video.so
libva info: va_openDriver() returns -1
WARNING: Kernel has no file descriptor comparison support: Operation not permitted

I think the libva build configuration had to change. Set the proper path to /usr/ not default /usr/local. It seems the display driver library is not found.

I tried to run

LIBVA_DRIVER_NAME=i965 LIBVA_DRIVERS_PATH=/usr/lib/x86_64-linux-gnu/dri/ LIBVA_MESSAGING_LEVEL=2 chromium --enable-features=VaapiVideoDecoder

but the environmental path still does not take action.

Revision history for this message
Sebastien Bacher (seb128) wrote :

Try the snap from https://launchpad.net/~nteodosio/+snap/chromium-browser-hwacc/+build/1804711 I got VDAVideoDecoder working doing

$ LIBVA_DRIVERS_PATH=/snap/chromium/current/usr/lib/x86_64-linux-gnu/dri/ chromium --use-gl=egl --enable-features=VaapiVideoDecoder,VaapiVideoEncoder --disable-features=UseChromeOSDirectVideoDecoder --ignore-gpu-blocklist --disable-gpu-driver-bug-workaround video.mp4

The cpu usage is quite lower trying on a local video downloaded from https://github.com/chthomos/video-media-samples as an example

the LIBVA_DRIVERS_PATH override shouldn't be needed in the next build Nathan started.

Using vulkan isn't working and the UseChromeOSDirectVideoDecoder option is deprecated according to upstream, I commented about that on https://bugs.chromium.org/p/chromium/issues/detail?id=1236697 but meanwhile it seems to be working (tested on a gen10 intel CPU)

description: updated
Revision history for this message
li (minye) wrote :

I tried the latest build. But nothing changed.

LIBVA_MESSAGING_LEVEL=2 LIBVA_DRIVERS_PATH=/snap/chromium/current/usr/lib/x86_64-linux-gnu/dri/ chromium --use-gl=egl --enable-features=VaapiVideoDecoder,VaapiVideoEncoder --disable-features=UseChromeOSDirectVideoDecoder --ignore-gpu-blocklist --disable-gpu-driver-bug-workaround

Gtk-Message: 10:04:13.634: Failed to load module "canberra-gtk-module"
Gtk-Message: 10:04:13.635: Failed to load module "canberra-gtk-module"
libva info: VA-API version 1.14.0
libva info: User environment variable requested driver 'iHD'
libva info: Trying to open /usr/local/lib/dri/iHD_drv_video.so <<== The path is wrong
libva info: va_openDriver() returns -1
[170870:170870:0702/100413.724659:ERROR:gpu_init.cc(486)] Passthrough is not supported, GL is egl, ANGLE is
WARNING: Kernel has no file descriptor comparison support: Operation not permitted
[170755:170853:0702/100416.979626:ERROR:udev_watcher.cc(98)] Failed to begin udev enumeration.

Revision history for this message
li (minye) wrote :

I check the build script. Would you update the build script?

      #Build Libva
      VA_VERSION=2.14.0
      wget -O - https://github.com/intel/libva/archive/refs/tags/"$VA_VERSION".tar.gz | tar -x -z
      cd libva-"$VA_VERSION"
      ./autogen.sh --prefix=/usr <<== give the install path so driver will also search from here.
      make -j$SNAPCRAFT_PARALLEL_BUILD_COUNT install
      cd ../..

Current the driver load path is not proper

Revision history for this message
Sebastien Bacher (seb128) wrote :

@li, which snap are you trying exactly? using the newest build on https://launchpad.net/~nteodosio/+snap/chromium-browser-hwacc/ with the flag you are using gives me

libva info: Trying to open /snap/chromium/x3/usr/lib/x86_64-linux-gnu/dri//iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_14
libva info: va_openDriver() returns 0

Revision history for this message
li (minye) wrote :
Download full text (3.5 KiB)

I remember 2022/07/01 two builds I both used. The result is the same.

After I back home, I try to give you the exact information. (With 6 hours)

Lee

On Mon, Jul 4, 2022 at 4:01 PM Sebastien Bacher <email address hidden>
wrote:

> @li, which snap are you trying exactly? using the newest build on
> https://launchpad.net/~nteodosio/+snap/chromium-browser-hwacc/ with the
> flag you are using gives me
>
> libva info: Trying to open
> /snap/chromium/x3/usr/lib/x86_64-linux-gnu/dri//iHD_drv_video.so
> libva info: Found init function __vaDriverInit_1_14
> libva info: va_openDriver() returns 0
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1816497
>
> Title:
> [snap] vaapi chromium no video hardware decoding
>
> Status in chromium-browser package in Ubuntu:
> In Progress
>
> Bug description:
> NEWS:
>
> 1. Download the most recent successful build from
> https://launchpad.net/~nteodosio/+snap/chromium-browser-hwacc
>
> For this you must click the desired build link. In the page that
> loads, download the snap from the "Built files" section.
>
> 2. Install with
>
> sudo snap install --dangerous [downloaded-snap-path]
>
> 3. Open a video, e.g. one from https://github.com/chthomos/video-
> media-samples
>
> 4. Enter about:media-internals in the address bar and note what the
> page says for kVideoDecoderName.
>
> Please report
>
> - The video used for testing, including codec and resolution if possible;
> - The value for kVideoDecoderName from step 4 (success is typically
> {Vaapi,VDA,Mojo}VideoDecoder while failure is {FFMpeg, Vpx}VideoDecoder);
> - Distro version (if in doubt, `grep VERSION= /etc/os_release`);
> - CPU generation (if in doubt, append the output of `lscpu`).
>
> About the last point, it may be that unfortunately only those with
> newer generations of Intel CPUs will have luck with this, but it's
> still an uncertainty. So reports are highly welcome.
>
> ----------Original Bug report ---------
>
> Libva is no longer working for snap installed chromium 72.0.3626.109
> (Official Build) snap (64-bit)
>
> I followed this instruction
> sudo snap install --channel=candidate/vaapi chromium
>
> My amdgpu can use libva
>
> `vainfo: Driver version: Mesa Gallium driver 18.3.3 for AMD STONEY (DRM
> 3.27.0, 4.20.0-10.1-liquorix-amd64, LLVM 7.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 : VAEntrypo...

Read more...

Revision history for this message
Sebastien Bacher (seb128) wrote :

The most recent build isn't working and gives an error

[36417:36417:0704/105935.923779:ERROR:vaapi_video_decode_accelerator.cc(722)] Failed to initialize VppVaapiWrapper

copying iHD_drv_video.so from the previous build make it work again so it seems that building with ENABLE_NONFREE_KERNELS=OFF creates an issue

Revision history for this message
li (minye) wrote :

I never report this

libva info: Trying to open /snap/chromium/x3/usr/lib/x86_64-linux-gnu/dri//iHD_drv_video.so

I report

libva info: Trying to open /usr/local/lib/dri/iHD_drv_video.so <<== The path is wrong

The recent build
Successfully built on lcy02-amd64-065
Successfully built on lcy02-amd64-028

Are both the same error: Trying to open /usr/local/...

I am not sure it is the only problem on my machine, or it is the general error.

Revision history for this message
Sebastien Bacher (seb128) wrote :

my point was that for me the snap uses the right location, libva might be built with /usr/local but the environment section of the snap sets LIBVA_DRIVERS_PATH: $SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/dri/ which should override the default

description: updated
Revision history for this message
li (minye) wrote :

I tried latest build: Successfully built on lcy02-amd64-012

The problem is still there.

overrider the LIBVA_DRIVER_PATH,

LIBVA_MESSAGING_LEVEL=2 LIBVA_DRIVERS_PATH=/snap/chromium/current/usr/lib/x86_64-linux-gnu/dri/ chromium --use-gl=egl --enable-features=VaapiVideoDecoder,VaapiVideoEncoder --disable-features=UseChromeOSDirectVideoDecoder --ignore-gpu-blocklist --disable-gpu-driver-bug-workaround
Gtk-Message: 07:36:32.101: Failed to load module "canberra-gtk-module"
Gtk-Message: 07:36:32.104: Failed to load module "canberra-gtk-module"

libva info: VA-API version 1.14.0
libva info: User environment variable requested driver 'iHD'
libva info: Trying to open /usr/local/lib/dri/iHD_drv_video.so
libva info: va_openDriver() returns -1

Use default:

 LIBVA_MESSAGING_LEVEL=2 chromium --use-gl=egl --enable-features=VaapiVideoDecoder,VaapiVideoEncoder --disable-features=UseChromeOSDirectVideoDecoder --ignore-gpu-blocklist --disable-gpu-driver-bug-workaround
Gtk-Message: 07:37:17.966: Failed to load module "canberra-gtk-module"
Gtk-Message: 07:37:17.968: Failed to load module "canberra-gtk-module"
libva info: VA-API version 1.14.0
libva info: User environment variable requested driver 'iHD'
libva info: Trying to open /usr/local/lib/dri/iHD_drv_video.so
libva info: va_openDriver() returns -1

Revision history for this message
Sebastien Bacher (seb128) wrote :

The only reason that would make sense is that you not using the snap ... what's the output of
$ which chromium
?

Revision history for this message
li (minye) wrote :

Is this more clear

LIBVA_MESSAGING_LEVEL=2 LIBVA_DRIVERS_PATH=/snap/chromium/current/usr/lib/x86_64-linux-gnu/dri/ snap run chromium --use-gl=egl --enable-features=VaapiVideoDecoder,VaapiVideoEncoder --disable-features=UseChromeOSDirectVideoDecoder --ignore-gpu-blocklist --disable-gpu-driver-bug-workaround
Gtk-Message: 19:01:34.885: Failed to load module "canberra-gtk-module"
Gtk-Message: 19:01:34.887: Failed to load module "canberra-gtk-module"
libva info: VA-API version 1.14.0
libva info: User environment variable requested driver 'iHD'
libva info: Trying to open /usr/local/lib/dri/iHD_drv_video.so
libva info: va_openDriver() returns -1
[10486:10486:0705/190134.981309:ERROR:gpu_init.cc(486)] Passthrough is not supported, GL is egl, ANGLE is
WARNING: Kernel has no file descriptor comparison support: Operation not permitted
[10375:10468:0705/190138.251997:ERROR:udev_watcher.cc(98)] Failed to begin udev enumeration.

chromium version: Version 103.0.5060.53 (Official Build) snap (64-bit)

Revision history for this message
li (minye) wrote :

which chromium

/snap/bin/chromium

Revision history for this message
Sebastien Bacher (seb128) wrote :

could you attach the output of the 'env' command?

> libva info: User environment variable requested driver 'iHD'

suggests you have some libva related variable set for your user?

Revision history for this message
Nathan Teodosio (nteodosio) wrote :

Just to rule out aliases, can you also try "type -a chromium" or "command -v chromium"?

Revision history for this message
li (minye) wrote :

env: (attached browser-related setting)

LIBVA_DRIVER_NAME=iHD
XDG_CONFIG_DIRS=/etc/xdg/xdg-ubuntu:/etc/xdg
XDG_MENU_PREFIX=gnome-
GNOME_DESKTOP_SESSION_ID=this-is-deprecated
MOZ_X11_EGL=1

type -a chromium
chromium is /snap/bin/chromium

command -v chromium
/snap/bin/chromium

Revision history for this message
Sebastien Bacher (seb128) wrote :

Ok, I've no idea at this point why LIBVA_DRIVERS_PATH isn't working unless it's a browser setting or local user configuration.
Could you try if adding --user-data-dir=/tmp makes a difference?

Revision history for this message
Sebastien Bacher (seb128) wrote :

or rename ~/snap/chromium to try with a fresh profile and config

Revision history for this message
li (minye) wrote :

I clean install first: sudo snap remove --purge chromium

And then sudo snap install --dangerous ./chromium_103.0.5060.53_amd64.snap

Strange, core dump.

LIBVA_MESSAGING_LEVEL=2 LIBVA_DRIVERS_PATH=/snap/chromium/current/usr/lib/x86_64-linux-gnu/dri/ snap run chromium --use-gl=egl --enable-features=VaapiVideoDecoder,VaapiVideoEncoder --disable-features=UseChromeOSDirectVideoDecoder --ignore-gpu-blocklist --disable-gpu-driver-bug-workaround
sed: can't read /home/redux/.config/chromium/Default/Preferences: Permission denied
Failed to move to new namespace: PID namespaces supported, Network namespace supported, but failed: errno = Operation not permitted
Trace/breakpoint trap (core dumped)

LIBVA_MESSAGING_LEVEL=2 LIBVA_DRIVERS_PATH=/snap/chromium/current/usr/lib/x86_64-linux-gnu/dri/ snap run chromium --use-gl=egl --enable-features=VaapiVideoDecoder --user-data-dir=/tmp
Failed to move to new namespace: PID namespaces supported, Network namespace supported, but failed: errno = Operation not permitted
Trace/breakpoint trap (core dumped)

My native chrome version:
LIBVA_MESSAGING_LEVEL=2 chromium-browser
libva info: VA-API version 1.14.0
libva info: User environment variable requested driver 'i965'
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so
libva info: Found init function __vaDriverInit_1_6
libva info: va_openDriver() returns 0
MESA-INTEL: warning: Performance support disabled, consider sysctl dev.i915.perf_stream_paranoid=0

Revision history for this message
Sebastien Bacher (seb128) wrote (last edit ):

doing the clean install from a local snap isn't going to do the automatic connection, you need to install from the store first for that to be working

Revision history for this message
Nathan Teodosio (nteodosio) wrote :

Yes, sorry for that, the test case was incomplete in that regard.

I uploaded the snap so now we should no longer have that problem, and testing should become easier.

Also, I guess you have Nvidia GPU? If yes, the problem you were facing with vainfo was very likely caused by this guy:

https://github.com/ubuntu/snapcraft-desktop-helpers/blob/ec861254c2a1d2447b2c589446e6cdf04c75c260/common/desktop-exports#L89-L95

So that setting LIBVA_DRIVERS_PATH would have no effect, and thus it would look in the wrong path.

You may confirm this with "snap run --shell chromium", and then contrast "vainfo" with "LIBVA_DRIVERS_PATH=/snap/chromium/current/usr/lib/x86_64-linux-gnu/dri/ vainfo".

All in all, the good news is that it may not be true that our hardware don't support this.

I'm still to determine the best way around this. Stay tuned and thanks for your perseverance as a tester.

description: updated
description: updated
Revision history for this message
Marc Peña (pachulo) wrote (last edit ):

After refreshing the snap with:
sudo snap refresh --channel candidate/hwacc chromium

I've used the following command line to start chromium:
$ LIBVA_DRIVERS_PATH=/snap/chromium/current/usr/lib/x86_64-linux-gnu/dri/ chromium --use-gl=egl --enable-features=VaapiVideoDecoder,VaapiVideoEncoder --disable-features=UseChromeOSDirectVideoDecoder --ignore-gpu-blocklist --disable-gpu-driver-bug-workaround

I've tested this with success!

Here is the required info:
- Video used: big-buck-bunny-1080p-30sec.mp4
- kVideoDecoderName: "VDAVideoDecoder"
- Distro: Ubuntu 20.04
- GPU: HD Graphics 620
- CPU: Intel Core i7-7500U

I've also observed that the decoding of compatible videos is hardware accelerated using the intel_gpu_top utility.

Thanks a lot for this!

Revision history for this message
li (minye) wrote :
Download full text (6.4 KiB)

Thank you for going on the snap.

My T460p really has 2 video card: one is Nvidia another is intel. This is the reason I set iHD in the environment. My native chromium is able to work, I am not sure which kind of driver or configuration takes action.

Today I switch an old N3450 pure intel machine.

The native machine vainfo output. It seems everything is OK, my chrome/chromium both support video hardware decode.
###
libva info: VA-API version 1.14.0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_7
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.14 (libva 2.14.0)
vainfo: Driver version: Intel iHD driver for Intel(R) Gen Graphics - 20.1.1 ()
vainfo: Supported profile and entrypoints
      VAProfileMPEG2Simple : VAEntrypointVLD
      VAProfileMPEG2Main : VAEntrypointVLD
      VAProfileH264Main : VAEntrypointVLD
      VAProfileH264Main : VAEntrypointEncSliceLP
      VAProfileH264High : VAEntrypointVLD
      VAProfileH264High : VAEntrypointEncSliceLP
      VAProfileJPEGBaseline : VAEntrypointVLD
      VAProfileJPEGBaseline : VAEntrypointEncPicture
      VAProfileH264ConstrainedBaseline: VAEntrypointVLD
      VAProfileH264ConstrainedBaseline: VAEntrypointEncSliceLP
      VAProfileVP8Version0_3 : VAEntrypointVLD
      VAProfileHEVCMain : VAEntrypointVLD
      VAProfileHEVCMain10 : VAEntrypointVLD
      VAProfileVP9Profile0 : VAEntrypointVLD
###

Here I used the latest snap : Successfully built on lcy02-amd64-062

LIBVA_MESSAGING_LEVEL=2 LIBVA_DRIVERS_PATH=/snap/chromium/current/usr/lib/x86_64-linux-gnu/dri/ chromium --use-gl=egl --enable-features=VaapiVideoDecoder,VaapiVideoEncoder --disable-features=UseChromeOSDire

Result:
Gtk-Message: 09:52:13.084: Failed to load module "canberra-gtk-module"
Gtk-Message: 09:52:13.088: Failed to load module "canberra-gtk-module"
libva info: VA-API version 1.14.0
libva info: Trying to open /snap/chromium/x1/usr/lib/x86_64-linux-gnu/dri//iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_14
libva info: va_openDriver() returns 0
[20720:20720:0706/095213.442312:ERROR:gpu_init.cc(486)] Passthrough is not supported, GL is egl, ANGLE is
WARNING: Kernel has no file descriptor comparison support: Operation not permitted
[20591:20689:0706/095217.052042:ERROR:udev_watcher.cc(98)] Failed to begin udev enumeration.

In this log no problem. (Good to see)

But in about:gpu

Video Acceleration Information
Decoding
Encoding
Encode h264 baseline 321x241 to 4096x4096 pixels, and/or 30.000 fps
Encode h264 main 321x241 to 4096x4096 pixels, and/or 30.000 fps
Encode h264 high 321x241 to 4096x4096 pixels, and/or 30.000 fps
Encode vp8 321x241 to 4096x4096 pixels, and/or 30.000 fps

Only have encoding ability, without decoding. (I more care of decoding)

LIBVA_MESSAGING_LEVEL=2 LIBVA_DRIVERS_PATH=/snap/chromium/current/usr/lib/x86_64-linux-gnu/dri/ chromium --enable-features=VaapiVideoDecoder

The result:

chomium/current/usr/lib/x86_64-linux-gnu/dri/ chromium --enable-features...

Read more...

description: updated
Revision history for this message
li (minye) wrote :

>> Also, I guess you have Nvidia GPU?

Yes. My Thinkpad T460p has two video card, one is nvidia (not not helpful for video decoder/encoder), and another is the intel video card.

>> You may confirm this with "snap run --shell chromium", and then contrast "vainfo" with "LIBVA_DRIVERS_PATH=/snap/chromium/current/usr/lib/x86_64-linux-gnu/dri/ vainfo".

It is an interesting result:

snap run --shell chromium
To run a command as administrator (user "root"), use "sudo <command>".
See "man sudo_root" for details.

redux@redux:/home/redux/Downloads$ LIBVA_DRIVERS_PATH=/snap/chromium/current/usr/lib/x86_64-linux-gnu/dri/ vainfo
libva info: VA-API version 1.14.0
libva info: User environment variable requested driver 'iHD'
libva info: Trying to open /snap/chromium/current/usr/lib/x86_64-linux-gnu/dri//iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_14
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.14 (libva 2.6.0)
vainfo: Driver version: Intel iHD driver for Intel(R) Gen Graphics - 22.4.3 (dc9d9f7)
vainfo: Supported profile and entrypoints
      VAProfileNone : VAEntrypointVideoProc
      VAProfileNone : VAEntrypointStats
      VAProfileMPEG2Simple : VAEntrypointVLD
      VAProfileMPEG2Simple : VAEntrypointEncSlice
      VAProfileMPEG2Main : VAEntrypointVLD
      VAProfileMPEG2Main : VAEntrypointEncSlice
      VAProfileH264Main : VAEntrypointVLD
      VAProfileH264Main : VAEntrypointEncSlice
      VAProfileH264Main : VAEntrypointFEI
      VAProfileH264Main : VAEntrypointEncSliceLP
      VAProfileH264High : VAEntrypointVLD
      VAProfileH264High : VAEntrypointEncSlice
      VAProfileH264High : VAEntrypointFEI
      VAProfileH264High : VAEntrypointEncSliceLP
      VAProfileVC1Simple : VAEntrypointVLD
      VAProfileVC1Main : VAEntrypointVLD
      VAProfileVC1Advanced : VAEntrypointVLD
      VAProfileJPEGBaseline : VAEntrypointVLD
      VAProfileJPEGBaseline : VAEntrypointEncPicture
      VAProfileH264ConstrainedBaseline: VAEntrypointVLD
      VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice
      VAProfileH264ConstrainedBaseline: VAEntrypointFEI
      VAProfileH264ConstrainedBaseline: VAEntrypointEncSliceLP
      VAProfileVP8Version0_3 : VAEntrypointVLD
      VAProfileHEVCMain : VAEntrypointVLD
      VAProfileHEVCMain : VAEntrypointEncSlice
      VAProfileHEVCMain : VAEntrypointFEI

Strang, it finds the proper driver, so the following line impact this in the run time.

https://github.com/ubuntu/snapcraft-desktop-helpers/blob/ec861254c2a1d2447b2c589446e6cdf04c75c260/common/desktop-exports#L89-L95

My native working environment :

vainfo: VA-API version: 1.14 (libva 2.14.0), but snap

vainfo: VA-API version: 1.14 (libva 2.6.0)

Is there a way to solve this?

Revision history for this message
li (minye) wrote :

In post #110, I suggest to setup libva default install path, so the new libva 2.14 version could completely overriding the system libva 2.6, which may decrease the uncertainty problem.

Revision history for this message
li (minye) wrote :

The latest: https://launchpad.net/~nteodosio/+snap/chromium-browser-hwacc/+build/1814664

From the code, there is only video log parts change, so the result won't change.

I run on my T460p, the result is the same.

How could I let the video log display? I am sure the

T460P and N3450 machine, the video decode type is the ffmpegXXXX.

Revision history for this message
Nathan Teodosio (nteodosio) wrote :

Hey Li, yes, the latest build is only for logging, which can be enabled by passing --enable-logging=stderr.

Please bear in mind that that build area is mostly a testing ground; not all new builds therein will be relevant, neither will they always be in a clean, refined state. Of course, feel free to test whichever you like, but rest assured that relevant ones will be uploaded to the candidate/hwacc channel as in the bug description.

Revision history for this message
Marc Peña (pachulo) wrote (last edit ):

I've tested this again with the updated instructions:
$ sudo snap refresh --channel candidate/hwacc chromium
$ snap run chromium --disable-features=UseChromeOSDirectVideoDecoder --enable-features=VaapiVideoDecoder

And it also worked OK.

The only thing is that I'm seeing the following warnings and error in the console:

Warning: /usr/lib/x86_64-linux-gnu/libvulkan_intel.so: cannot open shared object file: No such file or directory
Warning: loader_icd_scan: Failed loading library associated with ICD JSON /usr/lib/x86_64-linux-gnu/libvulkan_intel.so.Ignoring this JSON
Warning: /usr/lib/x86_64-linux-gnu/libvulkan_lvp.so: cannot open shared object file: No such file or directory
Warning: loader_icd_scan: Failed loading library associated with ICD JSON /usr/lib/x86_64-linux-gnu/libvulkan_lvp.so.Ignoring this JSON
Warning: /usr/lib/x86_64-linux-gnu/libvulkan_radeon.so: cannot open shared object file: No such file or directory
Warning: loader_icd_scan: Failed loading library associated with ICD JSON /usr/lib/x86_64-linux-gnu/libvulkan_radeon.so.Ignoring this JSON
Warning: vkCreateInstance: Found no drivers!
Error: vkCreateInstance failed with VK_ERROR_INCOMPATIBLE_DRIVER
    at CheckVkSuccessImpl (../../third_party/dawn/src/dawn/native/vulkan/VulkanError.cpp:88)
    at CreateVkInstance (../../third_party/dawn/src/dawn/native/vulkan/BackendVk.cpp:387)
    at Initialize (../../third_party/dawn/src/dawn/native/vulkan/BackendVk.cpp:263)
    at Create (../../third_party/dawn/src/dawn/native/vulkan/BackendVk.cpp:193)
    at operator() (../../third_party/dawn/src/dawn/native/vulkan/BackendVk.cpp:462)

And 2.6.0 as the libva version, that Li also reported, when running this:
$ snap run --shell chromium
$ vainfo
libva info: VA-API version 1.14.0
libva info: Trying to open /snap/chromium/2026/usr/lib/x86_64-linux-gnu/dri//iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_14
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.14 (libva 2.6.0)
vainfo: Driver version: Intel iHD driver for Intel(R) Gen Graphics - 22.4.3 (606ffe3)
...

Here is the required info again:
- Video used: big-buck-bunny-1080p-30sec.mp4
- kVideoDecoderName: "VDAVideoDecoder"
- Distro: Ubuntu 20.04
- GPU: HD Graphics 620
- CPU: Intel Core i7-7500U

Thanks!

Revision history for this message
Mateusz Stachowski (stachowski-mateusz) wrote :

I've tested this today and the acceleration works.

- kVideoDecoderName: "VDAVideoDecoder"
- Distro: Ubuntu 22.04
- GPU: AMD Radeon RX 5600 XT
- CPU: AMD Ryzen 5 3600

Also about the libva

native: vainfo: VA-API version: 1.14 (libva 2.12.0) [installed libva packages are at version 2.14]
snap: vainfo: VA-API version: 1.14 (libva 2.6.0)

Revision history for this message
li (minye) wrote :

The libva library is the same as me.

>>snap: vainfo: VA-API version: 1.14 (libva 2.6.0)

The old libva impacted my hardware configeration. It is not correct in fact.

I expect the depended libva could be solved so my hardware could use this snap packages.

expected: snap: vainfo: VA-API version: 1.14 (libva 2.14.0)

Thanks.

Revision history for this message
Sebastien Bacher (seb128) wrote :

@li, how do you get libva 2.6? that's different from what you posted in #129, what did you change?

Revision history for this message
li (minye) wrote :

The libva 2.6 is not the my native ubunut. As many users reported: Post #135, #134, #130, the libva 2.6 is comes from snap package. It is default apt install libva version. In the snap build, there is libva source build for latest 2.14, but the path is not overridden the default install path. This is what I understand that there are two libva in the snap: one is default libva 2.6, anther is libva 2.14 build from path.

In post #131, #110 I point this. I guess it is the root problem caused my hardware configure has not been supported by current snap package.

Revision history for this message
li (minye) wrote :

Try https://launchpad.net/~nteodosio/+snap/chromium-browser-hwacc/+build/1819056

The libva seems not working.

run: LIBVA_MESSAGING_LEVEL=2 snap run chromium --enable-features=VaapiVideoDecoder
log:

Gtk-Message: 07:27:15.926: Failed to load module "canberra-gtk-module"
Gtk-Message: 07:27:15.928: Failed to load module "canberra-gtk-module"
WARNING: Kernel has no file descriptor comparison support: Operation not permitted
[26304:26523:0713/072719.712410:ERROR:udev_watcher.cc(98)] Failed to begin udev enumeration.
Warning: /usr/lib/x86_64-linux-gnu/libvulkan_intel.so: cannot open shared object file: No such file or directory
Warning: loader_icd_scan: Failed loading library associated with ICD JSON /usr/lib/x86_64-linux-gnu/libvulkan_intel.so.Ignoring this JSON
Warning: /usr/lib/x86_64-linux-gnu/libvulkan_lvp.so: cannot open shared object file: No such file or directory
Warning: loader_icd_scan: Failed loading library associated with ICD JSON /usr/lib/x86_64-linux-gnu/libvulkan_lvp.so.Ignoring this JSON
Warning: /usr/lib/x86_64-linux-gnu/libvulkan_radeon.so: cannot open shared object file: No such file or directory
Warning: loader_icd_scan: Failed loading library associated with ICD JSON /usr/lib/x86_64-linux-gnu/libvulkan_radeon.so.Ignoring this JSON
Warning: vkCreateInstance: Found no drivers!
Error: vkCreateInstance failed with VK_ERROR_INCOMPATIBLE_DRIVER
    at CheckVkSuccessImpl (../../third_party/dawn/src/dawn/native/vulkan/VulkanError.cpp:88)
    at CreateVkInstance (../../third_party/dawn/src/dawn/native/vulkan/BackendVk.cpp:387)
    at Initialize (../../third_party/dawn/src/dawn/native/vulkan/BackendVk.cpp:263)
    at Create (../../third_party/dawn/src/dawn/native/vulkan/BackendVk.cpp:193)
    at operator() (../../third_party/dawn/src/dawn/native/vulkan/BackendVk.cpp:462)

There is no any libva log output

run: snap run --shell chromium
run: LIBVA_DRIVERS_PATH=/snap/chromium/current/usr/lib/x86_64-linux-gnu/dri/ vainfo

vainfo: error while loading shared libraries: libva-x11.so.2: cannot open shared object file: No such file or directory

From the source, it seems libva-dev is removed in default apt install.

Revision history for this message
li (minye) wrote :

I still think the libva source build and install is not use the proper default path, so the related app is unable to find driver from /usr/local/xxxx, these apps only use /usr/xxxx lib search path.

Revision history for this message
Nathan Teodosio (nteodosio) wrote :

> This is what I understand that there are two libva in the snap: one is default libva 2.6, anther is libva 2.14 build from path.

To me it is a riddle to me why libva 2.6 keeps showing up; libva2=2.7.0-2 is being unstaged, that is clear. I wonder if the dependencies being of older versions (the build log mentions libva-dev=2.7.0-2 libva-drm2=2.7.0-2 libva-glx2=2.7.0-2 libva-wayland2=2.7.0-2 libva-x11-2=2.7.0-2) is causing this. The next step I should take is to build them from source, newer versions too.

> From the source, it seems libva-dev is removed in default apt install.

Yes, this was a test reverted already.

> I still think the libva source build and install is not use the proper default path, so the related app is unable to find driver from /usr/local/xxxx, these apps only use /usr/xxxx lib search path.

It shouldn't matter where the libva is built, only where it is installed, which is usr/lib/$ARCH_TRIPLET/. But if you want, you can attach a diff, and I will perform a build for you in a temporary branch.

Revision history for this message
li (minye) wrote :

>>It shouldn't matter where the libva is built, only where it is
installed, which is usr/lib/$ARCH_TRIPLET/.

What you said is correct. (I did not make a clear expression.)

In post #110

      ./autogen.sh --prefix=/usr <<== give the install path so driver will search from this path.

I build libva in my notebook. if not using --prefix=/usr will cause other library loading problem.

Use this prefix will solve uncertainty.

It is just keep the same as apt install libva-dev.

Revision history for this message
Sebastien Bacher (seb128) wrote :

> Use this prefix will solve uncertainty.

But it doesn't really make sense in context of the snap since the library and drivers aren't installed under /usr but under /snaps/chromium/current/usr, would that be a better prefix choice?

Revision history for this message
li (minye) wrote :

I make the same test as #139

libva is back for normal usage

LIBVA_MESSAGING_LEVEL=2 snap run chromium --enable-features=VaapiVideoDecoder
Gtk-Message: 07:25:45.539: Failed to load module "canberra-gtk-module"
Gtk-Message: 07:25:45.542: Failed to load module "canberra-gtk-module"
libva info: VA-API version 1.14.0
libva info: User environment variable requested driver 'iHD'
libva info: Trying to open /usr/local/lib/dri/iHD_drv_video.so
libva info: va_openDriver() returns -1
WARNING: Kernel has no file descriptor comparison support: Operation not permitted
[19720:19941:0714/072549.476876:ERROR:udev_watcher.cc(98)] Failed to begin udev enumeration.

whatever I override LIBVA_DRIVERS_PATH, the result is not changed. It is because my NVIDA card.

snap run --shell chromium

LIBVA_DRIVERS_PATH=/snap/chromium/current/usr/lib/x86_64-linux-gnu/dri/ vainfo
libva info: VA-API version 1.14.0
libva info: User environment variable requested driver 'iHD'
libva info: Trying to open /snap/chromium/current/usr/lib/x86_64-linux-gnu/dri//iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_14
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.14 (libva 2.6.0)
vainfo: Driver version: Intel iHD driver for Intel(R) Gen Graphics - 22.4.3 (bbbf2cd)
vainfo: Supported profile and entrypoints
      VAProfileNone : VAEntrypointVideoProc
      VAProfileNone : VAEntrypointStats
      VAProfileMPEG2Simple : VAEntrypointVLD
      VAProfileMPEG2Simple : VAEntrypointEncSlice
      VAProfileMPEG2Main : VAEntrypointVLD
      VAProfileMPEG2Main : VAEntrypointEncSlice
      VAProfileH264Main : VAEntrypointVLD
      VAProfileH264Main : VAEntrypointEncSlice
      VAProfileH264Main : VAEntrypointFEI
      VAProfileH264Main : VAEntrypointEncSliceLP
      VAProfileH264High : VAEntrypointVLD
      VAProfileH264High : VAEntrypointEncSlice
      VAProfileH264High : VAEntrypointFEI
      VAProfileH264High : VAEntrypointEncSliceLP
      VAProfileVC1Simple : VAEntrypointVLD
      VAProfileVC1Main : VAEntrypointVLD
      VAProfileVC1Advanced : VAEntrypointVLD
      VAProfileJPEGBaseline : VAEntrypointVLD
      VAProfileJPEGBaseline : VAEntrypointEncPicture
      VAProfileH264ConstrainedBaseline: VAEntrypointVLD
      VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice
      VAProfileH264ConstrainedBaseline: VAEntrypointFEI
      VAProfileH264ConstrainedBaseline: VAEntrypointEncSliceLP
      VAProfileVP8Version0_3 : VAEntrypointVLD
      VAProfileHEVCMain : VAEntrypointVLD
      VAProfileHEVCMain : VAEntrypointEncSlice
      VAProfileHEVCMain : VAEntrypointFEI

The libva is still using old libva 2.6 driver. (It is not expected result)

Revision history for this message
li (minye) wrote :

snap run --shell chromium

LIBVA_DRIVERS_PATH=/snap/chromium/current/usr/local/lib/x86_64-linux-gnu/dri vainfo
libva info: VA-API version 1.14.0
libva info: User environment variable requested driver 'iHD'
libva info: Trying to open /snap/chromium/current/usr/local/lib/x86_64-linux-gnu/dri/iHD_drv_video.so
libva info: va_openDriver() returns -1
vaInitialize failed with error code -1 (unknown libva error),exit

Where is 2.14 libva driver path?

Revision history for this message
Nathan Teodosio (nteodosio) wrote (last edit ):

Li, Vainfo depends on Libva. Since Focal repositories are used, Vainfo gets Libva 2.6, which Vainfo reports. See https://github.com/intel/libva-utils/blob/1c4f53bc72e36385d301ac0aecfbf40d748e4483/vainfo/vainfo.c#L37-L38 and https://github.com/intel/libva-utils/blob/1c4f53bc72e36385d301ac0aecfbf40d748e4483/configure.ac#L152.

What ends up in Chromium is nonetheless Libva 2.14, which is built directly from upstream sources. The older Libva is unstaged, the snap would refuse to build otherwise (e.g. https://launchpadlibrarian.net/612926171/buildlog_snap_ubuntu_focal_amd64_chromium-browser-hwacc_BUILDING.txt.gz); don't worry about that.

About your last report #145, you have accidentally introduced /local in the environment variable, the correct path (as in #144) is /snap/chromium/current/usr/lib/x86_64-linux-gnu/dri.

Revision history for this message
li (minye) wrote :

Thank you for your clear response. It means chromium is bind the old libva 2.6. It is a little strange.

Current both my two machines are unable to work with the good snap package. But the native chromium version could. It is a little sad.

Revision history for this message
Sebastien Bacher (seb128) wrote :

> It means chromium is bind the old libva 2.6. It is a little strange.

Not really. It's just that the vainfo bundled in the snap is from the focal deb which is 2.6 and what it reports as 'libva version' is just its own version. If you wget the vainfo from impish in the snap it will tell libva 2.10.

We should remove vainfo from the snap, it's just confusing. The libva version now is correct and chromium is correctly loading 2.14 despite what vainfo is reporting

> Current both my two machines are unable to work with the good snap package. But the native chromium version could.

Could you give details on that. Is Chromium failing to use VDA for you even use --disable-features=UseChromeOSDirectVideoDecoder (which you didn't it seems in your previous comments?). If so could you copy the output of the command and maybe the log from --enable-logging=stderr ?

Revision history for this message
li (minye) wrote :

I tried this https://launchpad.net/~nteodosio/+snap/chromium-browser-hwacc/+build/1821034

Good snap package, my old N3450 works.

##
Gtk-Message: 17:56:38.503: Failed to load module "canberra-gtk-module"
Gtk-Message: 17:56:38.507: Failed to load module "canberra-gtk-module"
[16395:16490:0715/175638.574596:ERROR:object_proxy.cc(623)] Failed to call method: org.freedesktop.DBus.ListActivatableNames: object_path= /org/freedesktop/DBus: org.freedesktop.DBus.Error.AccessDenied: An AppArmor policy prevents this sender from sending this message to this recipient; type="method_call", sender=":1.188" (uid=1000 pid=16395 comm="/snap/chromium/x1/usr/lib/chromium-browser/chrome " label="snap.chromium.chromium (enforce)") interface="org.freedesktop.DBus" member="ListActivatableNames" error name="(unset)" requested_reply="0" destination="org.freedesktop.DBus" (bus)
[16395:16395:0715/175638.601987:WARNING:account_consistency_mode_manager.cc(70)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured.
libva info: VA-API version 1.14.0
libva info: Trying to open /snap/chromium/x1/usr/lib/x86_64-linux-gnu/dri//iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_14
libva info: va_openDriver() returns 0
[16503:16503:0715/175638.861107:WARNING:sandbox_linux.cc(376)] InitializeSandbox() called with multiple threads in process gpu-process.
WARNING: Kernel has no file descriptor comparison support: Operation not permitted
[16395:16395:0715/175639.046619:WARNING:bluez_dbus_manager.cc(247)] Floss manager not present, cannot set Floss enable/disable.
[16503:16503:0715/175639.744267:WARNING:angle_platform_impl.cc(48)] MemoryProgramCache.cpp:174 (getProgram): Failed to load binary from cache.
[16503:16503:0715/175639.748909:WARNING:angle_platform_impl.cc(48)] MemoryProgramCache.cpp:174 (getProgram): Failed to load binary from cache.
[16395:16484:0715/175642.349375:ERROR:udev_watcher.cc(98)] Failed to begin udev enumeration.
^C[16395:16395:0715/175649.380723:INFO:render_frame_host_impl.cc(11505)] RenderFrameHostImpl::MaybeGenerateCrashReport url = , status = 4, exit_code = 0
[16395:16395:0715/175649.541305:WARNING:pref_notifier_impl.cc(41)] Pref observer for media_router.cast_allow_all_ips found at shutdown.
###

My T460P because of Nvida CPU, does not work, the same as before.

Thank you for help. I at least do not need take time on the old PC. Install and works, that is what I wanted.

Revision history for this message
li (minye) wrote :

Is it possible to add chromium-wayland-vaapi driver in the snap. Check whether wayland mode works.

Revision history for this message
Marc Peña (pachulo) wrote :

@seb128 & @nteodosio: is there any more tests to do?
Is there any ETA for this to be released to the latest/* channels?

Thanks!

Revision history for this message
Nathan Teodosio (nteodosio) wrote :

The Nvidia/Intel issue mentioned in #127 has been addressed in Snapcraft 7.1.1 <https://github.com/snapcore/snapcraft/releases/tag/7.1.1>, which is already available in the 7.x/candidate channel.

Now I will be working on the merge of the hwacc into latest/{beta,edge}.

description: updated
Revision history for this message
Sergio Schvezov (sergiusens) wrote :

Snapcraft 7.1.1 is now on the stable channel

description: updated
Revision history for this message
li (minye) wrote :

My t460p, Nvida, Intel GPU. Insalled with

   sudo snap install --channel candidate/hwacc chromium

  LIBVA_MESSAGING_LEVEL=2 chromium --disable-features=UseChromeOSDirectVideoDecoder
  --enable-features=VaapiVideoDecoder

```
Gtk-Message: 19:02:47.866: Failed to load module "canberra-gtk-module"
Gtk-Message: 19:02:47.868: Failed to load module "canberra-gtk-module"
WARNING: Kernel has no file descriptor comparison support: Operation not permitted
[21291:21389:0805/190251.215417:ERROR:udev_watcher.cc(98)] Failed to begin udev enumeration.
Warning: vkCreateInstance: Found no drivers!
Error: vkCreateInstance failed with VK_ERROR_INCOMPATIBLE_DRIVER
    at CheckVkSuccessImpl (../../third_party/dawn/src/dawn/native/vulkan/VulkanError.cpp:88)
    at CreateVkInstance (../../third_party/dawn/src/dawn/native/vulkan/BackendVk.cpp:383)
    at Initialize (../../third_party/dawn/src/dawn/native/vulkan/BackendVk.cpp:269)
    at Create (../../third_party/dawn/src/dawn/native/vulkan/BackendVk.cpp:199)
    at operator() (../../third_party/dawn/src/dawn/native/vulkan/BackendVk.cpp:458)

```

There is no libva loading information. There is no video decoder. The version is not work in my hardware.

Revision history for this message
Nathan Teodosio (nteodosio) wrote :

If you updated Snapcraft as indicated, at least the LIBVA path should be right, so could you please `snap run --shell chromium` and tell us the output of `env | grep LIBVA` and `vainfo`?

And thank you for your perseverance testing this.

Changed in chromium-browser (Ubuntu):
assignee: Olivier Tilloy (osomon) → Nathan Teodosio (nteodosio)
Revision history for this message
li (minye) wrote :

##
snap info chromium
name: chromium
summary: Chromium web browser, open-source version of Chrome
publisher: Canonical✓
store-url: https://snapcraft.io/chromium
contact: https://bugs.launchpad.net/ubuntu/+source/chromium-browser/+bugs?field.tag=snap
license: unset
description: |
  An open-source browser project that aims to build a safer, faster, and more
  stable way for all Internet users to experience the web.
commands:
  - chromium.chromedriver
  - chromium
snap-id: XKEcBqPM06H1Z7zGOdG5fbICuf8NWK5R
tracking: latest/candidate/hwacc
refresh-date: today at 18:55 CST
channels:
  latest/stable: 104.0.5112.79 2022-08-03 (2051) 148MB -
  latest/candidate: 104.0.5112.79 2022-08-03 (2051) 148MB -
  latest/beta: 104.0.5112.79 2022-08-02 (2051) 148MB -
  latest/edge: 105.0.5195.19 2022-08-04 (2052) 148MB -

###

snap run --shell chromium

env | grep LIBVA
LIBVA_DRIVER_NAME=iHD

vainfo
bash: vainfo: command not found <<== ???

Revision history for this message
Nathan Teodosio (nteodosio) wrote :

My apologies, Li, I didn't realize that Snapcraft 7.1.1 had to reach the builder, not the installer machine; as such, your test still suffered the lack of LIBVA_DRIVERS_PATH.

I uploaded a rebuilt snap (from hwacc-debug, with vainfo) to candidate/hwacc and made sure that the snapcraft changes made their way in. May you please install — or refresh — it and try it again?

Revision history for this message
li (minye) wrote :

Wao, perfecter build.

It is the first time my Nvidia/intel CPU, get a snap chromium support video decoder.

I need not manually maintain my native chromium environment.

Thanks for your hardwarking.

Revision history for this message
li (minye) wrote (last edit ):

https://bugs.launchpad.net/ubuntu/+source/chromium-browser/+bug/1897454

 chrome://flags/#ozone-platform-hint , not work.

[30855:30855:0806/092525.830999:ERROR:wayland_connection.cc(210)] Failed to connect to Wayland display
[30855:30855:0806/092525.831041:ERROR:ozone_platform_wayland.cc(226)] Failed to initialize Wayland platform
[30855:30855:0806/092525.831051:ERROR:env.cc(226)] The platform failed to initialize. Exiting.

Revision history for this message
Nathan Teodosio (nteodosio) wrote :

So it works in Xorg (great to hear!) but not in Wayland for you?

It seems that you need one additional flag in Wayland, --ozone-platform=wayland. I.e., can you please try

    chromium --enable-features=VaapiVideoDecoder --disable-features=UseChromeOSDirectVideoDecoder --ozone-platform=wayland

description: updated
Revision history for this message
li (minye) wrote :

sure, I already enable wayland.

chromium --enable-features=VaapiVideoDecoder --disable-features=UseChromeOSDirectVideoDecoder --ozone-platform=wayland
[14225:14225:0807/073546.382350:ERROR:wayland_connection.cc(210)] Failed to connect to Wayland display
[14225:14225:0807/073546.382387:ERROR:ozone_platform_wayland.cc(226)] Failed to initialize Wayland platform
[14225:14225:0807/073546.382398:ERROR:env.cc(226)] The platform failed to initialize. Exiting.

Revision history for this message
li (minye) wrote :

I remember in previouse snap it is working, but withtout vaapivideodecoder working. It is another problem, but the wayland is sure working.

Revision history for this message
li (minye) wrote :

does wayland mode conflict with vaapivdideodecoder feature ?

I know in the 22.04 version the default GUI mode is Wayland.

Revision history for this message
Nathan Teodosio (nteodosio) wrote :

Wait,

> chrome://flags/#ozone-platform-hint , not work.

1. What does "not work" mean here? Does Chromium not even launch, or does it start but not hardware accelerated? If the former, does dropping the flags (--enable-features=VaapiVideoDecoder etc.) makes it launch?

> I remember in previouse snap it is working, but withtout vaapivideodecoder working. It is another problem, ...

2. So, in previous versions of the snap, Chromium would launch, but without hardware acceleration, correct me if I understand wrong.

> ... but the wayland is sure working.

3. You mean that snap is supposed to work under Wayland, not that Wayland itself works, right?

4. I'm also interested in your `snap run --shell chromium`, `vainfo` output under Wayland.

> does wayland mode conflict with vaapivdideodecoder feature ?

I, for one, could get hardware acceleration in Chromium under Wayland working with `chromium --enable-features=VaapiVideoDecoder --disable-features=UseChromeOSDirectVideoDecoder --ozone-platform=wayland`.

description: updated
Revision history for this message
Nathan Teodosio (nteodosio) wrote :

I get the exact error you report on #161 if I try the Wayland command (chromium --enable-features=VaapiVideoDecoder --disable-features=UseChromeOSDirectVideoDecoder --ozone-platform=wayland) under Xorg. Please double check you are not under Xorg when trying the Wayland command.

Revision history for this message
li (minye) wrote :

I already setup WAYLAND_DISPLAY=wayland-99. I setup a wayland display.

I confirmed the native chromium-browser did work with --enable-features=VaapiVideoDecoder --disable-features=UseChromeOSDirectVideoDecoder --ozone-platform=wayland. The WAYLAND_DISPLAY will displayed chromium browser.

The only problem is using snap chromium. So I made a report this time.

Revision history for this message
Nathan Teodosio (nteodosio) wrote :

> I already setup WAYLAND_DISPLAY=wayland-99. I setup a wayland display.

Hmm, I'm not sure if this is clear: The variable WAYLAND_DISPLAY is set as a consequence of a Wayland session being started. One should not manually set WAYLAND_DISPLAY; that does not start Wayland.

> The WAYLAND_DISPLAY will displayed chromium browser.

I don't understand what this means.

Also it would be nice if you could address the points in #164, as your situation is still unclear to me.

Revision history for this message
li (minye) wrote :

Sorry I did not make clear describe the problem. (I thought the previous version is working, so the current is a small problem.)

I am using ubuntu-frame to make Wayland test: https://github.com/MirServer/ubuntu-frame

If the ubnutu-frame is started, the Wayland display is ready. So I just used native chromium and snap version chromium to confirm the display result.

Revision history for this message
Nathan Teodosio (nteodosio) wrote :

It would be nice if you could run your test on normal Ubuntu Wayland, as it could be a bug in Ubuntu Frame.
Especially given https://github.com/MirServer/ubuntu-frame/issues/75, it would be reasonable to disregard your failure report.

Revision history for this message
li (minye) wrote :

The native chromium works. So I did not think it is a ubuntu-frame bug.

I test the previous snap chromium version before, and it also works.

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

This appears to be a duplicate of bug 1424201. Can we close this bug?

Changed in chromium-browser (Ubuntu):
status: In Progress → Incomplete
Revision history for this message
Nathan Teodosio (nteodosio) wrote :

It is, but since that bug targets both Chromium and Firefox, I believe it would be significantly harder to keep track of context of each piece of feedback (unfortunately we don't have threading here), judging by the interactions we have had in this one, both for developers and users.

Also, I consider the bug description with the test case key for quickly identifying testing instructions.

Revision history for this message
Nathan Teodosio (nteodosio) wrote :

A user reported VDAVideoDecoder in testing this under Wayland, but if he tries to play a Youtube video on fullscreen on 3 4K displays, it stops playing after ~10 s; Unmaximizing it resumes it.

Changed in chromium-browser (Ubuntu):
status: Incomplete → In Progress
Revision history for this message
Nathan Teodosio (nteodosio) wrote :

The snap in the hwacc channel has been updated. Now it automatically detects Wayland or Xorg and sets flags accordingly.

description: updated
Revision history for this message
li (minye) wrote :
Download full text (6.6 KiB)

My T460P (nvida + intel GPU): snap X11 works. video decoder with
hardware acceleration.

ubuntu frame with WayLand test: proper display.

Only problem is no video hardware decode. (I think it is not the snap
problem, the native version is also not support.)

It is nearly a perfect build.

Hope the wayland hardware acceleration will work in near future.

Lee

On Thu, Aug 18, 2022 at 1:44 AM Nathan Teodosio <email address hidden>
wrote:

> The snap in the hwacc channel has been updated. Now it automatically
> detects Wayland or Xorg and sets flags accordingly.
>
> ** Description changed:
>
> To test the snap with VA-API changes,
>
> 1. Install the Chromium snap,
>
> sudo snap install --channel candidate/hwacc chromium
>
> - 2. If on Xorg (`echo $WAYLAND_DISPLAY` is empty),
> + 2. Start Chromium,
>
> - snap run chromium --disable-features=UseChromeOSDirectVideoDecoder
> - --enable-features=VaapiVideoDecoder
> -
> - If on Wayland (`echo $WAYLAND_DISPLAY` is not empty),
> -
> - chromium --enable-features=VaapiVideoDecoder --disable-
> - features=UseChromeOSDirectVideoDecoder --ozone-platform=wayland
> + snap run chromium
>
> 3. Open a video, e.g. one from https://github.com/chthomos/video-media-
> samples
>
> - 4. Enter about:media-internals in the address bar and note what the page
> - says for kVideoDecoderName.
> + 4. Enter about:media-internals in the address bar, click the
> + corresponding box (if the video is playing, it will have the "(kPlay)"
> + identifier) and note what the page says for kVideoDecoderName.
>
> Please report
>
> - - The value for kVideoDecoderName from step 4. Success is typically
> {Vaapi,VDA,Mojo}VideoDecoder while failure is {FFMpeg,Vpx}VideoDecoder;
> - - If failed, the video used for testing, including codec and
> resolution if possible;
> + - The value for kVideoDecoderName from step 4. Success is typically
> {Vaapi,VDA,Mojo}VideoDecoder while failure is
> {FFMpeg,Vpx,Dav1d}VideoDecoder;
> - Xorg or Wayland (`echo $WAYLAND_DISPLAY`);
> - Distro version (`grep VERSION= /etc/os_release`);
> - GPU (`lscpu`);
> - CPU generation (`lscpu`).
>
> About the last point, it may be that unfortunately only those with newer
> generations of Intel CPUs will have luck with this, but it's still an
> uncertainty. So reports are highly welcome.
>
> ----------Original Bug report ---------
>
> Libva is no longer working for snap installed chromium 72.0.3626.109
> (Official Build) snap (64-bit)
>
> I followed this instruction
> sudo snap install --channel=candidate/vaapi chromium
>
> My amdgpu can use libva
>
> `vainfo: Driver version: Mesa Gallium driver 18.3.3 for AMD STONEY (DRM
> 3.27.0, 4.20.0-10.1-liquorix-amd64, LLVM 7.0.1)
> vainfo: Supported profile and entrypoints
> VAProfileMPEG2Simple : VAEntrypointVLD
> VAProfileMPEG2Main : VAEntrypointVLD
> VAProfileVC1Simple : VAEntrypointVLD
> VAProfileVC1Main : VAEntrypointVLD
> VAProfileVC1Advanced : VAEntrypointVLD
> VAProfileH264ConstrainedBaseline: VAEntrypointVLD
> ...

Read more...

tags: added: kivu performance
description: updated
Revision history for this message
Bram Stolk (b-stolk) wrote :

Desktop: wayland
OS: Kinetic
CPU: i5-12600k
GPU: Intel Alderlake_s (Gen12)

I hit this error: vaapi_wrapper.cc(2389)] vaCreateSurfaces (import mode)

After which chromium seems to fall back to ffmpeg.

[135904:14:0913/135753.793304:INFO:decoder.cc(41)] DecryptingVideoDecoder
[135863:135986:0913/135753.794331:INFO:decoder.cc(65)] VDAVideoDecoder
[135904:14:0913/135753.795630:INFO:decoder.cc(65)] VDAVideoDecoder
[135904:14:0913/135753.795678:INFO:decoder.cc(65)] VDAVideoDecoder
[135863:135863:0913/135753.809617:ERROR:vaapi_wrapper.cc(2389)] vaCreateSurfaces (import mode) failed, VA error: resource allocation failed
[135863:135863:0913/135753.809730:ERROR:vaapi_picture_native_pixmap_ozone.cc(66)] Failed creating VASurface for NativePixmap
[135863:135863:0913/135753.811544:ERROR:vaapi_wrapper.cc(2389)] vaCreateSurfaces (import mode) failed, VA error: resource allocation failed
[135863:135863:0913/135753.811593:ERROR:vaapi_picture_native_pixmap_ozone.cc(66)] Failed creating VASurface for NativePixmap
[135904:14:0913/135753.811795:INFO:decoder.cc(32)] VpxVideoDecoder
[135904:14:0913/135753.811863:INFO:decoder.cc(44)] Dav1dVideoDecoder
[135904:14:0913/135753.812884:INFO:decoder.cc(29)] FFmpegVideoDecoder
[135904:14:0913/135753.812955:INFO:decoder.cc(29)] FFmpegVideoDecoder
[135744:135875:0913/135755.767907:ERROR:udev_watcher.cc(98)] Failed to begin udev enumeration.

Launched with:

$ chromium --enable-logging=stderr --use-gl=egl --enable-features=VaapiVideoDecoder,VaapiVideoEncoder --disable-features=UseChromeOSDirectVideoDecoder --ignore-gpu-blocklist --disable-gpu-driver-bug-workaround --ozone-platform=wayland Downloads/big-buck-bunny-1080p-60fps-30sec.mp4

description: updated
Revision history for this message
Ioann (yanunim95) wrote :
Download full text (3.5 KiB)

Hi.
Can confirm this issue on Ubuntu 22.04 with Mate desktop env in X11 session.
No video acceleration is present.
When i try to start chromium in terminal i'm getting following output:
chromium-browser --use-gl=desktop --enable-features=VaapiVideoDecoder --disable-features=UseChromeOSDirectVideoDecoder
Gtk-Message: 09:12:41.908: Failed to load module "appmenu-gtk-module"
[26251:26418:1016/091242.099224:ERROR:object_proxy.cc(623)] Failed to call method: org.freedesktop.DBus.ListActivatableNames: object_path= /org/freedesktop/DBus: org.freedesktop.DBus.Error.AccessDenied: An AppArmor policy prevents this sender from sending this message to this recipient; type="method_call", sender=":1.137" (uid=1000 pid=26251 comm="/snap/chromium/2105/usr/lib/chromium-browser/chrom" label="snap.chromium.chromium (enforce)") interface="org.freedesktop.DBus" member="ListActivatableNames" error name="(unset)" requested_reply="0" destination="org.freedesktop.DBus" (bus)
Warning: vkCreateInstance: Found no drivers!
Error: vkCreateInstance failed with VK_ERROR_INCOMPATIBLE_DRIVER
    at CheckVkSuccessImpl (../../third_party/dawn/src/dawn/native/vulkan/VulkanError.cpp:88)
    at CreateVkInstance (../../third_party/dawn/src/dawn/native/vulkan/BackendVk.cpp:383)
    at Initialize (../../third_party/dawn/src/dawn/native/vulkan/BackendVk.cpp:269)
    at Create (../../third_party/dawn/src/dawn/native/vulkan/BackendVk.cpp:199)
    at operator() (../../third_party/dawn/src/dawn/native/vulkan/BackendVk.cpp:458)

Error: eglChooseConfig returned zero configs
    at Create (../../third_party/dawn/src/dawn/native/opengl/ContextEGL.cpp:53)

[26251:26522:1016/091244.462029:ERROR:udev_watcher.cc(98)] Failed to begin udev enumeration.

Information from vainfo:
vainfo
libva info: VA-API version 1.14.0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/radeonsi_drv_video.so
libva info: Found init function __vaDriverInit_1_14
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.14 (libva 2.12.0)
vainfo: Driver version: Mesa Gallium driver 22.1.0-devel for Radeon RX 5500 XT (navi14, LLVM 14.0.1, DRM 3.46, 5.15.0-50-generic)
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
      VAProfileHEVCMain10 : VAEntrypointEncSlice
      VAProfileJPEGBaseline : VAEntrypointVLD
      VAProfileVP9Profile0 : VAEntrypointVLD
      VAProfileVP9Profile2 : VAEn...

Read more...

Revision history for this message
Nathan Teodosio (nteodosio) wrote : AMD GPU

Thanks for the report, especially valuable as it is the first about AMD.

I just submitted a change and pushed the new build. Can you please give
it a try?

   # snap refresh --channel beta/hwacc chromium
   $ snap run chromium

The previous version did not include the radeonsi_drv_video.so driver
(the one in your system is not visible from snap confinement).

If it still doesn't work, please attach the outputs of env and lscpu.

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

It's probably better to focus more on Intel until everything is working well enough to close the bug. VAAPI has historically only been reliable on Intel so we risk getting distracted in debugging non-Intel driver issues (which would also be off-topic given this is a Chromium bug).

Revision history for this message
Marc Peña (pachulo) wrote :

Hi! From: https://code.launchpad.net/~nteodosio/chromium-browser/+git/chromium-browser/+merge/428038/comments/1137194

Is there any ETA for finishing the legal review of the inclusion of the non-free driver?

Thanks!

Revision history for this message
Nathan Teodosio (nteodosio) wrote : Re: [Bug 1816497] Re: [snap] vaapi chromium no video hardware decoding

Unfortunately, no.

description: updated
Revision history for this message
Matt Lee (matthewclee) wrote :

For these description items:

- Distro version (`grep VERSION= /etc/os_release`);
- GPU (`lscpu`);

Do you mean?

- Distro version (`grep VERSION= /etc/os-release`);
- GPU (`lsgpu`);

Revision history for this message
Matt Lee (matthewclee) wrote :

Hardware decode on stable/hwacc worked out of the box for me, thanks!

- VDAVideoDecoder
- Xorg
- VERSION="21 (Vanessa)"
- Intel Kabylake (Gen9)
- Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz

Revision history for this message
Nathan Teodosio (nteodosio) wrote (last edit ):

> For these description items:
>
> - Distro version (`grep VERSION= /etc/os_release`);
> - GPU (`lscpu`);
>
> Do you mean?
>
> - Distro version (`grep VERSION= /etc/os-release`);
> - GPU (`lsgpu`);

Just found out about that one. :) Either is fine.

 > Hardware decode on stable/hwacc worked out of the box for me, thanks!

Great to hear that! But do note that stable/hwacc is at 105 and falling
behind, so unresolved CVEs will start accumulating and I don't recommend
using it on a regular basis. Unfortunately, so far it is the only one I
could get VDAVideoDecoder on.

Revision history for this message
Marc Peña (pachulo) wrote :

Hi again @nteodosio and happy new year!

Any progress to report in the last 2 months?

Thanks!

Revision history for this message
Nathan Teodosio (nteodosio) wrote :
Revision history for this message
Andreas Hasenack (ahasenack) wrote (last edit ):

- The value for kVideoDecoderName from step 4. Success is typically {Vaapi,VDA,Mojo}VideoDecoder while failure is {FFMpeg,Vpx,Dav1d}VideoDecoder;
FFmpegVideoDecoder

- Xorg or Wayland (`echo $WAYLAND_DISPLAY`);
xorg

- Distro version (`grep VERSION= /etc/os_release`);
22.10 Kinetic

- GPU (`lscpu`);
intel-gpu-top: Intel Kabylake (Gen9) @ /dev/dri/card0 -

lsgpu (that's a new one):
card0 Intel Kabylake (Gen9) drm:/dev/dri/card0
└─renderD128 drm:/dev/dri/renderD128

- CPU generation (`lscpu`).
Vendor ID: GenuineIntel
  Model name: Intel(R) Core(TM) i7-7600U CPU @ 2.80GHz
    CPU family: 6
    Model: 142

Chromium snap:
chromium 112.0.5615.20-hwacc 2398 latest/beta/… canonical✓ -

description: updated
Revision history for this message
Matt Lee (matthewclee) wrote :

Hardware decode on candidate/hwacc worked out of the box for me, thanks!

- VaapiVideoDecoder
- Xorg
- VERSION="21.1 (Vera)"
- Intel Kabylake (Gen9)
- Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz

Revision history for this message
Hector CAO (hectorcao) wrote :
Download full text (4.0 KiB)

GPU . Intel® HD Graphics 5500 / Gen8 / Broadwell

Chromium : 113.0.5672.24 hwacc/candidate

Hardware decoding is not working !

Log:

[46128:46128:0511/183800.564351:WARNING:chrome_main_delegate.cc(589)] This is Chrome version 113.0.5672.24 (not a warning)
[46128:46128:0511/183800.609573:WARNING:chrome_browser_cloud_management_controller.cc(87)] Could not create policy manager as CBCM is not enabled.
[46128:46128:0511/183800.628662:WARNING:wayland_object.cc(157)] Binding to gtk_shell1 version 4 but version 5 is available.
[46128:46128:0511/183800.628726:WARNING:wayland_object.cc(157)] Binding to zwp_pointer_gestures_v1 version 1 but version 3 is available.
[46128:46128:0511/183800.628780:WARNING:wayland_object.cc(157)] Binding to zwp_linux_dmabuf_v1 version 3 but version 4 is available.
[46128:46128:0511/183800.889036:ERROR:chrome_browser_cloud_management_controller.cc(162)] Cloud management controller initialization aborted as CBCM is not enabled.
[46128:46128:0511/183800.904533:WARNING:account_consistency_mode_manager.cc(73)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured.
[46128:46128:0511/183800.952551:WARNING:wayland_surface.cc(163)] Server doesn't support zcr_alpha_compositing_v1.
[46128:46128:0511/183800.952572:WARNING:wayland_surface.cc(178)] Server doesn't support overlay_prioritizer.
[46128:46128:0511/183800.952579:WARNING:wayland_surface.cc(192)] Server doesn't support surface_augmenter.
[46128:46128:0511/183800.952584:WARNING:wayland_surface.cc(207)] Server doesn't support wp_content_type_v1
[46128:46128:0511/183800.952589:WARNING:wayland_surface.cc(226)] Server doesn't support zcr_color_management_surface.
[46128:46128:0511/183800.952946:WARNING:cursor_loader.cc(122)] Failed to load a platform cursor of type kNull
libva info: VA-API version 1.17.0
libva info: Trying to open /snap/chromium/2444/va-driver-non-free/dri/iHD_drv_video.so
libva info: Trying to open /snap/chromium/2444/usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_17
libva info: va_openDriver() returns 0
[minigbm:drv_helpers.c(364)] DRM_IOCTL_MODE_CREATE_DUMB failed (12, 13)
[46281:46281:0511/183800.988362:ERROR:gbm_pixmap_wayland.cc(75)] Cannot create bo with format= YUV_420_BIPLANAR and usage=GPU_READ_CPU_READ_WRITE
....

VAINFO
----
$ export LD_LIBRARY_PATH=/snap/chromium/current/usr/lib/x86_64-linux-gnu/
$ export LIBVA_DRIVERS_PATH=/snap/chromium/current/usr/lib/x86_64-linux-gnu/dri
$ vainfo

libva info: VA-API version 1.17.0
libva info: Trying to open /snap/chromium/current/usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_17
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.17 (libva 2.12.0)
vainfo: Driver version: Intel iHD driver for Intel(R) Gen Graphics - 22.6.6 (b51ffe5)
vainfo: Supported profile and entrypoints
      VAProfileNone : VAEntrypointVideoProc
      VAProfileNone : VAEntrypointStats
      VAProfileMPEG2Simple : VAEntrypointVLD
      VAProfileMPEG2Simple : VAEntrypointEncSlice
      VAProfileMPEG2Main : VAEntry...

Read more...

Revision history for this message
Michel-Ekimia (michel.ekimia) wrote :

Don't wanna be rude , but don't expect this to work solid one day.

I've been asking this to google and canonical for almost 10 years

We've worked hours of test and stuff , this is going nowhere.

Let's help firefox , time is precious

Revision history for this message
Hector CAO (hectorcao) wrote :

With the beta testing release, the hardware decoding is working for several recent Intel GPU architectures (Tigerlake, Aderlake, Raptorlake), so far, we only experienced a problem on Roadwell (Gen8) GPU, the oldest GPU generation we aim to support for this release, we will work to make it working very soon ... Let's keep the faith Michel !

Revision history for this message
Peter (t-cat) wrote (last edit ):

CPU: 12th Gen Intel i5-12400 (12) @ 4.400GHz
GPU: Intel Alder Lake-S GT1 [UHD Graphics 730]

intel_gpu_top shows 0%

Kubuntu 23.04

Revision history for this message
Nathan Teodosio (nteodosio) wrote :

Hi Peter, thanks, the bug description was not up to date, you need the snap from beta or edge. What is 'snap info chromium' for you?

If it doesn't work on those channels, please attach

  snap run chromium --enable-logging=stderr &> chr.log

description: updated
Revision history for this message
Peter (t-cat) wrote (last edit ):

Thank you, Nathan Teodosio.

I installed chromium as described here:
https://discourse.ubuntu.com/t/chromium-hardware-accelerated-build-for-intel-based-platforms-available-for-beta-testing/35625?u=d0od

That is, like this:
To install hardware accelerated Chromium:
snap install chromium --channel=latest/candidate/hwacc

I already found at https://snapcraft.io/chromium
Indeed, such a command is needed:
sudo snap install chromium --beta
I apologize for the inattention. I will check and send a message.
Thank you very much for your help.

Revision history for this message
Peter (t-cat) wrote :

Indeed, chromim-beta has hardware video acceleration.
All videos on youtube are accelerated.
But this is not observed in video conferences.
Verified in Google Meet.
Is this a bug?

Revision history for this message
Hector CAO (hectorcao) wrote :

No, it is not a bug, hardware decoding for video conferencing on google meet only works for very few specific use cases,

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

Duplicates of this bug

Other bug subscribers

Remote bug watches

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