You are not logged in.

#426 2020-10-10 21:54:04

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

Re: chromium: hardware video acceleration with VA-API

digitalone wrote:
liewkj wrote:

However, gstreamer-vaapi works with libva-mesa-drivers 20.2.0 through gst-play-1.0

On which hardware? AMD?

Both Intel and AMD, gstreamer-vaapi has always been working for Intel. AMD used to be flaky on 1.16.x but 1.18.x seemed to have resolved issues with MESA VA drivers. However, getting GNOME Web/Epiphany working with video acceleration through gstreamer-vaapi is not working, Otherwise, GNOME Web/Epiphany could be the 3rd option for Linux that supports hardware video acceleration.

Offline

#427 2020-10-21 04:57:02

xuanrui
Member
Registered: 2018-09-27
Posts: 40

Re: chromium: hardware video acceleration with VA-API

So, could we say that chromium-vaapi is relevant mostly only for Wayland users now? On 86+, X11 users should be happier with [extra/chromium] regardless of their driver, no?

Offline

#428 2020-10-23 12:43:47

frankieboy
Member
Registered: 2009-04-12
Posts: 62

Re: chromium: hardware video acceleration with VA-API

Hi,

With the recent chromium package, I can't get hardware video acceleration, using an optimus laptop with Intel UHD 630 package, using gnome on wayland, tried it under Xorg without success, the only flag I use is --enable-accelerated-video-decode. I have tried chromium-vaapi packaged with the patched mesa packages without success.

Offline

#429 2020-10-23 13:59:55

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

Re: chromium: hardware video acceleration with VA-API

frankieboy wrote:

the only flag I use is --enable-accelerated-video-decode.

It is *required* to have either `--use-gl=desktop` or `--use-gl=egl` for AUR chromium-vaapi.

Last edited by liewkj (2020-10-23 14:00:18)

Offline

#430 2020-10-23 18:29:37

frankieboy
Member
Registered: 2009-04-12
Posts: 62

Re: chromium: hardware video acceleration with VA-API

liewkj wrote:
frankieboy wrote:

the only flag I use is --enable-accelerated-video-decode.

It is *required* to have either `--use-gl=desktop` or `--use-gl=egl` for AUR chromium-vaapi.

Under wayland with --use-gl-egl and under Xorg with --use-gl-desktop I can see the similar error meesage scrolling continuosly in the terminal:

[83058:83058:1023/192539.738403:ERROR:gl_context_egl.cc(248)] eglCreateContext failed with error EGL_BAD_ATTRIBUTE
[83058:83058:1023/192539.738637:ERROR:gpu_channel_manager.cc(749)] ContextResult::kFatalFailure: Failed to create shared context for virtualization.
[83058:83058:1023/192539.738766:ERROR:shared_image_stub.cc(470)] SharedImageStub: unable to create context
[83058:83058:1023/192539.738992:ERROR:gpu_channel.cc(449)] GpuChannel: Failed to create SharedImageStub

vainfo shows no errors however using iHD driver (tried i965 with same results).

Offline

#431 2020-10-24 00:49:37

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

Re: chromium: hardware video acceleration with VA-API

frankieboy wrote:

Under wayland with --use-gl-egl and under Xorg with --use-gl-desktop I can see the similar error meesage scrolling continuosly in the terminal:

[83058:83058:1023/192539.738403:ERROR:gl_context_egl.cc(248)] eglCreateContext failed with error EGL_BAD_ATTRIBUTE
[83058:83058:1023/192539.738637:ERROR:gpu_channel_manager.cc(749)] ContextResult::kFatalFailure: Failed to create shared context for virtualization.
[83058:83058:1023/192539.738766:ERROR:shared_image_stub.cc(470)] SharedImageStub: unable to create context
[83058:83058:1023/192539.738992:ERROR:gpu_channel.cc(449)] GpuChannel: Failed to create SharedImageStub

vainfo shows no errors however using iHD driver (tried i965 with same results).

This is new. I couldn't reproduce it on Haswell and Skylake generations. Can you check if staying at X11 and using extra/chromium without any `--use-gl=` works for you?

