Want to try Pipewire Sound Server? It’s easy to do this on Ubuntu 21.04, and here’s how to do it!
PipeWire is a server for processing multimedia on Linux. Its most common use is for Wayland and Flatpak apps to implement audio and video playback and capture with minimal latency. It also seamlessly supports PulseAudio, JACK, ALSA, and GStreamer-based applications.
Replace PulseAudio with Pipewire in Ubuntu 21.04.
Ubuntu 21.04 has officially enabled pipewire support. And here’s how I enabled it on my laptop:
Do not do this on production machines! It is possible to replace existing Ubuntu audio services, but at this time there is no guarantee that the experience will be complete or free of problems and bugs.
1.) First, open a terminal from the system application launcher or by pressing Ctrl + Alt + T on your keyboard.
Once open, run the command to install
sudo apt install pipewire-audio-client-libraries
2.) Then run the command to create an empty file.
sudo touch /etc/pipewire/media-session.d/with-pulseaudio
pipewire-pulse Create a service file by copying the sample file.
sudo cp /usr/share/doc/pipewire/examples/systemd/user/pipewire-pulse.* /etc/systemd/user/
4.) You don’t need to remove PulseAudio. Just disable PulseAudio and enable Pipewire.
- Run the command to reload the new service file.
systemctl --user daemon-reload
- Disable the PulseAudio service with a command.
systemctl --user --now disable pulseaudio.service pulseaudio.socket
- And finally, enable the Pipewire service.
systemctl --user --now enable pipewire pipewire-pulse
5.) I performed the previous step in the following way Debian Wiki, But it didn’t work. The sound icon in the system tray disappears
pactl info “Connection failed: Connection rejected” is output.
To work around this issue, enable
pipewire-media-session The service may work when you run the following command:
systemctl --user --now enable pipewire-media-session.service
If you’re trying to get it to work on Ubuntu 20.04, try running the following command to “mask” the PulseAudio service before rebooting.
systemctl --user mask pulseaudio
Finally, reboot the machine.
Then check if Pipewire is working and run
pactl info command. Also, if “PulseAudio (PipeWire 0.3.24)” is displayed in the output, it is working.