Intel Haswell iGPU vaapi+wayland broken under latest nixpkgs

Hi!

I’ve recently been trying to use an old macbook of mine, which has been on NixOS for… a while.

Problem Context:

Under va-api 1.21, legacy intel-vaapi-driver worked fine under Wayland

However, va-api 1.22 introduced an issue with the legacy driver such that it was only fixed with a git patch, and not a full release, of the intel-vaapi-driver before it’s deprecation by intel

This patch made its way into nixpkgs some months ago, and it doesn’t seem like many people [based on google] have had any problems once on the latest patched version

Problem:

However, for some odd reason, on latest nixpkgs, vaapi is still broken on my computer under Wayland. Running vainfo yields:

libva info: Found init function __vaDriverInit_1_22
libva error: /run/opengl-driver/lib/dri/i965_drv_video.so init failed
libva info: va_openDriver() returns -1
vaInitialize failed with error code -1 (unknown libva error),exit

And when x11 or drm is specified, it does successfully return:

libva info: Trying to open /run/opengl-driver/lib/dri/i965_drv_video.so
libva info: Found init function __vaDriverInit_1_22
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.22 (libva 2.22.0)
vainfo: Driver version: Intel i965 driver for Intel(R) Haswell - 2.4.0.pre1 (2.4.0.pre1)
vainfo: Supported profile and entrypoints ...

What is most strikingly odd about this, is I’m fairly confident the version should be 2.4.1, not 2.4.0. When I cross reference what i965_drv_video.so points to, it is indeed coming from the latest intel-vaapi-driver with the git patch etc. in my /nix/store.

relevant bits from my configuration files for the build, i915 is an initrd.kernelModule, and this is how my graphics packages look:

      extraPackages = with pkgs; [
        intel-vaapi-driver  # LIBVA_DRIVER_NAME=i965 (older but works better for Firefox/Chromium), Overrode intel-vaapi-driver with hybrid codec support
        intel-media-sdk
        intel-ocl
        libva-vdpau-driver
      ];

[within hardware.graphics, enable=true obviously, and this exact configuration was functional ~last august, when it was on va-api 1.21]

I’ve tried tinkering with not overriding the hybrid codec, installing the 32 bit driver as well, removing/moving around the i915 kernel module, but nothing

additionally have searched for the exact i965 .so in my store, and the only version that exists whatsoever is from the latest package, hence my confusion over the version

With that, I’m at a loss at potential next steps

1 Like