Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Pulseaudio high CPU usage when idle?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Multimedia
View previous topic :: View next topic  
Author Message
trubicoid
n00b
n00b


Joined: 04 Aug 2009
Posts: 52

PostPosted: Wed Jan 17, 2018 3:57 pm    Post subject: Pulseaudio high CPU usage when idle? Reply with quote

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
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 5008

PostPosted: Wed Jan 17, 2018 5:43 pm    Post subject: Reply with quote

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.
_________________
*.ebuild // /etc/service/*
Back to top
View user's profile Send private message
trubicoid
n00b
n00b


Joined: 04 Aug 2009
Posts: 52

PostPosted: Wed Jan 17, 2018 6:31 pm    Post subject: Reply with quote

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
View user's profile Send private message
trubicoid
n00b
n00b


Joined: 04 Aug 2009
Posts: 52

PostPosted: Wed Jan 17, 2018 8:05 pm    Post subject: Reply with quote

There are these clients, not sure if they are active though: ConsoleKit Session, XSMP Session on KDE, QPulse plasmashell and pactl.
Back to top
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 5008

PostPosted: Fri Jan 19, 2018 2:05 am    Post subject: Reply with quote

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.
_________________
*.ebuild // /etc/service/*
Back to top
View user's profile Send private message
trubicoid
n00b
n00b


Joined: 04 Aug 2009
Posts: 52

PostPosted: Tue Jan 23, 2018 7:53 pm    Post subject: Reply with quote

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
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 5008

PostPosted: Wed Jan 24, 2018 6:19 am    Post subject: Reply with quote

I'm using Openbox on runit, with no *kits installed.
_________________
*.ebuild // /etc/service/*
Back to top
View user's profile Send private message
trubicoid
n00b
n00b


Joined: 04 Aug 2009
Posts: 52

PostPosted: Wed Jan 24, 2018 8:04 am    Post subject: Reply with quote

Hmmm, strange. I thought you need consolekit and udev, when not on systemd, as it is explicitly written in https://wiki.gentoo.org/wiki/PulseAudio
Back to top
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 5008

PostPosted: Wed Jan 24, 2018 8:53 pm    Post subject: Reply with quote

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.
_________________
*.ebuild // /etc/service/*
Back to top
View user's profile Send private message
trubicoid
n00b
n00b


Joined: 04 Aug 2009
Posts: 52

PostPosted: Thu Jan 25, 2018 9:23 am    Post subject: Reply with quote

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
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 5008

PostPosted: Thu Jan 25, 2018 6:33 pm    Post subject: Reply with quote

Last wifi GUI I used was net-misc/wicd...
_________________
*.ebuild // /etc/service/*
Back to top
View user's profile Send private message
trubicoid
n00b
n00b


Joined: 04 Aug 2009
Posts: 52

PostPosted: Fri Jan 26, 2018 8:09 am    Post subject: Reply with quote

without ConsoleKit the CPU usage stays 2-3%, so it is not the cause :(
Back to top
View user's profile Send private message
trubicoid
n00b
n00b


Joined: 04 Aug 2009
Posts: 52

PostPosted: Wed Apr 18, 2018 7:04 pm    Post subject: Reply with quote

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
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 5008

PostPosted: Wed Apr 18, 2018 11:39 pm    Post subject: Reply with quote

That can't be it, all that init script does is set the volume levels.
_________________
*.ebuild // /etc/service/*
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Multimedia All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum