You are not logged in.

#276 2020-01-20 04:34:58

akarshanbiswas
Member
Registered: 2019-06-22
Posts: 30

Re: chromium: hardware video acceleration with VA-API

Offline

#277 2020-01-20 05:34:14

liewkj
Member
Registered: 2019-07-08
Posts: 107

Re: chromium: hardware video acceleration with VA-API

Well, that does not help chromium-vaapi. GStreamer-vaapi already works for Intel GPU on Wayland. GNOME Web/Epiphany supports GStreamer and video playback can be accelerated on Wayland. The only problem with GNOME Web/Epiphany is lacking YouTube plugin to force accelerated video formats that are supported by the hardware.

If someone comes up with YouTube plugin for GNOME Web/Epiphany, then it will become a serious contender to chromium-vaapi.

Offline

#278 2020-01-20 07:26:47

akarshanbiswas
Member
Registered: 2019-06-22
Posts: 30

Re: chromium: hardware video acceleration with VA-API

liewkj wrote:

Well, that does not help chromium-vaapi. GStreamer-vaapi already works for Intel GPU on Wayland. GNOME Web/Epiphany supports GStreamer and video playback can be accelerated on Wayland. The only problem with GNOME Web/Epiphany is lacking YouTube plugin to force accelerated video formats that are supported by the hardware.

If someone comes up with YouTube plugin for GNOME Web/Epiphany, then it will become a serious contender to chromium-vaapi.


Well gnome web/epiphany has a problem. Since it is built using gtk there is an excessive surface reconfiguration bug on Wayland which effects the performance drastically. For gst-vaapi, well unless export EGLImage to dmabuf is implemented, it won't work on amdgpus. There are lot of bugs to fix there.




Excessive surface reconfiguration bug on wayland: https://gitlab.gnome.org/GNOME/gtk/issues/2311
EGLImage to dmabuf WIP: https://gitlab.freedesktop.org/gstreame … quests/122

Offline

#279 2020-01-20 11:50:58

liewkj
Member
Registered: 2019-07-08
Posts: 107

Re: chromium: hardware video acceleration with VA-API

akarshanbiswas wrote:

Well gnome web/epiphany has a problem. Since it is built using gtk there is an excessive surface reconfiguration bug on Wayland which effects the performance drastically. For gst-vaapi, well unless export EGLImage to dmabuf is implemented, it won't work on amdgpus. There are lot of bugs to fix there.

I don't think those issues affect Intel GPU, but you are right that gstreamer-vaapi does not quite play along with AMDGPU/MESA VA driver.
Well, I just checked out GNOME Web/Epiphany on my Intel laptop with Intel Skylake GPU. I used test H.264 video from http://www.html5videoplayer.net/html5vi … ideo-test/ and intel_gpu_top was showing activities with the video engine. That means GNOME Web/Epiphany is able to leverage video acceleration through gstreamer-vaapi. This is on an up-to-date ArchLinux with GNOME/Wayland.

For those who have Kabylake+ Intel GPUs with VP9 support, GNOME Web/Epiphany should be able to have video acceleration for YouTube.

Last edited by liewkj (2020-01-20 11:53:32)

Offline

#280 2020-01-21 02:36:49

liewkj
Member
Registered: 2019-07-08
Posts: 107

Re: chromium: hardware video acceleration with VA-API

Finally, I confirmed it myself that all the Wayland craps can be resolved by downgrading to xorg-server-xwayland 1.19.7, the last stable release from 1.19-branch.

commit 937391523eef6459d1f8b1ae25fe7e1f77b8a12a (HEAD, tag: xorg-server-1.19.7, origin/server-1.19-branch)
Author: Kevin Brace <kevinbrace@gmx.com>
Date:   Sat Mar 2 14:13:20 2019 -0800

    xserver 1.19.7
    
    Signed-off-by: Kevin Brace <kevinbrace@gmx.com>

And only this package, the rest of xorg-server packages can remain upstream. Moreover rubbing salt in the wounds, no matter how frustrated we had reported Wayland issues to Google Chromium team, they seemed to be triaging Wayland issues on Ubuntu 18.04LTS. Guess what? Ubuntu 18.04LTS is keeping xwayland from 1.19-branch while the rest of the Xorg packages at 1.20-branch! So, Google Chromium devs were not able to reproduce the issues!

So I did the same to my ArchLinux and boomed all the Wayland craps were resolved, no more V-Sync issue and chromium-vaapi perfectly plays back videos with acceleration with "--use-gl=egl" on GNOME/Wayland.

