Install Sound Open Firmware

I finally bought an ThinkPad X1 Yoga (4. Generation). I can report that everything works on nixos, but the internal microphone.

According to the arch wiki, one should install the Sound Open Firmware. Is there an example on howto install such a firmware on nixos or can I just simply create a derivation that downloads the release and copies the files?

1 Like

Maybe it’s part of nixpkgs.alsa-firmware? I would try that, and if that does not work, yes you could make a derivation that simply downloads the released files and populates a tree with them. Alternatively, you could create a derivation from the source,

The intel firmware isn’t included in the alsa-firmware package, it seems.

@zeec123 can you try nixos-unstable and use the latest kernel?

You can import this as sound.nix in your configuration.nix:

{ config, pkgs, options, ... }:

  # support audio out
  boot.kernelPackages = pkgs.linuxPackagesFor pkgs.linux_latest;

  # Enable sound.
  sound.enable = true;
  hardware.pulseaudio.enable = true;
  hardware.pulseaudio.support32Bit = true;
  hardware.pulseaudio.package = pkgs.pulseaudioFull;

I have the same laptop, and I was able to get it working on nixos-unstable by enabling kernel firmware following the merge of Seems like it’s going to be in the default list of firmwares enabled for the kernel.

This was also backported to 20.03 in and is in the stable channel by now.

Thank you all. @NickHu How can I enable this? Is it just

hardware.enableAllFirmware =true;

or can I just load the soc driver somehow?

I think you should be able to add just pkgs.sof-firmware to hardware.firmware in your config.

I seems that the SOF-firmware is automatically installed when using
boot.kernelPackages = pkgs.linuxPackagesFor pkgs.linux_latest;

The only thing I had to do is switch the sof-hda-dsp card in alsamixer AND MUTE the “Speaker” item. This is necessary for normal sound

Press the “M” key on the third column , this is essential to have bass sound.

1 Like

Thank you! With this and nixos 20.03 both speakers and mic seem to work on my Thinkpad X1 gen 7.