View previous topic :: View next topic |
Author |
Message |
trubicoid Tux's lil' helper
Joined: 04 Aug 2009 Posts: 79
|
Posted: Wed Jan 17, 2018 3:57 pm Post subject: Pulseaudio high CPU usage when idle? |
|
|
Hi guys,
when my KDE desktop is completely idle and no sound is playing, the Code: | /usr/bin/pulseaudio --start --log-target=syslog | process in htop takes around 3% of CPU. It newer goes below 2%. Is this expected or is it too high? I would think it should be much less and I'd probably get rid of pulseaudio.
Similarly the powertop shows the three top lines due to pulseaudio and the audio driver:
Code: | 27.5 ms/s 3.9 Process /usr/bin/pulseaudio --start --log-target=syslog
6.7 ms/s 259.2 Process [irq/28-snd_hda_]
384.4 µs/s 128.6 Interrupt [28] snd_hda_intel:card0
|
I'm on 17.0/desktop/plasma profile without systemd and these are the USE flags:
Code: | [ebuild R ] media-sound/pulseaudio-11.1::gentoo USE="X alsa alsa-plugin asyncns caps dbus glib gnome orc sox ssl tcpd udev webrtc-aec -bluetooth -doc -equalizer -gdbm -gtk -ipv6 -jack -libressl -libsamplerate -lirc -native-headset (-neon) -ofono-headset (-oss) -qt4 -realtime (-selinux) (-system-wide) -systemd {-test} -zeroconf" ABI_X86="32 (64) (-x32)" 1,611 KiB |
|
|
Back to top |
|
|
Ant P. Watchman
Joined: 18 Apr 2009 Posts: 6920
|
Posted: Wed Jan 17, 2018 5:43 pm Post subject: |
|
|
Run `pactl list` and see if there are any clients keeping the card active. Mine idles at 0% unless there's e.g. IM programs keeping the mic open. |
|
Back to top |
|
|
trubicoid Tux's lil' helper
Joined: 04 Aug 2009 Posts: 79
|
Posted: Wed Jan 17, 2018 6:31 pm Post subject: |
|
|
there is no IM running
what I'm looking for in pactl list? All sinks and sources are idle:
Code: | pactl list | grep Stat
State: IDLE
State: IDLE
State: IDLE
State: IDLE
State: IDLE
|
|
|
Back to top |
|
|
trubicoid Tux's lil' helper
Joined: 04 Aug 2009 Posts: 79
|
Posted: Wed Jan 17, 2018 8:05 pm Post subject: |
|
|
There are these clients, not sure if they are active though: ConsoleKit Session, XSMP Session on KDE, QPulse plasmashell and pactl. |
|
Back to top |
|
|
Ant P. Watchman
Joined: 18 Apr 2009 Posts: 6920
|
Posted: Fri Jan 19, 2018 2:05 am Post subject: |
|
|
Not sure then... I know the VU meters on volume controls can eat up substantial CPU time but they'd be easy to spot in the output (weird resample method). I don't know how KDE does things so can't say if it's the cause. |
|
Back to top |
|
|
trubicoid Tux's lil' helper
Joined: 04 Aug 2009 Posts: 79
|
Posted: Tue Jan 23, 2018 7:53 pm Post subject: |
|
|
I tried XFCE desktop, the problem is still there. Seems there is a problem of pulseudio without systemd? Ant P you have systemd or not? |
|
Back to top |
|
|
Ant P. Watchman
Joined: 18 Apr 2009 Posts: 6920
|
Posted: Wed Jan 24, 2018 6:19 am Post subject: |
|
|
I'm using Openbox on runit, with no *kits installed. |
|
Back to top |
|
|
trubicoid Tux's lil' helper
Joined: 04 Aug 2009 Posts: 79
|
|
Back to top |
|
|
Ant P. Watchman
Joined: 18 Apr 2009 Posts: 6920
|
Posted: Wed Jan 24, 2018 8:53 pm Post subject: |
|
|
ConsoleKit is only necessary for a multiseat-single-PC setup, which itself is largely a fad forced by RedHat to sell support contracts for their labyrinthine system plumbing software. PulseAudio works fine without that garbage. |
|
Back to top |
|
|
trubicoid Tux's lil' helper
Joined: 04 Aug 2009 Posts: 79
|
Posted: Thu Jan 25, 2018 9:23 am Post subject: |
|
|
I'll try to get rid of consolekit then. The other dependence on it is NetworkManager, do you have it as well? It is easier to use on a laptop than just wpa_supplicant. |
|
Back to top |
|
|
Ant P. Watchman
Joined: 18 Apr 2009 Posts: 6920
|
Posted: Thu Jan 25, 2018 6:33 pm Post subject: |
|
|
Last wifi GUI I used was net-misc/wicd... |
|
Back to top |
|
|
trubicoid Tux's lil' helper
Joined: 04 Aug 2009 Posts: 79
|
Posted: Fri Jan 26, 2018 8:09 am Post subject: |
|
|
without ConsoleKit the CPU usage stays 2-3%, so it is not the cause |
|
Back to top |
|
|
trubicoid Tux's lil' helper
Joined: 04 Aug 2009 Posts: 79
|
Posted: Wed Apr 18, 2018 7:04 pm Post subject: |
|
|
the problem is gone, pulseaudio takes 0% cpu, but I don't know, what was the problem.
It could be auto-started /etc/init.d/alsasound? But I'm not sure. |
|
Back to top |
|
|
Ant P. Watchman
Joined: 18 Apr 2009 Posts: 6920
|
Posted: Wed Apr 18, 2018 11:39 pm Post subject: |
|
|
That can't be it, all that init script does is set the volume levels. |
|
Back to top |
|
|
flabrus n00b
Joined: 10 Nov 2018 Posts: 3
|
Posted: Sun Dec 16, 2018 5:13 am Post subject: |
|
|
I experienced this issue as well. The cause, for me, was having the pulse audio loopback module loaded.
I previously set this module to autoload so I could listen to my line-in on my sound card, but I no longer needed to do that so I just unloaded the module and removed the line from /etc/pulse/default.pa.
Code: | # pactl unload-module module-loopback |
As soon as I unloaded the module, pulse's CPU time went to zero, at idle. |
|
Back to top |
|
|
|