8
April
2024
Replacing Pulseaudio sound server with Pipewire on Linux and installing EasyEffects
17:17

Replacing Pulseaudio sound server with Pipewire on Linux and installing EasyEffects

8 April 2024 17:17

How to replace PulseAudio with PipeWire, install EasyEffects equalizer, or downgrade from PipeWire to PulseAudio.

Contents

  1. 0.Checking the sound server you are using
  2. 1.Instructions for replacing PulseAudio with PipeWire
  3. 2.Installing the sound effects manager and equalizer EasyEffects
  4. 3.Setting the volume control in the system tray when you have multiple sound cards
  5. 4.Reverting to PulseAudio after installing PipeWire (rolling back changes)

 


0. Checking the sound server used

Check in the Terminal which sound server is installed and used:

inxi -Ax

1. Instructions for replacing PulseAudio with PipeWire

1) added a PPA repository

sudo -E add-apt-repository ppa:pipewire-debian/pipewire-upstream

2) updated the apt package cache

sudo apt update

3) installed pipewire sound server

sudo apt install pipewire

4) You also need to install libraries for the Pipewire sound server, which will install the ABR, LDAC, Opus and SBC codecs through dependencies:

sudo apt install libspa-0.2-bluetooth

(This command will install the libfreeaptx0, libldacbt-abr2, libldacbt-enc2, libopus0, libsbc1 packages to support the corresponding APRX, LDAC, Opus, SBC codecs).

5) Installed the Pipewire client libraries

sudo apt install pipewire-audio-client-libraries

6) Reloaded the service configuration with the "--user" switch for this user (since the PipeWire server runs in the user's security context):

systemctl --user daemon-reload

7) Disabled the old PulseAudio service for the user:

systemctl --user --now disable pulseaudio.service pulseaudio.socket

8) Additionally: in Ubuntu I disabled the pulseaudio service after reboot using the commands:

sudo systemctl --user mask pulseaudio
sudo systemctl mask pulseaudio

9) Installed the wireplumber package

sudo apt install wireplumber

I note that there are two ways to manage flows and policies in PipeWire: using the pipewire-media-session or wireplumber modules. The pipewire-media-session package is not available on Linux Mint. In other distributions, on the contrary, the wireplumber package requires dependencies that are not satisfied. Then install the package that is available - pipewire-media-session or wireplumber.

10) Installed the pipewire-pulse package (contains a service to replace PulseAudio) and the recommended pipewire-audio package.

sudo apt install pipewire-pulse pipewire-audio

11) After installing PipeWire according to PipeWire installation instructions from the-spyke I copy the ALSA configuration file from the PipeWire examples directory to the ALSA directory:

sudo cp /usr/share/doc/pipewire/examples/alsa.conf.d/99-pipewire-default.conf /etc/alsa/conf.d/

This applies to setting up ALSA in conjunction with PipeWire.

12) Removed all PulseAudio components

sudo apt purge pulseaudio pulseaudio-module-bluetooth pulseaudio-utils

#sudo apt purge jack* qjackctl

13) To prevent the SAP error from being displayed when starting bluetooth:

Open the bluetooth service description file for SystemD for editing

sudo nano /etc/systemd/system/bluetooth.target.wants/bluetooth.service

[Unit]
Description=Bluetooth service
Documentation=man:bluetoothd(8)
ConditionPathIsDirectory=/sys/class/bluetooth

[Service]
Type=dbus
BusName=org.bluez
ExecStart=/usr/libexec/bluetooth/bluetoothd --noplugin=sap

Added the --noplugin=sap switch!

A SIM access profile (SAP) allows a Bluetooth-enabled device to access data contained in the SIM card of another Bluetooth-enabled device. Disabled the SAP plugin.

14) Launching new services

systemctl --user --now enable pipewire pipewire-pulse wireplumber
systemctl --user start pipewire pipewire-pulse wireplumber

15) Check:

sudo inxi -Ax

The result should be something like this:

API: ALSA v: k6.17.0-20-generic status: kernel-api
Server-1: PipeWire v: 1.0.7 status: active

Now the sound card should work on wired headphones or speakers, and if you have a Bluetooth headset, it should also play sound via Bluetooth.

To switch from the built-in sound card to the headset, use the “Sound mixer” volume control item.
mixer
Before this, you need to connect to the BlueTooth device, as usual, through the Bluetooth icon in the system tray: the "Devices" menu item.
bt

 

2. Installing the sound effects manager and equalizer EasyEffects

1) Installing a level control, etc. - Control panel for PipeWire, called EasyEffects

The EasyEffects app has a home page at https://github.com/wwmm/easyeffects
EasyEffects can be installed from Flatpak:

sudo apt install flatpak
flatpak install flathub com.github.wwmm.easyeffects

Press Enter twice, if we want to allow installation - Y - EasyEffects application
Downloading and installing easyeffects takes about 5 minutes.

If the EasyEffects program does not install, check that the EasyEffects flatpak repository has been added (only relevant for some distributions):

flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.fpatpakrepo

By default, this command is not needed in Linux Mint and Linux Green.

2) Launch the application EasyEffects

flatpak run com.github.wwmm.easyeffects

An empty window should appear: "List is empty".
easyeffects1

3) In EasyEffects, go to the “Pipewire” tab - change the sound card (only if it is external USB)

pipewire-internal-audio

In the "Autoload presets" section, I changed the sound card for audio input/output from Built-in Audio Analog Stereo to USB Audio Analog Stereo.
pipewire-out

In the "General" section I selected a USB sound card (if there is built-in sound, this item is not required)

4) In EasyEffects we check the sound output - section "Test signal".

sound_test

Be careful, very loud signal, take off your headphones!

On the "Output" tab, the signal spectrum will appear, with a level of -6 dB
test
Let's turn off the test signal on the Pipewire - Test signal tab.

5) Launch the sound source - previously installed Shortwave application
vinyl

6) To adjust the volume: in EasyEffects, on the “Pipewire” - “Players” tab, reduce the volume from 100% to 20-25%.
volume

7) Adjust the PipeWire volume - on the "Players" tab (100% -> 22%)

8) Added an equalizer to "Effects" - "Add effect" - "Equalizer"

eq1

Default 32 stripes! I don't need this, 5 stripes are enough. We correct the number of stripes at the top from 32 to 5.
eq2
To change the equalizer parameters after reducing the number of bands, stretch the window beyond the right edge:
eq3
and click the "Calculate Frequencies" button.
eq4
Use the bottom edge to increase the size of the window or expand the window to fill the entire screen.
Adjust the equalizer to taste.

If there is overload in your headphones at maximum volume, you can adjust the "Output" gain.
eq5

The sound in PipeWire with equalizer has improved compared to PulseAudio.

Do not overload the output (move the slider to the left)! lvls

9) For better quality, switch the equalizer mode from IIR to FFT. fft

10) Save the equalizer settings to disk using the "Export APO preset" button.

In the future, there is no need to launch EasyEffects every time, because the settings are applied to PipeWire when the OS starts.
Launching EasyEffects to customize the sound is done with the command

flatpak run com.github.wwmm.easyeffects

Also, the Easy Effects sound adjustment program can be executed in the menu "Start" - "Audio and Video" - "Easy Effects":
easy_effects_icon

Saving EasyEffects settings is done in the "Presets" menu:
pipewire-save-settings

 

3. Setting the volume control in the system tray if you have multiple sound cards

If you have multiple sound cards connected to your computer, the default system tray volume setting controls the volume of the built-in sound card. Changes in volume level will not affect the speaker volume. To solve the problem, left-click on the volume control, select "Sound Settings".
volume2

A panel will open - you need to select the sound card that will be controlled by the volume control. In my case, the sound output to an external sound card is called "Analog output USB audio"- clicked on the corresponding button on the panel. Now the volume control works correctly - it controls the volume of sound output to the external USB sound card.
usb_sound_card


On Linux Green with the Cinnamon desktop, you can click on the volume icon in the system tray to select Bluetooth headset to output sound.
linux_green_output

To prevent system notifications from interfering with listening to music, in the same window "Sound" on the tab "Sound Settings" you need to reduce the volume of sounds to zero.
notifications-off

If the sound through Bluetooth headphones is of poor quality, then the “Headphone” profile is used instead of A2DP.
cvsd
This problem is addressed a separate article on this site.

 

4. Return to PulseAudio after installing PipeWire (rollback changes)

Some users have encountered problems after switching to PipeWire.
Removing PipeWire and installing PulseAudio will help.

sudo systemctl --global disable pipewire pipewire-pulse pipewire-media-session

sudo apt remove pipewire -y && sudo apt autoremove -y && sudo apt autoclean -y
sudo flatpak remove com.github.wwmm.easyeffects
sudo add-apt-repository -r ppa:pipewire-debian/pipewire-upstream
sudo apt update
sudo apt reinstall pulseaudio pulseaudio-module-zeroconf avahi-daemon  pavucontrol  alsa-utils pulseaudio-utils
sudo apt purge bluetooth bluez* blueman pulseaudio-module-bluetooth
sudo apt install bluetooth bluez bluez-tools blueman pulseaudio-module-bluetooth
mv  ~/.config/pulse/ ~/.config/pulse_old/
sudo systemctl --global unmask pulseaudio.service pulseaudio.socket
sudo systemctl --global enable pulseaudio.service pulseaudio.socket
sudo reboot

Bluetooth permissions:

sudo adduser pulse bluetooth

Edit the file

sudo nano /etc/dbus-1/system.d/bluetooth.conf

At the end of the file, before there should be:

<!-- allow users of bluetooth group to communicate -->
<policy group="bluetooth">
<allow send_destination="org.bluez"/>
</policy>

<policy context="default">
<allow send_destination="org.bluez"/>
</policy>

Permission to use and launch pulseAudio service by user:

systemctl --user unmask pulseaudio.service
systemctl --user enable pulseaudio.service

systemctl --user unmask pulseaudio.socket
systemctl --user enable pulseaudio.socket

systemctl --user daemon-reload

Setting up automatic connection of Bluetooth devices:

sudo nano /usr/bin/start-pulseaudio-x11
set -e

if [ x "$DISPLAY" != x ] ; then

    /usr/bin/pactl load-module module-x11-publish "display=$DISPLAY xauthority=$XAUTHORITY" > /dev/null
    /usr/bin/pactl load-module module-x11-cork-request "display=$DISPLAY xauthority=$XAUTHORITY" > /dev/null

    #Add NEW
    /usr/bin/pactl load-module module-bluetooth-discover
    /usr/bin/pactl load-module module-switch-on-connect

Edit:

sudo nano /etc/pulse/default.pa

After the module "###Automatically restore the volume of streams and devices" add the lines:

## Add New
.ifexists module-bluetooth-discover.so
load-module module-bluetooth-discover
.endif

Setting the operating mode of the Bluetooth adapter: remove the comment in the line ControllerMode and set the parameter to "bredr".

sudo nano /etc/bluetooth/main.conf
# Restricts all controllers to the specified transport. Default value
#is "dual", i.e. both BR/EDR and LE enabled (when supported by the HW).
#Possible values: "dual", "bredr", "le" 
ControllerMode = bredr

Archive with configuration files for PulseAudio + Bluetooth (from Runtu/Ubuntu 20.04): conf.zip.

Reboot PC:

sudo shutdown -r now

Start playing a sound, for example:
https://www.rbc.ru/story/radio.

If you can't hear any sound, check the audio output to "Headphones" or "Line Out" by right-clicking on the volume icon.
output

You can also use System Setting to select the output device Start - Settings - Sound.

Then, adjust the volume to pavucontrol.

Checking in the terminal:

systemctl --user status pulseaudio.service

Should be displayed in green: "Active: active (running)".

Checking the sound server:

pactl info

The result should be something like this:

Server String: /run/user/1000/pulse/native
Library Protocol Version: 35
Server Protocol Version: 33
Is Local: yes
Client Index: 12
Tile Size: 65472
User Name: vladimir
Host Name: amd
Server Name: pulseaudio
Server Version: 13.99.1
Default Sample Specification: s16le 2ch 44100Hz
Default Channel Map: front-left,front-right
Default Sink: bluez_sink.41_42_93_D9_80_BD.a2dp_sink
Default Source: bluez_sink.41_42_93_D9_80_BD.a2dp_sink.monitor
Cookie: db00:e703

Debugging:

pulseaudio -k
pulseaudio -D
sudo journalctl -xe

In my case, after all the above steps, there are no errors. I managed to install PipeWire, then return Pulseaudio back.

Command Result

inxi -Ax

next:

  Sound Server-1: ALSA v: k6.2.0-060200-generic running: yes
Sound Server-2: PulseAudio v: 15.99.1 running: yes

On Linux, when using Bluetooth, the default profile "HFP Headset" may sometimes launch with poor audio quality. How to switch the Bluetooth profile to high-quality A2DP audio via Bluetooth - see article on this site.


Sources:
https://pipewire-debian.github.io/pipewire-debian/
https://github.com/wwmm/easyeffects
https://forum.ubuntu.ru/index.php?topic=315646.0
https://gist.github.com/the-spyke/2de98b22ff4f978ebf0650c90e82027e


Last change: 05/06/2026



Related publications