MX 23 Going back to pulseaudio (step-by-step tutorial)

Here is where you can post tips and tricks to share with other users of MX. Do not ask for help in this Forum.
Message
Author
User avatar
MadMax
Posts: 483
Joined: Wed Aug 04, 2021 3:25 pm

MX 23 Going back to pulseaudio (step-by-step tutorial)

#1 Post by MadMax »

As described in this thread ( viewtopic.php?t=76364 ) I'm not super-happy about the switch to pipewire. It usually runs fine, but if you're used to pulseaudio and have no need for pipewire's features, it might be a reasonable choice to go back to pulseaudio. Debian 12 decided to put pipewire as default. An interesting detail about that decision is that this is only the case for GNOME. Debian KDE for example will still use pulseaudio by the choice of the Debian KDE maintainers.

I read that the pulseaudio daemon gets spawned any time an application calls for audio and if it isn't running yet, so I figured that there shouldn't be much configuration to do. So I decided to just try to do the switch back to pulse and it worked flawlessly.

So in case anyone who's suffering from audio issues might find this info useful, I documented the steps I did. Be aware that all output is in German as this is my system's language.

Disclaimer: I do not know how easy/difficult it is to revert back to pipewire in case pulseaudio doesn't work for you. There is the package pipewire-setup-mx which should reinstall and reconfigure pipewire, but I did not do this.
Do this on your own risk!


1. Let's get an overview what's on the system. So we query all packages that contain "wire".

Code: Select all

$ apt list --installed | grep wire

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

gstreamer1.0-pipewire/stable,now 0.3.65-3 amd64  [Installiert,automatisch]
libpipewire-0.3-0/stable,now 0.3.65-3 amd64  [Installiert,automatisch]
libpipewire-0.3-modules/stable,now 0.3.65-3 amd64  [Installiert,automatisch]
libwireplumber-0.4-0/stable,now 0.4.13-1 amd64  [Installiert,automatisch]
pipewire-alsa/stable,now 0.3.65-3 amd64  [Installiert,automatisch]
pipewire-bin/stable,now 0.3.65-3 amd64  [Installiert,automatisch]
pipewire-jack/stable,now 0.3.65-3 amd64  [Installiert,automatisch]
pipewire-pulse/stable,now 0.3.65-3 amd64  [Installiert,automatisch]
pipewire-setup-mx/mx,mx,now 23.05.10 all  [installiert]
pipewire/stable,now 0.3.65-3 amd64  [Installiert,automatisch]
wireless-regdb/stable,stable,now 2022.06.06-1 all  [installiert]
wireless-tools/stable,now 30~pre9-14 amd64  [installiert]
wireplumber/stable,now 0.4.13-1 amd64  [Installiert,automatisch]
We basically want to get rid of all except the two wireless packages that have nothing to do with pipewire.


2. After tinkering with apt --dry-run a bit I found this to be the cleanest command.

Code: Select all

$ sudo apt remove pipewire
Paketlisten werden gelesen… Fertig
Abhängigkeitsbaum wird aufgebaut… Fertig
Statusinformationen werden eingelesen… Fertig
Die folgenden Pakete wurden automatisch installiert und werden nicht mehr benötigt:
  liblc3-0 libldacbt-abr2 libpipewire-0.3-modules libspa-0.2-bluetooth libspa-0.2-jack libwireplumber-0.4-0 pipewire-bin
Verwenden Sie »sudo apt autoremove«, um sie zu entfernen.
Die folgenden zusätzlichen Pakete werden installiert:
  pulseaudio
Vorgeschlagene Pakete:
  pavumeter paprefs
Empfohlene Pakete:
  rtkit
Die folgenden Pakete werden ENTFERNT:
  gstreamer1.0-pipewire pipewire pipewire-alsa pipewire-jack pipewire-pulse pipewire-setup-mx wireplumber
Die folgenden NEUEN Pakete werden installiert:
  pulseaudio
0 aktualisiert, 1 neu installiert, 7 zu entfernen und 0 nicht aktualisiert.
Es müssen 1.174 kB an Archiven heruntergeladen werden.
Nach dieser Operation werden 5.000 kB Plattenplatz zusätzlich benutzt.
Möchten Sie fortfahren? [J/n] 
Holen:1 http://deb.debian.org/debian bookworm/main amd64 pulseaudio amd64 16.1+dfsg1-2+b1 [1.174 kB]
Es wurden 1.174 kB in 1 s geholt (1.969 kB/s).
(Lese Datenbank ... 345260 Dateien und Verzeichnisse sind derzeit installiert.)
Entfernen von pipewire-setup-mx (23.05.10) ...
Entfernen von gstreamer1.0-pipewire:amd64 (0.3.65-3) ...
Entfernen von wireplumber (0.4.13-1) ...
Entfernen von pipewire-alsa:amd64 (0.3.65-3) ...
Vormals nicht ausgewähltes Paket pulseaudio wird gewählt.
(Lese Datenbank ... 345126 Dateien und Verzeichnisse sind derzeit installiert.)
Vorbereitung zum Entpacken von .../pulseaudio_16.1+dfsg1-2+b1_amd64.deb ...
Entpacken von pulseaudio (16.1+dfsg1-2+b1) ...
(Lese Datenbank ... 345367 Dateien und Verzeichnisse sind derzeit installiert.)
Entfernen von pipewire-jack:amd64 (0.3.65-3) ...
dpkg: pipewire-pulse: Abhängigkeitsprobleme, wird aber wie gefordert dennoch entfernt:
 libcanberra-pulse:amd64 hängt ab von pulseaudio | pipewire-pulse; aber:
  Paket pulseaudio ist noch nicht konfiguriert.
  Paket pipewire-pulse soll entfernt werden.

Entfernen von pipewire-pulse (0.3.65-3) ...
dpkg: pipewire:amd64: Abhängigkeitsprobleme, wird aber wie gefordert dennoch entfernt:
 firefox hängt ab von pulseaudio | apulse | pipewire; aber:
  Paket pulseaudio ist noch nicht konfiguriert.
  Paket apulse ist nicht installiert.
  Paket pipewire:amd64 soll entfernt werden.

Entfernen von pipewire:amd64 (0.3.65-3) ...
pulseaudio (16.1+dfsg1-2+b1) wird eingerichtet ...
Created symlink /etc/systemd/user/default.target.wants/pulseaudio.service → /usr/lib/systemd/user/pulseaudio.service.
Created symlink /etc/systemd/user/sockets.target.wants/pulseaudio.socket → /usr/lib/systemd/user/pulseaudio.socket.
Trigger für man-db (2.11.2-2) werden verarbeitet ...
Trigger für dbus (1.14.8-2~deb12u1) werden verarbeitet ...
apt automatically recognizes what you want to do and replaces pipewire with pulseaudio. dpkg then sorts out some dependencies and apt configures needed systemd links even if you're booted with SysVinit (which I am).


3. Get rid of orphan pipewire packages with a regular autoremove.

Code: Select all

$ sudo apt autoremove
Paketlisten werden gelesen… Fertig
Abhängigkeitsbaum wird aufgebaut… Fertig
Statusinformationen werden eingelesen… Fertig
Die folgenden Pakete werden ENTFERNT:
  liblc3-0 libldacbt-abr2 libpipewire-0.3-modules libspa-0.2-bluetooth libspa-0.2-jack libwireplumber-0.4-0 pipewire-bin
0 aktualisiert, 0 neu installiert, 7 zu entfernen und 0 nicht aktualisiert.
Nach dieser Operation werden 7.477 kB Plattenplatz freigegeben.
Möchten Sie fortfahren? [J/n] 
(Lese Datenbank ... 345334 Dateien und Verzeichnisse sind derzeit installiert.)
Entfernen von libspa-0.2-bluetooth:amd64 (0.3.65-3) ...
Entfernen von liblc3-0:amd64 (1.0.1-1+b1) ...
Entfernen von libldacbt-abr2:amd64 (2.0.2.3+git20200429+ed310a0-4) ...
Entfernen von pipewire-bin (0.3.65-3) ...
Entfernen von libpipewire-0.3-modules:amd64 (0.3.65-3) ...
Entfernen von libspa-0.2-jack:amd64 (0.3.65-3) ...
Entfernen von libwireplumber-0.4-0:amd64 (0.4.13-1) ...
Trigger für man-db (2.11.2-2) werden verarbeitet ...
Trigger für libc-bin (2.36-9+deb12u1) werden verarbeitet ...

4. (optional) Check for orphan configurations and get rid of those with a purge ~c.

Code: Select all

$ apt list ~c
Auflistung… Fertig
pipewire-bin/stable,now 0.3.65-3 amd64 [Konfiguration-verbleibend]
pipewire-pulse/stable,now 0.3.65-3 amd64 [Konfiguration-verbleibend]
pipewire-setup-mx/mx,mx,now 23.05.10 all [Konfiguration-verbleibend]
pipewire/stable,now 0.3.65-3 amd64 [Konfiguration-verbleibend]
wireplumber/stable,now 0.4.13-1 amd64 [Konfiguration-verbleibend]

Code: Select all

$ sudo apt purge ~c
Paketlisten werden gelesen… Fertig
Abhängigkeitsbaum wird aufgebaut… Fertig
Statusinformationen werden eingelesen… Fertig
Die folgenden Pakete werden ENTFERNT:
  pipewire* pipewire-bin* pipewire-pulse* pipewire-setup-mx* wireplumber*
0 aktualisiert, 0 neu installiert, 5 zu entfernen und 0 nicht aktualisiert.
Nach dieser Operation werden 0 B Plattenplatz zusätzlich benutzt.
Möchten Sie fortfahren? [J/n] 
(Lese Datenbank ... 345124 Dateien und Verzeichnisse sind derzeit installiert.)
Löschen der Konfigurationsdateien von pipewire-setup-mx (23.05.10) ...
Löschen der Konfigurationsdateien von pipewire-bin (0.3.65-3) ...
Löschen der Konfigurationsdateien von wireplumber (0.4.13-1) ...
Löschen der Konfigurationsdateien von pipewire-pulse (0.3.65-3) ...
Löschen der Konfigurationsdateien von pipewire:amd64 (0.3.65-3) ...

EDIT: Performance improvements.

In step 2 apt recommends to install the package rtkit. This is a daemon that helps pulseaudio to gain a higher priority on the system to avoid cracking or other audio glitches. It will start automatically after installation.

Code: Select all

sudo apt install rtkit
DONE! Now the only thing we have left to do is reboot the system and pulseaudio will take over the audio system.


BONUS: One might notice that libpipewire-0.3-0 did not get removed.

Code: Select all

$ apt list --installed | grep wire

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

libpipewire-0.3-0/stable,now 0.3.65-3 amd64  [Installiert,automatisch]
wireless-regdb/stable,stable,now 2022.06.06-1 all  [installiert]
wireless-tools/stable,now 30~pre9-14 amd64  [installiert]
That is the because apparently it's a dependency to A LOT of important other packages. DO NOT REMOVE THIS PACKAGE AS THIS WILL BREAK PARTS OF YOUR SYSTEM. It's a situation that looks a little like Linus Tech Tips' faux-pas to uninstall the desktop environment due to a dependency error in case you know about that.

ONLY RUN THIS COMMAND WITH --DRY-RUN to check its output.

Code: Select all

$ sudo apt remove libpipewire-0.3-0 --dry-run
Paketlisten werden gelesen… Fertig
Abhängigkeitsbaum wird aufgebaut… Fertig
Statusinformationen werden eingelesen… Fertig
Die folgenden Pakete wurden automatisch installiert und werden nicht mehr benötigt:
  flatpak fonts-open-sans libappstream4 libavkys9 libmalcontent-0-0 libmujs2 libostree-1-1 libqt5qmlworkerscript5 libqt5quickcontrols2-5
  libqt5quicktemplates2-5 libqt6widgets6 libqt6xml6 libsixel1 libspa-0.2-modules libstemmer0d libuvc0 libxmlb2 qml-module-qt-labs-folderlistmodel
  qml-module-qt-labs-platform qml-module-qt-labs-settings qml-module-qtgraphicaleffects qml-module-qtqml qml-module-qtqml-models2
  qml-module-qtquick-controls qml-module-qtquick-controls2 qml-module-qtquick-dialogs qml-module-qtquick-extras qml-module-qtquick-layouts
  qml-module-qtquick-privatewidgets qml-module-qtquick-templates2 qml-module-qtquick-window2 qml-module-qtquick2 socat webcamoid-data
Verwenden Sie »sudo apt autoremove«, um sie zu entfernen.
Die folgenden zusätzlichen Pakete werden installiert:
  libenca0 libvorbisidec1 mplayer
Vorgeschlagene Pakete:
  mplayer-doc
Die folgenden Pakete werden ENTFERNT:
  libpipewire-0.3-0 mpv mx-apps mx-packageinstaller mx-packageinstaller-pkglist qpwgraph smplayer smplayer-l10n smplayer-themes webcamoid
  webcamoid-plugins xdg-desktop-portal xdg-desktop-portal-gtk
Die folgenden NEUEN Pakete werden installiert:
  libenca0 libvorbisidec1 mplayer
0 aktualisiert, 3 neu installiert, 13 zu entfernen und 0 nicht aktualisiert.
Remv mx-apps [23.07.02mx23]
Remv mx-packageinstaller [23.7.02] [mx-packageinstaller-pkglist:amd64 ]
Remv mx-packageinstaller-pkglist [23.08.04mx23]
Remv xdg-desktop-portal-gtk [1.14.1-1]
Remv xdg-desktop-portal [1.16.0-2]
Remv webcamoid [9.0.0-6]
Remv webcamoid-plugins [9.0.0-6]
Remv libpipewire-0.3-0 [0.3.65-3] [mpv:amd64 qpwgraph:amd64 ]
Remv smplayer-themes [1:20.11.0-1] [smplayer:amd64 mpv:amd64 qpwgraph:amd64 ]
Remv smplayer [23.6.0-0.1~mx23+1] [mpv:amd64 qpwgraph:amd64 smplayer-l10n:amd64 ]
Remv smplayer-l10n [23.6.0-0.1~mx23+1] [mpv:amd64 qpwgraph:amd64 ]
Remv mpv [0.35.1-4] [qpwgraph:amd64 ]
Remv qpwgraph [0.3.9-1]
Inst libenca0 (1.19-1.1 Debian:12.1/stable [amd64])
Inst libvorbisidec1 (1.2.1+git20180316-7 Debian:12.1/stable [amd64])
Inst mplayer (2:1.5+svn38408-1 Debian:12.1/stable [amd64])
Conf libenca0 (1.19-1.1 Debian:12.1/stable [amd64])
Conf libvorbisidec1 (1.2.1+git20180316-7 Debian:12.1/stable [amd64])
Conf mplayer (2:1.5+svn38408-1 Debian:12.1/stable [amd64])
Last edited by MadMax on Sun Aug 06, 2023 4:41 pm, edited 2 times in total.
If it ain't broke, don't fix it.
Main: MX 23 | Second: Mint 22 | HTPC: Linux Lite 7 | VM Machine: Debian 12 | Testrig: Arch/FreeBSD 14 | Work: RHEL 8

User avatar
thomasl
Posts: 477
Joined: Sun Feb 04, 2018 9:26 am

Re: MX 23 Going back to pulseaudio (step-by-step tutorial)

#2 Post by thomasl »

Interesting. I thought virtually everyone is enamoured with pipewire and/or pulseaudio.

And I think those sorts of write-up are really helpful for people.

I had removed pulseaudio from my MX19 install without probs and when I saw that pipewire is now (ie with MX23) the "new normal" I removed that and all traces of pa as well. All my audio now runs via ALSA and everything works as well as it did with MX19 (there was a bit of bother with Bluetooth audio but not too much trouble). Having said that, I am not into much audio work... just my daily dose of music and internet radio. And of course browser stuff.
Frugal installs on Lenovo ThinkPad L14 Ryzen 5 4650U/24GB * HP Pavilion Ryzen 3 3300U/16GB * Toshiba R950 i5-3340M/12GB
I have a reservation... What do you mean it's not in the COMPUTER!

User avatar
MadMax
Posts: 483
Joined: Wed Aug 04, 2021 3:25 pm

Re: MX 23 Going back to pulseaudio (step-by-step tutorial)

#3 Post by MadMax »

I just tinkered a bit with my settings and found out about the recommended package rtkit. It's a daemon that provides a way for pulseaudio to gain higher priorities to reduce cracking noises or other audio glitches during high system loads. A quick test improved the sound quality on my (rather low-end) system by a hearable bit, so I can recommend it.

I edited the first post to contain that info.
If it ain't broke, don't fix it.
Main: MX 23 | Second: Mint 22 | HTPC: Linux Lite 7 | VM Machine: Debian 12 | Testrig: Arch/FreeBSD 14 | Work: RHEL 8

User avatar
pbear
Posts: 311
Joined: Tue Aug 09, 2022 9:24 pm

Re: MX 23 Going back to pulseaudio (step-by-step tutorial)

#4 Post by pbear »

Thanks. I'm trying to troubleshoot a sound problem on a laptop to which I've installed all three versions of MX-23. This will be helpful. As for how to revert, I'm early enough in the process that reinstall wouldn't be the end of the world. Another option is Timeshift, which can restore a file-level snapshot. And, really, any good system backup strategy should be able to handle the task (I use manual rsync snapshots).

By the way, another way to check reverse dependencies is sudo apt rdepends libpipewire-0.3-0. Synaptic also has the information, on a dropdown under Properties > Dependencies > Dependants [sic].

User avatar
siamhie
Global Moderator
Posts: 3362
Joined: Fri Aug 20, 2021 5:45 pm

Re: MX 23 Going back to pulseaudio (step-by-step tutorial)

#5 Post by siamhie »

Thanks for this post. I'm trying to iron out a small issue I'm having with pipewire (viewtopic.php?t=76453) and may rely on this later. I've gone and bookmarked it for now.

Debian KDE for example will still use pulseaudio by the choice of the Debian KDE maintainers.
I downloaded Debian 12.1 XFCE live ISO to see how they manage pipewire but it also uses pulseaudio. Maybe just the Gnome desktop uses pipewire.
This is my Fluxbox . There are many others like it, but this one is mine. My Fluxbox is my best friend. It is my life.
I must master it as I must master my life. Without me, my Fluxbox is useless. Without my Fluxbox, I am useless.

User avatar
OlafD
Posts: 42
Joined: Sun Sep 26, 2021 9:09 am

Re: MX 23 Going back to pulseaudio (step-by-step tutorial)

#6 Post by OlafD »

@MadMax
Many thanks for the tip with rtkit. After installation my Airpods works better with MX21xfce and reduces the cracking noises and the choppy playback significantly.
Another one that the fever of MX Linux grabbed :happy:

BitterTruth
Posts: 620
Joined: Tue Sep 22, 2020 7:36 pm

Re: MX 23 Going back to pulseaudio (step-by-step tutorial)

#7 Post by BitterTruth »

Many thanks @MadMax for this. Just did this now on a new MX23 install. Downloaded rtkit as well.

User avatar
siamhie
Global Moderator
Posts: 3362
Joined: Fri Aug 20, 2021 5:45 pm

Re: MX 23 Going back to pulseaudio (step-by-step tutorial)

#8 Post by siamhie »

@MadMax Worked like a charm in MX-23 fluxbox with one extra step required.


MX-23_fluxbox users. This is the method I used to switch from pipewire back to pulseaudio.

Code: Select all

1. 
sudo apt remove pipewire

2. 
sudo apt autoremove

3. 
sudo apt purge ~c

4.
sudo apt install pulseaudio

5.
sudo apt install rtkit

6. 
Edit the startup file (root menu > Settings > Configure > Startup)
replace this section:

#start pipewire before volumeicon so unmute works
pipewire-start
sleep 2
volumeicon -c volumeicon-fluxbox & 


to this:

#start pulseaudio before volumeicon so unmute works
start-pulseaudio-x11 &
sleep 2
volumeicon -c volumeicon-fluxbox &

This is my Fluxbox . There are many others like it, but this one is mine. My Fluxbox is my best friend. It is my life.
I must master it as I must master my life. Without me, my Fluxbox is useless. Without my Fluxbox, I am useless.

User avatar
rokytnji.1
Global Moderator
Posts: 828
Joined: Sun Apr 13, 2014 9:06 pm

Re: MX 23 Going back to pulseaudio (step-by-step tutorial)

#9 Post by rokytnji.1 »

]Paying attention to this as my chromebook does not agree with pipewire but I have instructions for pulse audio and alsa to run on my chromebook.

AntiX 23 is also defaulting to using pipe wire except for base iso ( can't swear to the base part yet )

I am on my chromebook now.

Code: Select all

harry@antix1:~
$ inxi -M
Machine:
  Type: Laptop System: GOOGLE product: Candy v: 1.0
    serial: <superuser required>
  Mobo: GOOGLE model: Candy v: 1.0 serial: <superuser required>
    UEFI: coreboot v: MrChromebox-4.18.1 date: 10/27/2022
harry@antix1:~
$ inxi -SA
System:
  Host: antix1 Kernel: 5.10.153-antix.1-amd64-smp arch: x86_64 bits: 64
    Desktop: IceWM v: 3.4.1 Distro: antiX-22_x64-full Grup Yorum 18 October 2022
Audio:
  Device-1: Intel Atom Processor Z36xxx/Z37xxx Series High Definition Audio
    driver: snd_hda_intel
  API: ALSA v: k5.10.153-antix.1-amd64-smp status: kernel-api
  Server-1: PulseAudio v: 14.2 status: active
I am not sure my sound fix plans will work or not on antiX 23 with different kernel, libs/configs, repos, etc......
But I do know I have to remove pipe wire and go with pulse audio to follow my borrowed sound fix instructions.
https://blog.nanax.fr/post/2018-05-01-chromebook-linux/

User avatar
MadMax
Posts: 483
Joined: Wed Aug 04, 2021 3:25 pm

Re: MX 23 Going back to pulseaudio (step-by-step tutorial)

#10 Post by MadMax »

It makes sense that the procedure is a bit different on different distributions. The idea always has to be to remove pipewire and then (or simulatenously in case of apt's logic) install pulseaudio. pulseaudio hasn't gone anywhere, so it should always be in the repos for most systems.

If there are are custom scripts that include pipewire, these have to be adjusted (like the aforementioned fluxbox one).

In a few years I can see this procedure getting more difficult, since pipewire will become the standard in linux audio and more programs, maybe browsers for example, will rely on it. But for the time being, we can give pipewire and its documentation more time to mature.
If it ain't broke, don't fix it.
Main: MX 23 | Second: Mint 22 | HTPC: Linux Lite 7 | VM Machine: Debian 12 | Testrig: Arch/FreeBSD 14 | Work: RHEL 8

Post Reply

Return to “Tips & Tricks by users (not for help)”