I’d like to get video acceleration/ VA-API working on my machine, but firefox doesn’t like my setup. Using nixos-24.11 and hyprland/wayland:
And I can’t run some commands from other threads I found:
> NVD_LOG=1 nix shell nixpkgs#libva-utils -c vainfo
Trying display: wayland
libva info: VA-API version 1.22.0
libva info: User environment variable requested driver 'nvidia'
libva info: Trying to open /run/opengl-driver/lib/dri/nvidia_drv_video.so
13177.076873512 [376000-376000] ../src/vabackend.c: 168 init CUDA ERROR 'unknown error' (999)
libva info: Found init function __vaDriverInit_1_0
13177.076894526 [376000-376000] ../src/vabackend.c:2187 __vaDriverInit_1_0 Initialising NVIDIA VA-API Driver: 40
13177.076896462 [376000-376000] ../src/vabackend.c:2196 __vaDriverInit_1_0 Now have 0 (0 max) instances
13177.076898110 [376000-376000] ../src/vabackend.c:2222 __vaDriverInit_1_0 Selecting Direct backend
13177.099345600 [376000-376000] ../src/direct/nv-driver.c: 295 init_nvdriver Initing nvdriver...
13177.099364711 [376000-376000] ../src/direct/nv-driver.c: 313 init_nvdriver NVIDIA kernel driver version: 565.77, major version: 565, minor version: 77
13177.099368254 [376000-376000] ../src/direct/nv-driver.c: 320 init_nvdriver Got dev info: 100 1 2 6
13177.105230822 [376000-376000] ../src/direct/direct-export-buf.c: 27 findGPUIndexFromFd CUDA ERROR 'initialization error' (3)
13177.105234994 [376000-376000] ../src/vabackend.c:2252 __vaDriverInit_1_0 CUDA ERROR 'initialization error' (3)
libva error: /run/opengl-driver/lib/dri/nvidia_drv_video.so init failed
libva info: va_openDriver() returns 1
vaInitialize failed with error code 1 (operation failed),exit
> nvidia-settings --glxinfo
ERROR: libEGL setup error : libEGL.so.1: cannot open shared object file: No such file or directory
I have an Intel CPU and nvidia graphics card:
> nix shell nixpkgs#pciutils -c lspci -kd ::03xx
00:02.0 Display controller: Intel Corporation AlderLake-S GT1 (rev 0c)
DeviceName: Onboard - Video
Subsystem: Micro-Star International Co., Ltd. [MSI] Device 7d30
Kernel driver in use: i915
Kernel modules: i915
01:00.0 VGA compatible controller: NVIDIA Corporation GA102 [GeForce RTX 3080 Ti] (rev a1)
Subsystem: eVga.com. Corp. Device 3967
Kernel driver in use: nvidia
Kernel modules: nvidiafb, nouveau, nvidia_drm, nvidia
Relevant config:
{ config, pkgs, ... }:
{
# ...
boot = {
blacklistedKernelModules = [ "nouveau" ];
extraModulePackages = [ config.boot.kernelPackages.nvidia_x11 ];
initrd.kernelModules = [ "nvidia" ];
};
hardware = {
graphics.enable = true;
nvidia = {
open = true;
powerManagement.enable = true;
};
};
services.xserver.videoDrivers = [ "nvidia" ];
}
(Full config here)
hyprland.conf
env = GBM_BACKEND,nvidia-drm
env = __GLX_VENDOR_LIBRARY_NAME,nvidia
env = NVD_BACKEND,direct
env = LIBVA_DRIVER_NAME,nvidia
env = __GL_GSYNC_ALLOWED,1
env = MOZ_DISABLE_RDD_SANDBOX,1
I’m using firefox 137 with about:config:
"gfx.x11-egl.force-enabled" = true;
"media.hardware-video-decoding.force-enabled" = true;