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.
-
I was only able to get this working by manually building and installing the following packages:
+
I was only able to get this working by manually building and installing the following updated packages:
- nvidia-driver v570.169
-
- nvidia-vaapi-driver v0.0.14
+
- nvidia-smi v570.169 (comes with manually installed nvidia-driver)
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:
+
```
+
export NVD_BACKEND=direct
+
```
+
+
### Configuring Firefox
+
Before launching Firefox I recommend setting the following environment variable in your terminal to enable NV logging:
+
```
+
export NVD_LOG=1
+
```
+
+
Now launch Firefox using the following parameters:
+
```
+
MOZ_DISABLE_RDD_SANDBOX=1 firefox
+
```
+
+
In Firefox you will need to set the `media.ffmpeg.vaapi.enabled` option to `true` in the `about:config` page:
+

+
+
Now close Firefox and restart using the same command. To verify that video hardware decoding is working you can play a YouTube video and check the output of `nvidia-smi`: