LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Alsa, Dbus, and Pulseaudio In Current (https://www.linuxquestions.org/questions/slackware-14/alsa-dbus-and-pulseaudio-in-current-4175625740/)

enorbet 03-17-2018 05:23 AM

Alsa, Dbus, and Pulseaudio In Current
 
Greetz
I vastly prefer Alsa-only systems with my semi-pro soundcard that has hardware mixing but I recognize that Pulse has become a Fact of Life even though I don't ever use Bluetooth. After playing around trying to actually enjoy Pulse, then attempting to eliminate it (I've come to despise it) through many changes to Pulse itself upstream and my own attempts at simply preferring Alsa I find that for once my notes were not up to KISS standards and I'd like some current, clear, complete steps offered to get Pulse to ONLY be invoked when it absolutely has to and Alsa, like before, for everything else that can just use Alsa with no intervention and no Dbus errors.

So what are the configurations I need to accomplish this? I am well-versed in using ~/.asoundrc, somewhat skilled in "/etc/pulse" configs, and a rank newb at controlling Dbus/Dmix. I'm tired of "spaghetti" and wish to start out right immediately after I install Current.

Thanks in advance for any comments and/or assistance.

JWJones 03-17-2018 11:23 AM

I'm just following this thread as a sometimes-Slackware user, who is mostly using Gentoo these days, minus dbus, pulseaudio, and other things in Linux that I'd rather avoid. :D

globetrotterdk 03-17-2018 12:40 PM

I sympathize and would love to do the same thing. Where I can provide a little advice as to whether this is a viable project, is to tell you that I have tried this on Devuan and it works well. Unfortunately, like systemd, pulseaudio is becoming ubiquitous. For this reason, you will need a wrapper called apulse, when you come in contact with a program that depends on pulseaudio, such as MuseScore, now in it's version 2 iteration. Unfortunately, the apulse wrapper is not in SlackBuilds.org, but the wrapper itself is here - https://github.com/i-rinat/apulse. Good luck with your project, I hope that you are successful.

Emerson 03-17-2018 04:27 PM

I believe Bluetooth audio works without PA nowadays? The only reason Slackware got PA is gone.

Daedra 03-17-2018 04:45 PM

Quote:

Originally Posted by Emerson (Post 5832174)
I believe Bluetooth audio works without PA nowadays? The only reason Slackware got PA is gone.

I'm not crazy about pulseaudio either, but I do like that the newest versions allow you to disable re-sampling. But, like you said, since bluez 5 now has a fork that uses alsa and doesn't require pulseaudio it makes me wonder if Pat has looked into it?

orbea 03-17-2018 04:48 PM

Seems like some other people are carrying on with bluez + alsa, but since I do not have any bluetooth hardware I of course can't test it...

https://github.com/Arkq/bluez-alsa

globetrotterdk 03-17-2018 05:19 PM

I am not sure as to how much of this you can adapt to Slackware, as I am very new, but this is the guide that I successfully used when purging pulseaudio from my former Devuan Jessie install (I have gone completely slacky now):
http://linuxg.net/how-to-properly-re...ebian-squeeze/
Hopefully it will give you some inspiration.

enorbet 03-17-2018 05:48 PM

Thanks everyone. I have and have used apulse but there are some apps it won't satisfy with an Alsa-Only system. I have seen a number of posts here at LQ that reconfigure both Pulse and Alsa in such a way as to simple be Alsa > Pulseaudio where Pulse is only spawned when Alsa with or without apulse won't do the job. However some of these alterations have changed or should be changed as things, especially pulse, and apps that default to it, are developed.

I recently read that "type - hw" causes direct access to the hardware which on most cards means it's resources are only available to one app at a time - one of the claimed problems that pulseaudio sought to fix. Someone (and I'll try to find it to give that person credit) posted that changing to this

Code:

pcm.!default
{
    type asym
    playback.pcm
    {
      type plug
        slave.pcm "dmix"

    }
    capture.pcm
    {
        type plug
        slave.pcm "usb"
    }
}

does exactly what you might expect, default to a software mixer that can share the card's resources.

I'm looking to do things like this and either have things auto-switch to pulse when needed or even a manual command would be fine... just so I can limit pulse to only what absolutely has to have it. The above config works for me for sharing resources both on my laptop (embedded sound) and my Main which has an ESI Juli@ (ICE 1724) semi-pro card, although back in 14.0 days (pre pulse) the ESI did everything I ever asked of it with nary a complaint. That is no longer true and I can't just let Pulse takeover because it has almost 10 times the latency of Alsa and severely impedes any serious recording and editing.

Also I don't recall ever getting a dbus error before pulse became default and now I get them regularly and I've tried to find data on how to fix them but quite often the problem gets blamed on the app which helps me or anyone nada.

