I do game streaming from a Windows PC to an Intel NUC running NixOS and the moonlight-qt package. As part of the config for this device I have
hardware.opengl.extraPackages = with pkgs; [
intel-media-driver
];
This NUC is new, so this is the correct driver. On 23.11 moonlight-qt correctly picked up this driver and video decoding was hardware accelerated.
However, I upgraded to 24.05 (I just changed which branch my nixpkgs input pointed to in my flake) and now at startup moonlight-qt says that it can’t find a hardware video decoder.
Is this a change in how drivers, etc work from one release to the next, or is it a problem with moonlight-qt?
(not sure about vaapiIntel there, got it from old wiki entry and it has been there ever since)
Haven’t tested specifically moonlight-qt, but vlc and firefox have hardware acceleration, no problem
So here’s what I’ve found. All the drivers exist both on 23.11 and 24.05, and the moonlight-qt revision is the same from 23.11 to 24.05.
The difference is found in the moonlight-qt logs. On 23.11 you see this:
libva info: VA-API version 1.20.0
libva info: Trying to open /run/opengl-driver/lib/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_20
libva info: va_openDriver() returns 0
whereas on 24.05 you see this:
libva info: VA-API version 1.20.0
libva info: Trying to open /run/opengl-driver/lib/dri/iHD_drv_video.so
libva error: /run/opengl-driver/lib/dri/iHD_drv_video.so has no function __vaDriverInit_1_0
So the driver exists, but on 24.05 it’s looking for a different symbol name that appears not to exist.
I found similar issues on GitHub, but there doesn’t seem to be any apparent solution. However, I found the following configuration in nixos-hardware:
From this, I assume you need to add intel-vaapi-driver in addition to intel-media-driver for it to work properly.
have you tried with any other software that uses hardware encoding? is it just moonlight-qt that have those issues, or all other softwares too?
in VLC, you will see the same kind of log when you open a video that supports hardware decoding
p.s. also it’s strange that it looks for __vaDriverInit_1_0, when it should be 1_20,
you can check exported symbols with readelf --symbols -C /run/opengl-driver/lib/dri/iHD_drv_video.so | grep -i vadriver
my guess is that’s something fishy with moonlight-qt, but i don’t know how libva picks init function and what env (or smth else) affects it
Appears to be something fishy with moonlight-qt. VLC works fine with an H264 video and the driver is picked up, but on 24.05 it’s __vaDriverInit_1_21. That readelf command only shows that symbol as well, not __vaDriverInit_1_1.
I see that it has been removed from the official wiki’s Accelerated_Video_Playback article, but it is still present in some other articles, i guess those need to be updated.
found in: