Underruns and stuttering

Bug #1045771 reported by Smeuuh
34
This bug affects 7 people
Affects Status Importance Assigned to Milestone
pulseaudio (Ubuntu)
Expired
Undecided
Unassigned

Bug Description

When playing sound, be it in Clementine, in games via wine or in movies, I get stuttering. Attached is an example of log from clementine, running under pulseaudio -vvv

Here's all the relevant info I can think of:

lspci | grep Audio :
00:1b.0 Audio device: Intel Corporation Panther Point High Definition Audio Controller (rev 04)
01:00.1 Audio device: Advanced Micro Devices [AMD] nee ATI Turks HDMI Audio [Radeon HD 6000 Series]

alsamixer :
Chip: Realtek ALC269VC, Card: HDA Intel PCH

I'm using an up-to-date Precise. Let me know if you need more info.

Revision history for this message
Smeuuh (smeuuh) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in pulseaudio (Ubuntu):
status: New → Confirmed
Revision history for this message
Michael Andersen (mpandersen) wrote :

I suspect I am seeing the same problem, sound occasionally stutters with the loops being about half a second long. This happens irrespective of what application is producing the sound.

I am also using up to date Precise and this bug has existed since I installed.

lspci | grep "Audio" :
00:1b.0 Audio device: Intel Corporation X79 series chipset High Definition Audio Controller (rev 05)
02:00.1 Audio device: NVIDIA Corporation GF110 High Definition Audio Controller (rev a1)

but I am using the motherboard sound, didn't know I had any Nvidia audio stuff :/

Also, although the stuttering occurs more when I am compiling code or running a few programs, the system is far from heavily loaded and it is a fairly decent computer.

I have read somewhere that there may be interactions between SSD's and the default disk scheduler, perhaps the audio stuttering is a symptom of another problem? (I do run off SSD's using the CFQ scheduler) I do sometimes see similar 'mini-lockups' in my browser that coincide with the audio stuttering.

Revision history for this message
Smeuuh (smeuuh) wrote :

FWIW I don't use any SSD. Do you have the same pulseaudio logs?

Revision history for this message
Michael Andersen (mpandersen) wrote :

I haven't got any logs yet, I will generate some now. I suspect this bug is related to bug #751298 and/or bug #1008177

Revision history for this message
Michael Andersen (mpandersen) wrote :

Yeah, I see lots of these during the stutters:

D: [alsa-sink] sink-input.c: Requesting rewind due to corking
D: [alsa-sink] alsa-sink.c: Requested to rewind 14112 bytes.
D: [alsa-sink] alsa-sink.c: Limited to 13856 bytes.
D: [alsa-sink] alsa-sink.c: before: 3464
D: [alsa-sink] alsa-sink.c: after: 2552
D: [alsa-sink] alsa-sink.c: Rewound 10208 bytes.
D: [alsa-sink] sink.c: Processing rewind...
D: [alsa-sink] sink.c: latency = 22157
D: [alsa-sink] sink-input.c: Have to rewind 10208 bytes on render memblockq.
D: [alsa-sink] sink-input.c: Have to rewind 10208 bytes on render memblockq.
D: [alsa-sink] sink-input.c: Have to rewind 10208 bytes on implementor.
D: [alsa-sink] source.c: Processing rewind...
D: [alsa-sink] alsa-sink.c: Requested volume: 0: 40% 1: 40%
D: [alsa-sink] alsa-sink.c: in dB: 0: -24,20 dB 1: -24,20 dB
D: [alsa-sink] alsa-sink.c: Got hardware volume: 0: 40% 1: 40%
D: [alsa-sink] alsa-sink.c: in dB: 0: -24,00 dB 1: -24,00 dB
D: [alsa-sink] alsa-sink.c: Calculated software volume: 0: 99% 1: 99% (accurate-enough=yes)
D: [alsa-sink] alsa-sink.c: in dB: 0: -0,20 dB 1: -0,20 dB
D: [alsa-sink] sink.c: Volume not changing
D: [alsa-sink] alsa-sink.c: Requested to rewind 14112 bytes.
D: [alsa-sink] alsa-sink.c: Limited to 13696 bytes.
D: [alsa-sink] alsa-sink.c: before: 3424
D: [alsa-sink] alsa-sink.c: after: 2512
D: [alsa-sink] alsa-sink.c: Rewound 10048 bytes.
D: [alsa-sink] sink.c: Processing rewind...
D: [alsa-sink] sink.c: latency = 22274
D: [alsa-sink] sink-input.c: Have to rewind 10048 bytes on render memblockq.
D: [alsa-sink] source.c: Processing rewind...

Revision history for this message
nAndrade (bugsubuntu-nicoandra) wrote :

I think https://bugs.launchpad.net/ubuntu/+source/alsa-driver/+bug/1016825 is related to this one, but I can't find how to suggest the relationship in Launchpad; "also affects project" option seemed the most likely to be but gave me an error.

Syslog uploaded here https://launchpadlibrarian.net/121046721/syslog looks like yours.

Revision history for this message
nAndrade (bugsubuntu-nicoandra) wrote :
Revision history for this message
Jukka Marin (parityerror) wrote :

I have been experiencing stuttering problems which have been driving me crazy, googling all night and trying all kinds of "solutions" with no help. Then I disabled the WIFI driver (RTL8723AE) and now audio works well (Intel hda output). It seems the driver is disabling interrupts for extended periods of time (or something like that), draining the small buffers of the audio hardware. (Now, if the SPDIF output only worked with xubuntu 13.04 (it did with 12.10)...)

Revision history for this message
Andreas Ringlstetter (ext3h) wrote :

It doesn't look like the problem is in pulseaudio though.
I have the very same problem (buffer underruns in alsa and the resulting stuttering / crackling), but the issue not only occurs when I use Pulseaudio.

It's a generic issue with all applications which access Alsa, although varying the size of the buffers in pulseaudio can reduce the interval of stutters.

For me it's not the Wifi driver which is causing the issue, but (i think) something in the graphics driver since I get the stuttering whenever large bitmaps get drawn on screen.
This seems to be highly dependent on the hardware and there appear to be multiple hardware configurations which can trigger the underruns in Alsa.
I can e.g. trigger it reliably by switching the video renderer in VLC from GLX to Xvideo and back and it will start stuttering as soon as the Xserver is under load. Switching between Pulseaudio and Alsa (direct, PA suspended) as audio backend makes no difference at all, well except that the interval of the cracks is directly related to the buffer size used by the corresponding applications.

What would be noteworthy, this issue is rather new for me.
There appears to be some regression in the Alsa driver which makes it less tolerant towards long running, non-interruptible service routines from other drivers.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Thank you for reporting this bug to Ubuntu.
Ubuntu 12.04 (precise) reached end-of-life on April 28, 2017.

See this document for currently supported Ubuntu releases:
https://wiki.ubuntu.com/Releases

We appreciate that this bug may be old and you might not be interested in discussing it any more. But if you are then please upgrade to the latest Ubuntu version and re-test.

Changed in pulseaudio (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for pulseaudio (Ubuntu) because there has been no activity for 60 days.]

Changed in pulseaudio (Ubuntu):
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.