MX-17.1/MX-18.1: Replacing PulseAudio by ALSA's sound server – implications?

Message
Author
User avatar
MX-16_fan
Posts: 331
Joined: Mon Feb 13, 2017 12:09 pm

MX-17.1/MX-18.1: Replacing PulseAudio by ALSA's sound server – implications?

#1 Post by MX-16_fan »

@all:

I'm thinking about replacing PulseAudio (which, to my knowledge, is MX Linux's default sound server) by ALSA's own sound server.

My question is what implications this would have – would there be any useage restrictions?


Greetings, and thanks in advance for any answer, Joe

User avatar
dolphin_oracle
Developer
Posts: 20024
Joined: Sun Dec 16, 2007 1:17 pm

Re: MX-17.1/MX-18.1: Replacing PulseAudio by ALSA's sound server – implications?

#2 Post by dolphin_oracle »

A few apps may have issues, like Firefox.

Note that pulse just sirs on top of alsa anyway.
http://www.youtube.com/runwiththedolphin
lenovo ThinkPad X1 Extreme Gen 4 - MX-23
FYI: mx "test" repo is not the same thing as debian testing repo.

User avatar
MX-16_fan
Posts: 331
Joined: Mon Feb 13, 2017 12:09 pm

Re: MX-17.1/MX-18.1: Replacing PulseAudio by ALSA's sound server – implications?

#3 Post by MX-16_fan »

@dolphin_oracle:
dolphin_oracle wrote: Sat Aug 03, 2019 2:53 pm A few apps may have issues, like Firefox.

Note that pulse just sirs on top of alsa anyway.
The more traditional the application, the fewer issues? Greetings, Joe

User avatar
dreamer
Posts: 738
Joined: Sun Oct 15, 2017 11:34 am

Re: MX-17.1/MX-18.1: Replacing PulseAudio by ALSA's sound server – implications?

#4 Post by dreamer »

MX-16_fan wrote: Sat Aug 03, 2019 2:51 pm @all:

I'm thinking about replacing PulseAudio (which, to my knowledge, is MX Linux's default sound server) by ALSA's own sound server.

My question is what implications this would have – would there be any useage restrictions?


Greetings, and thanks in advance for any answer, Joe
Important:
You don't have to uninstall PulseAudio packages. This will make it easier to switch between PulseAudio and ALSA. When you launch an application default behavior is to first check for PulseAudio and then ALSA. If PulseAudio isn't running the application will use ALSA instead.

I think all browsers can use ALSA except regular Firefox from Mozilla, because maintaining ALSA support is apparently not possible with hundreds of millions of dollars. Firefox ESR from Debian supports ALSA.

How to use ALSA without uninstalling PulseAudio packages:
A small change in /etc/pulse/client.conf (can be made per user instead /home/yourusername/.config/pulse/client.conf) is enough:

Code: Select all

autospawn=no
In Xfce > Settings Manager > Session and Startup > Application Autostart I unchecked PulseAudio items and created a new item called Volumicon with command "volumeicon" so that there still is a sound volume icon in the notification area next time you boot.

Reboot then use MX Select Sound to choose the default sound card.

Install qasmixer so you can use that instead of PulseAudio Volume Control. My desktop looks identical with notification area "volumeicon" pointing to QasMixer instead of PulseAudio Volume Control. Make sure the correct sound card is chosen in volumeicon preferences.

If there is an antiX or MX Linux user with Skype working without PulseAudio (requires apulse) I would be interested in knowing the correct command for launching Skype. Thanks.

User avatar
MX-16_fan
Posts: 331
Joined: Mon Feb 13, 2017 12:09 pm

Re: MX-17.1/MX-18.1: Replacing PulseAudio by ALSA's sound server – implications?

#5 Post by MX-16_fan »

@dreamer:

Thanks for this interesting how-to!

dreamer wrote: Sat Aug 03, 2019 3:55 pm In Xfce > Settings Manager > Session and Startup > Application Autostart I unchecked PulseAudio items and created a new item called Volumicon with command "volumeicon" so that there still is a sound volume icon in the notification area next time you boot.
On a German language system: Einstellungen – Grafische Einstellungen für Xfce 4 -> Sitzung und Startverhalten -> Automatisch gestartete Anwendungen.

dreamer wrote: Sat Aug 03, 2019 3:55 pm If there is an antiX or MX Linux user with Skype working without PulseAudio (requires apulse) I would be interested in knowing the correct command for launching Skype. Thanks.
I used to think that apulse ("PulseAudio emulation for ALSA") was made exactly for a scenario like that?



Greetings, Joe

User avatar
MX-16_fan
Posts: 331
Joined: Mon Feb 13, 2017 12:09 pm

Re: MX-17.1/MX-18.1: Replacing PulseAudio by ALSA's sound server – implications?

#6 Post by MX-16_fan »

@dreamer:


UPDATE:

Worked myself trough your how-to. Nearly everything works like a charm. Besides, for a reason I do not know, sound quality is many times better, and Twinkle crackling (see viewtopic.php?f=108&t=51888) has disappeared.