So I'm still looking but pleased to hear Bluetooth has an alternative now and of course to see a number of folks have similar interests. I do hope Patrick or Eric or someone can release a step-by-step to either eliminate pulse or get it to "play nice"

enorbet 03-17-2018 06:03 PM

Quote:

Originally Posted by globetrotterdk (Post 5832189)
I am not sure as to how much of this you can adapt to Slackware, as I am very new, but this is the guide that I successfully used when purging pulseaudio from my former Devuan Jessie install (I have gone completely slacky now):
http://linuxg.net/how-to-properly-re...ebian-squeeze/
Hopefully it will give you some inspiration.

While packaging commands are different in Slackware what you linked is almost identical to what one does to purge pulse altogether. I've tried living with pulse as is and purging it altogether just as you linked but neither is satisfactory. I am reticent to do that because there are apps that require pulse that won't respond to apulse and, unfortunately, it seems that list is growing. I don't see that changing in Alsa's favor (or mine) anytime soon so I'm figuring that if I can't have things like they used to be, where all I had to do was search and configure to get Alsa to do everything with sound I wanted, fundamentally at kernel level I should add, then I have to find a way for them to collaborate where the "driver" (and I) has priority, not the know-it-all "back seat conductor".

Again thank you very much for a thoughtful post that will very likely help others new to such change options.

Didier Spaier 03-17-2018 06:34 PM

I do it this way:

1) Comment these lines in asound.conf:
Code:

pcm.default pulse
ctl.default pulse

2) Append these lines to /etc/pulse/default.pa:
Code:

load-module module-alsa-sink device=dmix
load-module module-alsa-source device=dsnoop

3) Keep this line in /etc/pulse/client.conf:
Code:

autospawn = yes
4) Don't start pulseaudio at login through a .desktop or otherwise.
5) Don't start pulseaudo system wide, of course.
6) Politely ask the apps that give this choice to rely on alsa if I prefer so. This usually can be done either with a configure option or setting a config file. An example is speech-dispatcher.

These settings allow to hear both some youtube stream through Firefox (using pulse) and orca reading the screen (through speech-dispatcher with alsa as audio backend). Also alsamixer and pavucontrol are both fully functional.

enorbet 03-19-2018 02:46 AM

Thank you Didier, that helps considerably which I don't quite understand since it appears to allow spawning pulseaudio but instead prefers ALSA which is the main issue and my distinct desire. However I must have some leftover config that conflicts to some degree because although I can now run Palemoon and listen to music at the same time that game sounds work in Steam games, for some odd reason the Firefox Nightly ( --- GitHub Firefox-FuckPA --- ) no longer plays music whether combined or alone. No biggy. I will either try going back to "normal" Firefox, use Palemoon instead, or search out what causes the problem with the NIghtly. Again, Thank You :)

Didier Spaier 03-19-2018 05:49 AM

Quote:

Originally Posted by enorbet (Post 5832597)
Thank you Didier, that helps considerably which I don't quite understand since it appears to allow spawning pulseaudio but instead prefers ALSA which is the main issue and my distinct desire

pulseaudio is only spawned if and by an application that needs it, so if an application preferably or exclusively rely on alsa this won't occur it will not spawn pulseaudio.

You can check looking at the pulseaudio processes running.

enorbet 03-19-2018 08:32 AM

Quote:

Originally Posted by Didier Spaier (Post 5832631)
pulseaudio is only spawned if and by an application that needs it, so if an application preferably or exclusively rely on alsa this won't occur it will not spawn pulseaudio.

You can check looking at the pulseaudio processes running.

Yes I did "ps aux | grep pulse" which is how I discovered it wasn't getting launched, thus the kudos. Also I revisited the thread here about this sort of issue on Current (had forgotten that fix) and upon altering security.sandbox to "16" sound now works and I am very happy :D Many thanks

FTIO 03-20-2018 11:32 AM

Or, do as I have done, and when it comes to my music, I use my 14.1 system. If the next Slackware contains this escaped abortion known as pulse audio on it, 14.2 will be wiped from the drive and another distro found. One should not have to leap through hoops afire to get rid of the nasty thing called pulse on ones system...it reminds me of the old microshaft days.

JWJones 03-20-2018 09:28 PM

Quote:

Originally Posted by FTIO (Post 5833223)
Or, do as I have done, and when it comes to my music, I use my 14.1 system. If the next Slackware contains this escaped abortion known as pulse audio on it, 14.2 will be wiped from the drive and another distro found. One should not have to leap through hoops afire to get rid of the nasty thing called pulse on ones system...it reminds me of the old microshaft days.

I know most slackers recommend that new slackers do a full installation, but I myself never do. I pick and choose what I want when I do a new Slackware installation. It's easy enough to avoid pulseaudio when you do this.

Having said this, I am currently using Gentoo on both a desktop and a laptop, both pulseaudio-free (see my signature).


All times are GMT -5. The time now is 02:37 AM.