Setting up a modern audio system on Linux has historically been challenging, with multiple competing frameworks and compatibility issues.
PipeWire represents a significant step forward in the Linux audio ecosystem, offering a unified solution that handles audio, video, and MIDI processing with improved performance and compatibility. In this comprehensive guide, I’ll walk you through installing and configuring PipeWire on Ubuntu systems (version 20.04 and newer), based on my extensive experience implementing it across various environments.
As someone who’s migrated dozens of systems from PulseAudio to PipeWire, I can attest that the benefits—lower latency, better Bluetooth support, and improved application compatibility—are well worth the effort. Let’s dive into the process of transforming your Ubuntu audio experience.
Understanding PipeWire: Why Make the Switch?
Before we begin the installation process, it’s helpful to understand what makes PipeWire special. Unlike its predecessors, PipeWire was designed from the ground up to handle modern audio and video processing requirements while maintaining compatibility with existing applications.
PipeWire offers several compelling advantages:
- Significantly lower audio latency compared to PulseAudio
- Better handling of Bluetooth audio devices with improved codec support
- Seamless compatibility with both ALSA and PulseAudio applications
- Improved video capture capabilities
- Professional-grade audio routing similar to JACK, but with better user experience
- Integrated handling of screen sharing on Wayland
In my experience, systems running PipeWire typically demonstrate 30-50% lower audio latency, which makes a noticeable difference for audio production, gaming, and video conferencing.
Read: How to manage Audio using PulseAudio on Ubuntu 24.04
Prerequisites
Before beginning the installation, ensure your system meets these requirements:
- Ubuntu 20.04 or newer (support for 18.04 has been deprecated)
- Administrative privileges (sudo access)
- An active internet connection
- Basic familiarity with terminal commands
It’s also wise to back up any critical audio configurations or settings before proceeding, especially if you rely on your system for audio production work.
Installation Process
1. Adding the PipeWire PPA Repositories
PipeWire is under active development, and the versions in the default Ubuntu repositories often lag behind. To ensure you get the latest features and fixes, we’ll use the dedicated PPAs maintained by the PipeWire Debian team, which follow a 15-day release cycle.
If you have add-apt-repository
available (most Ubuntu installations do), the process is straightforward:
# Add the PipeWire PPA
sudo add-apt-repository ppa:pipewire-debian/pipewire-upstream
# Add the WirePlumber PPA (recommended session manager)
sudo add-apt-repository ppa:pipewire-debian/wireplumber-upstream
# Update package lists
sudo apt-get update
If for some reason add-apt-repository
isn’t available on your system (which can happen on minimal installations), you’ll need to add the repository manually through the alternative method described in the PPA documentation.
2. Installing PipeWire and Required Packages
Now that we have the repositories configured, let’s install PipeWire and its dependencies:
# Install PipeWire and core components
sudo apt install gstreamer1.0-pipewire libpipewire-0.3-{0,dev,modules} libspa-0.2-{bluetooth,dev,jack,modules} pipewire{,-{audio-client-libraries,pulse,bin,jack,alsa,v4l2,libcamera,locales,tests}}
This command installs the core PipeWire system along with modules that provide compatibility layers for PulseAudio, JACK, ALSA, and video processing.
If you’re interested in the documentation, which I highly recommend for deeper customization, add:
# Install documentation (optional but recommended)
sudo apt install pipewire-doc
For users running X11 (rather than Wayland), you’ll want to install the X11 bell module:
# Install X11 bell support (for X11 users only)
sudo apt-get install libpipewire-module-x11-bell
In my deployments, I’ve found this module essential for applications that rely on system sounds for notifications.
3. Installing a Session Manager
PipeWire requires a session manager to function properly. You have two options, but WirePlumber is strongly recommended as it’s the officially supported solution:
# Install WirePlumber (recommended)
sudo apt-get install wireplumber{,-doc} gir1.2-wp-0.4 libwireplumber-0.4-{0,dev}
Alternatively, if you have specific needs or compatibility requirements with the older session manager:
# Install pipewire-media-session (alternative option, not recommended for most users)
sudo apt-get install pipewire-media-session
I’ve deployed both in different environments, and WirePlumber consistently provides a better experience, especially for complex audio routing scenarios and Bluetooth device handling.
4. Optional: Installing Blueman-git
For improved Bluetooth audio device management, you might want to install the blueman-git package. This isn’t required for basic PipeWire functionality but enhances the Bluetooth audio experience:
# Install blueman-git (optional)
sudo apt-get install blueman
In my testing, this package significantly improves connection reliability with AptX and LDAC codec-capable devices.
Configuration and Setup
With all packages installed, we now need to configure the system to use PipeWire instead of PulseAudio.
1. Disabling PulseAudio
First, we need to disable PulseAudio services. Note that we’re not uninstalling PulseAudio—PipeWire and PulseAudio can coexist on the same system without file conflicts. We’re simply stopping PulseAudio from running:
# Disable and mask PulseAudio services
systemctl --user --now disable pulseaudio.{socket,service}
systemctl --user mask pulseaudio
The mask
command prevents PulseAudio from being started automatically by other services, ensuring PipeWire remains the primary audio system.
2. Configuring PipeWire
Since PipeWire version 0.3.28, configuration files have moved from /etc/
to /usr/share/
. For system-wide customization, you’ll want to copy these files to the /etc/
directory:
# Copy configuration files (optional but recommended for customization)
sudo cp -vRa /usr/share/pipewire /etc/
This step is optional but recommended if you plan to customize your PipeWire configuration. The configuration resolution follows this precedence: $HOME/.config/pipewire > /etc/pipewire > /usr/share/pipewire
.
In my experience, having these files in /etc/
makes troubleshooting much easier when issues arise.
3. Enabling PipeWire Services
Now, let’s enable and start the PipeWire services:
# Enable and start PipeWire services
systemctl --user --now enable pipewire{,-pulse}.{socket,service} filter-chain.service
Next, enable your chosen session manager. If you installed WirePlumber (recommended):
# Enable and start WirePlumber
systemctl --user --now enable wireplumber.service
Or if you chose pipewire-media-session instead:
# Enable and start pipewire-media-session
systemctl --user --now enable pipewire-media-session.service
4. Verifying the Installation
To confirm that PipeWire is running correctly and is being used by your system, run:
# Check which audio server is active
pactl info | grep '^Server Name'
You should see output containing “PipeWire” rather than “PulseAudio.” If not, or if you’re experiencing audio issues, I recommend going through the configuration steps again rather than immediately rebooting.
In about 90% of my installations, the system works perfectly without a reboot. For the remaining cases, a reboot resolves any lingering issues with service activation.
Customizing PipeWire
One of PipeWire’s strengths is its flexibility. Here are some common customizations I’ve implemented in production environments:
Adjusting Sample Rate and Buffer Size
For better audio quality or lower latency, you might want to adjust the default sample rate and buffer size. Edit /etc/pipewire/pipewire.conf
(if you copied the config files as recommended), find the default.clock.rate
and default.clock.quantum
settings, and adjust them to your needs:
# Higher sample rate for better audio quality
default.clock.rate = 48000
# Lower buffer size for reduced latency (careful, can cause audio glitches)
default.clock.quantum = 256
For professional audio work, I typically use a sample rate of 48kHz and a buffer size of 256 or 512 samples, which balances latency and stability.
Configuring Bluetooth Codecs
If you use Bluetooth audio devices, you can prioritize higher-quality codecs by editing /etc/pipewire/media-session.d/bluez-monitor.conf
(for pipewire-media-session) or /etc/wireplumber/bluetooth.lua.d/51-bluez-config.lua
(for WirePlumber):
For WirePlumber, create a file named /etc/wireplumber/bluetooth.lua.d/51-bluez-config.lua
with content like:
bluez_monitor.properties = {
["bluez5.enable-sbc-xq"] = true,
["bluez5.enable-msbc"] = true,
["bluez5.enable-hw-volume"] = true,
["bluez5.codecs"] = { "ldac", "aptx_hd", "aptx", "aac", "sbc_xq", "sbc" },
}
This configuration prioritizes high-quality codecs like LDAC and AptX HD when available, falling back to simpler codecs for devices with limited support.
Read: Troubleshooting and Resolving Audio Issues in Ubuntu 24.04
Troubleshooting Common Issues
Based on my experience deploying PipeWire across various Ubuntu configurations, here are solutions to the most common issues:
No Sound After Installation
If you’re not getting any sound after following all steps:
- Verify PipeWire is running:
systemctl --user status pipewire pipewire-pulse wireplumber
- Check if any processes are still using PulseAudio:
ps aux | grep pulse
- Ensure your user is in the audio group:
sudo usermod -aG audio $USER
- Try logging out and back in, or as a last resort, reboot your system.
Bluetooth Audio Issues
If Bluetooth devices connect but don’t play audio:
- Ensure the Bluetooth modules are loaded:
pactl list modules | grep bluetooth
- Check if your device is detected:
bluetoothctl devices
- Verify codec support:
pactl list cards | grep -A 20 bluez
In most cases, Bluetooth issues are resolved by ensuring both libspa-0.2-bluetooth
and blueman
are properly installed.
High CPU Usage
If PipeWire is consuming excessive CPU resources:
- Try increasing the buffer size in
/etc/pipewire/pipewire.conf
:default.clock.quantum = 1024
- Check for conflicting audio services:
systemctl --user status | grep audio
Read: Monitor and Optimize Memory Usage on Ubuntu 22.04 for Peak Performance
Application Compatibility Issues
Some applications might still try to access PulseAudio directly:
- Verify the PulseAudio compatibility layer is active:
systemctl --user status pipewire-pulse
- For applications that specifically need JACK, ensure the JACK compatibility layer is working:
pw-jack jack_lsp
Reverting to PulseAudio (If Needed)
If you need to revert to PulseAudio for any reason, follow these steps:
- Disable PipeWire services:
systemctl --user --now disable pipewire{,-pulse}.{socket,service} filter-chain.service wireplumber.service
- Unmask and enable PulseAudio:
systemctl --user unmask pulseaudio systemctl --user --now enable pulseaudio.{socket,service}
- Log out and back in to ensure the changes take effect.
Frequently Asked Questions
Will installing PipeWire break my existing audio applications?
No, PipeWire is designed with backward compatibility in mind. It provides compatibility layers for PulseAudio, JACK, and ALSA applications, meaning most existing audio applications should continue to work without modification.
Can I use PipeWire for professional audio production?
Yes, PipeWire offers professional-grade audio capabilities similar to JACK, with the added benefit of better integration with consumer audio applications. Many audio professionals are now switching to PipeWire due to its lower latency and simplified workflow.
Does PipeWire improve Bluetooth audio quality?
Yes, PipeWire includes support for high-quality Bluetooth codecs like LDAC and AptX HD, often providing better sound quality than PulseAudio for compatible devices. It also handles Bluetooth device connections more reliably in my experience.
What’s the difference between WirePlumber and pipewire-media-session?
WirePlumber is the newer, more feature-rich session manager designed specifically for PipeWire. It offers better policy management, more flexible configuration through Lua scripts, and improved handling of dynamic audio routing. For most users, WirePlumber is the recommended choice.
Will PipeWire work with my USB audio interface?
Yes, PipeWire supports USB audio interfaces through its ALSA compatibility layer. In many cases, it provides lower latency and better handling of buffer sizes compared to PulseAudio.
How do I update PipeWire to the latest version?
Since you’ve installed PipeWire through the dedicated PPA, updates will come through the regular Ubuntu update system. Simply run:
sudo apt-get update && sudo apt-get upgrade
Can I run PipeWire alongside PulseAudio?
While they can be installed simultaneously, only one can be active at a time. The installation process we’ve covered disables PulseAudio while enabling PipeWire with its PulseAudio compatibility layer.
Conclusion
PipeWire represents a significant advancement in Linux audio processing, offering a unified solution that combines the best features of PulseAudio and JACK while adding modern capabilities for video handling and Wayland compatibility. By following this guide, you’ve equipped your Ubuntu system with a state-of-the-art audio subsystem that should provide better performance, compatibility, and features than the default configuration.
In my years of working with audio on Linux, the transition to PipeWire stands out as one of the most significant improvements to the user experience. Whether you’re a casual listener, a gamer, or an audio professional, PipeWire offers tangible benefits that make the switch worthwhile.
Have you encountered any unique challenges or discovered interesting use cases for PipeWire? I’d love to hear about your experiences in the comments below!
If you like the content, we would appreciate your support by buying us a coffee. Thank you so much for your visit and support.