You are not logged in.

#976 2024-03-10 17:28:40

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

Re: chromium: hardware video acceleration with VA-API

Reuter wrote:

Is the mesa patch from hmann still necessary?

Edit: Apparently so. X11 AMD still dysfunctional in Chrome, despite chrome://gpu showing Encoding to be supported.

yes, without his patch doesn't work here on 6650xt
with mesa-git with applied patches it does work on x11 and with xwayland, didnt try native wayland but i assume it won't work
on mine laptop with intel 8350u and uhd620 vaapi works in chrome with native wayland without issues

Offline

#977 2024-03-15 03:18:48

lxsq
Member
Registered: 2024-03-15
Posts: 1

Re: chromium: hardware video acceleration with VA-API

As long as chrome is using Vulkan, would they support Vulkan Video as well? Already tired about VA-API. Why would a same API work only on Intel, but not AMD?

Offline

#978 2024-03-18 10:45:57

Reuter
Member
Registered: 2023-05-12
Posts: 7

Re: chromium: hardware video acceleration with VA-API

Sadly applying the hmann patch to the latest mesa-git (24.1.0) breaks KDE Plasma 6. X11 has graphical glitches while a Wayland session wouldn't even start.

Last edited by Reuter (2024-03-18 10:46:40)

Offline

#979 2024-03-21 10:58:52

0BADC0DE
Member
From: Regnum Utriusque Siciliae
Registered: 2018-02-21
Posts: 270

Re: chromium: hardware video acceleration with VA-API

It seems I got it finally working on Chrome/Chromium/Vivaldi but not yet on Falkon.

Chrome: 124.0.6356.2 (yup, "unstable")
Chromium:  122.0.6261.128
Vivaldi: 6.6.3271.53
Falkon:  24.02.0

This is my current system setup:

Kernel Version : 6.8.1.zen1-1
Plasma Version : 6.0.2-3
KDE Version : 24.02.0-1
Frameworks Version : 5.115.0-1
Qt5 Version : 5.15.13+kde+r7-1
Qt6 Version : 6.6.2-4
Wayland Version : 1.22.0-1
XOrg/Wayland Version : 23.2.4-2
Mesa Version : 1:24.0.3-1
LibVA Version : 2.21.0-1
VDPAU Version : 1.5-2
GPU: TigerLake-LP GT2 [Iris Xe Graphics]

These are the CLI options  I use to start chromium-based browsers (relevant options only):

--enable-features=VaapiVideoDecodeLinuxGL,VaapiVideoEncoder --ignore-gpu-blocklist --ozone-platform=wayland

There are the flags I enabled (not sure they are all needed):

chrome://flags/#ignore-gpu-blocklist
chrome://flags/#enable-gpu-rasterization
chrome://flags/#enable-zero-copy
chrome://flags/#cast-streaming-hardware-h264
chrome://flags/#enable-global-vaapi-lock
chrome://flags/#enable-drdc
chrome://flags/#canvas-oop-rasterization
chrome://flags/#enable-raw-draw  # <<< not available in chrome-unstable
chrome://flags/#use-gpu-scheduler-dfs

Anyway, I can now see it working, on youtube for example, because when I watch a video I can fire "sudo intel_gpu_top" on a terminal and see something like this (chorme-unstable):

intel-gpu-top: Intel Tigerlake (Gen12) @ /dev/dri/card1 -  126/ 127 MHz;  80% RC6;  0.51/ 4.97 W;      467 irqs/s

         ENGINES     BUSY                                                                               MI_SEMA MI_WAIT
       Render/3D   13.61% |██████████▎                                                                |      0%      0%
         Blitter    0.00% |                                                                           |      0%      0%
           Video    0.79% |▋                                                                          |      0%      0%
    VideoEnhance    2.68% |██▏                                                                        |      0%      0%

   PID              NAME        Render/3D               Blitter                 Video              VideoEnhance         
 47851            chrome |█▋                   ||                     ||▏                    ||▌                    |
   819      kwin_wayland |█▏                   ||                     ||                     ||                     |
     1           systemd |                     ||                     ||                     ||                     |
   902          Xwayland |                     ||                     ||                     ||                     |
   926             kded6 |                     ||                     ||                     ||                     |
   927         ksmserver |                     ||                     ||                     ||                     |
   959       plasmashell |                     ||                     ||                     ||                     |

Video and VideoEnhance are both in use by chrome itself!

The same goes for chromium and vivaldi. Nothing happening for falkon (despite the single "enable hardware acceleration" flag is set).

I am not sure about a couple of things like:
* Blitter (usage keeps staying to zero)
* video encoding (not sure it is happening as my webcam refuses to work now)

I think this is better than nothing, though.

Last edited by 0BADC0DE (2024-03-21 11:06:25)


Maybe Computers Will Never Become As Intelligent
As Humans. Surely They Won't Ever Become So Stupid.

Offline

#980 2024-04-01 11:48:03

theDude1848
Member
Registered: 2023-11-27
Posts: 4

Re: chromium: hardware video acceleration with VA-API

On Chromium 123 HW-Acceleration with Mesa-git and Patch from Hmon is not working anymore on Gnome. Any ideas how to fix it? Did flags changed?

Offline

#981 2024-04-01 14:56:27

LinX
Member
Registered: 2012-11-20
Posts: 10

Re: chromium: hardware video acceleration with VA-API

theDude1848 wrote:

On Chromium 123 HW-Acceleration with Mesa-git and Patch from Hmon is not working anymore on Gnome. Any ideas how to fix it? Did flags changed?

It's not working with KDE 6 too. Especially flag --enable-features=Vulkan causes all webpages to be blank and not render anything

Offline

#982 2024-04-02 16:51:18

Preycon
Member
From: México, D.F.
Registered: 2009-02-14
Posts: 51

Re: chromium: hardware video acceleration with VA-API

Not working from me anymore with intel graphics on KDE & Wayland, didn't change anything, was working ok.

Offline

#983 2024-04-12 01:11:06

jr1991
Member
Registered: 2024-02-08
Posts: 2

Re: chromium: hardware video acceleration with VA-API

Offline

#984 2024-04-14 08:55:47

darkbasic
Member
Registered: 2015-06-22
Posts: 33

Re: chromium: hardware video acceleration with VA-API

theDude1848 wrote:

On Chromium 123 HW-Acceleration with Mesa-git and Patch from Hmon is not working anymore on Gnome. Any ideas how to fix it? Did flags changed?

Are you sure you don't have --enable-features=RawDraw ?
It regressed in Chromium 123.

Offline

#985 2024-04-14 13:18:01

theDude1848
Member
Registered: 2023-11-27
Posts: 4

Re: chromium: hardware video acceleration with VA-API

Thanks for help. When RawDraw is enabled the websites are just a whitescreen.

These are my current flags working with HW-Acceleration in Chrome 123:

--use-gl=angle 
--use-angle=vulkan 
--enable-accelerated-video-decode 
--enable-features=Vulkan,VulkanFromANGLE,DefaultANGLEVulkan,VaapiIgnoreDriverChecks,VaapiVideoDecoder,PlatformHEVCDecoderSupport,UseMultiPlaneFormatForHardwareVideo

Offline

#986 2024-04-24 23:23:52

theDude1848
Member
Registered: 2023-11-27
Posts: 4

Re: chromium: hardware video acceleration with VA-API

darkbasic wrote:
theDude1848 wrote:

On Chromium 123 HW-Acceleration with Mesa-git and Patch from Hmon is not working anymore on Gnome. Any ideas how to fix it? Did flags changed?

Are you sure you don't have --enable-features=RawDraw ?
It regressed in Chromium 123.

I still installed current mesa-git and it's working now. Thanks for help.

Offline

#987 2024-04-25 05:18:02

0BADC0DE
Member
From: Regnum Utriusque Siciliae
Registered: 2018-02-21
Posts: 270

Re: chromium: hardware video acceleration with VA-API

theDude1848 wrote:
darkbasic wrote:
theDude1848 wrote:

On Chromium 123 HW-Acceleration with Mesa-git and Patch from Hmon is not working anymore on Gnome. Any ideas how to fix it? Did flags changed?

