Pulseaudio using alot of cpu to underruns and overruns

Bug #330006 reported by Alan Jenkins on 2009-02-16
22
This bug affects 3 people
Affects Status Importance Assigned to Milestone
pulseaudio (Ubuntu)
Low
Daniel T Chen

Bug Description

Pulseaudio keeps using up 20% CPU in its 3 threads (60% cpu usage) due to mainly these 2 errors:

D: protocol-native.c: Requesting rewind due to end of underrun.
E: asyncq.c: q overrun, queuing locally

This did not happen before I upgraded to pulseaudio 0.9.14-0ubuntu6 this morning.

Attached is the very verbose output of pulseaudio collected while listening to music through rhythmbox.

Related branches

Here is /etc/pulse/default.pa

/etc/pulse/system.pa

/etc/pulse/client.conf

/etc/pulse/daemon.conf

Find the line that loads module-hal-detect in /etc/pulse/default.pa, and remove "tsched=0" from the end of it, and restart pulseaudio with "pulseaudio -k; start-pulseaudio-x11". Do things settle down then? In addition, once you make this change, do you get crackly/glitchy audio at all?

Hey Luke,

Just tried your suggestion of removing the tsched=0 and then running "pulseaudio -k; start-pulseaudio-x11".

Did not have any luck (keeps saying daemon startup failed).

Anyway the log of what I did (minus the editing of the conf file) is attached.

Ignore the last post (I did not read all of the output of the pulseaudio -v -v) (I commented out the #tsched=0 and it tried to use that as an argument).

Anyways testing your commands again now with the config file set right.

Luke that seems to have worked. No problems as of yet no crackling or distortions of any kind and the cpu usage is down to a total of 3%.

What was that line telling pulse to do? (don't tell me pulse was outputting through itself =S?).

Luke Yelavich (themuso) wrote :

Removing tsched=0 turned glitch-free playback on. It seems your card driver/system cause pulse to use lots of CPU if glitch-free is disabled.

Luke thanks for you replies and help. Pulseaudio is running fine now however:

Where do we take this bug from here? Do we just make sure that tsched=0 is not the default? Or do we try figure out why my system hates that option?

Anyway here is the output of lshw -html for my affected system.

Tell me if there is any other information that could be useful in debugging this problem.

Daniel T Chen (crimsun) wrote :

PulseAudio cannot currently switch between glitch-free (and not) without an explicit (manual) default.pa reconfiguration and restart. Your configuration (and mine) seems amenable to glitch-free usage, but a great many other jaunty users have configurations that are not. Until the most severe of the bugs in the audio stack are worked out, there is no one global setting that will work well for everyone.

Changed in pulseaudio:
importance: Undecided → Low
Markus Thielmann (thielmann) wrote :

Thanks for the clarification Daniel. Is there any way we're able to help?

My audio controller [1] consumes a lot of CPU too, if glitch-free usage is disabled. In fact the whole system is nearly unusable when playing sound or video (up to 60% CPU usage for pulse alone).

[1] 00:1f.5 Multimedia audio controller: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) AC'97 Audio Controller (rev 01)

Daniel T Chen (crimsun) on 2009-03-04
Changed in pulseaudio:
assignee: nobody → crimsun
status: New → In Progress

I posted this in #207135 too (probably a dup?):
If you are getting high CPU usage from pulse, change the resample method in /etc/pulse/daemon.conf to a less CPU intensive algorithm:

resample-method = src-sinc-fastest

See if this works for you. My CPU dropped from 2-5% CPU to pretty much below the background noise. Perhaps there needs to be a less "high end" default?

Cheers, J

Jonathan Harker wrote:
> I posted this in #207135 too (probably a dup?):
> If you are getting high CPU usage from pulse, change the resample method in /etc/pulse/daemon.conf to a less CPU intensive algorithm:
>
> resample-method = src-sinc-fastest
>
> See if this works for you. My CPU dropped from 2-5% CPU to pretty much
> below the background noise. Perhaps there needs to be a less "high end"
> default?
>
> Cheers, J
>
>
This was actually one of the first things that I tried before I posted
the bug. The only thing that lowered the CPU was removing the tsched=0
from the sink line.

Daniel T Chen (crimsun) wrote :

Resolved in the latest upload (ubuntu11)

Changed in pulseaudio:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers