New Installation on ASUS Zenbook UX5406: intel_vpu Firmware Error -2

Hello everyone, I’m new to NixOS and recently attempted my first installation on an ASUS Zenbook UX5406 (Intel Core Ultra 7 258v).

The installation was successful, but when booting the system, I encountered the following issue:

intel_vpu 0000:00:0b.0: [drm] *ERROR* ivpu_fw_request(): Failed to request firmware: -2
intel_vpu 0000:00:0b.0: [drm] *ERROR* ivpu_dev_init(): Failed to initialize firmware: -2
intel_vpu 0000:00:0b.0: Failed to initialize VPU device: -2

The machine came preinstalled with Windows 11, and I followed this tutorial for installation: Dual Boot Installation Guide.
I used a live CD with KDE Plasma 5 and installed the system using a USB stick. The installed version is 24.11, using the USTC mirror: USTC NixOS Mirrors.

For the configuration, I tried both the simplest nearly-default setup and one with the addition of hardware.opengl from the Intel Graphics Wiki:

  hardware.opengl = {
    enable = true;
    extraPackages = with pkgs; [
      ... # your Open GL, Vulkan and VAAPI drivers
      vpl-gpu-rt          # for newer GPUs on NixOS >24.05 or unstable
      # onevpl-intel-gpu  # for newer GPUs on NixOS <= 24.05
      # intel-media-sdk   # for older GPUs
    ];
  };

This modification didn’t resolve the issue.

I also wanted to try the kernelParams part from the same wiki, but using lspci in the Live CD’s Konsole caused the Live CD to crash, preventing me from retrieving the required information.

Additionally, I tried selecting the latest kernel in the hardwareConfiguration file, but the 6.12.5 kernel failed to compile. (If this compilation error is crucial, I can retry and provide more details.)

Regarding the bootloader, I tested both GRUB2 and the default systemd-boot, and both worked fine, showing entries for both NixOS and Windows.

Further information:
I am unsure how to rescue the current system using a command line after the boot error. As a result, I’ve been re-entering the Live CD each time, remounting the partitions, adjusting the configuration files, and reinstalling the system with nixos-install. I’m not sure if this workflow is problematic.

Thank you in advance for your help! If anyone has any ideas or suggestions, please let me know—I’ll research, learn, and give them a try. :smiling_face_with_three_hearts:

Hello
Could you tell me your Kernel Version and Nix Version?
Also you could try adding the intel npu driver with the following in your configuration:

hardware.firmware = [
    (
      let
        model = "37xx";
        version = "0.0";

        firmware = pkgs.fetchurl {
          url = "https://github.com/intel/linux-npu-driver/raw/v1.2.0/firmware/bin/vpu_${model}_v${version}.bin";
          hash = "sha256-qGhLLiBnOlmF/BEIGC7DEPjfgdLCaMe7mWEtM9uK1mo=";
        };
      in
      pkgs.runCommand "intel-vpu-firmware-${model}-${version}" { } ''
        mkdir -p "$out/lib/firmware/intel/vpu"
        cp '${firmware}' "$out/lib/firmware/intel/vpu/vpu_${model}_v${version}.bin"
      ''
    )
  ];

The way you rescue your system is not completely correct because with nixos you can enter your system when its mounted:
Boot live ISO
mount root to /mnt and boot to /mnt/boot
than do nixos enter (to enter your system and do the necessary things)
and then nixos-rebuild -switch

Thank you very much for your reply :blush:. I’m not currently near my computer and cannot check which kernel version is installed by default, but I recall that the configured system version is 24.11.

Oh, so the intel VPU error is related to its NPU driver. I will try the solution you provided tonight and let you know the results as soon as possible.

Thank you also for explaining the proper procedure to rescue the system!

Yeah the intel npu driver is currently packaged for nixos. This is just a quick fix until it is out.

I tried the process of installing the NPU driver last night, and now my system is able to boot normally. Thanks again for your help!