You are not logged in.
Pages: 1
Hi,
A couple of days ago I noticed something was taking quite a lot of CPU load at rest (not sure when exactly it started though). It turned out that the task pulseaudio --start --log-target=syslog was continuously using 8-10% CPU. Right after reboot it was 0-1%, and now it's already 3-4%. No specific sound-related apps are running, just Firefox/Thunderbird and a file manager. On a different PC used for the same purposes this PulseAudio task is exactly 0% all the time.
I do not think I meddled with settings/tweaks at any time recently, only the official updates. I've looked online, but there seems to be a wide variety of pulseaudio problems that may cause such a behavior, and since I'm pretty sure I have not changed anything recently, I simply do not know where to start from. May I ask for some directions?
The system is a rather old all-Intel laptop with Realtek audio, Devuan ASCII 64bit.
Thank you.
Offline
Hi
Maybe try this https://dev1galaxy.org/viewtopic.php?id=3732 Howto disable pa see here https://dev1galaxy.org/viewtopic.php?id=3728 . And here do the opposite of what is suggested
Have a nice day
Lars H
Offline
Thanks Lars,
Maybe I missed something, but for some reason I do not have any sound with ALSA alone. What I did was:
1. Turned off PulseAudio autostart.
2. Added volumeicon autostart.
3. ALSA settings: automute was on, so I turned it off. Sound card/input and output channels are correctly selected and non of them are muted.
As a result, still no sound with ALSA alone.
Thank you.
Offline
Hi
Do you have multiple soundcards ??. Take a look with "alsamixer" in a terminal. F6 will allow you to choose and set your default soundcard. You can also choose soundcard in volumicon by right clicking and choose preferences. Hopefully this is your problem. If not we have to look a littel deeper. But the simple things first ;-))
Have a nice day
Lars H
Offline
I need an .asoundrc config to sort the 2 sound devices on my board!
Online
Thanks a lot Lars,
It turned out I needed to reboot, not just to log out.
However this is not quite what I expected, because though initially I do not see a pulseaudio --start --log-target=syslog task, it keeps re-appearing at the moment I start, for example, Clementine or Skype and consumes the same 1-4% CPU. So it looks to me that those apps either do require Pulseaudio (and initiate it on start) or one needs to clean the whole damn thing out completely to use ALSA alone.
Technically, it wouldn't be that bad, because Clementine alone results in 1% CPU used by PA. But the bigger issue is that even Firefox, which I must keep open all the time (due to my work Outlook mailbox) also initiates PA via AudioIPC Server: AudioCallbackDriver. Maybe if I turn off sound notifications it won't be activated...
So the bottom line is probably that you're too optimistic about using ALSA alone and too many common apps are hard-coded to use PA... sorry.
Any thoughts?
Thank you!
Offline
even Firefox, which I must keep open all the time (due to my work Outlook mailbox) also initiates PA via AudioIPC Server: AudioCallbackDriver.
The Devuan firefox-esr package does not need PulseAudio at all. I have yet to find an application from the repositories that actually needs PA.
Brianna Ghey — Rest In Power
Offline
Hi
It looks like you get sound working ;-)
I am a professional musician myself using my setup for everything. And I have removed all of pulseaudio. Using firefox, vlc, mpv, audacity, musescore with just alsa. And for professional work I use jack as audioserver.
Make sure your /etc/pulse/client.conf.d/00-disable-autospawn.conf looks like this:
# On linux systems, disable autospawn by default
# If you are not using systemd, comment out this line
autospawn=no
Then you should be safe that pulseaudio is not working. If you find any problems then try uninstall and purge pulseaudio with apt purge pulseaudio. Then apt will also remove pulseaudio configuration files (that might be your problem)
Have a nice day
Lars H
Offline
The Devuan firefox-esr package does not need PulseAudio at all. I have yet to find an application from the repositories that actually needs PA.
Do you mean Devuan repos? Skype is definitely from MS repo and I do not remember if Clementine 1.31 I have comes from Devuan repos or not. The facts are that if I do not start them, I do not see any traces of PA in a task manager, but as soon as they are active, PA re-appears and consumes quite a lot (for a laptop at least). And these two are pretty basic and widely used apps I guess.
The FF I have is from the Devuan repo, so I'll check this out too.
Thank you.
Last edited by Copper36 (2020-08-11 17:33:05)
Offline
Hi again
We can help the best if you are using devuan repos only. If you install programs from other places they might very well be configured with both systemd, pulseaudio, libraryversions and other things that are not compatible with devuan. So be careful when you do that. If things work to your satisfaction then fine (using a bit of cpu sounds like an acceptable compromise). But take care when upgrading. You might break your system in the process.
Have a nice day
Lars H
Last edited by larsH (2020-08-11 17:41:34)
Offline
Skype is definitely from MS repo and I do not remember if Clementine 1.31 I have comes from Devuan repos or not. The facts are that if I do not start them, I do not see any traces of PA in a task manager, but as soon as they are active, PA re-appears
Just because they start PA does not necessarily mean that they need PA — firefox-esr will also auto-start PA but it will still produce sound if PA is not installed.
But I've never used Skype so I have no idea if it will work without PA, why don't you try it and report back?
Brianna Ghey — Rest In Power
Offline
Make sure your /etc/pulse/client.conf.d/00-disable-autospawn.conf looks like this:
# On linux systems, disable autospawn by default
# If you are not using systemd, comment out this line
autospawn=no
I do not have exactly the same location of the config files, but when I replaced autospawn=yes with autospawn=no in /etc/pulse/client.conf nothing changed.
I'll try to purge PA completely, we'll see what happens.
Thank you.
Offline
larsH wrote:Make sure your /etc/pulse/client.conf.d/00-disable-autospawn.conf looks like this:
# On linux systems, disable autospawn by default
# If you are not using systemd, comment out this line
autospawn=noautospawn=no in /etc/pulse/client.conf nothing changed.
"Comment out" looks like this:
# autospawn=no
Online
"Comment out" looks like this:
# autospawn=no
Well, I thought it was binary - either on or off... looks like there is a third option :-)
Offline
So I've removed PA with all configs and + autoremoved unneeded packages. Clementine and Skype both work fine. I'll check everything else and if there are no problems, I'll repeat the same on my "production" laptop :-)
Thanks a lot!
BTW, what are those things PA can do that ALSA can't? I mean, for a common user like me? For example, if I'm listening to music and new mail comes with a sound notification, will that notification be heard on top of background music with/without PA?
Offline
what are those things PA can do that ALSA can't?
There are a few things like per-application volume levels (but almost every application that outputs sound has it's own volume control anyway), multiplexing (but this can be replicated in ALSA with the DMix plugin), sample rate conversion & equalisation (but it's best to use a dedicated DAC for the former and not use the latter at all) and networked audio (if all the machines on the network also have PA) but the most important advantage is plain convenience — pure ALSA tends to require command line or text file configuration whereas PA has some nice GUIs to handle most tasks.
Brianna Ghey — Rest In Power
Offline
Hi
And as professionel I am using jack for most of this when it really matters. It reduces latency together with alsa, which in that situation is the most important thing. I also think using pulseaudio is much simpler for the programmer, because he does not need to take care of a lot of small details. But on high end gear I can hear a difference between pulseadio and alsa because of the higher latency.
Have a nice day
Lars H
Offline
Some updates on "living without PA":
1. With ALSA controls only, the sound is very quiet now. Only with Master/Speaker/PCM close to 100% it is kind of OK. Yes, it was much louder with PA (and Win7) and no, there were no sound distortions.
2. For some reason Clementine began to consume 10-12% CPU while playing any .mp3/.ogg file. It used to be about 3-4% and this is the number I see now using preinstalled QuodLibet or VLC. Clementine was installed from Devuan repos, all graphics/equalizer are turned off (as it was before, did not change anything).
So as usually happens, if smth is better, smth will definitely get worse :-)
Any ideas?
Thank you.
Offline
Some updates (with a question).
As I've mentioned above, sound volume with ALSA alone became very low, so I tried to boost it somehow.
Fortunately, it is a relatively well-known issue and the most recommended solution is to add a pre-amplifier to ALSA. I used this tutorial:
https://alien.slackbook.org/blog/adding … nd-levels/
however whatever I tied I still could not see an additional "pre-amp" option in ALSA mixer.
Maybe the location/name of the .conf file should be different (Slackware vs Devuan)?
Thank you.
Offline
Hi,
I hate leaving business unfinished and that's why I'm back:-). I've finally managed to figure out what caused my problems and would like to share it, hoping that someone might find it useful.
First, I tried to completely get rid of PA. Can you live without PA? Yes. Will you like it? Maybe, but not so sure. After removing PA I still have sound (which is good), but faced a bunch of problems and restrictions, that included:
1. Very low max volume. I have a Windows system on the same laptop, so I could compare all 3: Win, PA and ALSA. ALSA had that low volume that in several cases I had to use headphones. I tried to fix it introducing an additional pre-amplifier via special script and it kind of worked - the sound became louder, but there appeared irregular sound distortions, that DID NOT depend on volume. So I had to disable the pre-amp.
2. A bunch of smaller things, that still might be very important. For example, you one needs PA in order to share sound in ZOOM.
Having all that, I decided to take a closer look at what exactly caused the high CPU consumption by PA. With re-installed PA I noticed that it starts taking up more and more CPU right after I use reader view in FF. PA Audio Mixer / Playback shows 3 more text to speech streams, which very likely were the culprits. Since I do not use this feature (text-to-speech), I removed a speech-dispatcher package (and its dependences) + orca-gnome just in case :-). And it looks like this made a trick. No additional streams, rather low CPU consumption by PA (though not a complete zero...). Technically, it seems it was possible to block text to speech instead, but as you can see I chose the radical solution :-).
The bottom line is that if you work with sound (professionally, as larsH in the thread above), you probably have an additional hi-fi amplifier and ALSA volume problems are non-existent, while sound quality is reportedly higher (compared to PA). On the other hand, for an average day-to-day cheap laptop user like me PA removal makes life a bit worse (see the points above).
Thanks for your attention.
Last edited by Copper36 (2020-10-28 19:14:47)
Offline
2. A bunch of smaller things, that still might be very important. For example, you one needs PA in order to share sound in ZOOM.
There is a package called apulse which provides a partial implementation of the PulseAudio API for ALSA. The command looks like
apulse zoom
maybe it will fix the issue.
Last edited by dzhigit (2020-11-12 21:57:58)
Offline
Pages: 1