Are you sure you don't have --enable-features=RawDraw ?
It regressed in Chromium 123.

I still installed current mesa-git and it's working now. Thanks for help.

What about WebRTC hw en-/de-coding?

Last edited by 0BADC0DE (2024-04-25 05:18:20)


Maybe Computers Will Never Become As Intelligent
As Humans. Surely They Won't Ever Become So Stupid.

Offline

#988 2024-04-25 13:07:33

jmandawg
Member
Registered: 2011-10-19
Posts: 59

Re: chromium: hardware video acceleration with VA-API

Is HW accel broken on wayland with intel? 

It works until i add the following wayland flags to enable wayland:

--enable-features=VaapiVideoDecodeLinuxGL
--enable-features=UseOzonePlatform
--ozone-platform=wayland

UPDATE:

They must have fixed something after latest update (2 chromium updates today) now it works with just these flags:


--enable-features=VaapiVideoDecodeLinuxGL
--ozone-platform=wayland

Adding this flag seems to break it:

--enable-features=VaapiVideoDecodeLinuxGL

Last edited by jmandawg (Yesterday 01:56:56)

Offline

#989 Yesterday 16:04:50

noobaroo
Member
Registered: 2024-04-02
Posts: 10

Re: chromium: hardware video acceleration with VA-API

0BADC0DE wrote:

It seems I got it finally working on Chrome/Chromium/Vivaldi but not yet on Falkon.

Chrome: 124.0.6356.2 (yup, "unstable")
Chromium:  122.0.6261.128
Vivaldi: 6.6.3271.53
Falkon:  24.02.0

This is my current system setup:

Kernel Version : 6.8.1.zen1-1
Plasma Version : 6.0.2-3
KDE Version : 24.02.0-1
Frameworks Version : 5.115.0-1
Qt5 Version : 5.15.13+kde+r7-1
Qt6 Version : 6.6.2-4
Wayland Version : 1.22.0-1
XOrg/Wayland Version : 23.2.4-2
Mesa Version : 1:24.0.3-1
LibVA Version : 2.21.0-1
VDPAU Version : 1.5-2
GPU: TigerLake-LP GT2 [Iris Xe Graphics]

These are the CLI options  I use to start chromium-based browsers (relevant options only):

--enable-features=VaapiVideoDecodeLinuxGL,VaapiVideoEncoder --ignore-gpu-blocklist --ozone-platform=wayland

There are the flags I enabled (not sure they are all needed):

chrome://flags/#ignore-gpu-blocklist
chrome://flags/#enable-gpu-rasterization
chrome://flags/#enable-zero-copy
chrome://flags/#cast-streaming-hardware-h264
chrome://flags/#enable-global-vaapi-lock
chrome://flags/#enable-drdc
chrome://flags/#canvas-oop-rasterization
chrome://flags/#enable-raw-draw  # <<< not available in chrome-unstable
chrome://flags/#use-gpu-scheduler-dfs

Anyway, I can now see it working, on youtube for example, because when I watch a video I can fire "sudo intel_gpu_top" on a terminal and see something like this (chorme-unstable):

intel-gpu-top: Intel Tigerlake (Gen12) @ /dev/dri/card1 -  126/ 127 MHz;  80% RC6;  0.51/ 4.97 W;      467 irqs/s

         ENGINES     BUSY                                                                               MI_SEMA MI_WAIT
       Render/3D   13.61% |██████████▎                                                                |      0%      0%
         Blitter    0.00% |                                                                           |      0%      0%
           Video    0.79% |▋                                                                          |      0%      0%
    VideoEnhance    2.68% |██▏                                                                        |      0%      0%

   PID              NAME        Render/3D               Blitter                 Video              VideoEnhance         
 47851            chrome |█▋                   ||                     ||▏                    ||▌                    |
   819      kwin_wayland |█▏                   ||                     ||                     ||                     |
     1           systemd |                     ||                     ||                     ||                     |
   902          Xwayland |                     ||                     ||                     ||                     |
   926             kded6 |                     ||                     ||                     ||                     |
   927         ksmserver |                     ||                     ||                     ||                     |
   959       plasmashell |                     ||                     ||                     ||                     |