Offline

#432 2020-10-24 07:10:23

frankieboy
Member
Registered: 2009-04-12
Posts: 62

Re: chromium: hardware video acceleration with VA-API

liewkj wrote:
frankieboy wrote:

Under wayland with --use-gl-egl and under Xorg with --use-gl-desktop I can see the similar error meesage scrolling continuosly in the terminal:

[83058:83058:1023/192539.738403:ERROR:gl_context_egl.cc(248)] eglCreateContext failed with error EGL_BAD_ATTRIBUTE
[83058:83058:1023/192539.738637:ERROR:gpu_channel_manager.cc(749)] ContextResult::kFatalFailure: Failed to create shared context for virtualization.
[83058:83058:1023/192539.738766:ERROR:shared_image_stub.cc(470)] SharedImageStub: unable to create context
[83058:83058:1023/192539.738992:ERROR:gpu_channel.cc(449)] GpuChannel: Failed to create SharedImageStub

vainfo shows no errors however using iHD driver (tried i965 with same results).

This is new. I couldn't reproduce it on Haswell and Skylake generations. Can you check if staying at X11 and using extra/chromium without any `--use-gl=` works for you?

No, video decode is software only like on wayland.

Offline

#433 2020-10-24 11:02:39

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

Re: chromium: hardware video acceleration with VA-API

frankieboy wrote:

No, video decode is software only like on wayland.

Could you also provide logs from chromium running from terminal on X11 session with `--use-gl=desktop`?
Something wasn't right if you were getting the same error messages with `--use-gl=desktop` as the error messages were related to EGL backend. `--use-gl=desktop` should not be using EGL backend.

Offline

#434 2020-10-24 11:14:45

frankieboy
Member
Registered: 2009-04-12
Posts: 62

Re: chromium: hardware video acceleration with VA-API

liewkj wrote:
frankieboy wrote:

No, video decode is software only like on wayland.

Could you also provide logs from chromium running from terminal on X11 session with `--use-gl=desktop`?
Something wasn't right if you were getting the same error messages with `--use-gl=desktop` as the error messages were related to EGL backend. `--use-gl=desktop` should not be using EGL backend.

The only error I can see on the terminal is:
[25392:25392:1024/121013.453344:ERROR:sandbox_linux.cc(374)] InitializeSandbox() called with multiple threads in process gpu-process.
Video-decode is software acceleration only, I have tried --ignore-gpu-blocklist, --disable-gpu-sandbox, none of them worked.

Offline

#435 2020-10-24 18:44:39

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

Re: chromium: hardware video acceleration with VA-API

frankieboy wrote:

The only error I can see on the terminal is:
[25392:25392:1024/121013.453344:ERROR:sandbox_linux.cc(374)] InitializeSandbox() called with multiple threads in process gpu-process.

This was normal. You need to start playing a video (either online or local) and observe for more chromium log output. Check for "VDA error" if you are getting any of these. I suggest using a local video file downloaded using youtube-dl and enter `file:///path/to/video.mp4` directly into chromium.

Please show the chromium command line from chrome://gpu. Video Acceleration information should also be available from chrome://gpu.

Offline

#436 2020-10-25 09:12:24

frankieboy
Member
Registered: 2009-04-12
Posts: 62

Re: chromium: hardware video acceleration with VA-API

liewkj wrote:
frankieboy wrote:

The only error I can see on the terminal is:
[25392:25392:1024/121013.453344:ERROR:sandbox_linux.cc(374)] InitializeSandbox() called with multiple threads in process gpu-process.

This was normal. You need to start playing a video (either online or local) and observe for more chromium log output. Check for "VDA error" if you are getting any of these. I suggest using a local video file downloaded using youtube-dl and enter `file:///path/to/video.mp4` directly into chromium.

Please show the chromium command line from chrome://gpu. Video Acceleration information should also be available from chrome://gpu.

So it turned out that video decode was disabled by a flag, I turned it on, and now under Xorg, it works, under wayland it doesn't (based on the battery consumption by powertop), and under wayland the vaapi package shows the errors I mentioned above.

