PipeWire: Difference between revisions

H7x4 (talk | contribs)
Add a few links
RobH (talk | contribs)
Add new section on headless operation.
Line 204: Line 204:
$ pw-dump | grep node.name | grep alsa
$ pw-dump | grep node.name | grep alsa
</syntaxHighlight>
</syntaxHighlight>
==Headless operation==
PipeWire can run on a headless device (without a GUI) such as a Raspberry Pi connected to a speaker. In that case, it may be preferable to start PipeWire on boot and keep it running rather than only running during an interactive login session. Among other things, this helps prevent a race condition that may occur when socket activation fails to initialize  audio devices in time for their first use, leading to one-time errors after reboots. The following additional configuration facilitates this:
<syntaxhighlight lang="nix">
  # Socket activation too slow for headless; start at boot instead.
  services.pipewire.socketActivation = false;
  # Start WirePlumber (with PipeWire) at boot.
  systemd.user.services.wireplumber.wantedBy = [ "default.target" ];
  users.users.<name>.linger = true; # keep user services running
  users.users.<name>.extraGroups = [ ... "audio" ];
</syntaxhighlight>


==Troubleshooting==
==Troubleshooting==