This happened when after rebuilding, and somehow VAAPI just won’t work even though the driver is correct, I also checked each wallpaper in image viewer and it shows fine. but these problem does not apply in arch linux.
Trying display: wayland
libva info: VA-API version 1.23.0
libva info: User environment variable requested driver 'i965'
libva info: Trying to open /run/opengl-driver/lib/dri/i965_drv_video.so
libva info: Found init function __vaDriverInit_1_23
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
The nixos-hardware modules for the Thinkpad T420 does this for the GPU:
{
imports = [ ../. ];
# Enables RC6, RC6p and RC6pp.
# Last two are only available on Sandy Bridge CPUs (circa 2011).
boot.kernelParams = [ "i915.enable_rc6=7" ];
hardware.intelgpu.vaapiDriver = "intel-vaapi-driver";
}
I tried it and it didn’t work, but when I ran it on X11 instead of Wayland, it worked—though the glitch was still there. My Kitty terminal also had the same issue on both X11 and Wayland.
Yes, I’ve already tried adding the nixos-hardware module and kernel param to the configuration, but it doesn’t seem to be working.
I added that variable as described in the wiki; if I don’t apply it, Vainfo will try the intel-media-driver (iHD) first, then the intel-vaapi-driver (i965), as far as I know https://wiki.nixos.org/wiki/Accelerated_Video_Playback
Okay, after a few days I figured out the problem. When I updated my Arch Linux, I realized that my Arch was also affected, so I tried rolling back a package called “mesa” and it worked without any issues. But I haven’t tried it on NixOS yet.
The version of Mesa I’m currently using is: mesa 1:26.0.6-1