nixos-hardware icon indicating copy to clipboard operation
nixos-hardware copied to clipboard

Lenovo Yoga 7 15ILL9

Open cpaluszek opened this issue 7 months ago • 1 comments

Hello!

I've recently installed NixOS on this device and managed to get audio working properly. I'm new to NixOS but would like to contribute my findings.

Hardware details:

  • CPU: Intel Core Ultra 7 - Lunar Lake architecture
  • Laptop Model: Lenovo Yoga 7 15ILL9
  • Audio codec: Intel Corporation Lunar Lake-M HD Audio Controller

With kernel 6.14.6 and UEFI (also misnamed BIOS) version NYCN67WW.

References:

  • https://github.com/thesofproject/sof/issues/9720

Current configuration:

{ lib, pkgs, unstablePkgs, ... }:

let
  # Custom package for alsa-ucm-conf 1.2.14
  # Can be removed when 1.2.14 gets included in nixpkgs
  alsa-ucm-conf-latest = pkgs.alsa-ucm-conf.overrideAttrs (oldAttrs: {
    version = "1.2.14";
    src = pkgs.fetchurl {
      url = "mirror://alsa/lib/alsa-ucm-conf-1.2.14.tar.bz2";
      hash = "sha256-MumAn1ktkrl4qhAy41KTwzuNDx7Edfk3Aiw+6aMGnCE=";
    };
  });
in
{
  boot.kernelPackages = pkgs.linuxPackages_latest;

  hardware.pulseaudio.enable = false;
  security.rtkit.enable = true;

  services.pipewire = {
    enable = true;
    alsa.enable = true;
    alsa.support32Bit = true;
    pulse.enable = true;
    jack.enable = true;
    wireplumber.enable = true;
  };

  hardware.firmware = [ unstablePkgs.sof-firmware pkgs.alsa-firmware ];

  environment.systemPackages = with pkgs; [
    pavucontrol
    alsa-ucm-conf-latest
  ];

  environment = {
    sessionVariables.ALSA_CONFIG_UCM2 = "${alsa-ucm-conf-latest}/share/alsa/ucm2";
  };
}

Questions: Which part of this configurations should be included in the hardware profile for this laptop? I understand hardware profiles should use lib.mkDefault for most settings - which ones are appropriate here?

The ALSA_CONFIG_UCM2 environment variable is crucial for the audio to work. Is setting this via environment.sessionVariables the preferred approach in hardware profiles?

cpaluszek avatar May 14 '25 17:05 cpaluszek

Thanks, I had sound issues on my ThinkPad X9 15 and this fixed it.

v411e avatar Jun 13 '25 21:06 v411e

Did you have to do anything to this to make it work with the current version of NixOS? I have a Lenovo Slim 7 14ILL10 and can't seem to get this working.

Flameopathic avatar Oct 10 '25 02:10 Flameopathic