You are not logged in.

#751 2023-02-05 13:01:04

Sanvean
Member
Registered: 2023-02-05
Posts: 3

Re: chromium: hardware video acceleration with VA-API

Hi, I have noticed, that usage of

--use-gl=egl

with brave instantly floods my Xorg.log with ton of messages like this:

[  1192.270] (II) modeset(0): EDID vendor "TMX", prod id 5472
[  1192.270] (II) modeset(0): Using hsync ranges from config file
[  1192.270] (II) modeset(0): Using vrefresh ranges from config file
[  1192.270] (II) modeset(0): Printing DDC gathered Modelines:
[  1192.270] (II) modeset(0): Modeline "3200x2000"x0.0  631.80  3200 3248 3280 3375  2000 2023 2028 2080 +hsync +vsync (187.2 kHz eP)
[  1192.270] (II) modeset(0): Modeline "3200x2000"x0.0  421.20  3200 3248 3280 3375  2000 2023 2028 2080 +hsync +vsync (124.8 kHz e)

Each tab switching produces couple of such blocks of messages and during video playback the rate of such mesaages becomes absolutely insane.
That applies to any chromium-based browser I have tried to use.

Could you please check your Xorg logs, it seems that such behavior may reduce SSD lifespan.

Offline

#752 2023-02-06 19:08:38

salvaju29ro
Member
Registered: 2023-01-26
Posts: 5

Re: chromium: hardware video acceleration with VA-API

Sanvean wrote:

Hi, I have noticed, that usage of

--use-gl=egl

with brave instantly floods my Xorg.log with ton of messages like this:

[  1192.270] (II) modeset(0): EDID vendor "TMX", prod id 5472
[  1192.270] (II) modeset(0): Using hsync ranges from config file
[  1192.270] (II) modeset(0): Using vrefresh ranges from config file
[  1192.270] (II) modeset(0): Printing DDC gathered Modelines:
[  1192.270] (II) modeset(0): Modeline "3200x2000"x0.0  631.80  3200 3248 3280 3375  2000 2023 2028 2080 +hsync +vsync (187.2 kHz eP)
[  1192.270] (II) modeset(0): Modeline "3200x2000"x0.0  421.20  3200 3248 3280 3375  2000 2023 2028 2080 +hsync +vsync (124.8 kHz e)

Each tab switching produces couple of such blocks of messages and during video playback the rate of such mesaages becomes absolutely insane.
That applies to any chromium-based browser I have tried to use.

Could you please check your Xorg logs, it seems that such behavior may reduce SSD lifespan.

Are you sure it's the fault of

--use-gl=egl

?

I also have these Xorg log messages but I don't have that flag

cat /home/salvatore/.config/chromium-flags.conf
--enable-features=WebUIDarkMode
--force-dark-mode
--disable-smooth-scrolling
--force-device-scale-factor=1.2
[    10.088] (II) modeset(0): EDID vendor "HPN", prod id 13360
[    10.088] (II) modeset(0): Using hsync ranges from config file
[    10.088] (II) modeset(0): Using vrefresh ranges from config file
[    10.088] (II) modeset(0): Printing DDC gathered Modelines:
[    10.088] (II) modeset(0): Modeline "1920x1080"x0.0  148.50  1920 2008 2052 2200  1080 1084 1089 1125 +hsync +vsync (67.5 kHz eP)
[    10.088] (II) modeset(0): Modeline "800x600"x0.0   40.00  800 840 968 1056  600 601 605 628 +hsync +vsync (37.9 kHz e)
[    10.088] (II) modeset(0): Modeline "640x480"x0.0   25.18  640 656 752 800  480 490 492 525 -hsync -vsync (31.5 kHz e)
[    10.088] (II) modeset(0): Modeline "720x400"x0.0   28.32  720 738 846 900  400 412 414 449 -hsync +vsync (31.5 kHz e)
[    10.088] (II) modeset(0): Modeline "1024x768"x0.0   65.00  1024 1048 1184 1344  768 771 777 806 -hsync -vsync (48.4 kHz e)
[    10.088] (II) modeset(0): Modeline "1280x720"x60.0   74.48  1280 1336 1472 1664  720 721 724 746 -hsync +vsync (44.8 kHz e)
[    10.088] (II) modeset(0): Modeline "1600x900"x60.0  119.00  1600 1696 1864 2128  900 901 904 932 -hsync +vsync (55.9 kHz e)
[    10.088] (II) modeset(0): Modeline "1680x1050"x0.0  146.25  1680 1784 1960 2240  1050 1053 1059 1089 -hsync +vsync (65.3 kHz e)
[    10.088] (II) modeset(0): Modeline "1440x900"x0.0  106.50  1440 1520 1672 1904  900 903 909 934 -hsync +vsync (55.9 kHz e)
[    10.088] (II) modeset(0): Modeline "1280x800"x0.0   83.50  1280 1352 1480 1680  800 803 809 831 -hsync +vsync (49.7 kHz e)
[    10.088] (II) modeset(0): Modeline "1280x1024"x0.0  108.00  1280 1328 1440 1688  1024 1025 1028 1066 +hsync +vsync (64.0 kHz e)
[    10.309] (II) modeset(0): Allocate new frame buffer 1920x1080 stride

Offline

#753 2023-02-07 15:12:38

Sanvean
Member
Registered: 2023-02-05
Posts: 3

Re: chromium: hardware video acceleration with VA-API

salvaju29ro wrote:

Are you sure it's the fault of

--use-gl=egl

?

I also have these Xorg log messages but I don't have that flag

I am absolutely sure about that.

Messages in your log are absolutely OK, because they are produced only once at Xorg startup (look at the timestamps) and I bet, you only see them just at the beginning of your log file.

In my case there are literally thousands of them, because they are produced constantly during video playback and tab switching. They appear in such quantities only when I enable egl option. When egl is not used they appear only once at the beginning of log file, just like in your case.

Last edited by Sanvean (2023-02-07 15:16:23)

Offline

#754 2023-02-14 15:14:29

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

Re: chromium: hardware video acceleration with VA-API

Hi, I notice a regression on NVIDIA lately. I can't get video acceleration on NVIDIA (via libva-vdpau-driver-vp9-git). I'm ashamed to say I'm the maintainer of this package, but well...

If I use

--use-gl=desktop

then the GPU process failes to boot upright. With

--use-gl=egl

the process boots but I don't get any accelerated decoding. If I open up chrome://gpu/, I see that "Video Acceleration Information" is just plain blank for both encode and decode.

Anyone has a fix to this problem? I use the flags:

--enable-features=VaapiVideoEncoder,VaapiVideoDecoder,CanvasOopRasterization,RawDraw,VaapiVideoDecodeLinuxGL
--disable-features=UseChromeOSDirectVideoDecoder
--use-gl=egl
--enable-zero-copy
--ignore-gpu-blocklist
--disable-gpu-driver-bug-workarounds
--enable-gpu-rasterization
--enable-raw-draw
--enable-oop-rasterization
--enable-gpu-compositing

Enabling or disabling Vulkan doesn't change anything.

Offline

#755 2023-02-14 19:20:58

iamUndefined
Member
Registered: 2015-01-26
Posts: 4

Re: chromium: hardware video acceleration with VA-API

xuanrui wrote:

If I use

--use-gl=desktop

then the GPU process failes to boot upright.

Looks like that particular flag was removed in chromium 110.
https://bugs.chromium.org/p/chromium/is … id=1414171

Offline

#756 2023-02-15 09:17:05

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

Re: chromium: hardware video acceleration with VA-API

Thanks. I tried removing all --use-gl flags, but then I get a blank screen (known issue w/ libva-vdpau-driver-vp9-git, any help highly appreciated). EGL doesn't work either...

Offline

#757 2023-02-18 07:01:16

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

Re: chromium: hardware video acceleration with VA-API

"Video Acceleration Information" still blank both with and without --use-gl=egl.

Anyone has an NVIDIA card and working accel?

Offline

#758 2023-02-19 08:01:27

insilications
Member
Registered: 2020-02-12
Posts: 3

Re: chromium: hardware video acceleration with VA-API

xuanrui wrote:

"Video Acceleration Information" still blank both with and without --use-gl=egl.

Anyone has an NVIDIA card and working accel?

Nope. Can't make it work since --use-gl=desktop was removed.

https://bugs.chromium.org/p/chromium/is … id=1414171

Offline

#759 2023-02-20 16:42:26

Sanvean
Member
Registered: 2023-02-05
Posts: 3

Re: chromium: hardware video acceleration with VA-API

I've almost managed to work vaapi in my browser with Vulkan. Intel_gpu_top shows that acceleration is used, but in youtube video I see distorted picture, as if it was text and rows were shifted.

What can cause such behavior?

pNX1YTX.png

Offline

#760 2023-02-21 08:19:10

richardm
Member
Registered: 2023-02-19
Posts: 3

Re: chromium: hardware video acceleration with VA-API

I've managed to get acceleration with ONE format: h.264. I had to use this:

aur/chromium-wayland-vaapi 110.0.5481.100-1 (+11 0.65) (Installed)
Chromium, patched to enable VA-API video decoding on the Ozone Wayland backend

...and I had to launch it with a basket of switches:

--enable-features=VaapiVideoDecoder --use-gl=egl --enable-features=VaapiIgnoreDriverChecks --ozone-platform=wayland

This under Wayland (obviously) with amdgpu and a Polaris10.

I've had ZERO success getting any acceleration with google-chrome-stable. Firefox will also accelerate h.264 with MOZ_PLATFORM_WAYLAND=1 and a bunch of overrides in about:config -- no idea which one actually made it happen.

Some of this can be blamed on my circa-2016 GPU which lacks VP9 and AV1 hardware decode. But h.264 ought to "just work" and it doesn't. I've spent hours on this and I've even tried some flatpaks (the Microsoft Edge flatpak can be coaxed into h.264 h/w decode if you stroke it just right).

Offline

#761 2023-02-23 02:20:27

thubble
Member
Registered: 2023-01-21
Posts: 4

Re: chromium: hardware video acceleration with VA-API

I updated my patch to support AMD Vulkan drivers with VaapiVideoDecoder, it now works with Chromium 110: https://gist.github.com/thubble/235806c … 9173d24d9f

It looks like the Chromium devs added some infrastructure for supporing AMD's disjoint VAAPI planes, but it's not yet complete. I tried using the helper methods they created to bind disjoint planes, but it actually caused a GPU reset. So, it still needs this hacky patch. Hopefully they'll get it actually working soon.

With the patch, I get full zero-copy acceleration (on X11/XWayland) running with

--enable-features=VaapiVideoDecoder,UseChromeOSDirectVideoDecoder,VaapiIgnoreDriverChecks,PlatformHEVCDecoderSupport,Vulkan,DefaultANGLEVulkan,VulkanFromANGLE

Wayland native probably won't work because it doesn't support using the Vulkan backend for ANGLE. (ANGLE landed support for it recently, but it hasn't been enabled in Chromium).

Theoretically, Intel GPUs should work fine (on X11) with the above flags, with no patches (unless you want to add HEVC support).

Offline

#762 2023-02-23 09:32:25

Arup
Member
From: Earth
Registered: 2014-02-20
Posts: 95

Re: chromium: hardware video acceleration with VA-API

I have no issues with hardware acceleration using chrome based browsers and nvidia card with libva-vdpau-driver and libvdpau-va-gl be it google chrome and opera, both being Flatpak package btw.

Offline

#763 2023-02-23 09:49:00

seth
Member
Registered: 2012-09-03
Posts: 58,974

Re: chromium: hardware video acceleration with VA-API

So completely random versions, what is kinda unrelated to the ongoing thread.
Also libva-vdpau-driver and libvdpau-va-gl is cyclic - one does vdpau over vaapi and the other vaapi over vdpau.

It's good that you have "no issues", but I'd look into about:gpu to see what you're actually using there…

Offline

#764 2023-03-02 12:07:19

asklow
Member
Registered: 2022-11-07
Posts: 58

Re: chromium: hardware video acceleration with VA-API

Same here. Video acceleration in chromium completely got borked. Firefox still works atleast for me (nvidia).

Offline

#765 2023-03-02 12:48:06

ttyykk
Member
Registered: 2023-03-02
Posts: 1

Re: chromium: hardware video acceleration with VA-API

I also encountered the same problem(Intel)
I was able to hw accelerate a week ago.

Last edited by ttyykk (2023-03-02 12:52:21)

Offline

#766 2023-03-08 11:29:43

n0q
Member
Registered: 2023-03-08
Posts: 1

Re: chromium: hardware video acceleration with VA-API

--use-gl=angle seems to be working for me on nvidia with brave. I'm accelerated with it, and unaccelerated without it. But I've also been experiencing periodic 1-2 second freezes under x11 since doing this, which go away after backing out of this change, occurring across multiple systems. I've had no luck tracking down a cause or even an event in any log file, so if this works for you but also results in freezes, I'd like to know.

--enable-gpu-rasterization
--enable-zero-copy
--enable-features=VaapiVideoDecoder
--use-gl=angle
--enable-accelerated-video-decode

Last edited by n0q (2023-03-08 11:53:29)

Offline

#767 2023-03-12 06:11:41

insilications
Member
Registered: 2020-02-12
Posts: 3

Re: chromium: hardware video acceleration with VA-API

chromium 109.0.5414.74 is the last one that works with  libva-vdpau-driver-vp9-git and use-gl=desktop and nvidia. Keeping it they manage to make VaapiVideoDecoder work under nvidia vulkan

Offline

#768 2023-03-15 15:44:55

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

Re: chromium: hardware video acceleration with VA-API

n0q wrote:

--use-gl=angle seems to be working for me on nvidia with brave. I'm accelerated with it, and unaccelerated without it. But I've also been experiencing periodic 1-2 second freezes under x11 since doing this, which go away after backing out of this change, occurring across multiple systems. I've had no luck tracking down a cause or even an event in any log file, so if this works for you but also results in freezes, I'd like to know.

--enable-gpu-rasterization
--enable-zero-copy
--enable-features=VaapiVideoDecoder
--use-gl=angle
--enable-accelerated-video-decode

With the same flags, I am indeed accelerated on Chromium too, but unfortunately the video does not get rendered which makes this useless...

Offline

#769 2023-03-21 17:28:07

gbcbooks
Member
Registered: 2014-12-03
Posts: 25

Re: chromium: hardware video acceleration with VA-API

my laptop is DELL XPS 9380

my chrome-flags.conf is :
--use-vulkan
--enable-features=VaapiVideoEncoder,VaapiVideoDecoder,CanvasOopRasterization
--disable-features=UseChromeOSDirectVideoDecoder,UseSkiaRenderer
--disable-reading-from-canvas
--webgpu
--ignore-gpu-blocklist
--enable-raw-draw
--disable-gpu-driver-workarounds
--use-gl=egl

and --use-gl=egl is work for me

Offline

#770 2023-03-22 18:13:35

topcat01
Member
Registered: 2019-09-17
Posts: 133

Re: chromium: hardware video acceleration with VA-API

Thanks for that. On my desktop with Intel graphics, adding --use-gl=egl to the other options makes vaapi decoding work again.

Offline

#771 2023-03-30 17:49:09

adi222
Member
Registered: 2023-01-03
Posts: 11

Re: chromium: hardware video acceleration with VA-API

as expected new libva 2.18 broke everything again... Setting LIBVA_DRI3_DISABLE=1 didn't fix anyway

nevermind, just setting flag in bashrc didn't work, it works when you will set it in /etc/environment and reboot

Last edited by adi222 (2023-03-30 19:28:02)

Offline

#772 2023-04-06 13:23:23

SoongVilda
Member
Registered: 2022-02-08
Posts: 1

Re: chromium: hardware video acceleration with VA-API

I managed hardware-accelerated video on my Dell Inspiron 14z 5406
CPU: 11th Gen Intel Core i5-1135G7
GPU: Intel TigerLake-LP GT2 [Iris Xe Graphics]

Google Chrome dev 113 looks good!
--use-vulkan
--enable-features=VaapiVideoEncoder,VaapiVideoDecoder,CanvasOopRasterization,RawDraw,AllowQt,PlatformHEVCDecoderSupport,UseChromeOSDirectVideoDecoder
--disable-features=UseSkiaRenderer
--ignore-gpu-blocklist
--disable-gpu-driver-bug-workarounds
--webgpu
--enable-raw-draw
--enable-webrtc-pipewire-capturer
--enable-native-gpu-memory-buffers
--enable-zero-copy
--enable-unsafe-webgpu
--enable-drdc
--ui-enable-shared-image-cache-for-gpu
--enable-gpu-rasterization
--auto-dark-mode
--cast-streaming-hardware-h264
--cast-streaming-hardware-vp8
--enable-parallel-downloading
--enable-experimental-webassembly-features

Offline

#773 2023-04-07 20:25:53

mindbreaker
Member
Registered: 2006-01-23
Posts: 20

Re: chromium: hardware video acceleration with VA-API

adi222 wrote:

as expected new libva 2.18 broke everything again... Setting LIBVA_DRI3_DISABLE=1 didn't fix anyway

nevermind, just setting flag in bashrc didn't work, it works when you will set it in /etc/environment and reboot

For my Intel Kaby Lake following lines from [gbcbooks] worked well to GPU accelerate.

--use-vulkan
--enable-features=VaapiVideoEncoder,VaapiVideoDecoder,CanvasOopRasterization
--disable-features=UseChromeOSDirectVideoDecoder,UseSkiaRenderer
--disable-reading-from-canvas
--webgpu
--ignore-gpu-blocklist
--enable-raw-draw
--disable-gpu-driver-workarounds
--use-gl=egl

Today I updated the system again...and acceleration was gone.
Chromium 112.0.5615.49
libva 2.18
intel-media driver 23.1

Your suggestion to set LIBVA_DRI3_DISABLE=1  in  /etc/environment did not bring it back.

Can someone please help me out please?
Thanks in advance.

Last edited by mindbreaker (2023-04-07 20:26:36)

Offline

#774 2023-04-07 21:20:25

cbr1_
Member
Registered: 2019-02-09
Posts: 9

Re: chromium: hardware video acceleration with VA-API

I had to start using --use-gl=egl a while ago or else vaapi wouldn't work (i only needed VaapiVideoEncoder enabled and UseChromeOSDirectVideoDecoder disabled before).
Now --use-gl=egl  breaks hardware acceleration entirely (literally everything on chrome:gpu gets disabled) so it seems there's literally no workaround for me anymore lol.

Offline

#775 2023-04-08 01:25:49

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

Re: chromium: hardware video acceleration with VA-API

indeed update to v112 killed vaapi. I was able to get it working again with the following flags.

--pasword-store=gnome
--ozone-platform-hint=auto
--extension-mime-request-handling=always-prompt-for-install
--enable-features=WebUIDarkMode,VaapiVideoDecoder,VaapiVideoEncoder,RawDraw,CanvasOopRasterization
--disable-features=UseChromeOSDirectVideoDecoder,SidePanel,UseSkiaRenderer
--force-dark-mode
--use-vulkan
--enable-gpu-rasterization
--enable-zero-copy
--enable-hardware-overlays
--enable-native-gpu-memory-buffers

I think --use-vulkan doesn't help so you could remove it.

Edit: I also had to start using this env variable. LIBVA_DRI3_DISABLE=1

My cpu is i7-11800H

Last edited by justkdng (2023-04-08 01:27:21)


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

Offline

Board footer

Powered by FluxBB