It is disappointing that the XWayland V-Sync issue with respect to Chromium is getting nowhere from the upstream. The upstream master-branch solved the V-Sync issue but chromium performance remains poor when flag "--use-gl=egl" is used. And it is not just for VA-API, typical page 2D rendering and WebGL are all affected by poor performance whenever the flag is used.
https://bugs.chromium.org/p/chromium/is … id=1041228

Unfortunately for Intel GPUs, "--use-gl=egl" is the only way to get VA-API in action on Wayland session. I am now leaning towards that this is indeed Google Chromium issue to debug and fix the V-Sync of Chromium EGL surface presentation to match the behavior of xwayland from 1.20-branch, mostly likely due to the new multi-buffering scheme.

Last edited by liewkj (2020-01-21 08:04:36)

Offline

#281 2020-01-22 16:12:28

liewkj
Member
Registered: 2019-07-08
Posts: 107

Re: chromium: hardware video acceleration with VA-API

Upstream Chromium acknowledged the bug and is working on the fix. smile

Issue 1041229: Flag --use-gl=egl unable to select gl::kGLImplementationEGLGLES2 during VADisplayState::InitializeOnce()

As expected, they did not simply take the ugly patch but will be fixing it the right way. Hopefully, next Chromium release will support hardware video acceleration on Wayland for i965 VA driver.

Last edited by liewkj (2020-01-22 16:13:19)

Offline

#282 2020-01-22 19:37:04

maximbaz
Trusted User (TU)
Registered: 2017-12-28
Posts: 54

Re: chromium: hardware video acceleration with VA-API

liewkj: I am giving Wayland another try smile I noticed that if I launch chromium using "--use-gl=egl" using either driver, videos become very visibly laggy - is this known? Do you also experience this? If I use iHD driver, I do get MojoVideoDecoder, but as per the bug you referenced, i965 driver throws some errors. But these lags with --use-gl=egl are so visible...

Offline

#283 2020-01-23 04:04:14

liewkj
Member
Registered: 2019-07-08
Posts: 107

Re: chromium: hardware video acceleration with VA-API

maximbaz wrote:

liewkj: I am giving Wayland another try smile I noticed that if I launch chromium using "--use-gl=egl" using either driver, videos become very visibly laggy - is this known? Do you also experience this? If I use iHD driver, I do get MojoVideoDecoder, but as per the bug you referenced, i965 driver throws some errors. But these lags with --use-gl=egl are so visible...

You are definitely not alone smile, but we will have to wait for this bug to get traction and resolved at Chromium upstream.

Issue 1041228: Poor performance with --use-gl=egl on XWayland (GNOME/Wayland)

I am experiencing the issue on 4 different systems at my disposals, all running up-to-date ArchLinux with GNOME/Wayland.

  • NVIDIA GT730/nouveau - Desktop

  • Intel Haswell - Laptop

  • Intel Skylake GT2 - Laptop

  • Ryzen APU - Laptop.

Unfortunately since corporate worlds are all about Ubuntu LTS these days, the last 18.04LTS will not have the issue. For quick and dirty workaround today on ArchLinux, I just created custom AUR package for xwayland and keep it at 1.19.7, similar to Ubuntu 18.04LTS.

$ pacman -Qs xorg-server | grep ^[a-z]
local/xorg-server 1.20.7-1 (xorg)
local/xorg-server-common 1.20.7-1 (xorg)
local/xorg-server-devel 1.20.7-1 (xorg)
**local/xorg-server-xwayland0 1.19.7-1 (xorg)**

Offline

#284 2020-01-24 15:11:16

akarshanbiswas
Member
Registered: 2019-06-22
Posts: 30

Re: chromium: hardware video acceleration with VA-API

I have build chromium with ozone support to see if it can decode video using vaapi while running in ozone wayland.

Faced this error:

[34369:34369:0124/203225.848300:ERROR:sandbox_linux.cc(372)] InitializeSandbox() called with multiple threads in process gpu-process.
[34369:34369:0124/203412.800498:ERROR:gbm_pixmap_wayland.cc(77)] Cannot create bo with format= YUV_420_BIPLANAR and usage SCANOUT_VDA_WRITE
[34369:34369:0124/203412.800680:ERROR:vaapi_picture_native_pixmap_ozone.cc(104)] Failed allocating a pixmap
[34642:16:0124/203412.801511:ERROR:batching_media_log.cc(26)] MediaEvent: MEDIA_ERROR_LOG_ENTRY {"error":"VDA Error 4"}
[34369:34369:0124/203420.414844:ERROR:gbm_pixmap_wayland.cc(77)] Cannot create bo with format= YUV_420_BIPLANAR and usage SCANOUT_VDA_WRITE
[34369:34369:0124/203420.414894:ERROR:vaapi_picture_native_pixmap_ozone.cc(104)] Failed allocating a pixmap
[34642:16:0124/203420.415527:ERROR:batching_media_log.cc(26)] MediaEvent: MEDIA_ERROR_LOG_ENTRY {"error":"VDA Error 4"}
[34369:34369:0124/203420.629581:ERROR:gbm_pixmap_wayland.cc(77)] Cannot create bo with format= YUV_420_BIPLANAR and usage SCANOUT_VDA_WRITE
[34369:34369:0124/203420.629631:ERROR:vaapi_picture_native_pixmap_ozone.cc(104)] Failed allocating a pixmap
[34642:16:0124/203420.629859:ERROR:batching_media_log.cc(26)] MediaEvent: MEDIA_ERROR_LOG_ENTRY {"error":"VDA Error 4"}
[34369:34369:0124/203422.241528:ERROR:gbm_pixmap_wayland.cc(77)] Cannot create bo with format= YUV_420_BIPLANAR and usage SCANOUT_VDA_WRITE
[34369:34369:0124/203422.241577:ERROR:vaapi_picture_native_pixmap_ozone.cc(104)] Failed allocating a pixmap
[34642:16:0124/203422.242067:ERROR:batching_media_log.cc(26)] MediaEvent: MEDIA_ERROR_LOG_ENTRY {"error":"VDA Error 4"}

@liewkj do you think it can be fixed?

Offline

#285 2020-02-02 06:35:42

sapjunior
Member
Registered: 2019-10-27
Posts: 3

Re: chromium: hardware video acceleration with VA-API

liewkj wrote:
maximbaz wrote:

liewkj: I am giving Wayland another try smile I noticed that if I launch chromium using "--use-gl=egl" using either driver, videos become very visibly laggy - is this known? Do you also experience this? If I use iHD driver, I do get MojoVideoDecoder, but as per the bug you referenced, i965 driver throws some errors. But these lags with --use-gl=egl are so visible...

You are definitely not alone smile, but we will have to wait for this bug to get traction and resolved at Chromium upstream.

Issue 1041228: Poor performance with --use-gl=egl on XWayland (GNOME/Wayland)

I am experiencing the issue on 4 different systems at my disposals, all running up-to-date ArchLinux with GNOME/Wayland.

  • NVIDIA GT730/nouveau - Desktop

  • Intel Haswell - Laptop

  • Intel Skylake GT2 - Laptop

  • Ryzen APU - Laptop.

Unfortunately since corporate worlds are all about Ubuntu LTS these days, the last 18.04LTS will not have the issue. For quick and dirty workaround today on ArchLinux, I just created custom AUR package for xwayland and keep it at 1.19.7, similar to Ubuntu 18.04LTS.

$ pacman -Qs xorg-server | grep ^[a-z]
local/xorg-server 1.20.7-1 (xorg)
local/xorg-server-common 1.20.7-1 (xorg)
local/xorg-server-devel 1.20.7-1 (xorg)
**local/xorg-server-xwayland0 1.19.7-1 (xorg)**

Could you please share your makepkg file? It might be useful for wayland users

Thank you

Offline

#286 2020-02-06 13:15:17

accron
Member
Registered: 2020-02-06
Posts: 1

Re: chromium: hardware video acceleration with VA-API

I simply can't seem to get video acceleration to work in Chromium vaapi.

This is the output of vainfo:

vainfo: VA-API version: 1.6 (libva 2.6.0)
vainfo: Driver version: Intel iHD driver - 19.4.0
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

I have set $LIBVA_DRIVER_NAME to iHD.
Any suggestions are appreciated.

Offline

#287 2020-02-06 21:28:55

liewkj
Member
Registered: 2019-07-08
Posts: 107

Re: chromium: hardware video acceleration with VA-API

accron wrote:

I simply can't seem to get video acceleration to work in Chromium vaapi.
Any suggestions are appreciated.

How did you conclude that video acceleration wasn't working for you in chromium-vaapi?
You need to show any errors indication that video acceleration wasn't working. Details from vainfo alone wasn't enough.
Are you on Wayland or Xorg session?

Offline

#288 2020-02-12 08:36:05

mbrennr
Member
Registered: 2012-09-17
Posts: 10

Re: chromium: hardware video acceleration with VA-API

I'd like to thank everybody for their work and dedication on chromium-vaapi (and chromium-vaapi-bin).
And, of course libva-vdpau-driver-chromium.
I rolled back to chromium 78, and glibc 2.30.
This still works.

Offline

Board footer

Powered by FluxBB