Well, I see that it is listed under For Google Chrome. For Brave and possibly others doesn’t explicitly list it in You’ll also need to launch the web browser using the following flags either.
That’s a good point. I just edited it.
I copied and edited the brave-browser.desktop
file, these aren’t applied if i open brave from the terminal, it only works if I open brave by double clicking its icon… is this by design?
As for chrome, it works with both from the terminal and from the icon.
Also, does anyone know how much larger a h.264 video would be compared to vp8/vp9
That’s by design and how desktop file work.
I finally got it working thanks to this HowTo on my Intel NUC (i310110U) in X11 (no luck with Wayland), but after some time Vulkan always crashes (I see the window flicker and chrome://gpu shows Vulkan disabled) so hardware decoding gets lost till Chrome is restarted.
That’s what worked for me, thanks!
Vulkan still brings flickering on HD620 though…
Not working in Edge.
Looks like it is broken in the current version 101.0.4951.54 again.
I only get “Hardware Decoder: False” in the Dev Tools, and chrome://media-internals
shows FFMpegVideoDecoder
which means software decoding.
My current flags:
--disable-software-rasterizer
--disable-gpu-driver-bug-workarounds
--disable-gpu-driver-workarounds
--disable-gpu-vsync
--enable-accelerated-mjpeg-decode
--enable-features=VaapiVideoDecoder,CanvasOopRasterization
--disable-features=UseChromeOSDirectVideoDecoder
--enable-gpu-compositing
--enable-gpu-rasterization
--enable-gpu-memory-buffer-video-frames
--enable-hardware-overlays
--enable-native-gpu-memory-buffers
--enable-oop-rasterization
--enable-zero-copy
--ignore-gpu-blocklist
--use-gl=desktop
--num-raster-threads=6
UPDATE / EDIT:
You will have to disable Vulkan in chrome://flags
(selecting Default
in the drop down menu is sufficient).
Or, you add it to the --disable-features
line:
--disable-features=Vulkan,UseChromeOSDirectVideoDecoder
Has anyone been able to enable hardware video acceleration on Chrome on native Wayland? I’m using Intel graphics.
It works on Wayland but the browsers drop a lot of frames
There is some discussion ongoing at 1236697 - chromium - An open-source project to help move the web forward. - Monorail.
In a nutshell: VAAPIVideoDecoder
for Linux exists in Chromium but it only works on some hardware (if at all).
Usually, VAAPIVideoDecoder
fails to initialize, and if you have it set to be used in your flags, you most likely will end up with software video decoding using FFMpegVideoDecoder
only.
To have at least some sort of hardware accelerated video decoding with Chromium, you will have to use VDAVideoDecoder
which appears to be independent of VAAPIVideoDecoder
and works on most setups.
For VDAVideoDecoder
you will have to use at least the following flags (with –disable-features=UseChromeOSDirectVideoDecoder being the most important one):
--disable-software-rasterizer
--disable-gpu-driver-bug-workarounds
--disable-gpu-driver-workarounds
--disable-gpu-vsync
--enable-accelerated-video-decode
--enable-accelerated-mjpeg-decode
--enable-features=VaapiVideoDecoder,ParallelDownloading,UnexpireFlagsM90,VaapiVideoEncoder,CanvasOopRasterization,Vulkan,RawDraw
--disable-features=UseChromeOSDirectVideoDecoder
--enable-drdc
--enable-gpu-compositing
--enable-gpu-rasterization
--enable-gpu-memory-buffer-video-frames
--enable-hardware-overlays
--enable-native-gpu-memory-buffers
--enable-oop-rasterization
--enable-zero-copy
--ignore-gpu-blocklist
--num-raster-threads=6
For X11, add
--use-gl=desktop
--ozone-platform=x11
For Wayland, use
--use-gl=egl
instead.
On my laptop your flags do not work the way you described. I get “VpxDecoder” or something.
However, slightly different set of flags is working fine for a month or so already:
–enable-features=VaapiVideoDecoder,VaapiVideoEncoder,CanvasOopRasterization,RawDraw
–enable-zero-copy
–enable-accelerated-video-decode
–disable-features=UseChromeOSDirectVideoDecoder
–ignore-gpu-blocklist
–disable-gpu-driver-workarounds
–ozone-platform-hint=auto
–enable-gpu-rasterization
–disable-features=UseChromeOSDirectVideoDecoder
Looks like you have this flag twice in your settings
That’s what makes it work I guess!
PS: Nice catch, thanks.
Looks like hardware acceleration for VP9 is broken (again?). For h.264, I get VDAVideoDecoder
as expected but for VP9, Chromium falls back to software decoding using VPXVideoDecoder
Also tried changing the flags:
--enable-features=VaapiVideoDecoder,VaapiVideoEncoder,CanvasOopRasterization,RawDraw
--enable-zero-copy
--enable-accelerated-video-decode
--disable-features=UseChromeOSDirectVideoDecoder
--ignore-gpu-blocklist
--disable-gpu-driver-workarounds
--ozone-platform-hint=auto
--enable-gpu-rasterization
but that did not help.
--use-gl=egl
for me it’s not needed since 2 ltest versions.
Automatically puttin
--disable-features=UseChromeOSDirectVideoDecoder
--enable-features=VaapiVideoDecoder,VaapiVideoEncoder
--enable-accelerated-video-decode
its sufficient
Cannot confirm here. As I am on X11, I have to use --use-gl=desktop
; as soon as I omit that flag, all videos remain black, and there is audio only.
#--ignore-gpu-blacklist
--force-dark-mode
#--use-gl=egl
#--enable-gpu-rasterization
#--enable-native-gpu-memory-buffers
#--enable-zero-copy
#--disable-gpu-driver-bug-workarounds
#--ozone-platform=wayland
--disable-features=UseChromeOSDirectVideoDecoder
--enable-features=VaapiVideoEncoder,VaapiVideoDecoder,WebUIDarkMode,UseOzonePlatform
--enable-webrtc-hw-decoding
--enable-webrtc-hw-encoding
and chromium has hardware video decoding… ozone X11 in wayland session. AMD rx 580 8 GB
some of them I think it does nothing so…
Hardware accelerated video decoding / video playback in Chromium seems to be broken (again?).
If I am not entirely mistaken, it used to work in version 101.0.4951.64-1 for both h.264
and vp9
but now, with 102.0.5005.61-1, vp9
videos are played using software decoding (VpxVideoDecoder
) only.
As downgrading chromium to 101.0.4951.64-1 did not help, I am assuming that this might be connected to the graphics driver (which is nvidia-dkms 515.43.04-2 on my system), or this libva-vdpau-driver-vp9
package from AUR (is this still needed anyway?).
i cnt speak about VP9 since my radeon doesn’t have it so… I put h264 whatever i go…
And for me h264 is working with the last config file without problems on wayland