
How to switch from PulseAudio to PipeWire
July 18, 2024
What is PipeWire
PulseAudio is an audio service that allows you to stream audio locally and over the network. Since 2020, it has gradually begun to be replaced by PipeWire, which manages the mixing of various sources and their distribution to various outputs.
Since arriving on the scene in 2017, PipeWire was seen as a strong contender to replace PulseAudio, but it still had many stability issues. PipeWire currently has a good reputation. In this article, we will provide you with the latest information on the benefits of PipeWire over PulseAudio and show you how to properly install it on your system if you decide to replace PulseAudio with PipeWire.
Audio in Linux has always had a layered structure: you install the driver, it makes the device work, but applications still want to interact with it in their own way. To do this, the server acts as an intermediary in user space, “talking” to the kernel, which then communicates with the computer hardware.
The Advanced Linux Sound Architecture (ALSA) serves as a good, simple intermediary between your applications and the kernel, but if you want a more complex system, you'll need something called an audio server.
Both PulseAudio and PipeWire add a layer on top of what your kernel does to present a range of functions. They allow multiple applications to stream audio, provide granular mixing control capabilities, and even allow on-the-fly post-processing of audio streams that rivals or even exceeds the application suite capabilities that commercial operating systems provide.
The difference between the two is that the PipeWire layer adds other features, such as streaming video processing, while eliminating some of the problems of PulseAudio.
Since its introduction in 2017, PipeWire's stability issues have gradually disappeared. It is now the default sound server for various distributions including Fedora, Arch-based Manjaro, EndeavourOS, Garuda, and it was even introduced in Ubuntu 22.10.
Overall, PipeWire brings improvements to the performance of audio devices while maintaining backward compatibility with software that uses PulseAudio.
How to install PipeWire
1. Make sure Pipewire is not already installed
To do this, run the command and examine its output:
pactl info
If the output contains the line “Server Name: pulseaudio”, then this instruction is for you – continue.
If the output contains the line “Server Name: PulseAudio (on PipeWire 1.2.1)”, then there is nothing more to do – PipeWire is already installed on your system.
2. Disable PulseAudio and its services
systemctl --user --now disable pulseaudio.service pulseaudio.socket systemctl --user mask pulseaudio
After executing these commands, the icons for applets that use audio services will disappear, this is normal.
3. Install PipeWire and its services
On Debian, Ubuntu, Linux Mint, Kali Linux and derivative distributions, run the command:
sudo apt install pipewire wireplumber pipewire-pulse
On Arch Linux, BlackArch and derivative distributions, run the command:
sudo pacman -S pipewire pipewire-pulse pipewire-alsa wireplumber
Install and start the appropriate services (the command is the same for all distributions):
systemctl --user --now enable pipewire pipewire-pulse wireplumber
Icons for applets that use audio services will reappear.
4. Uninstall Pulseaudio
Attention: Pulsaudio must be uninstalled after installing Pipewire, otherwise Cinnamon may also be uninstalled!
On Debian, Ubuntu, Linux Mint, Kali Linux and derivative distributions, run the command:
sudo apt remove pulseaudio
On Arch Linux, BlackArch and derivative distributions, run the command:
sudo pacman -Rns pulseaudio
5. PipeWire check
Restart your computer to ensure that the necessary services start correctly when you turn on your computer.
After restarting the computer, the sound should work normally.
Check the status of services.
You can check that everything is running correctly using the command:
systemctl --user status pipewire-pulse.socket pipewire-pulse.service
This command should return something like this:
● pipewire-pulse.socket - PipeWire PulseAudio Loaded: loaded (/usr/lib/systemd/user/pipewire-pulse.socket; enabled; vendor preset: enabled) Active: active (running) since Thu 2024-07-18 09:28:01 +07; 1min 24s ago Triggers: ● pipewire-pulse.service Listen: /run/user/1000/pulse/native (Stream) CGroup: /user.slice/user-1000.slice/user@1000.service/app.slice/pipewire-pulse.socket Jul 18 09:28:01 HackWare-Mint systemd[952]: Listening on PipeWire PulseAudio. ● pipewire-pulse.service - PipeWire PulseAudio Loaded: loaded (/usr/lib/systemd/user/pipewire-pulse.service; enabled; vendor preset: enabled) Active: active (running) since Thu 2024-07-18 09:28:01 +07; 1min 24s ago TriggeredBy: ● pipewire-pulse.socket Main PID: 962 (pipewire-pulse) Tasks: 2 (limit: 6761) Memory: 6.0M CPU: 69ms CGroup: /user.slice/user-1000.slice/user@1000.service/session.slice/pipewire-pulse.service └─962 /usr/bin/pipewire-pulse Jul 18 09:28:01 HackWare-Mint systemd[952]: Started PipeWire PulseAudio. Jul 18 09:28:02 HackWare-Mint pipewire-pulse[986]: 536870912
And the following command:
pactl info
should return something like the following output:
Server String: /run/user/1000/pulse/native Library Protocol Version: 35 Server Protocol Version: 35 Is Local: yes Client Index: 58 Tile Size: 65472 User Name: mial Host Name: HackWare-Mint Server Name: PulseAudio (on PipeWire 0.3.48) Server Version: 15.0.0 Default Sample Specification: float32le 2ch 48000Hz Default Channel Map: front-left,front-right Default Sink: alsa_output.pci-0000_00_05.0.analog-stereo Default Source: alsa_input.pci-0000_00_05.0.analog-stereo Cookie: 43ea:fb6e
Related articles:
- How to migrate from X11 to Wayland? (64.8%)
- How to connect a TV to a computer in Linux in Cinnamon (Linux Mint, LMDE) (64.7%)
- How to run multiple instances of an application from the Panel in Cinnamon (61.9%)
- How to translate Linux with Cinnamon into my language (61.9%)
- How to prioritize Wi-Fi connections in Linux (61.9%)
- How to play a movie with an external audio track in VLC (RANDOM - 32.2%)