Help needed - Audio problem

I cant get audio from my laptop. Its a Lenovo Legion 7 ITHg6 with the Cirrus Logic CS35L41 amplifiers. I have tried so much and installed the kernel and patches from CachyOS since it works in their live environment, but no luck.

If anybody can help that would really be appreciated as im pulling out my hair here. I have been at this for days and cant get it to work.

Also relatively new to NixOS, so please be patient with me. I have experience from Arch/CachyOS as that’s what I had installed before i installed NixOS.

Greetings new friends,
Sebastian

1 Like

got it to work. needed another source of cachyos kernel that included the needed patches. As the one i used apparently didnt have those patches. I would prefer to manually include those into the stock kernel, but i dont know how to do that.

If anybody is willing to help me with that it would be great, but there’s not an issue for me to use cachyos’s kernel for the time being.

Sebastian

1 Like

I don’t have any experience with custom kernels, but maybe this section of the wiki could help: https://nixos.wiki/wiki/Linux_kernel#Custom_configuration

Could you share a link to these patches?

Here’s the info I have found currently:
In CachyOS’s cloned repo of the Linux upstream kernel you can see this line:

They have added a C fix, but unsure on how to add that to the standard kernel. (I’m not that advanced other that having built the kernel or using dkms on CachyOS on my machine a few times).

I have tried a few fixes other have tried with a patch found here:

But that has not worked and the person trying to maintain it has stopped maintaining it.
Cirrus has added some support for the Cirrus CS35L41 on many laptops, but that does not apply to this one.

I have messaged their open source side in hopes of getting this included in the upstream kernel, and will update here if I get an answer.

1 Like

Also for anyone wanting to get working audio right now on this laptop right now you can do the following.

First setup Nix Flake, and then add the following.

add this to your configuration.nix config block:

  boot.initrd.kernelModules = [
    "snd_hda_scodec_cs35l41_i2c"   # The missing bridge module between your card and amplifiers
    "i2c_designware_platform"      # The low-level ACPI driver for your Intel i2c rails
  ];

Add the following to your flake.nix inputs block:

    # Official Chaotic-NYX package input (TRUE pre-patched CachyOS kernel)
    chaotic = {
      url = "github:chaotic-cx/nyx/nyxpkgs-unstable";
      inputs.nixpkgs.follows = "nixpkgs";
    };

And my flake.nix output is this:

  outputs = { self, nixpkgs, chaotic, ... }@inputs: {

    nixosConfigurations.<YOUR MACHINE NAME> = nixpkgs.lib.nixosSystem {
      system = "x86_64-linux";
      modules = [
        # Pulls in your core system layout configuration directly
        ./configuration.nix

        # CachyOS TRUE Kernel - Audio fix for Lenovo Legion 7 ITHg6
        ({ pkgs, ... }: {
          nixpkgs.overlays = [ chaotic.overlays.default ];

          # Wire up the pre-compiled binary cached speed loaders
          nix.settings.substituters = [
            "https://cache.nixos.org/"
            "https://nix-community.cachix.org/"
            "https://chaotic-nyx.cachix.org/"
            "https://cache.garnix.io"
          ];
          nix.settings.trusted-public-keys = [
            "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
            "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
            "chaotic-nyx.cachix.org-1:HfnXSw4pj95iI/n17rIDy40agHj12WfF+Gqk6SonIT8="
            "cache.garnix.io:CTFPyKSLcx5RMJKfLo5EEPUObbA78b0YQ2DTCJXqr9g="
          ];
        })
      ];
    };
  };

^ This is only my outputs, so don’t forget to add { at the start and } at the end if your copy-pasting the whole block.

1 Like