Video and VideoEnhance are both in use by chrome itself!

The same goes for chromium and vivaldi. Nothing happening for falkon (despite the single "enable hardware acceleration" flag is set).

I am not sure about a couple of things like:
* Blitter (usage keeps staying to zero)
* video encoding (not sure it is happening as my webcam refuses to work now)

I think this is better than nothing, though.

Have you actually looked in the "inspect" menu of the browser under the "media" tab? AFAIK GPU is always being used to some extent, even without full-blown hardware video decoding.

theDude1848 wrote:

Thanks for help. When RawDraw is enabled the websites are just a whitescreen.

These are my current flags working with HW-Acceleration in Chrome 123:

--use-gl=angle 
--use-angle=vulkan 
--enable-accelerated-video-decode 
--enable-features=Vulkan,VulkanFromANGLE,DefaultANGLEVulkan,VaapiIgnoreDriverChecks,VaapiVideoDecoder,PlatformHEVCDecoderSupport,UseMultiPlaneFormatForHardwareVideo

Are you using Intel? I'm using Intel Rocket Lake, and a couple years ago Chromium hardware decoding used to work, but recently I've noticed it doesn't anymore and I have tried everything to get it to work. I use KDE Wayland mainly, but I've tried on X11 and it doesn't work either. Here's my current config (note I have tried lots of different things, not just this): http://0x0.st/XH_S.txt
Any suggestions for me?

Offline

#990 Yesterday 20:44:03

jmandawg
Member
Registered: 2011-10-19
Posts: 59

Re: chromium: hardware video acceleration with VA-API

noobaroo wrote:

Are you using Intel? I'm using Intel Rocket Lake, and a couple years ago Chromium hardware decoding used to work, but recently I've noticed it doesn't anymore and I have tried everything to get it to work. I use KDE Wayland mainly, but I've tried on X11 and it doesn't work either. Here's my current config (note I have tried lots of different things, not just this): http://0x0.st/XH_S.txt
Any suggestions for me?

On KDE Plasma (wayland) it works for me with stock chromium.

Make sure your vaapi uses intel-media-driver.

and use ONLY the following flags, they work for me on intel tiger lake and normal chromium from the standard repo.

--enable-features=VaapiVideoDecodeLinuxGL
--ozone-platform=wayland

Last edited by jmandawg (Yesterday 20:44:50)

Offline

#991 Today 01:04:50

noobaroo
Member
Registered: 2024-04-02
Posts: 10

Re: chromium: hardware video acceleration with VA-API

jmandawg wrote:

On KDE Plasma (wayland) it works for me with stock chromium.

Make sure your vaapi uses intel-media-driver.

and use ONLY the following flags, they work for me on intel tiger lake and normal chromium from the standard repo.

--enable-features=VaapiVideoDecodeLinuxGL
--ozone-platform=wayland

Nope, it says it's enabled then under chrome://gpu but according to "inspect" menu it doesn't actually use it.
I tried the ones from this guy:

theDude1848 wrote:
--use-gl=angle 
--use-angle=vulkan 
--enable-accelerated-video-decode 
--enable-features=Vulkan,VulkanFromANGLE,DefaultANGLEVulkan,VaapiIgnoreDriverChecks,VaapiVideoDecoder,PlatformHEVCDecoderSupport,UseMultiPlaneFormatForHardwareVideo

And it works, fully, under X11 only. Under Wayland, the entire list of all options in chrome://gpu is forced to software.
I'm pretty happy, though.

jmandawg wrote:

Is HW accel broken on wayland with intel? 

It works until i add the following wayland flags to enable wayland:

--enable-features=VaapiVideoDecodeLinuxGL
--enable-features=UseOzonePlatform
--ozone-platform=wayland

UPDATE:

They must have fixed something after latest update (2 chromium updates today) now it works with just these flags:


--enable-features=VaapiVideoDecodeLinuxGL
--ozone-platform=wayland

Adding this flag seems to break it:

--enable-features=VaapiVideoDecodeLinuxGL

You say "--enable-features=VaapiVideoDecodeLinuxGL" works, and at the same time you say it breaks it. Which one is it?

Offline

Board footer

Powered by FluxBB