Would be good to have a script wrapped into a package that could do all this automatically, plus removing everything PulseAudio from your system. We might call it "RemovePulseAudio".

The only thing that does not work at all is audio streaming to a Bluetooth device. Apparently you need bluez-alsa (https://github.com/Arkq/bluez-alsa) for that, which currently isn't available via repo for MX-17.1 nor MX-18.1. I'll file a package request for that.


Greetings, Joe

User avatar
dreamer
Posts: 738
Joined: Sun Oct 15, 2017 11:34 am

Re: MX-17.1/MX-18.1: Replacing PulseAudio by ALSA's sound server – implications?

#7 Post by dreamer »

MX-16_fan wrote: Sat Aug 03, 2019 4:40 pm I used to think that apulse ("PulseAudio emulation for ALSA") was made exactly for a scenario like that?
You need the correct launch command for Skype that first starts apulse. It could be as easy as

Code: Select all

apulse skypeforlinux
but it didn't work and then I got tired and started asking myself questions like "Why am I using Skype?"

User avatar
dreamer
Posts: 738
Joined: Sun Oct 15, 2017 11:34 am

Re: MX-17.1/MX-18.1: Replacing PulseAudio by ALSA's sound server – implications?

#8 Post by dreamer »

MX-16_fan wrote: Sat Aug 03, 2019 5:21 pm Worked myself trough your how-to. Nearly everything works like a charm. Besides, for a reason I do not know, sound quality is many times better, and Twinkle crackling (see viewtopic.php?f=108&t=51888) has disappeared.
MX is the best PulseAudio experience I have had, but of course sound is better without PulseAudio because the (lazy) middle-man is gone. I think PulseAudio needs to hit the gym, but no one is testing performance so nothing happens.
MX-16_fan wrote: Sat Aug 03, 2019 5:21 pm Would be good to have a script wrapped into a package that could do all this automatically, plus removing everything PulseAudio from your system. We might call it "RemovePulseAudio".
Well, you can set up one user without PulseAudio and one user with PulseAudio. If you want to use an application that requires PulseAudio you can quickly switch to your PulseAudio account. When PulseAudio isn't running having the packages installed does nothing. Maybe you can save a little space by removing the packages. The good thing with MX Linux is that you only have to do something once, thanks to the snapshot functionality.
MX-16_fan wrote: Sat Aug 03, 2019 5:21 pm The only thing that does not work at all is audio streaming to a Bluetooth device. Apparently you need bluez-alsa (https://github.com/Arkq/bluez-alsa) for that, which currently isn't available via repo for MX-17.1 nor MX-18.1. I'll file a package request for that.
That's a good idea. Having all the necessary components for a PulseAudio free experience is a worthy goal I think. antiX comes without PulseAudio, but the main difference between these platforms seems to be systemd-free vs systemd-shim.

User avatar
MX-16_fan
Posts: 331
Joined: Mon Feb 13, 2017 12:09 pm

Re: MX-17.1/MX-18.1: Replacing PulseAudio by ALSA's sound server – implications?

#9 Post by MX-16_fan »

@dreamer:
dreamer wrote: Sat Aug 03, 2019 5:59 pm (...) and then I got tired and started asking myself questions like "Why am I using Skype?"
That's a very good question indeed. Personally speaking, I wouldn't put Skype on a nice clean MX Linux system.

Maybe you'd like to have a look at jami – A GNU package (formerly named Ring – A GNU package) (https://jami.net/) (see older discussion here: viewtopic.php?f=134&t=43901)).


Greetings, Joe

User avatar
MX-16_fan
Posts: 331
Joined: Mon Feb 13, 2017 12:09 pm

Re: MX-17.1/MX-18.1: Replacing PulseAudio by ALSA's sound server – implications?

#10 Post by MX-16_fan »

@dreamer:
dreamer wrote: Sat Aug 03, 2019 6:38 pm ... of course sound is better without PulseAudio because the (lazy) middle-man is gone. (...) Having all the necessary components for a PulseAudio free experience is a worthy goal I think. antiX comes without PulseAudio, but the main difference between these platforms seems to be systemd-free vs systemd-shim.
Given the fact that PulseAudio has been developed by the same guy who also developed systemd, plus the fact that IMHO PulseAudio has led to more than ten years of broken or questionable audio functionality with many Linux distros, it's puzzling to me why MX Linux (via Debian) would want to use PulseAudio any longer in the first place.

In any case, having a "network transparent" audio server on your system sounds like a dangerous thing to me, especially when you think of potential shortcomings in implementation. IMHO PulseAudio's potential security impilications might even in the long run be considered as leading to an incompatibility with the General Data Protection Regulation (GDPR).

ALSA works fine. OSS is now free. OpenBSD's sndio (https://en.wikipedia.org/wiki/Sndio) is available under the GPL-compatible (cf. (cf. https://www.gnu.org/licenses/license-list.en.html#ISC) ISC license. So maybe we could all be freed from another burden of the past from the time when the Linux world was severely damaged?


Greetings, Joe

Post Reply

Return to “Software / Configuration”