tpwrules / nixos-apple-silicon

Resources to install NixOS bare metal on Apple Silicon Macs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Speaker quality bad on nixos-unstable

MaximilianGaedig opened this issue · comments

First of all, thank you for making this amazing nix config, it makes nixos a blast to use on my macbook!

I've recently enabled speakers which worked amazingly, then I changed my nixpkgs channel to nixos-unstable. After that change my speakers became really muffled, vibrated the whole machine etc., I tried rolling back to previous generations which fixed the issue after a reboot, so I switched back to nixos-23.11 in the flake, this fixed the issue.

I have no idea what the cause of this is, but I diffed the configurations and found 2 derivations of the same speakersafetyd package which might be the issue: /nix/store/b2p28lh5mfl3abnc0c25yaqddxy7yx73-speakersafetyd-0.1.9 /nix/store/f110s40gx4kkmirn4y4kyg68v376x368-speakersafetyd-0.1.9/

I have checked the dependencies using nix-tree and they were the same, I'm pretty new to nix, so I don't know how to further go into the details on why this has changed

I would highly appreciate if you could look into this, or tell me what the possible causes are/how I can help fix this. I would consider this low priority tho, as the workaround does not cause many problems.

relevant flake.lock:

{
  "nodes": {
    "apple-silicon-support": {
      "inputs": {
        "flake-compat": "flake-compat",
        "nixpkgs": "nixpkgs",
        "rust-overlay": "rust-overlay"
      },
      "locked": {
        "lastModified": 1710209440,
        "narHash": "sha256-1JwFo3u2aVrvpz12OotjCK51EQ0hEDI7xSG7CEvTSk8=",
        "owner": "tpwrules",
        "repo": "nixos-apple-silicon",
        "rev": "bdc68b494d6a26c9457f4841ab1a6109b12a33e6",
        "type": "github"
      },
      "original": {
        "owner": "tpwrules",
        "repo": "nixos-apple-silicon",
        "type": "github"
      }
    },
    "nixpkgs": {
      "locked": {
        "lastModified": 1709961763,
        "narHash": "sha256-6H95HGJHhEZtyYA3rIQpvamMKAGoa8Yh2rFV29QnuGw=",
        "owner": "nixos",
        "repo": "nixpkgs",
        "rev": "3030f185ba6a4bf4f18b87f345f104e6a6961f34",
        "type": "github"
      },
      "original": {
        "owner": "nixos",
        "repo": "nixpkgs",
        "rev": "3030f185ba6a4bf4f18b87f345f104e6a6961f34",
        "type": "github"
      }
    },
    "nixpkgs_2": {
      "locked": {
        "lastModified": 1711163522,
        "narHash": "sha256-YN/Ciidm+A0fmJPWlHBGvVkcarYWSC+s3NTPk/P+q3c=",
        "owner": "NixOS",
        "repo": "nixpkgs",
        "rev": "44d0940ea560dee511026a53f0e2e2cde489b4d4",
        "type": "github"
      },
      "original": {
        "id": "nixpkgs",
        "ref": "nixos-unstable",
        "type": "indirect"
      }
    },
    "nixpkgs_3": {
      "locked": {
        "lastModified": 1708422533,
        "narHash": "sha256-OJxUslyGM/Eni66IOq8WGCjpM3H0vEfdv+fwzUmsOSY=",
        "owner": "NixOS",
        "repo": "nixpkgs",
        "rev": "e1135102e9ae9f7fe84147f9700a17cf4839f97f",
        "type": "github"
      },
      "original": {
        "owner": "NixOS",
        "ref": "master",
        "repo": "nixpkgs",
        "type": "github"
      }
    },
    "root": {
      "inputs": {
        "apple-silicon-support": "apple-silicon-support",
        "nixpkgs": "nixpkgs_2"
      }
    },
    "rust-overlay": {
      "flake": false,
      "locked": {
        "lastModified": 1686795910,
        "narHash": "sha256-jDa40qRZ0GRQtP9EMZdf+uCbvzuLnJglTUI2JoHfWDc=",
        "owner": "oxalica",
        "repo": "rust-overlay",
        "rev": "5c2b97c0a9bc5217fc3dfb1555aae0fb756d99f9",
        "type": "github"
      },
      "original": {
        "owner": "oxalica",
        "repo": "rust-overlay",
        "type": "github"
      }
    },
    "systems": {
      "locked": {
        "lastModified": 1681028828,
        "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
        "owner": "nix-systems",
        "repo": "default",
        "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
        "type": "github"
      },
      "original": {
        "owner": "nix-systems",
        "repo": "default",
        "type": "github"
      }
    },
    "systems_2": {
      "locked": {
        "lastModified": 1681028828,
        "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
        "owner": "nix-systems",
        "repo": "default",
        "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
        "type": "github"
      },
      "original": {
        "id": "systems",
        "type": "indirect"
      }
    },
  },
  "root": "root",
  "version": 7
}

relevant flake.nix:

{
  inputs = {
    nixpkgs.url = "nixpkgs/nixos-unstable";
    apple-silicon-support.url = "github:tpwrules/nixos-apple-silicon";
  };

}

Workaround

Switch nixpkgs to nixos-23.11

Someone mentioned on Matrix that bankstown might have issues with wireplumber 0.5.0. Not sure how reliable that information is.

@zzywysm, thanks for the hint. Wireplumber 0.5.0 seems to be the issue. This workaround works for me when added to configuration.nix (reverts NixOS/nixpkgs#278760):

  nixpkgs.overlays = [(
    self: super:
    {
      wireplumber = super.wireplumber.overrideAttrs ( old: rec {
        version = "0.4.17";
        src = super.fetchFromGitLab {
          domain = "gitlab.freedesktop.org";
          owner = "pipewire";
          repo = "wireplumber";
          rev = version;
          hash = "sha256-vhpQT67+849WV1SFthQdUeFnYe/okudTQJoL3y+wXwI=";
        };
      });
    }
  )];

Yes, this fix will automatically be applied in the upcoming release.

Fixed in the latest release. Please remove the overlay from your config and upgrade.