PipeWire: Difference between revisions

Writer (talk | contribs)
Explain how to disable sink suspension in wireplumber to avoid sound pops.
drop 24.05 compat
Line 10: Line 10:


<syntaxhighlight lang="nix">
<syntaxhighlight lang="nix">
  # On NixOS 24.05 or older, this option must be set:
  #sound.enable = false;
   # rtkit is optional but recommended
   # rtkit is optional but recommended
   security.rtkit.enable = true;
   security.rtkit.enable = true;
Line 25: Line 22:
</syntaxhighlight>
</syntaxhighlight>


It is possible to use the <code>services.pipewire.extraConfig</code> option hierarchy in NixOS (available from 24.05 onwards) to create drop-in configuration files, if needed.
It is possible to use the <code>services.pipewire.extraConfig</code> option hierarchy in NixOS to create drop-in configuration files, if needed.


==Bluetooth Configuration==
==Bluetooth Configuration==
PipeWire can be configured to use specific codecs, by default all codecs and most connection modes are enabled, see [https://pipewire.pages.freedesktop.org/wireplumber/daemon/configuration/bluetooth.html#monitor-properties this link] for precise details of which connections modes are enabled by default. The mSBC codec provides slightly better sound quality in calls than regular HFP/HSP, while the SBC-XQ provides better sound quality for audio listening. For more information [https://www.guyrutenberg.com/2021/03/11/replacing-pulseaudio-with-pipewire/ see this link].
PipeWire can be configured to use specific codecs, by default all codecs and most connection modes are enabled, see [https://pipewire.pages.freedesktop.org/wireplumber/daemon/configuration/bluetooth.html#monitor-properties this link] for precise details of which connections modes are enabled by default. The mSBC codec provides slightly better sound quality in calls than regular HFP/HSP, while the SBC-XQ provides better sound quality for audio listening. For more information [https://www.guyrutenberg.com/2021/03/11/replacing-pulseaudio-with-pipewire/ see this link].


Wireplumber (<code>services.pipewire.wireplumber</code>) is the default modular session / policy manager for PipeWire in unstable. To add custom configuration in NixOS 24.05 you can use <code>services.pipewire.wireplumber.extraConfig</code> directly. For example:
Wireplumber (<code>services.pipewire.wireplumber</code>) is the default modular session / policy manager for PipeWire in unstable. To add custom configuration you can use <code>services.pipewire.wireplumber.extraConfig</code> directly. For example:


<syntaxhighlight lang="nix">
<syntaxhighlight lang="nix">