I am trying to get hardware accelerated video decoding working on my chromium browser (Brave Beta) under X11.
Brave: 1.53.66 Chromium: 114.0.5735.35 (Official Build) beta (64-bit)
Revision: 2295354895fa3652ae47b651481831484f16d1ff-refs/branch-heads/5735@{#713}
OS: Linux
JavaScript: V8 11.4.183.8
I got the HW-decode working with my integrated GPU using the following flags
--ignore-gpu-blocklist --enable-features=VaapiVideoDecoder,VaapiVideoEncoder,VaapiVideoDecodeLinuxGL,VaapiIgnoreDriverChecks --disable-features=UseChromeOSDirectVideoDecoder,UseSkiaRenderer
I am using enhanced-h264ify extension to ensure the youtube video is decoded with h.264 decoding only.
I tried launching my browser with environment variable DRI_PRIME=1 to use dedicated GPU. The video decoding section in brave://gpu is identical in both of the GPU’s case but practically the video isn’t hardware accelerated when using dedicated GPU.
Another weird thing is that it always shows my integrated gpu as ACTIVE in brave://gpu. Here are the screenshot for these two scenarios:
Here are the details of my GPUs
$ xrandr --listproviders
Providers: number : 2
Provider 0: id: 0x54 cap: 0xf, Source Output, Sink Output, Source Offload, Sink Offload crtcs: 4 outputs: 2 associated providers: 1 name:AMD Radeon Graphics @ pci:0000:09:00.0
Provider 1: id: 0x83 cap: 0xf, Source Output, Sink Output, Source Offload, Sink Offload crtcs: 5 outputs: 1 associated providers: 1 name:AMD Radeon RX 5500M @ pci:0000:03:00.0
$ glxinfo -B
name of display: :0
display: :0 screen: 0
direct rendering: Yes
Extended renderer info (GLX_MESA_query_renderer):
Vendor: AMD (0x1002)
Device: AMD Radeon Graphics (renoir, LLVM 15.0.7, DRM 3.52, 6.3.4-arch1-1) (0x1638)
Version: 23.1.0
Accelerated: yes
Video memory: 512MB
Unified memory: no
Preferred profile: core (0x1)
Max core profile version: 4.6
Max compat profile version: 4.6
Max GLES1 profile version: 1.1
Max GLES[23] profile version: 3.2
Memory info (GL_ATI_meminfo):
VBO free memory - total: 30 MB, largest block: 30 MB
VBO free aux. memory - total: 7380 MB, largest block: 7380 MB
Texture free memory - total: 30 MB, largest block: 30 MB
Texture free aux. memory - total: 7380 MB, largest block: 7380 MB
Renderbuffer free memory - total: 30 MB, largest block: 30 MB
Renderbuffer free aux. memory - total: 7380 MB, largest block: 7380 MB
Memory info (GL_NVX_gpu_memory_info):
Dedicated video memory: 512 MB
Total available memory: 8176 MB
Currently available dedicated video memory: 30 MB
OpenGL vendor string: AMD
OpenGL renderer string: AMD Radeon Graphics (renoir, LLVM 15.0.7, DRM 3.52, 6.3.4-arch1-1)
OpenGL core profile version string: 4.6 (Core Profile) Mesa 23.1.0
OpenGL core profile shading language version string: 4.60
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL version string: 4.6 (Compatibility Profile) Mesa 23.1.0
OpenGL shading language version string: 4.60
OpenGL context flags: (none)
OpenGL profile mask: compatibility profile
OpenGL ES profile version string: OpenGL ES 3.2 Mesa 23.1.0
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20
$ DRI_PRIME=1 glxinfo -B
name of display: :0
display: :0 screen: 0
direct rendering: Yes
Extended renderer info (GLX_MESA_query_renderer):
Vendor: AMD (0x1002)
Device: AMD Radeon RX 5500M (navi14, LLVM 15.0.7, DRM 3.52, 6.3.4-arch1-1) (0x7340)
Version: 23.1.0
Accelerated: yes
Video memory: 4096MB
Unified memory: no
Preferred profile: core (0x1)
Max core profile version: 4.6
Max compat profile version: 4.6
Max GLES1 profile version: 1.1
Max GLES[23] profile version: 3.2
Memory info (GL_ATI_meminfo):
VBO free memory - total: 4076 MB, largest block: 4076 MB
VBO free aux. memory - total: 7639 MB, largest block: 7639 MB
Texture free memory - total: 4076 MB, largest block: 4076 MB
Texture free aux. memory - total: 7639 MB, largest block: 7639 MB
Renderbuffer free memory - total: 4076 MB, largest block: 4076 MB
Renderbuffer free aux. memory - total: 7639 MB, largest block: 7639 MB
Memory info (GL_NVX_gpu_memory_info):
Dedicated video memory: 4096 MB
Total available memory: 11760 MB
Currently available dedicated video memory: 4076 MB
OpenGL vendor string: AMD
OpenGL renderer string: AMD Radeon RX 5500M (navi14, LLVM 15.0.7, DRM 3.52, 6.3.4-arch1-1)
OpenGL core profile version string: 4.6 (Core Profile) Mesa 23.1.0
OpenGL core profile shading language version string: 4.60
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL version string: 4.6 (Compatibility Profile) Mesa 23.1.0
OpenGL shading language version string: 4.60
OpenGL context flags: (none)
OpenGL profile mask: compatibility profile
OpenGL ES profile version string: OpenGL ES 3.2 Mesa 23.1.0
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20