Add a note in README explaining how to use this with Chrome
Since Chrome is now widely reported to work, there is no need to pretend that it will not function, as long as we explain that the support is not official.
doesn't seem to work for me
EDIT: after testing, latest chromium seem to be working, but latest electron doesn't...
❯ google-chrome-stable --enable-features=AcceleratedVideoDecodeLinuxGL,AcceleratedVideoDecodeLinuxZeroCopyGL,VaapiOnNvidiaGPUs,VaapiIgnoreDriverChecks
Error: unrecognized flag --no-expose-wasm
Try --help for options
Created TensorFlow Lite XNNPACK delegate for CPU.
[12125:12152:0204/202623.925581:ERROR:registration_request.cc(291)] Registration response error message: DEPRECATED_ENDPOINT
Warning: Couldn't find an EGLConfig rendering to a window for TextureFormat::RGBA8Unorm.
- While trying to discover a BackendType::OpenGL adapter.
at Initialize (../../third_party/dawn/src/dawn/native/opengl/ContextEGL.cpp:83)
[12413:10:0204/202635.375322:ERROR:ffmpeg_common.cc(970)] Unsupported pixel format: -1
[12171:12424:0204/202635.548757:ERROR:vaapi_video_decoder.cc(1223)] failed Initialize()ing the frame pool
[12125:12152:0204/202649.542363:ERROR:registration_request.cc(291)] Registration response error message: DEPRECATED_ENDPOINT
Video Acceleration Information ==============================
| Decoding : | |
| Decode h264 baseline : | 48x16 to 4096x4096 pixels |
| Decode h264 main : | 48x16 to 4096x4096 pixels |
| Decode h264 high : | 48x16 to 4096x4096 pixels |
| Decode vp9 profile0 : | 128x128 to 8192x8192 pixels |
| Decode vp9 profile2 : | 128x128 to 8192x8192 pixels |
| Decode hevc main : | 144x144 to 8192x8192 pixels |
| Decode hevc main 10 : | 144x144 to 8192x8192 pixels |
| Decode hevc main still-picture: | 144x144 to 8192x8192 pixels |
| Encoding : |
Log Messages ============
- [12171:12171:0204/202620.491978:WARNING:sandbox_linux.cc(430)] : InitializeSandbox() called with multiple threads in process gpu-process.
- [12171:12171:0204/202620.497426:WARNING:viz_main_impl.cc(85)] : VizNullHypothesis is disabled (not a warning)
- [12171:12424:0204/202635.548757:ERROR:vaapi_video_decoder.cc(1223)] : failed Initialize()ing the frame pool
Actually it's not working when playing a video
Does AV1 work for you with this? VP9 and H264 work great but AV1 uses CPU decode.
Using a 4090 with 570.86.16
Trying display: wayland
vainfo: VA-API version: 1.22 (libva 2.22.0)
vainfo: Driver version: VA-API NVDEC driver [direct backend]
vainfo: Supported profile and entrypoints
VAProfileMPEG2Simple : VAEntrypointVLD
VAProfileMPEG2Main : VAEntrypointVLD
VAProfileVC1Simple : VAEntrypointVLD
VAProfileVC1Main : VAEntrypointVLD
VAProfileVC1Advanced : VAEntrypointVLD
VAProfileH264Main : VAEntrypointVLD
VAProfileH264High : VAEntrypointVLD
VAProfileH264ConstrainedBaseline: VAEntrypointVLD
VAProfileHEVCMain : VAEntrypointVLD
VAProfileVP8Version0_3 : VAEntrypointVLD
VAProfileVP9Profile0 : VAEntrypointVLD
VAProfileAV1Profile0 : VAEntrypointVLD
VAProfileHEVCMain10 : VAEntrypointVLD
VAProfileHEVCMain12 : VAEntrypointVLD
VAProfileVP9Profile2 : VAEntrypointVLD
VAProfileHEVCMain444 : VAEntrypointVLD
VAProfileHEVCMain444_10 : VAEntrypointVLD
VAProfileHEVCMain444_12 : VAEntrypointVLD
I tried chroium, ungoogled-chromium, and edge.
Does AV1 work for you with this? VP9 and H264 work great but AV1 uses CPU decode.
Using a 4090 with 570.86.16
Trying display: wayland vainfo: VA-API version: 1.22 (libva 2.22.0) vainfo: Driver version: VA-API NVDEC driver [direct backend] vainfo: Supported profile and entrypoints VAProfileMPEG2Simple : VAEntrypointVLD VAProfileMPEG2Main : VAEntrypointVLD VAProfileVC1Simple : VAEntrypointVLD VAProfileVC1Main : VAEntrypointVLD VAProfileVC1Advanced : VAEntrypointVLD VAProfileH264Main : VAEntrypointVLD VAProfileH264High : VAEntrypointVLD VAProfileH264ConstrainedBaseline: VAEntrypointVLD VAProfileHEVCMain : VAEntrypointVLD VAProfileVP8Version0_3 : VAEntrypointVLD VAProfileVP9Profile0 : VAEntrypointVLD VAProfileAV1Profile0 : VAEntrypointVLD VAProfileHEVCMain10 : VAEntrypointVLD VAProfileHEVCMain12 : VAEntrypointVLD VAProfileVP9Profile2 : VAEntrypointVLD VAProfileHEVCMain444 : VAEntrypointVLD VAProfileHEVCMain444_10 : VAEntrypointVLD VAProfileHEVCMain444_12 : VAEntrypointVLDI tried chroium, ungoogled-chromium, and edge.
I don't have a card that supports AV1, unfortunately.
But it's not really working for me with 570.86.16. Have you used nvidia-smi pmon to verify that this is working?
I don't have a card that supports AV1, unfortunately. But it's not really working for me with 570.86.16. Have you used
nvidia-smi pmonto verify that this is working?
Yeah nvtop and nvidia-smi pmon both show decode for VP9, H264, and HEVC, just not AV1.
❯ nvidia-smi
Wed Feb 12 11:24:29 2025
+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 570.86.16 Driver Version: 570.86.16 CUDA Version: 12.8 |
|-----------------------------------------+------------------------+----------------------+
| GPU Name Persistence-M | Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap | Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|=========================================+========================+======================|
| 0 NVIDIA GeForce RTX 4090 Off | 00000000:0A:00.0 On | Off |
| 0% 46C P2 59W / 450W | 4662MiB / 24564MiB | 2% Default |
| | | N/A |
+-----------------------------------------+------------------------+----------------------+
+-----------------------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=========================================================================================|
| 0 N/A N/A 1122 G /usr/lib/Xorg 59MiB |
| 0 N/A N/A 1210 G /usr/bin/kwalletd6 6MiB |
| 0 N/A N/A 1243 G /usr/bin/kwin_wayland 177MiB |
| 0 N/A N/A 1335 G /usr/bin/Xwayland 9MiB |
| 0 N/A N/A 1371 G /usr/bin/ksmserver 6MiB |
| 0 N/A N/A 1373 G /usr/bin/kded6 6MiB |
| 0 N/A N/A 1394 C+G /usr/bin/plasmashell 451MiB |
| 0 N/A N/A 1432 G /usr/lib/kactivitymanagerd 6MiB |
| 0 N/A N/A 1435 G /usr/bin/gmenudbusmenuproxy 6MiB |
| 0 N/A N/A 1436 G /usr/bin/kaccess 6MiB |
| 0 N/A N/A 1437 G ...it-kde-authentication-agent-1 6MiB |
| 0 N/A N/A 1438 G /usr/lib/org_kde_powerdevil 6MiB |
| 0 N/A N/A 1440 G /usr/bin/xembedsniproxy 6MiB |
| 0 N/A N/A 1585 G /usr/bin/kdeconnectd 6MiB |
| 0 N/A N/A 1656 G /usr/bin/xwaylandvideobridge 6MiB |
| 0 N/A N/A 1693 G /usr/lib/xdg-desktop-portal-kde 6MiB |
| 0 N/A N/A 2859 G /usr/lib/firefox/firefox 370MiB |
| 0 N/A N/A 3077 G ...asma-browser-integration-host 6MiB |
| 0 N/A N/A 5120 G ...deo --variations-seed-version 1884MiB |
| 0 N/A N/A 5506 G /usr/lib/baloorunner 6MiB |
| 0 N/A N/A 7033 G ...xZeroCopyGL,VaapiOnNvidiaGPUs 6MiB |
| 0 N/A N/A 7082 C+G ...per --variations-seed-version 1240MiB |
| 0 N/A N/A 7858 G /usr/bin/konsole 6MiB |
+-----------------------------------------------------------------------------------------+
~
❯ nvidia-smi pmon
# gpu pid type sm mem enc dec jpg ofa command
# Idx # C/G % % % % % % name
0 1122 G - - - - - - Xorg
0 1210 G - - - - - - kwalletd6
0 1243 G 0 0 - - - - kwin_wayland
0 1335 G - - - - - - Xwayland
0 1371 G - - - - - - ksmserver
0 1373 G - - - - - - kded6
0 1394 C+G - - - - - - plasmashell
0 1432 G - - - - - - kactivitymanage
0 1435 G - - - - - - gmenudbusmenupr
0 1436 G - - - - - - kaccess
0 1437 G - - - - - - polkit-kde-auth
0 1438 G - - - - - - org_kde_powerde
0 1440 G - - - - - - xembedsniproxy
0 1585 G - - - - - - kdeconnectd
0 1656 G - - - - - - xwaylandvideobr
0 1693 G - - - - - - xdg-desktop-por
0 2859 G - - - - - - firefox
0 3077 G - - - - - - plasma-browser-
0 5120 G - - - - - - legcord --gpu-p
0 5506 G - - - - - - baloorunner
0 7033 G - - - - - - msedge --ozone-
0 7082 C+G 0 0 - 7 - - msedge --type=g
You can see successful hardware decode on a VP9 video with 570.86.16.
https://wiki.debian.org/Chromium similar to https://wiki.debian.org/Firefox
before saying all of this, i have compiled the latest and verified it working in Firefox
in chromium 135:
i have enabled the config options --enable-features=AcceleratedVideoDecodeLinuxGL,AcceleratedVideoDecodeLinuxZeroCopyGL,VaapiOnNvidiaGPUs,VaapiIgnoreDriverChecks
optimus laptop:
however by default it tries to load the iHD vaapi which is disabled via prime
export LIBVA_DRIVER_NAME=nvidia with NVD_LOG=1 shows that it is now working
plus down at the bottom of chrome://gpu/
enabling the config option features now has (it is empty without the --enable)
Video Acceleration Information
==============================
Decoding :
Decode h264 baseline : 48x16 to 4096x4096 pixels
Decode h264 main : 48x16 to 4096x4096 pixels
Decode h264 high : 48x16 to 4096x4096 pixels
Decode vp9 profile0 : 128x128 to 8192x8192 pixels
Decode vp9 profile2 : 128x128 to 8192x8192 pixels
Decode hevc main : 144x144 to 8192x8192 pixels
Decode hevc main 10 : 144x144 to 8192x8192 pixels
Decode hevc main still-picture: 144x144 to 8192x8192 pixels
HOWEVER, both in nvtop and in developer console > more tools > media it is evident that its not operating, atleast for AV1 obviously
on an alternate site that i know uses H264 videos, it still does show FFmpegVideoDecoder and is using CPU only decode
any further ideas?
nvidia-smi
+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 570.124.04 Driver Version: 570.124.04 CUDA Version: 12.8 |
|-----------------------------------------+------------------------+----------------------+
| GPU Name Persistence-M | Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap | Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|=========================================+========================+======================|
| 0 NVIDIA GeForce GTX 1070 Off | 00000000:01:00.0 Off | N/A |
| N/A 47C P8 7W / 115W | 1869MiB / 8192MiB | 21% Default |
vainfo
Trying display: wayland
Trying display: x11
libva info: VA-API version 1.22.0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/nvidia_drv_video.so
libva info: Found init function __vaDriverInit_1_0
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.22 (libva 2.22.0)
vainfo: Driver version: VA-API NVDEC driver [direct backend]
vainfo: Supported profile and entrypoints
VAProfileMPEG2Simple : VAEntrypointVLD
VAProfileMPEG2Main : VAEntrypointVLD
VAProfileVC1Simple : VAEntrypointVLD
VAProfileVC1Main : VAEntrypointVLD
VAProfileVC1Advanced : VAEntrypointVLD
VAProfileH264Main : VAEntrypointVLD
VAProfileH264High : VAEntrypointVLD
VAProfileH264ConstrainedBaseline: VAEntrypointVLD
VAProfileHEVCMain : VAEntrypointVLD
VAProfileVP9Profile0 : VAEntrypointVLD
VAProfileHEVCMain10 : VAEntrypointVLD
VAProfileHEVCMain12 : VAEntrypointVLD
VAProfileVP9Profile2 : VAEntrypointVLD
and the log with error playing videos avc1 (h264) and other
25531.903480910 [411047-413955] ../src/vabackend.c:2239 __vaDriverInit_1_0 Initialising NVIDIA VA-API Driver
25531.903494394 [411047-413955] ../src/vabackend.c:2247 __vaDriverInit_1_0 Got DRM FD: 1 41
25531.903502747 [411047-413955] ../src/backend-common.c: 31 isNvidiaDrmFd Invalid driver for DRM device: i915
25531.903509876 [411047-413955] ../src/vabackend.c:2250 __vaDriverInit_1_0 Passed in DRM FD does not belong to the NVIDIA driver, ignoring
25531.903515684 [411047-413955] ../src/vabackend.c:2259 __vaDriverInit_1_0 Now have 0 (0 max) instances
25531.903522713 [411047-413955] ../src/vabackend.c:2286 __vaDriverInit_1_0 Selecting Direct backend
25531.903557156 [411047-413955] ../src/direct/direct-export-buf.c: 107 direct_initExporter Searching for GPU: 0 0 128
25531.903582161 [411047-413955] ../src/backend-common.c: 31 isNvidiaDrmFd Invalid driver for DRM device: i915
25531.903597403 [411047-413955] ../src/direct/direct-export-buf.c: 107 direct_initExporter Searching for GPU: 0 0 129
25531.903613761 [411047-413955] ../src/direct/direct-export-buf.c: 129 direct_initExporter Found NVIDIA GPU 0 at /dev/dri/renderD129
25531.903618787 [411047-413955] ../src/direct/nv-driver.c: 292 init_nvdriver Initing nvdriver...
25531.903648182 [411047-413955] ../src/direct/nv-driver.c: 310 init_nvdriver NVIDIA kernel driver version: 570.124.04, major version: 570, minor version: 124
25531.903655890 [411047-413955] ../src/direct/nv-driver.c: 317 init_nvdriver Got dev info: 100 1 0 fe
25531.978701689 [411047-413955] ../src/vabackend.c: 682 nvCreateConfig got profile: 7 with 1 attributes
25531.978721784 [411047-413955] ../src/vabackend.c: 703 nvCreateConfig got config attrib: 0 0 1
25531.980455261 [411047-413955] ../src/vabackend.c:1043 nvCreateContext creating context with 0 render targets, 0 surfaces, at 1280x720
25531.993030659 [411047-413962] ../src/vabackend.c: 412 resolveSurfaces [RT] Resolve thread for 0x1bec2824e800 started
[411047:413955:0411/081925.764370:ERROR:vaapi_video_decoder.cc(1214)] failed Initialize()ing the frame pool
25531.994924710 [411047-413955] ../src/vabackend.c:1161 nvDestroyContext Destroying context: 2
25531.994943178 [411047-413955] ../src/vabackend.c: 321 destroyContext Signaling resolve thread to exit
25531.994953998 [411047-413955] ../src/vabackend.c: 327 destroyContext Waiting for resolve thread to exit
25531.995061489 [411047-413962] ../src/vabackend.c: 466 resolveSurfaces [RT] Resolve thread for 0x1bec2824e800 exiting
25531.995108266 [411047-413955] ../src/vabackend.c: 329 destroyContext pthread_timedjoin_np finished with 0
25532.235722920 [411047-413955] ../src/vabackend.c:2147 nvTerminate Terminating 0x1bec01c48800
25532.235917086 [411047-413955] ../src/vabackend.c:2161 nvTerminate Now have 0 (0 max) instances
For me setting --enable-features=AcceleratedVideoDecodeLinuxGL,AcceleratedVideoDecodeLinuxZeroCopyGL,VaapiOnNvidiaGPUs,VaapiIgnoreDriverChecks does work (significant less CPU usage and nvidia-smi pmon gives C+G), however, I get the following logs which maybe are related?:
[45:45:0413/100847.144056: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)
And scrolling down on the chrome://gpu/ page
[46:46:0413/102337.286620:WARNING:sandbox_linux.cc(415)] : InitializeSandbox() called with multiple threads in process gpu-process.
[46:46:0413/102345.022466:ERROR:gl_display.cc(495)] : EGL Driver message (Error) eglCreateContext: Requested version is not supported
[46:46:0413/102504.769070:ERROR:gl_display.cc(495)] : EGL Driver message (Error) eglCreateContext: Requested version is not supported
[46:46:0413/102643.865773:ERROR:gl_display.cc(495)] : EGL Driver message (Error) eglCreateContext: Requested version is not supported
Hardware video decoding acceleration has been working properly in chromium/brave releases for a long while now.
--enable-features=AcceleratedVideoDecodeLinuxGL,AcceleratedVideoDecodeLinuxZeroCopyGL,VaapiOnNvidiaGPUs
- note: nVidia driver
575.57.08currently requires building from git master, but very thankful it's working flawlessly.
Similar EGL errors (only ever occurring when accessing brave://gpu) as noted in https://github.com/elFarto/nvidia-vaapi-driver/pull/341#issuecomment-2799853293.
Jun 08 15:50:50 brave-browser.desktop[524117]: [524117:524117:0608/155050.964677:ERROR:ui/gl/gl_display.cc:508] EGL Driver message (Error) eglCreateContext: Requested version is not supported
Jun 08 15:50:50 brave-browser.desktop[524117]: Warning: eglCreateContext failed with EGL_BAD_ATTRIBUTE
Jun 08 15:50:50 brave-browser.desktop[524117]: at CheckEGL (../../third_party/dawn/src/dawn/native/opengl/UtilsEGL.cpp:98)
Jun 08 15:50:51 brave-browser.desktop[524117]: [524117:524117:0608/155051.003143:ERROR:ui/gl/angle_platform_impl.cc:49] SyncEGL.cpp:69 (operator()): eglCreateSync failed with 0x00003009
Jun 08 15:50:51 brave-browser.desktop[524117]: ERR: SyncEGL.cpp:69 (operator()): eglCreateSync failed with 0x00003009
- kernel 6.14.10
- gnome-shell 48.2 (Wayland)
- mutter 48.3.1 (-Dxwayland=false -Dx11=false)
- nVidia 575.57.08
I confirm that google-chrome-stable --enable-features=AcceleratedVideoDecodeLinuxGL,AcceleratedVideoDecodeLinuxZeroCopyGL,VaapiOnNvidiaGPUs works perfectly on Gnome Wayland as of today, 08/06/2025.
google-chrome 137.0.7151.68-1
libva-nvidia-driver 0.0.14-1
AV1 videos still use CPU decoding, but as 99% of the videos on the platform aren't AV1, that's not really a problem for now. Still, would be good to get AV1 decoding too, but having in mind that Chrome is unsupported by this library, we're blessed to have the rest working. Thanks for this incredible job, @elFarto!
Electron apps usually use old versions of Electron and can't be expected to work properly
An additional note: if you perform a Google Meet call with --enable-features=AcceleratedVideoDecodeLinuxGL,AcceleratedVideoDecodeLinuxZeroCopyGL,VaapiOnNvidiaGPUs enabled, all you will see is a green image, at least it happened to me today until I removed the flags.
@arrowgent Has this issue been resolved for you? I'm encountering the same problem - Chrome's HEVC hardware acceleration throws the same error on Linux.
Currently, under Wayland with DRM and NVIDIA driver version 570, Chrome 138 in non-headless mode successfully supports HEVC hardware decoding. However, in headless mode testing, it fails with errors
An additional note: if you perform a Google Meet call with
--enable-features=AcceleratedVideoDecodeLinuxGL,AcceleratedVideoDecodeLinuxZeroCopyGL,VaapiOnNvidiaGPUsenabled, all you will see is a green image, at least it happened to me today until I removed the flags.
This can be reproduced by visiting this steam page and viewing the video:
https://store.steampowered.com/app/222880/Insurgency/
I filed #386 for this, but I assume it is an upstream issue in chromium.
Chromium. Works on Arch Wayland, but not with command from pull, use this one --> https://bbs.archlinux.org/viewtopic.php?pid=2257360#p2257360
Chromium works on Arch Wayland, but not with command from pull, use this one
It's literally the same command though. --ozone-platform=wayland is just there to enable the native Wayland backend. Maybe I should add that it would work only on Wayland though
@xuanruiqi Personally, if I don't add this to command, then the VA-API doesn't work, some players crash, and this site for checking the video looks like this
And if I press play, then it will kind of do nothing, let's say I press play, and it just stays in the same visual state as in the picture
also if i try to start a 2k broadcast on twitch, i get error #3000
but with --ozone-platform=wayland all good
Chromium 140 defaults to --ozone-platform-hint=auto so the Wayland flag is soon to be irrelevant.
https://github.com/elFarto/nvidia-vaapi-driver/pull/394 this should fix the VP8 problem producing a green screen/issues on videos, and we should finally have a fully working experience.
#394 this should fix the VP8 problem producing a green screen/issues on videos, and we should finally have a fully working experience.
I tested it and it works perfectly