You are not logged in.

#1126 2025-04-12 03:32:52

PrismaticCuttlefish
Member
Registered: 2023-04-06
Posts: 9

Re: chromium: hardware video acceleration with VA-API

Anyone else struggling to get this working properly on a dual-AMD-gpu laptop? It seems to decode on my dGPU with the flags under the vulkan section from the wiki, but if I disable my dGPU with supergfxctl it doesn't decode at all. If I use the new --render-node-override flag to point it to my iGPU, regardless of whether the dGPU is on or off it also doesn't work. Any ideas? Firefox and MPV are able to decode on the iGPU.

Using an Asus Zephyrus G14 2022.

Last edited by PrismaticCuttlefish (2025-04-12 05:03:45)

Offline

#1127 2025-04-12 05:54:09

Xephon
Member
Registered: 2024-12-22
Posts: 59

Re: chromium: hardware video acceleration with VA-API

@PrismaticCuttlefish, did you try https://wiki.archlinux.org/title/Vulkan#Switching ?

Offline

#1128 2025-04-12 06:41:08

PrismaticCuttlefish
Member
Registered: 2023-04-06
Posts: 9

Re: chromium: hardware video acceleration with VA-API

@Xephon Thank you for the suggestion. Using MESA_VK_DEVICE_SELECT seems to have no effect for me. --render-node-override changes which gpu is listed as active under about:gpu and it keeps the dGPU from powering on, but GL_RENDERER there is still listed as the dGPU regardless of what I have the flag set to. I seem unable to get hardware decoding working at all on the iGPU.

Offline

#1129 2025-04-12 08:00:39

Xephon
Member
Registered: 2024-12-22
Posts: 59

Re: chromium: hardware video acceleration with VA-API

Did you install vulkan-mesa-layers and reboot after that? Provide output of

vulkaninfo --summary

Offline

#1130 2025-04-12 22:26:55

PrismaticCuttlefish
Member
Registered: 2023-04-06
Posts: 9

Re: chromium: hardware video acceleration with VA-API

Seems to be installed correctly. Here:

$ vulkaninfo --summary
==========
VULKANINFO
==========

Vulkan Instance Version: 1.4.309


Instance Extensions: count = 24
-------------------------------
VK_EXT_acquire_drm_display             : extension revision 1
VK_EXT_acquire_xlib_display            : extension revision 1
VK_EXT_debug_report                    : extension revision 10
VK_EXT_debug_utils                     : extension revision 2
VK_EXT_direct_mode_display             : extension revision 1
VK_EXT_display_surface_counter         : extension revision 1
VK_EXT_headless_surface                : extension revision 1
VK_EXT_surface_maintenance1            : extension revision 1
VK_EXT_swapchain_colorspace            : extension revision 5
VK_KHR_device_group_creation           : extension revision 1
VK_KHR_display                         : extension revision 23
VK_KHR_external_fence_capabilities     : extension revision 1
VK_KHR_external_memory_capabilities    : extension revision 1
VK_KHR_external_semaphore_capabilities : extension revision 1
VK_KHR_get_display_properties2         : extension revision 1
VK_KHR_get_physical_device_properties2 : extension revision 2
VK_KHR_get_surface_capabilities2       : extension revision 1
VK_KHR_portability_enumeration         : extension revision 1
VK_KHR_surface                         : extension revision 25
VK_KHR_surface_protected_capabilities  : extension revision 1
VK_KHR_wayland_surface                 : extension revision 6
VK_KHR_xcb_surface                     : extension revision 6
VK_KHR_xlib_surface                    : extension revision 6
VK_LUNARG_direct_driver_loading        : extension revision 1

Instance Layers: count = 5
--------------------------
VK_LAYER_MESA_device_select       Linux device selection layer 1.4.303  version 1
VK_LAYER_VALVE_steam_fossilize_32 Steam Pipeline Caching Layer 1.3.207  version 1
VK_LAYER_VALVE_steam_fossilize_64 Steam Pipeline Caching Layer 1.3.207  version 1
VK_LAYER_VALVE_steam_overlay_32   Steam Overlay Layer          1.3.207  version 1
VK_LAYER_VALVE_steam_overlay_64   Steam Overlay Layer          1.3.207  version 1

Devices:
========
GPU0:
        apiVersion         = 1.4.305
        driverVersion      = 25.0.2
        vendorID           = 0x1002
        deviceID           = 0x1681
        deviceType         = PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU
        deviceName         = AMD Radeon 680M (RADV REMBRANDT)
        driverID           = DRIVER_ID_MESA_RADV
        driverName         = radv
        driverInfo         = Mesa 25.0.2
        conformanceVersion = 1.4.0.0
        deviceUUID         = 00000000-0700-0000-0000-000000000000
        driverUUID         = 414d442d-4d45-5341-2d44-525600000000
GPU1:
        apiVersion         = 1.4.305
        driverVersion      = 25.0.2
        vendorID           = 0x1002
        deviceID           = 0x73ef
        deviceType         = PHYSICAL_DEVICE_TYPE_DISCRETE_GPU
        deviceName         = AMD Radeon RX 6800S (RADV NAVI23)
        driverID           = DRIVER_ID_MESA_RADV
        driverName         = radv
        driverInfo         = Mesa 25.0.2
        conformanceVersion = 1.4.0.0
        deviceUUID         = 00000000-0300-0000-0000-000000000000
        driverUUID         = 414d442d-4d45-5341-2d44-525600000000
GPU2:
        apiVersion         = 1.4.305
        driverVersion      = 0.0.1
        vendorID           = 0x10005
        deviceID           = 0x0000
        deviceType         = PHYSICAL_DEVICE_TYPE_CPU
        deviceName         = llvmpipe (LLVM 19.1.7, 256 bits)
        driverID           = DRIVER_ID_MESA_LLVMPIPE
        driverName         = llvmpipe
        driverInfo         = Mesa 25.0.2 (LLVM 19.1.7)
        conformanceVersion = 1.3.1.1
        deviceUUID         = 6d657361-3235-2e30-2e32-000000000000
        driverUUID         = 6c6c766d-7069-7065-5555-494400000000

Offline

#1131 2025-04-12 23:31:04

Xephon
Member
Registered: 2024-12-22
Posts: 59

Re: chromium: hardware video acceleration with VA-API

This should work

MESA_VK_DEVICE_SELECT=1002:1681! chromium

UPD: It seems to be a problem with switching rendering devices under wayland
https://issues.chromium.org/issues/396434686

Last edited by Xephon (2025-04-12 23:54:27)

Offline

#1132 2025-04-13 00:42:18

PrismaticCuttlefish
Member
Registered: 2023-04-06
Posts: 9

Re: chromium: hardware video acceleration with VA-API

Thanks. I'll keep an eye on that issue thread then.

Offline

#1133 2025-04-13 11:42:30

nelsonhf
Member
Registered: 2025-04-13
Posts: 2

Re: chromium: hardware video acceleration with VA-API

schaats wrote:
irql-notlessoreq wrote:

Hi, I uploaded today an AUR package of my Intel legacy VA-API driver fork [1] and was wondering if anyone on older Intel hardware would be willing to try it out.

It's main feature is that the issue with Chromium is fixed so you no longer see the following error:

VaapiVideoDecoder: failed Initialize()ing the frame pool

[1] https://aur.archlinux.org/packages/libv … river-irql

What a work !
Your driver works very well on Ivybridge generation Thinkpads (t430s. w530)
I tested this driver's hardware video acceleration capability on some Chromium based browsers (Vivaldi, Brave) and found all work with vaapivideodecoder.

Thank you

Hi, which flags or options did you have to use to make video acceleration to work? I've compiled the IRQL fork but couldn't made it work with Chromium or Brave (Firefox works, checked via intel_gpu_top). No matter which flags i use the chrome://gpu video acceleration section is empty (before the IRQL fork, with Brave, i was able to make at least show the info and stumbled at the VAAPI frame pool error, but i can't remember which flag made the trick)

Offline

#1134 2025-04-13 13:42:59

irql-notlessoreq
Member
Registered: 2025-03-12
Posts: 2
Website

Re: chromium: hardware video acceleration with VA-API

nelsonhf wrote:

Hi, which flags or options did you have to use to make video acceleration to work? I've compiled the IRQL fork but couldn't made it work with Chromium or Brave (Firefox works, checked via intel_gpu_top). No matter which flags i use the chrome://gpu video acceleration section is empty (before the IRQL fork, with Brave, i was able to make at least show the info and stumbled at the VAAPI frame pool error, but i can't remember which flag made the trick)

Per the Arch Wiki, for Chrome 130+ it is the following:

--enable-features=AcceleratedVideoDecodeLinuxGL

Also "AcceleratedVideoDecodeLinuxZeroCopyGL" is recommended for native (with the ozone platform hint set) Wayland users.

Last edited by irql-notlessoreq (2025-04-13 13:43:45)

Offline

#1135 2025-04-13 14:15:52

tekstryder
Member
Registered: 2013-02-14
Posts: 265

Re: chromium: hardware video acceleration with VA-API

In a shocking turn of events... vaapi hardware decoding is now working with nVidia in a pure native Wayland session.


Device 0 [NVIDIA GeForce GTX 1050 Ti] PCIe GEN 3@16x RX: 1.514 MiB/s TX: 450.0 KiB/s
 GPU 1290MHz MEM 3504MHz TEMP  99°F  FAN  31%   POW N/A /  75 W
 GPU[||                         7%] MEM[||||||||||||||2.254Gi/4.000Gi] DEC[||    22%]
   ┌────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
100│GPU0 %                                                                                                                                                  │
   │GPU0 mem%                                                                                                                                               │
   │                                                                                                                                                        │
   │                                                                                                                                                        │
   │                                                                                                                                                        │
 75│                                                                                                                                                        │
   │                                                                                                                                                        │
   │                                                                                                                                                        │
   │                                                                                                                                     ┌─────────┐        │
   │                                                                                                                                 ┌───┘         └────────│
 50│                               ┌─┐                                                                                 ┌───────────┐ │                      │
   │─────────────┐                 │ │ ┌─────────────────┐                                                             │           └─┘                      │
   │             └─────────────────┘ └─┘                 │                                                   ┌─────────┘                                    │
   │                                                     └───────────────────────────────────────────────────┘                                              │
   │                                                  ┌─┐                                                                                                   │
 25│                                                  │ │                                                                                                   │
   │                                                  │ │ ┌─┐                                                                       ┌─┐ ┌───────────────┐   │
   │                              ┌───┐               │ │ │ │                                                                       │ └─┘               └─┐ │
   │                              │   └─┐             │ │ │ │                                           ┌─┐ ┌─┐       ┌─────┐ ┌───┐ │                     │ │
   │    ┌───┐   ┌───┐             │     └───┐         │ └─┘ └─┐                                         │ └─┘ └───────┘     └─┘   └─┘                     └─│
  0│────┘   └───┘   └─────────────┘         └─────────┘       └─────────────────────────────────────────┘                                                   │
   └76s──────────────────────────────────57s───────────────────────────────────38s───────────────────────────────────19s──────────────────────────────────0s┘
    PID USER       DEV     TYPE  GPU       GPU  MEM    CPU  HOST MEM Command                                                                                        
   1095 tekstryder   0  Graphic   0%    862MiB  21%     6%   1068MiB /usr/bin/gnome-shell                                                                           
  61880 tekstryder   0  Graphic   6%    823MiB  20%     5%    559MiB /usr/lib/chromium/chromium --type=gpu-process --ozone-platform=wayland --crashpad-handler-
--enable-features=AcceleratedVideoDecodeLinuxZeroCopyGL,AcceleratedVideoDecodeLinuxGL,VaapiOnNvidiaGPUs

• kernel 6.13.11
• gnome-shell 48.0
• mutter 48.1
• wayland (meson_options: xwayland=false, x11=false)
• chromium 135.0.7049.84
• brave-bin 1.77.97

Well slap my ass and call me Sally!

Never thought I'd see the day.

Offline

#1136 Yesterday 18:15:32

RobinSch
Member
Registered: 2020-02-13
Posts: 19

Re: chromium: hardware video acceleration with VA-API

Hardware encoding for me works in firefox and brave, however, in all chromium based programs (brave, vscodium, ...) I have flickering issues.

LIBVA_DRIVER_NAME=nvidia
VDPAU_DRIVER=nvidia
NVD_BACKEND=direct
__GLX_VENDOR_LIBRARY_NAME=nvidia
EGL_PLATFORM=wayland

### https://github.com/elFarto/nvidia-vaapi-driver?tab=readme-ov-file#firefox
MOZ_DISABLE_RDD_SANDBOX=1
__EGL_VENDOR_LIBRARY_FILENAMES=/usr/share/glvnd/egl_vendor.d/10_nvidia.json
$ brave --enable-features=AcceleratedVideoDecodeLinuxGL,AcceleratedVideoDecodeLinuxZeroCopyGL,VaapiOnNvidiaGPUs,VaapiIgnoreDriverChecks
<removed non-related errors>
[45:45:0414/201023.005856:ERROR:gl_display.cc(495)] EGL Driver message (Error) eglCreateContext: Requested version is not supported
Warning: eglCreateContext failed with EGL_BAD_ATTRIBUTE
 - While trying to discover a BackendType::OpenGL adapter.
    at CheckEGL (../../third_party/dawn/src/dawn/native/opengl/UtilsEGL.cpp:98)

I guess this error is related to the flickering?

Last edited by RobinSch (Yesterday 18:16:06)

Offline

#1137 Yesterday 18:46:00

tekstryder
Member
Registered: 2013-02-14
Posts: 265

Re: chromium: hardware video acceleration with VA-API

RobinSch wrote:

in all chromium based programs (brave, vscodium, ...) I have flickering issues.

LIBVA_DRIVER_NAME=nvidia
VDPAU_DRIVER=nvidia
NVD_BACKEND=direct
__GLX_VENDOR_LIBRARY_NAME=nvidia
EGL_PLATFORM=wayland
__EGL_VENDOR_LIBRARY_FILENAMES=/usr/share/glvnd/egl_vendor.d/10_nvidia.json

I would start by removing/commenting out... ALL of those.

No idea what platform you're running, but none of them are necessary for chromium-based browser hardware acceleration.


RobinSch wrote:
$ brave --enable-features=AcceleratedVideoDecodeLinuxGL,AcceleratedVideoDecodeLinuxZeroCopyGL,VaapiOnNvidiaGPUs,VaapiIgnoreDriverChecks

Get rid of VaapiIgnoreDriverChecks too.

Offline

#1138 Yesterday 19:50:33

nelsonhf
Member
Registered: 2025-04-13
Posts: 2

Re: chromium: hardware video acceleration with VA-API

irql-notlessoreq wrote:
nelsonhf wrote:

Hi, which flags or options did you have to use to make video acceleration to work? I've compiled the IRQL fork but couldn't made it work with Chromium or Brave (Firefox works, checked via intel_gpu_top). No matter which flags i use the chrome://gpu video acceleration section is empty (before the IRQL fork, with Brave, i was able to make at least show the info and stumbled at the VAAPI frame pool error, but i can't remember which flag made the trick)

Per the Arch Wiki, for Chrome 130+ it is the following:

--enable-features=AcceleratedVideoDecodeLinuxGL

Also "AcceleratedVideoDecodeLinuxZeroCopyGL" is recommended for native (with the ozone platform hint set) Wayland users.

Thanks @irql-notlessoreq. Indeed the only flag needed was --enable-features=AcceleratedVideoDecodeLinuxGL since i'm on X11. It worked with Chromium and Brave on a Gen7 GPU (verified with chrome://media-internals and intel_gpu_top) The issue was on my side with an old libva. I compiled a new version (libva 2.20) and it worked. Thanks again for your fork of the legacy intel vaapi driver.

Last edited by nelsonhf (Yesterday 19:51:20)

Offline

#1139 Yesterday 20:13:55

RobinSch
Member
Registered: 2020-02-13
Posts: 19

Re: chromium: hardware video acceleration with VA-API

tekstryder wrote:
RobinSch wrote:

in all chromium based programs (brave, vscodium, ...) I have flickering issues.

LIBVA_DRIVER_NAME=nvidia
VDPAU_DRIVER=nvidia
NVD_BACKEND=direct
__GLX_VENDOR_LIBRARY_NAME=nvidia
EGL_PLATFORM=wayland
__EGL_VENDOR_LIBRARY_FILENAMES=/usr/share/glvnd/egl_vendor.d/10_nvidia.json

I would start by removing/commenting out... ALL of those.

No idea what platform you're running, but none of them are necessary for chromium-based browser hardware acceleration..

I tried to remove all of those. Firefox works fine, however, without the

__EGL_VENDOR_LIBRARY_FILENAMES

brave gives the following error (and hardware acceleration does not work anymore):

465:465:0414/220551.352166:ERROR:gl_display.cc(495)] EGL Driver message (Error) eglCreateContext: Requested version is not supported
Warning: eglCreateContext failed with EGL_BAD_ATTRIBUTE
 - While trying to discover a BackendType::OpenGL adapter.
    at CheckEGL (../../third_party/dawn/src/dawn/native/opengl/UtilsEGL.cpp:98)

