Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VAAPI does not work #116

Open
beew opened this issue Jul 5, 2021 · 18 comments
Open

VAAPI does not work #116

beew opened this issue Jul 5, 2021 · 18 comments

Comments

@beew
Copy link

beew commented Jul 5, 2021

Chromium-browser 92.0.4503.0 Ubuntu 20.04 installed via the ppa

I started Chromium with

LIBVA_DRIVER_NAME=i965 chromium-browser --use-gl=desktop --enable-features=VaapiVideoDecoder

I have enabled override software rendering list and after starting Chromium this way I checked about:gpu and hardware decoding was enabled.

But went to Youtube to watch any video and checked Developer_Tools > Media and it showed that vaapi is not working and intel-gpu-top also show 0% under video.(as well the terminal didn't show any info about vaapi version and driver initiation and such)

I have installed h264ify addon on Chromium. VAAPI for the same videos works in Firefox.

When Chromium started I got these errors

[833744:833744:0705/001603.508396:ERROR:gpu_init.cc(441)] Passthrough is not supported, GL is desktop
[833744:833744:0705/001603.552650:ERROR:sandbox_linux.cc(374)] InitializeSandbox() called with multiple threads in process gpu-process.

I have intel ivybridge graphic, no Nvidia.

@beew
Copy link
Author

beew commented Jul 8, 2021

Sorry I should be clear this is ver92 from the dev ppa. ver91 in the beta ppa works.

@JurgenWolf
Copy link

JurgenWolf commented Oct 30, 2021

Looks that HW decode (VAAPI) doesn't work at all on NVIDIA in the recent 95 build...
No problems in 93.

And as bonus: bad web fonts render in 95.

@beew
Copy link
Author

beew commented Oct 30, 2021

Looks that HW decode (VAAPI) doesn't work at all on NVIDIA in the recent 95 build... No problems in 93.

Actually VAAPI doesn't work for Chromium 95 because there is no way to disable the ozone platform which atm doesn't support VAAPI. It has nothing to do with Nvidia, it doesn't work on Intel either. The good news is there is a commit that fixes it and it will land on Chromium 96. So just skip 95.

https://chromium.googlesource.com/chromium/src/+/a4de986102a45e29c3ef596f22704bdca244c26c

@xswqaz
Copy link

xswqaz commented Nov 15, 2021

Failed to Hardware decode with vdpau-va-driver
Version 97.0.4692.8 (Developer Build) Ubuntu 20.04 (64-bit)

00:00:02.801 | event | "kPlay"
00:00:02.891 | kIsVideoDecryptingDemuxerStream | false
00:00:02.891 | kVideoDecoderName | "VDAVideoDecoder"
00:00:02.891 | kIsPlatformVideoDecoder | true
00:00:02.891 | info | "Selected VDAVideoDecoder for video decoding, config: codec: h264, profile: h264 main, level: not available, alpha_mode: is_opaque, coded size: [854,480], visible rect: [0,0,854,480], natural size: [854,480], has extra data: false, encryption scheme: Unencrypted, rotation: 0°, flipped: 0, color space: {primaries:BT709, transfer:BT709, matrix:BT709, range:LIMITED}"
00:00:02.891 | pipeline_state | "kPlaying"
00:00:02.923 | seek_target | 5950.4
00:00:02.934 | seek_target | 5953.019705
00:00:02.936 | pipeline_state | "kSeeking"
00:00:02.991 | pipeline_state | "kPlaying"
00:00:02.997 | error | "VDA Error 4"
00:00:02.997 | warning | "video decoder fallback after initial decode error."
00:00:02.997 | info | "Failed to initialize VpxVideoDecoder"
00:00:02.997 | info | "Failed to initialize Dav1dVideoDecoder"
00:00:03.001 | kIsVideoDecryptingDemuxerStream | false
00:00:03.001 | kVideoDecoderName | "FFmpegVideoDecoder"
00:00:03.001 | kIsPlatformVideoDecoder | false
00:00:03.001 | info | "Selected FFmpegVideoDecoder for video decoding, config: codec: h264, profile: h264 main, level: not available, alpha_mode: is_opaque, coded size: [854,480], visible rect: [0,0,854,480], natural size: [854,480], has extra data: false, encryption scheme: Unencrypted, rotation: 0°, flipped: 0, color space: {primaries:BT709, transfer:BT709, matrix:BT709, range:LIMITED}"
Graphics Feature Status
Canvas: Hardware accelerated
Canvas out-of-process rasterization: Disabled
Compositing: Hardware accelerated
Multiple Raster Threads: Disabled
Out-of-process Rasterization: Hardware accelerated
OpenGL: Enabled
Rasterization: Hardware accelerated
Raw Draw: Disabled
Skia Renderer: Enabled
Video Decode: Hardware accelerated
Video Encode: Software only. Hardware acceleration disabled
Vulkan: Disabled
WebGL: Hardware accelerated
WebGL2: Hardware accelerated

@saiarcot895
Copy link
Owner

@xswqaz Can you run Chromium from the following command line with these arguments, and paste the output here? Hopefully there's a bit more info there.

chromium-browser --enable-logging=stderr --log-level=0 --vmodule=vaapi_wrapper=4,vaapi_video_decode_accelerator=4

@xswqaz
Copy link

xswqaz commented Nov 18, 2021

Here is log

chromium-browser --enable-logging=stderr --log-level=0 --vmodule=vaapi_wrapper=4,vaapi_video_decode_accelerator=4 --enable-features=VaapiVideoDecoder
[28840:28840:1119/044412.071637:WARNING:account_consistency_mode_manager.cc(65)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured.
[28840:28840:1119/044416.158318:INFO:CONSOLE(3820)] "LegacyDataMixin will be applied to all legacy elements.
Set `_legacyUndefinedCheck: true` on element class to enable.", source: https://www.youtube.com/s/desktop/e2e70717/jsbin/desktop_polymer.vflset/desktop_polymer.js (3820)
[28840:28866:1119/044416.921093:ERROR:chrome_browser_main_extra_parts_metrics.cc(227)] START: ReportBluetoothAvailability(). If you don't see the END: message, this is crbug.com/1216328.
[28840:28866:1119/044416.923018:ERROR:chrome_browser_main_extra_parts_metrics.cc(230)] END: ReportBluetoothAvailability()
*** stack smashing detected ***: terminated
Received signal 6
#0 0x56232af7f9c9 (/usr/lib/chromium-browser/chromium-browser+0x50479c8)
#1 0x56232aee6673 (/usr/lib/chromium-browser/chromium-browser+0x4fae672)
#2 0x56232af7f4b1 (/usr/lib/chromium-browser/chromium-browser+0x50474b0)
#3 0x7fc32e1cc3c0 (/usr/lib/x86_64-linux-gnu/libpthread-2.31.so+0x153bf)
#4 0x7fc32cfb918b gsignal
#5 0x7fc32cf98859 abort
#6 0x7fc32d0033ee (/usr/lib/x86_64-linux-gnu/libc-2.31.so+0x903ed)
#7 0x7fc32d0a5b4a __fortify_fail
#8 0x7fc32d0a5b16 __stack_chk_fail
#9 0x56232a9ab615 (/usr/lib/chromium-browser/chromium-browser+0x4a73614)
#10 0x56232a9ac5d3 (/usr/lib/chromium-browser/chromium-browser+0x4a745d2)
#11 0x56232a9a9b9b (/usr/lib/chromium-browser/chromium-browser+0x4a71b9a)
#12 0x56232a9aa4cd (/usr/lib/chromium-browser/chromium-browser+0x4a724cc)
#13 0x5623270d3ed8 ChromeMain
#14 0x7fc32cf9a0b3 __libc_start_main
#15 0x5623270d3cde _start
  r8: 0000000000000000  r9: 00007fffb21f86a0 r10: 0000000000000008 r11: 0000000000000246
 r12: 00007fffb21f8920 r13: 0000000000000020 r14: 00007fc32e1f0000 r15: 0000000000000001
  di: 0000000000000002  si: 00007fffb21f86a0  bp: 00007fffb21f8a20  bx: 00007fc32ba6de00
  dx: 0000000000000000  ax: 0000000000000000  cx: 00007fc32cfb918b  sp: 00007fffb21f86a0
  ip: 00007fc32cfb918b efl: 0000000000000246 cgf: 002b000000000033 erf: 0000000000000000
 trp: 0000000000000000 msk: 0000000000000000 cr2: 0000000000000000
[end of stack trace]
Received signal 11 <unknown> 03e800000001
#0 0x56232af7f9c9 (/usr/lib/chromium-browser/chromium-browser+0x50479c8)
#1 0x56232aee6673 (/usr/lib/chromium-browser/chromium-browser+0x4fae672)
#2 0x56232af7f4b1 (/usr/lib/chromium-browser/chromium-browser+0x50474b0)
#3 0x7fc32e1cc3c0 (/usr/lib/x86_64-linux-gnu/libpthread-2.31.so+0x153bf)
#4 0x7fc32cf98941 abort
#5 0x7fc32d0033ee (/usr/lib/x86_64-linux-gnu/libc-2.31.so+0x903ed)
#6 0x7fc32d0a5b4a __fortify_fail
#7 0x7fc32d0a5b16 __stack_chk_fail
#8 0x56232a9ab615 (/usr/lib/chromium-browser/chromium-browser+0x4a73614)
#9 0x56232a9ac5d3 (/usr/lib/chromium-browser/chromium-browser+0x4a745d2)
#10 0x56232a9a9b9b (/usr/lib/chromium-browser/chromium-browser+0x4a71b9a)
#11 0x56232a9aa4cd (/usr/lib/chromium-browser/chromium-browser+0x4a724cc)
#12 0x5623270d3ed8 ChromeMain
#13 0x7fc32cf9a0b3 __libc_start_main
#14 0x5623270d3cde _start
  r8: 0000000000000000  r9: 00007fffb21f86a0 r10: 0000000000000008 r11: 0000000000000246
 r12: 00007fffb21f8920 r13: 0000000000000020 r14: 00007fc32e1f0000 r15: 0000000000000001
  di: 0000000000000002  si: 00007fffb21f86a0  bp: 00007fffb21f8a20  bx: 00007fc32ba6de00
  dx: 0000000000000000  ax: 0000000000000000  cx: 00007fc32cfb918b  sp: 00007fffb21f87c0
  ip: 00007fc32cf98941 efl: 0000000000010246 cgf: 002b000000000033 erf: 0000000000000000
 trp: 000000000000000d msk: 0000000000000000 cr2: 0000000000000000
[end of stack trace]
[28879:28879:1119/044417.905406:VERBOSE2:vaapi_video_decode_accelerator.cc(202)] Initialize(): Initializing VAVDA, profile: h264 main
Failed to create dedicated X11 display!
[28879:29011:1119/044418.115009:VERBOSE2:vaapi_video_decode_accelerator.cc(483)] DecodeTask(): Decoder requesting a new set of surfaces
[28879:28879:1119/044418.129512:VERBOSE2:vaapi_video_decode_accelerator.cc(578)] InitiateSurfaceSetChange():  |requested_num_pics_| = 6; |requested_num_reference_frames_| = 7
[28879:28879:1119/044418.129997:VERBOSE2:vaapi_video_decode_accelerator.cc(644)] TryFinishSurfaceSetChange(): Requesting 6 pictures of size: 864x480 and visible rectangle = 0,0 854x480
[28879:28879:1119/044418.157057:VERBOSE1:vaapi_video_decode_accelerator.cc(144)] NotifyError(): Notifying of error 4
[28879:28879:1119/044418.174829:VERBOSE2:vaapi_video_decode_accelerator.cc(1043)] Cleanup(): Destroying VAVDA
[28840:28840:1119/044421.283124:INFO:CONSOLE(0)] "The resource https://r4---sn-3qqp-ioqls.googlevideo.com/generate_204?conn2 was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate `as` value and it is preloaded intentionally.", source: https://www.youtube.com/watch?v=hxAF6lVXYJI (0)
[28840:28840:1119/044421.283717:INFO:CONSOLE(0)] "The resource https://i.ytimg.com/generate_204 was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate `as` value and it is preloaded intentionally.", source: https://www.youtube.com/watch?v=hxAF6lVXYJI (0)
[28840:28840:1119/044421.284075:INFO:CONSOLE(0)] "The resource https://r4---sn-3qqp-ioqls.googlevideo.com/generate_204 was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate `as` value and it is preloaded intentionally.", source: https://www.youtube.com/watch?v=hxAF6lVXYJI (0)
[28991:29009:1119/044422.769840:WARNING:sync_reader.cc(187)] ASR: No room in socket buffer.: Broken pipe (32)
[28840:28840:1119/044423.288355:WARNING:pref_notifier_impl.cc(40)] Pref observer for media_router.cast_allow_all_ips found at shutdown.

@xswqaz
Copy link

xswqaz commented Nov 20, 2021

After setting "Enable software compositing window manager" on
It enabled to VDAVideoDecoder youtube
But, screen is black. what's wrong?

@saiarcot895
Copy link
Owner

I'm suspecting it's something specific to do with NVidia, but not sure what. AMD appears to be working fine.

@marioroy
Copy link

I added a script today to install this chromium-ubuntu-build and it works great with NVIDIA graphics including hardware video acceleration. The GitHub repository builds both VA-API drivers for NVIDIA graphics.

@ghost
Copy link

ghost commented May 22, 2022

I added a script today to install this chromium-ubuntu-build and it works great with NVIDIA graphics including hardware video acceleration. The GitHub repository builds both VA-API drivers for NVIDIA graphics.

Can you guide the same for Arch Linux as well? It's a hazzle for me to not have a working VA--API decoder.

@xswqaz
Copy link

xswqaz commented May 22, 2022

@pc00per
You can vaapi decode with Window manager GLX setting
and option --use-gl=desktop

No need to customize chromium version

@ghost
Copy link

ghost commented May 22, 2022

@pc00per You can vaapi decode with Window manager GLX setting and option --use-gl=desktop

No need to customize chromium version

Tnx. But I've tried desktop glx & it's of no use. None of my browsers decode using hw acceleration at all. Chromium strictly stick to VpxVideoDecoder whatever I do.

@xswqaz
Copy link

xswqaz commented May 22, 2022

Have you tried with chrome Official version?

--disable-features=UseChromeOSDirectVideoDecoder
--enable-features=VaapiVideoDecoder
--use-gl=desktop

and You need to install vdpau-va-driver backend. No problem with vainfo
http://ppa.launchpad.net/saiarcot895/chromium-dev/ubuntu/pool/main/v/vdpau-video/vdpau-va-driver_0.7.4-7ubuntu1~ppa2~20.04.1_amd64.deb

@ghost
Copy link

ghost commented May 22, 2022

Have you tried with chrome Official version?

--disable-features=UseChromeOSDirectVideoDecoder --enable-features=VaapiVideoDecoder --use-gl=desktop

and You need to install vdpau-va-driver backend. No problem with vainfo http://ppa.launchpad.net/saiarcot895/chromium-dev/ubuntu/pool/main/v/vdpau-video/vdpau-va-driver_0.7.4-7ubuntu1~ppa2~20.04.1_amd64.deb

I've tried everything. Modifications of flags has nothing to do with the absense of hardware-accelerated-video-decode
It's the browser's vaapi issue (failed to Initialize VaapiVideoDecoder)

@xswqaz
Copy link

xswqaz commented May 22, 2022

Youtube default codec is vp9, and I recommend plugin h264ify

@ghost
Copy link

ghost commented May 22, 2022

Youtube default codec is vp9, and I recommend plugin h264ify

H264 uses DA1VD Decoder, which too doesn't have HW acceleration.

@xswqaz
Copy link

xswqaz commented May 22, 2022

No h264 is decoded by VDAVideoDecoder

@xswqaz
Copy link

xswqaz commented May 22, 2022

There is no option for hardware decoder in latest chrome version

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants