PipeWire is an advanced audio and video server designed to replace PulseAudio and JACK in Linux systems. It offers low-latency performance, better handling of professional audio workflows, and seamless integration with various applications. In this guide, we will cover how to install, configure, and optimize PipeWire for audio management in Linux.
Why Use PipeWire?
- Low Latency: Ideal for professional audio production.
- Better Compatibility: Works with PulseAudio and JACK applications.
- Efficient Resource Management: Optimized for modern Linux distributions.
- Improved Bluetooth Audio Support: Supports high-quality codecs like AAC, aptX, and LDAC.
- Future-Proofing: Aims to become the standard audio server for Linux.
Installing PipeWire on Linux
Most modern Linux distributions come with PipeWire pre-installed. However, if you need to install it manually, follow the steps below based on your distribution.
Fedora
Fedora uses PipeWire by default. If it is not installed, you can install it using:
sudo dnf install pipewire pipewire-pulseaudio pipewire-jack pipewire-alsa
Ubuntu/Debian
Ubuntu and Debian still use PulseAudio by default, but you can switch to PipeWire:
sudo apt install pipewire pipewire-audio-client-libraries
To replace PulseAudio with PipeWire:
echo "export PIPEWIRE_RUNTIME_DIR=/run/user/$(id -u)/pipewire" >> ~/.profile
systemctl --user disable --now pulseaudio.socket pulseaudio.service
systemctl --user enable --now pipewire pipewire-pulse
Arch Linux
Arch Linux provides official support for PipeWire. Install it using:
sudo pacman -S pipewire pipewire-pulse pipewire-alsa pipewire-jack
Enable PipeWire:
systemctl --user enable --now pipewire pipewire-pulse
Configuring PipeWire
Once installed, you may need to configure PipeWire to optimize its performance.
Checking PipeWire Status
Verify that PipeWire is running:
systemctl --user status pipewire
If PipeWire is not running, start it manually:
systemctl --user start pipewire
Managing Audio Devices
Use pw-cli
to list available audio devices:
pw-cli list-objects
Alternatively, use pactl
for a more familiar interface:
pactl list short sinks
Setting Default Audio Device
To set a default audio sink, run:
pactl set-default-sink <sink-name>
You can find the sink name using:
pactl list sinks short
Additional Tips
- Use WirePlumber: WirePlumber is a session manager for PipeWire that provides better control over audio routing.
- Tweak Buffer Sizes: Adjust buffer sizes for lower latency in
pipewire.conf
. - Monitor Audio Streams: Use
pw-mon
to debug audio streams in real-time. - Switch Between PulseAudio and PipeWire: If you need to revert back to PulseAudio, disable PipeWire and re-enable PulseAudio services.
Enable High-Quality Bluetooth Audio: Add the following to /etc/pipewire/media-session.d/bluez-monitor.conf
:
properties = {
"bluez5.enable-msbc" = true
"bluez5.enable-hw-volume" = true
}
Conclusion
PipeWire is revolutionizing audio management in Linux, providing a robust and low-latency alternative to PulseAudio and JACK. Whether you're an audiophile, a professional musician, or just looking for better Bluetooth audio support, PipeWire is a great choice. By following this guide, you can install, configure, and optimize PipeWire to enhance your Linux audio experience.