Compressed sof-firmware messes up symlinks?

Hi,

This morning I noticed that sound was not working on my nixos laptop.
After examining the dmesg I found this:

[ 5.084701] sof-audio-pci-intel-tgl 0000:00:1f.3: Direct firmware load for intel/sof/sof-rpl.ri failed with error -2
[ 5.084706] sof-audio-pci-intel-tgl 0000:00:1f.3: error: sof firmware file is missing, you might need to
[ 5.084765] sof-audio-pci-intel-tgl 0000:00:1f.3: download it from GitHub - thesofproject/sof-bin: Firmware and topology binaries
[ 5.084822] sof-audio-pci-intel-tgl 0000:00:1f.3: error: failed to load DSP firmware -2
[ 5.085491] sof-audio-pci-intel-tgl 0000:00:1f.3: error: sof_probe_work failed err: -2

I enabled sof-firmware in my configuration.nix, and did ‘nixos-rebuild switch’ and rebooted, but no
improvement. I then looked at /run/current-system/firmware/intel/sof/, and found that all the symlinks
were broken. In particular,

/run/current-system/firmware/intel/sof/sof-rpl.ri

is a symlink targeting intel-signed/sof-rpl.ri, and

/run/current-system/firmware/intel/sof/intel-signed/sof-rpl.ri

is a symlink targeting sof-adl.ri, but

/run/current-system/firmware/intel/sof/intel-signed/sof-adl.ri

does not exist, although there is a

/run/current-system/firmware/intel/sof/intel-signed/sof-adl.ri.xz

There is also no .xz version of the original symlink, i.e. there is no

/run/current-system/firmware/intel/sof/sof-rpl.ri.xz

If I look in the store for sof-firmware, I see this:

/nix/store]$ ls *sof-firmware*
01wlpqj26k4licfqq19d8cyx2w9v9vl4-sof-firmware-2.2.6-xz.drv  j02gvxik38rvbfix6k1h2xnsvv723zl0-sof-firmware-2.2.6.drv    wbi4j8fzly1qpaj8hn96swinj1g9x2q8-sof-firmware-2023.12-xz.drv
8fcmbbd6ifcqf1y5ayc0kxlpcy2rs0lb-sof-firmware-2023.12.drv   qlsmglmzkzf3ri9iim71z72ciwlbkkf5-sof-firmware-2023.12.drv  y7f96k4s00z5940bn4430kyr0c86174q-sof-firmware-2023.12-xz.drv

29n2gkp1ahwz5ip74hlp9gn1f3hlzfhr-sof-firmware-2023.12:
lib

mxklp70ll2w94xc0d6a809vmilydd8gc-sof-firmware-2023.12-xz:
lib

nyhlnr5k3kfqw976b1nvigd47nnvwj6h-sof-firmware-2.2.6-xz:
lib

rmsdx7f3sh8f13rb042smjhwsd16lmnw-sof-firmware-2023.12-xz:
lib

The 29n2gkp1ahwz5ip74hlp9gn1f3hlzfhr-sof-firmware-2023.12 tree contains the
firmware without any files xz-compressed, and with all the symlinks good.
The versions of the *sof-firrmware-*-xz/ directories all seem to have a somewhat
random mix of symlinks and xz-compressed files. In the latest version that
the system is currently using, none of the symlinks under ‘sof’ have ‘.xz’ extenstions,
and their targets don’t have .xz extensions, and all the links are broken because
the actual sof firmware files all have .xz extensions.

Does anyone know where the compressed versions of the sof-firmware package are
coming from or what might be causing the broken compression/symlinking?

Having the same issue on ZenBook UX3402VA

There was some buggy behavior merged in the firmware compression code last week. It’s been fixed, and that should make it to nixos-unstable soon.

2 Likes

Luckily, it’s already in: https://nixpk.gs/pr-tracker.html?pr=284487

1 Like