No sound on unstable

This is my current audio config with pulseaudio:

{pkgs, config, ...}:

{
  sound.enable = true;

  hardware.pulseaudio = {
    enable = true;
    support32Bit = true;
    package = pkgs.pulseaudio.override {
      jackaudioSupport = true;
    };
  };

  environment.systemPackages = with pkgs; [
    flac
    pavucontrol
  ];
}

After upgrading from 19.09pre181629.ae71c13a92f (Loris) to 19.09pre182256.168d1031af4 (Loris) my system seems to have no audio.

Output of certain commands while playing a sound:

$ sudo lsof /dev/snd/*
<nothing>

Also, the upgrade changed the kernel from 5.1.6 to 5.1.7, did something change as to break pulseaudio? Making a roolback the audio on the system seems to work fine.

1 Like

https://github.com/NixOS/nixpkgs/pull/61269#issuecomment-500211927

Since apparently I’m not alone in this issue, I’ll look into reverting that commit (as long as it doesn’t cause mass rebuild on master).

1 Like

Can confirm this seems to be the cause, I’ve made the following overlay and the system now rebuilds with audio:

self: super:

{
  alsaLib = super.alsaLib.overrideAttrs (old: rec {
    name = "alsa-lib-1.1.8";
    src = super.fetchurl {
      url = "mirror://alsa/lib/${name}.tar.bz2";
      sha256 = "1pxf0zkmps03l3zzd0fr828xhkg6a8hxljmbxzc2cyj2ls9kmp1w";
    };
  });
}

The root cause was that pulseaudio wasn’t able to load its alsa modules due to missing symbols because the alsa headers files moved. This was fixed on master but after the latest nixos-unstable channel release.

It would be wise to also check the current master in such situations in the future. Note that it’s called nixos-unstable for a reason. A NixOS test for working sound with pulseaudio would be great if anybody wants to take a shot at it.

5 Likes

You’re right, I should’ve checked current master. I only searched the reported issues, not recent commits.

You don’t need to override the package to enable jackSupport.

pulseaudioFull already enables those features

all-packages.nix
pulseaudioFull = pulseaudio.override {
    x11Support = true;
    jackaudioSupport = true;
    airtunesSupport = true;
    bluetoothSupport = true;
    remoteControlSupport = true;
    zeroconfSupport = true;
  };

Or unless you just want that one feature.