Offline

#437 2020-10-25 20:01:18

blispx
Member
Registered: 2017-11-29
Posts: 53

Re: chromium: hardware video acceleration with VA-API

After a full day of running chromium, I have:

[1455: 1455: 1025 / 200705.039978: ERROR: vaapi_wrapper.cc (1898)]: vaSyncSurface failed, VA error: HW busy now

and naturally vaapi stops working

Test platform is IUHD

Offline

#438 2020-10-26 12:22:25

DAC324
Member
Registered: 2020-03-12
Posts: 12

Re: chromium: hardware video acceleration with VA-API

Hello,

in the comments for the AUR package, user asem commented on 2020-06-28 17:53:

And i think this should be pinned, many people complain about build time, i recommend pinning that its highly recommended to use ccache to speed up build.

The package is being downloaded as a whole on each update which also results in all source files being replaced.
How can ccache help improving build time in such a scenario?

Offline

#439 2020-11-05 10:43:30

DAC324
Member
Registered: 2020-03-12
Posts: 12

Re: chromium: hardware video acceleration with VA-API

Looks like build time for the AUR package is not a problem for most of you. Congratulations big_smile
I'd be really grateful if anybody got a spare 3990X - I will take it so that you can avoid tossing it in the bin smile

Offline

#440 2020-11-05 19:11:19

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

Re: chromium: hardware video acceleration with VA-API

This is not the place for build time improvement strategy. Go somewhere else and Google is your friend.

If one downloaded a compressed source of over 700MB and expected to build it within hours on typical quad-core desktop machine, then this was just insane.
If you have problem with build time, then just don't build it, isn't it simple?
Both the official and AUR provide pre-built package, use them, and save your frustration. smile

Offline

#441 2020-11-11 11:48:55

steffend
Member
Registered: 2020-11-11
Posts: 2

Re: chromium: hardware video acceleration with VA-API

I'm seeing the following error using native wayland and ungoogled-chromium-ozone:

[36:36:1111/113445.064779:ERROR:gbm_pixmap_wayland.cc(58)] Cannot create bo with format= YUV_420_BIPLANAR and usage SCANOUT_VDA_WRITE
[36:36:1111/113445.065977:ERROR:gbm_pixmap_wayland.cc(58)] Cannot create bo with format= YUV_420_BIPLANAR and usage SCANOUT_VDA_WRITE
[42:11:1111/113445.068220:ERROR:batching_media_log.cc(38)] MediaEvent: {"error":"VDA Error 4"}

Any ideas? What is currently the best way to get accelerated video decode with vaapi working with chromium + wayland (not XWayland)?
This was already mentioned here https://bbs.archlinux.org/viewtopic.php … 3#p1884523 but I did not find any response.

Offline

#442 2020-11-15 17:07:05

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

Re: chromium: hardware video acceleration with VA-API

steffend wrote:

I'm seeing the following error using native wayland and ungoogled-chromium-ozone:

[36:36:1111/113445.064779:ERROR:gbm_pixmap_wayland.cc(58)] Cannot create bo with format= YUV_420_BIPLANAR and usage SCANOUT_VDA_WRITE
[36:36:1111/113445.065977:ERROR:gbm_pixmap_wayland.cc(58)] Cannot create bo with format= YUV_420_BIPLANAR and usage SCANOUT_VDA_WRITE
[42:11:1111/113445.068220:ERROR:batching_media_log.cc(38)] MediaEvent: {"error":"VDA Error 4"}

Any ideas? What is currently the best way to get accelerated video decode with vaapi working with chromium + wayland (not XWayland)?
This was already mentioned here https://bbs.archlinux.org/viewtopic.php … 3#p1884523 but I did not find any response.

Because it is not yet implemented.


Check: https://bugs.chromium.org/p/chromium/is … 929632#c11

Offline

#443 2020-11-15 18:25:11

steffend
Member
Registered: 2020-11-11
Posts: 2

Re: chromium: hardware video acceleration with VA-API

akarshanbiswas wrote:

Because it is not yet implemented.


Check: https://bugs.chromium.org/p/chromium/is … 929632#c11

That’s the hint I needed. Thank you!

Offline

#444 2020-11-18 21:09:10

yochananmarqos
Member
Registered: 2020-02-05
Posts: 22
Website

Re: chromium: hardware video acceleration with VA-API

frankieboy wrote:

So it turned out that video decode was disabled by a flag, I turned it on, and now under Xorg, it works

What flag?

Offline

#445 2020-11-19 08:19:48

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 11,168

Re: chromium: hardware video acceleration with VA-API

Frankieboy if you wonder where your post went, you've accidentally sent a report:

frankieboy wrote:

Hardware accelelrated video decode.

Offline

#446 2020-11-19 19:04:01

frankieboy
Member
Registered: 2009-04-12
Posts: 62

Re: chromium: hardware video acceleration with VA-API

Thank you big_smile

Offline

#447 2020-11-24 02:22:20

agm28011997
Member
Registered: 2015-05-26
Posts: 77

Re: chromium: hardware video acceleration with VA-API

someone here with amdgpu has the chromium working in wayland with Vaapi?
I have vda errors:

00:00:01.054    kVideoDecoderName    "MojoVideoDecoder"
00:00:01.054    kIsPlatformVideoDecoder    true
00:00:01.054    info    "Selected MojoVideoDecoder 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}"
00:00:01.054    pipeline_state    "kPlaying"
00:00:01.054    audio_buffering_state    {"state":"BUFFERING_HAVE_ENOUGH"}
00:00:01.062    error    "VDA Error 4"
00:00:01.062    warning    "video fallback to new decoder after initial decode error."
00:00:01.062    info    "Failed to initialize VpxVideoDecoder"
00:00:01.062    info    "Failed to initialize Dav1dVideoDecoder"
00:00:01.063    kIsVideoDecryptingDemuxerStream    false
00:00:01.063    kVideoDecoderName    "FFmpegVideoDecoder"

EDIT: I have working vaapi config on xorg and I put the --use-gl=egl and there is no luck.. only choppiness xD... nothing good all bad
EDIT2:I have the chromium package included on repos!

Last edited by agm28011997 (2020-11-24 02:22:50)

Offline

#448 2020-11-24 02:43:46

justkdng
Member
From: 日本
Registered: 2019-10-08
Posts: 27

Re: chromium: hardware video acceleration with VA-API

@agm28011997

latest chromium needs some flags to enable ozone under wayland, you will be using xwayland without those flags I think.


GPG key: 3DEA 6251 3C80 3538 3A24  5A12 E578 6B42 E8E5 D565

Offline

#449 2020-11-24 06:12:17

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

Re: chromium: hardware video acceleration with VA-API

AMDGPU MESA VA driver regressed since MESA 20.1.x for Ryzen. Only X11 session with --use-gl=desktop works. Wayland or --use-gl=egl caused AMDGPU to crash and unable to recover.
Bug had been filed, but issue likes this will take long time to resolve if ever. AMD is not very proactive in Linux driver quality, otherwise this is a very serious defect for user-space Va-API to crash the whole system.
https://gitlab.freedesktop.org/mesa/mesa/-/issues/3656

Anyway, since it didn't crash on you, this is good news for you. Perhaps you aren't using Radeon Vega graphics. You should use chromium-vaapi instead. The log showed a known Wayland bug that was patched in AUR chromium-vaapi together with MESA package with ANGLE_sync_control_rate EGL extension.

Offline

#450 2020-11-24 06:41:39

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

Re: chromium: hardware video acceleration with VA-API

agm28011997 wrote:

someone here with amdgpu has the chromium working in wayland with Vaapi?

Chromium vaapi on wayland/ozone is not implemented. Please check my earlier comment.

I have working chromium vaapi on xwayland by passing LIBVA_DRIVER_NAME=radeonsi as env.

Last edited by akarshanbiswas (2020-11-24 06:42:41)

Offline

Board footer

Powered by FluxBB