Missing ivsc-firmware on Dell XPS 13 Plus 9320

I failed to resolve the problem on Dell XPS 13 Plus 9320 with nixos 23.11 and would appreciate any help

[:~]$ dmesg | grep vsc
..
[   12.898799] intel vsc not ready
[   12.909779] mei_vsc spi-INTC1094:00: Direct firmware load for vsc/soc_a1_prod/ivsc_fw_a1_prod.bin failed with error -2
[   12.909784] mei_vsc spi-INTC1094:00: file not found vsc/soc_a1_prod/ivsc_fw_a1_prod.bin
[   12.910610] mei_vsc spi-INTC1094:00: hw_reset failed ret = -19
[   12.911381] mei_vsc spi-INTC1094:00: reset failed ret = -19
[   12.912162] mei_vsc spi-INTC1094:00: link layer initialization failed.
[   12.914776] mei_vsc spi-INTC1094:00: init hw failure.
[   12.916179] intel vsc not ready

Resolved it with the help of the xps_9320.nix gist. The firmware is required for webcamer usage together with ipu6 driver.

# /etc/nixos/hardware-configuration.nix 
{ config, lib, pkgs, modulesPath, ... }:

let
  ivsc-firmware = with pkgs;
    stdenv.mkDerivation rec {
      pname = "ivsc-firmware";
      version = "main";

      src = pkgs.fetchFromGitHub {
        owner = "intel";
        repo = "ivsc-firmware";
        rev = "main";
        sha256 = "sha256-kEoA0yeGXuuB+jlMIhNm+SBljH+Ru7zt3PzGb+EPBPw=";

      };

      installPhase = ''
        mkdir -p $out/lib/firmware/vsc/soc_a1_prod

        cp firmware/ivsc_pkg_ovti01a0_0.bin $out/lib/firmware/vsc/soc_a1_prod/ivsc_pkg_ovti01a0_0_a1_prod.bin
        cp firmware/ivsc_skucfg_ovti01a0_0_1.bin $out/lib/firmware/vsc/soc_a1_prod/ivsc_skucfg_ovti01a0_0_1_a1_prod.bin
        cp firmware/ivsc_fw.bin $out/lib/firmware/vsc/soc_a1_prod/ivsc_fw_a1_prod.bin
      '';
    };
in
{
...
  hardware.firmware = [
    ivsc-firmware
  ];
  hardware.ipu6 = {
    enable = true;
    platform = "ipu6ep";
  };
}

I am struggling here as well, specially as a NixOS newbie. Do you have your full XPS 13 config somewhere?

Thanks you!

@fcoury the gist contains my config

1 Like

That’s awesome, thank you so much!

1 Like

the problem with that (original) gist is having main as rev. As soon as a new commit lands there it is no longer possible to reproduce.

@FRidh, thanks for your attention. Updated the gist by setting rev to the commit.

Addressed the problem in ivsc-firmware: file not found vsc/soc_a1_prod/ivsc_fw_a1_prod.bin · Issue #281373 · NixOS/nixpkgs · GitHub

1 Like

Did you managed to get webcam working on 9320 with this?? And does your microphone also works? I can’t find how to fix it.

answered to you in It Just Works ™️ · GitHub

i created a PR that fix this issue WIP: Add a1_prod symblinks by bubuntux · Pull Request #295508 · NixOS/nixpkgs · GitHub

2 Likes

I don’t have access to this computer right now to test, but thanks a lot!

The PR may take some time to merge so as a work around you can do

{pkgs, ...}: {
  hardware = {
    ipu6 = {
      enable = true;
      platform = "ipu6ep"; # or whatever you need
    };
    firmware = [
      (pkgs.ivsc-firmware.overrideAttrs (attrs: {
        postInstall =
          (attrs.postInstall or "")
          + ''
            mkdir -p $out/lib/firmware/vsc/soc_a1_prod
             for file in $out/lib/firmware/vsc/*.bin; do
              ln -sf "$file" "$out/lib/firmware/vsc/soc_a1_prod/$(basename "$file" .bin)_a1_prod.bin"
             done
          '';
      }))
    ];
  };
}
2 Likes