Ticket #208 (closed defect: invalid)

Opened 4 years ago

Last modified 4 years ago

Stuttering and other effects in long-running pulseaudio

Reported by: kalaleq Owned by: lennart
Milestone: Component: daemon
Keywords: stuttering garbled sound Cc:

Description

I'm experiencing a problem with garbled sound. It sounds vaguely similar to ticket #201, but somewhat different, in that i cannot rectify the problem by restarting the client, only by restarting the PA daemon.

Starting with 0.9.7, and continuing with 0.9.8 - it never happened with 0.9.6 - if i leave MPD playing for a long time, the audio begins stuttering, which persists until i restart PA. I had not previously measured what `a long time' means, but in my latest test it took just under two hours. My feeling is it is a bit random, and sometimes happens more quickly, but i cannot be sure without testing further. I believe it also happened once while listening to a long mp3 in audacious, so i don't believe it is MPD-related.

I'm testing on an athlon 1800+ with 640MB of RAM, using an on-board CM8738 (cmipci) - i have other hardware configurations available but have not yet had occasion to test on those. I have PA set up as pcm.!default in my /etc/asound.conf. It is actually running on top of dmix, a trick i discovered that will allow me to use passthrough mode (spdif) for watching movies, even while PA has the sound device open - as long as i don't play any other sounds while watching.

It basically sounds like the audio is `stuttering' - a very rapid interruption and popping through which the original sound is certainly still understandable. It's not especially loud, just stuttering at about the same perceived volume as the stream itself.

At first i thought it sounded like a load issue, that perhaps PA 0.9.7+ used more CPU than the previous versions and wasn't able to keep up. But that doesn't seem to be the case; both before and after the garbling starts, PA's CPU utilisation hovers around 6% in top.

If i stop the client, then restart, i still hear the same effect. Likewise if i kill the client's connexion via the PA manager, then restart it.

The `stuttering' effect remains until i restart PA itself. After restarting, CPU and memory usage as reported both by top and by the PA manager statistics seem unchanged, but the stuttering effect is gone.

Interestingly, this time, when i tried to start *another* client, either while MPD was still playing, or after pausing/stopping MPD, or even after restarting PA, i could not. I tried audacious, mpg123 and aplay, none of which could open the audio device. The command-line clients showed me the following message:

*** PULSEAUDIO: Unable to create stream.

MPD continued to be able to create streams, even after restarting it, but the other three could not. This persisted until i rebooted the machine - after which i could run all four clients simultaneously again with no problems. I had not noticed a problem like this before, but i may just never have tried.

Please let me know if there's anything else i can do to help diagnose the problem! I'll continue running PA 0.9.8 on this and other machines for a while, and add to this ticket if i notice anything new.

Change History

Changed 4 years ago by kalaleq

Just experienced the same stuttering effect on another machine, with a very similar setup: this time an athlon 1900+ with a PCI Auzentech X-Plosion card with digital out, though that card also uses the cmipci alsa driver. Same setup as the first machine with pulse as alsa's default output, running on top of dmix. This machine is a dedicated media server and didn't have anything else of significance going on aside from MPD.

One difference - there were no problems with running other streams after the stuttering started, unlike last time. I could run aplay and mpg123 just fine. Both of them were subject to the same stuttering effect until i restarted pulseaudio. So i'm guessing that may have been a red herring in my original post.

I will try removing dmix from the mix temporarily and report back if i notice any change.

Changed 4 years ago by kalaleq

  • status changed from new to closed
  • resolution set to invalid

my apologies - i'm not 100% certain but it seems pretty likely that the problems i've experienced have had to do with running pulse on top of dmix. when i run it on top of the alsa hardware device instead, the problems seem to stop (so far). so i'm looking into alternate setups for achieving the effect i want.

i will mark this ticket invalid.

Note: See TracTickets for help on using tickets.