VAAPI acceleration in Firefox on Debian 12 is tricky because many of the components are broken with fixes hiding in newer versions that have yet to be released through Debian's repositories.
+
As of Debian 13 (Trixie) it is now fairly easy to configure VAAPI hardware video acceleration as this release ships with an updated version of the `nvidia-vaapi-driver`. The only package that needs to be manually installed now is the `nvidia-driver`.
-
I was only able to get this working by manually building and installing the following updated packages:
-
- nvidia-driver v570.169
-
- nvidia-smi v570.169 (comes with manually installed nvidia-driver)
Other packages used (installed through Debian 12 repository):
+
Tested working packages:
+
- nvidia-driver v570.169 (manually installed without the package manager)
+
- nvidia-vaapi-driver v0.0.13
- firefox-esr v128.11
-
- vainfo v2.12
+
- -vainfo v2.22
+
+
In the future when the Debian repository ships a newer release of the `nvidia-driver` make sure you also have the `libnvidia-encode1` package installed (this package already comes with the `nvidia-driver` when manually installed).
+
+
Ensure you have the following kernel parameters set for the `nvidia-driver`:
+
+
`/etc/modprobe.d/nvidia.conf`
+
```
+
options nvidia-drm modeset=1
+
```
+
+
If this parameter is not currently set you will have to rebuild initramfs and reboot:
+
```
+
sudo mkinitramfs -u
+
sudo reboot
+
```
Once you have installed the packages above you can verify `nvidia-vaapi-driver` is working by running `vainfo`:
```
user@debian:~$ vainfo
-
libva info: VA-API version 1.17.0
+
Trying display: wayland
+
Trying display: x11
+
error: can't connect to X server!
+
Trying display: drm
+
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
Here we are looking to see that the driver has loaded without errors and that we are using the `[direct backend]`. If the driver is defaulting to the`[egl backend]` you can force it to use `direct` by setting the following environment variable: