NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
17.62k stars 13.77k forks source link

PipeWire doesn't load correct default configuration #180983

Open SuperSamus opened 2 years ago

SuperSamus commented 2 years ago

Describe the bug

This issue is probably hardware dependent, so I'll say what's wrong on my end.

On my laptop, there is an audio option (from alsamixer) called Auto-Mute that should be Disabled.

If I use PulseAudio, it's Disabled. If I use PipeWire with a system that isn't NixOS (tested Fedora and EndeavourOS, both from live USB), it's Disabled. If I use PipeWire with NixOS, it's Enabled, on every boot, even if I change it (as a workaround I can launch a command on every boot to disable it, but I shouldn't have to do it).

I thought it was a problem with PipeWire, but seeing that the other two OSes have the correct behavior, it's probably a NixOS problem.

Steps To Reproduce

Steps to reproduce the behavior (on my end, because other cards might actually want Auto-Mute Enabled):

  1. Enable PipeWire;
  2. Open alsamixer;
  3. Select the relevant sound card (F6);
  4. Auto-Mute is Enabled.

Expected behavior

On my end, Auto-Mute should be Disabled.

Additional context

Here's every possible log that might be useful.

Probably relevant to #102547.

Notify maintainers

@Kranzes

Metadata

[user@system:~]$ nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-linux"`
 - host os: `Linux 5.18.9-zen1, NixOS, 22.11 (Raccoon), 22.11pre390234.2770cc0b1e8`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.9.1`
 - channels(root): `"nixos"`
 - channels(user): `""`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`
jansol commented 2 years ago

Relevant upstream discussion: https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/1228

SuperSamus commented 2 years ago

Relevant upstream discussion: https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/1228

It is kinda relevant (I do have a comment there), but I don't think these two issues are really connected.

SuperSamus commented 2 years ago

Still an issue on the latest nixos-unstable. cc @Kranzes

SuperSamus commented 1 year ago

Still an issue on PipeWire 0.3.60.

SuperSamus commented 1 year ago

Still an issue on the latest nixpkgs-unstable.

SuperSamus commented 1 year ago

Still an issue.

 - system: `"x86_64-linux"`
 - host os: `Linux 6.2.7-xanmod1, NixOS, 23.05 (Stoat), 23.05.20230403.53dad94`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.13.3`
 - channels(root): `"nixos"`
 - channels(martino): `""`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`
SuperSamus commented 1 year ago

Still an issue.

jansol commented 1 year ago

Hmm, I checked alsamixer on my setup and I don't even see anything that looks like auto-mute on any of my interfaces. Where is it supposed to be indicated again?

SuperSamus commented 1 year ago

By pressing F6 you can select the sound card.

jansol commented 1 year ago

Ah, it's a "mixer control" on the sound card. Looks like none of mine have that. Also it does not seem to show up in any of the pw-dumps at all. A quick search however pointed me towards this pipewire issue. An educated guess for moving forward would be to check the alsa card profile files that pipewire and wireplumber pull in. Maybe they don't have the patch mentioned in that issue?

Schmiggolas commented 5 months ago

I'm facing this exact behaviour when trying to use my SoundBlaster Z. When I use my onboard sound everything works out fine, but for some reason the "Front" channel for the SBZ is always muted by default after every reboot, even after changing it and using alsactl store to write the file to disk.

eclairevoyant commented 3 months ago

Why are you using alsamixer with pipewire?

SuperSamus commented 3 months ago

Because it's the only way (that I know of) to see and control Auto-Mute.

AnasSaeed1 commented 3 months ago

Hello. I don't have an auto mute device so I can't do much testing on my end but does sound.enable = true; help you? I think it enables services for restoring alsa state from /etc/asound.state