[465:465:0414/220551.648948:ERROR:angle_platform_impl.cc(49)] ImageEGL.cpp:112 (operator()): eglCreateImage failed with 0x00003009
ERR: ImageEGL.cpp:112 (operator()): eglCreateImage failed with 0x00003009
[465:465:0414/220551.649210:ERROR:scoped_egl_image.cc(23)] Failed to create EGLImage: EGL_SUCCESS
[465:465:0414/220551.649473:ERROR:native_pixmap_egl_binding.cc(114)] Unable to initialize binding from pixmap
[465:465:0414/220551.649633:ERROR:ozone_image_backing.cc(319)] OzoneImageBacking::ProduceSkiaGanesh failed to create GL representation
[465:465:0414/220551.649770:ERROR:shared_image_manager.cc(408)] SharedImageManager::ProduceSkia: Trying to produce a Skia representation from an incompatible backing: OzoneImageBacking
[465:465:0414/220551.650090:ERROR:gpu_service_impl.cc(1186)] Exiting GPU process because some drivers can't recover from errors. GPU process will restart shortly.
[67:10:0414/220551.670662:ERROR:command_buffer_proxy_impl.cc(327)] GPU state invalid after WaitForGetOffsetInRange.
[5:5:0414/220551.716510:ERROR:gpu_process_host.cc(954)] GPU process exited unexpectedly: exit_code=8704
[689:689:0414/220553.251350:ERROR:angle_platform_impl.cc(49)] ImageEGL.cpp:112 (operator()): eglCreateImage failed with 0x00003009
ERR: ImageEGL.cpp:112 (operator()): eglCreateImage failed with 0x00003009
[689:689:0414/220553.251557:ERROR:scoped_egl_image.cc(23)] Failed to create EGLImage: EGL_SUCCESS
[689:689:0414/220553.251672:ERROR:native_pixmap_egl_binding.cc(114)] Unable to initialize binding from pixmap
[689:689:0414/220553.251793:ERROR:ozone_image_backing.cc(319)] OzoneImageBacking::ProduceSkiaGanesh failed to create GL representation
[689:689:0414/220553.251902:ERROR:shared_image_manager.cc(408)] SharedImageManager::ProduceSkia: Trying to produce a Skia representation from an incompatible backing: OzoneImageBacking
[689:689:0414/220553.252107:ERROR:gpu_service_impl.cc(1186)] Exiting GPU process because some drivers can't recover from errors. GPU process will restart shortly.
[82:1:0414/220553.270196:ERROR:command_buffer_proxy_impl.cc(327)] GPU state invalid after WaitForGetOffsetInRange.
[5:5:0414/220553.329794:ERROR:gpu_process_host.cc(954)] GPU process exited unexpectedly: exit_code=8704
[141:10:0414/220554.653813:ERROR:command_buffer_proxy_impl.cc(127)] ContextResult::kTransientFailure: Failed to send GpuControl.CreateCommandBuffer.
[116:7:0414/220554.662505:ERROR:command_buffer_proxy_impl.cc(127)] ContextResult::kTransientFailure: Failed to send GpuControl.CreateCommandBuffer.
[862:862:0414/220554.773952:ERROR:gl_utils.cc(431)] [.WebGL-0x2cd4000e9500]GL Driver Message (OpenGL, Performance, GL_CLOSE_PATH_NV, High): GPU stall due to ReadPixels
[862:862:0414/220554.886127:ERROR:gl_utils.cc(431)] [.WebGL-0x2cd4000e9500]GL Driver Message (OpenGL, Performance, GL_CLOSE_PATH_NV, High): GPU stall due to ReadPixels
[862:862:0414/220554.955328:ERROR:gl_utils.cc(431)] [.WebGL-0x2cd4000e9500]GL Driver Message (OpenGL, Performance, GL_CLOSE_PATH_NV, High): GPU stall due to ReadPixels

If I add that one back then hardware acceleration works again, however, I still get the flickering issue.. hmm

Running hyprland with my nvidia gtx 1650 and proprietary drivers btw, and brave browser is running natively and not under xwayland smile

Last edited by RobinSch (Yesterday 20:28:50)

Offline

Board footer

Powered by FluxBB