Bug 462026

Summary: music file play -> sound sparks.
Product: [Fedora] Fedora Reporter: sangu <sangu.fedora>
Component: alsa-libAssignee: Kernel Maintainer List <kernel-maint>
Status: CLOSED WONTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: medium    
Version: 10CC: abo, adam, alexbour, andreas.utterberg, andrew, cra, c.shoemaker, dennisml, james, jkysela, kamilpe, kernel-maint, krnlbg, lkundrak, me, mkanat, pcfe, sha256sum, tmraz, tore, torsten, vwfoxguru, wes
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard: Workaround: http://www.fedorafaq.org/f10/#sound-pops
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-12-18 06:23:18 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 438944    
Attachments:
Description Flags
pulseaudio -vv
none
possibly relevant lines from lsmod
none
possibly relevant lines from lspci
none
pulseaudio -vv
none
pulseaudio -vvvv log for Comment #41
none
pulseaudio -vvvv output for comment #49 none

Description sangu 2008-09-12 00:41:59 UTC
Created attachment 316508 [details]
pulseaudio -vv

Description of problem:

Whenever sound sparks, below log happens in pulseaudio -vv 
[...]
I: module-alsa-sink.c: Underrun!
D: protocol-native.c: Requesting rewind due to end of underrun.
D: module-alsa-sink.c: Requested to rewind 32536 bytes.
D: module-alsa-sink.c: Limited to 496 bytes.
D: module-alsa-sink.c: before: 124
D: module-alsa-sink.c: after: 124
D: module-alsa-sink.c: Rewound 496 bytes.
D: sink.c: Processing rewind...
D: sink-input.c: Have to rewind 496 bytes on render memblockq.
[...]

Version-Release number of selected component (if applicable):
0.9.12-5.fc10

How reproducible:
always

Steps to Reproduce:
1. play music file 
2.
3.
  
Actual results:


Expected results:


Additional info:
alsa-utils-1.0.18-1.rc3.fc10.i386
alsa-plugins-pulseaudio-1.0.18-1.rc3.fc10.i386
alsa-lib-1.0.18-6.rc3.fc10.i386
alsa-lib-devel-1.0.18-6.rc3.fc10.i386
gstreamer-plugins-bad-0.10.8-1.lvn10.i386
gstreamer-plugins-base-0.10.20-2.fc10.i386
gstreamer-plugins-pulse-0.9.7-1.fc10.i386
gstreamer-0.10.20-1.fc10.i386
gstreamer-plugins-ugly-0.10.8-1.lvn10.i386
gstreamer-plugins-good-0.10.10-2.fc10.i386

Comment 1 sangu 2008-09-20 00:59:02 UTC
$ cat /proc/asound/cards
 0 [NVidia         ]: HDA-Intel - HDA NVidia
                      HDA NVidia at 0xfe020000 irq 21
 1 [Live           ]: EMU10K1 - SBLive! Platinum [CT4760P]
                      SBLive! Platinum [CT4760P] (rev.7, serial:0x80401102) at 0xcc00, irq 17

in pavucontrol
Selecting HDA NVidia -> No problem (then unfortunately sometimes this device is loaded)
Selecting SBLive! -> this issue happens( over mp3 file bitrate 250kbps)

ALSA information : http://www.alsa-project.org/db/?f=40809bcf08ca42d71a9a5af18bf07a19e0bc6d29

Comment 2 sangu 2008-09-22 04:25:48 UTC
Removing alsa-plugins-pulseaudio (rpm -e alsa-plugins-pulseaudio), sound is no problem.

Does alsa-pulgins(or alsa-lib) conflict with pulseaudio?

Comment 3 Lennart Poettering 2008-09-24 00:03:38 UTC
Seems as if snd_pcm_rewind() is broken in the emu10k1 driver. Reassigning to ALSA/kernel.

Comment 4 sangu 2008-10-08 02:54:45 UTC
Reassigning to alsa-lib?

http://bugzilla.kernel.org/show_bug.cgi?id=11644#c1
------- Comment  #1 From Takashi Iwai  2008-10-07 06:43:04  [reply] -------

I guess it's rather a problem of alsa-lib.  The bug in snd_pcm_rewind() was
fixed recently.  Make sure that you have alsa-lib-1.0.17a or 1.0.18-rc*.

Comment 5 sangu 2008-10-25 00:26:04 UTC
Please update alsa-lib git snapshot for emu10k1 driver?

Comment 6 sangu 2008-10-27 14:14:14 UTC
http://bugzilla.kernel.org/show_bug.cgi?id=11644#c2
------ Comment  #2 From sangu  2008-10-27 07:12:19  [reply] -------

(In reply to comment #1)
> I guess it's rather a problem of alsa-lib.  The bug in snd_pcm_rewind() was
> fixed recently.  Make sure that you have alsa-lib-1.0.17a or 1.0.18-rc*.
> 

This issue still happens with
http://www.alsa-project.org/snapshot/files/alsa-lib-1.0.18rc3.9.g8feae.tar.bz2

$ pulseauido -vvv
[skip]
D: memblockq.c: memblockq requested: maxlength=141120, tlength=70560, base=8,
prebuf=67032, minreq=3528 maxrewind=0
D: memblockq.c: memblockq sanitized: maxlength=141120, tlength=70560, base=8,
prebuf=67032, minreq=3528 maxrewind=0
I: protocol-native.c: Final latency 380.00 ms = 180.00 ms + 2*10.00 ms + 180.00
ms
D: module-alsa-sink.c: latency set to 180.00ms
D: module-alsa-sink.c: hwbuf_unused_frames=8446
D: module-alsa-sink.c: setting avail_min=8975
D: module-alsa-sink.c: Requesting rewind due to latency change.
D: module-alsa-sink.c: Requested to rewind 65536 bytes.
D: module-alsa-sink.c: Limited to 34228 bytes.
D: module-alsa-sink.c: before: 8557
D: module-alsa-sink.c: after: 8557
D: module-alsa-sink.c: Rewound 34228 bytes.
D: sink.c: Processing rewind...
D: sink-input.c: Have to rewind 34228 bytes on render memblockq.
D: protocol-native.c: Requesting rewind due to end of underrun.
D: module-alsa-sink.c: Requested to rewind 65536 bytes.
D: module-alsa-sink.c: Limited to 480 bytes.
D: module-alsa-sink.c: before: 120
D: module-alsa-sink.c: after: 120
D: module-alsa-sink.c: Rewound 480 bytes.
D: sink.c: Processing rewind...
D: sink-input.c: Have to rewind 480 bytes on render memblockq.
D: module-alsa-sink.c: Wakeup from ALSA! OUTPUT
I: module-alsa-sink.c: Underrun!
D: module-alsa-sink.c: Wakeup from ALSA! OUTPUT
D: module-alsa-sink.c: Wakeup from ALSA! OUTPUT
D: module-alsa-sink.c: Wakeup from ALSA! OUTPUT
D: protocol-native.c: Requesting rewind due to end of underrun.
D: module-alsa-sink.c: Requested to rewind 33036 bytes.
D: module-alsa-sink.c: Limited to 428 bytes.
D: module-alsa-sink.c: before: 107
D: module-alsa-sink.c: after: 107
D: module-alsa-sink.c: Rewound 428 bytes.
D: sink.c: Processing rewind...
D: sink-input.c: Have to rewind 428 bytes on render memblockq.
I: module-alsa-sink.c: Underrun!
D: protocol-native.c: Requesting rewind due to end of underrun.
D: module-alsa-sink.c: Requested to rewind 32080 bytes.
D: module-alsa-sink.c: Limited to 440 bytes.
D: module-alsa-sink.c: before: 110
D: module-alsa-sink.c: after: 110
D: module-alsa-sink.c: Rewound 440 bytes.
D: sink.c: Processing rewind...
D: sink-input.c: Have to rewind 440 bytes on render memblockq.
I: module-alsa-sink.c: Underrun!
D: protocol-native.c: Requesting rewind due to end of underrun.
D: module-alsa-sink.c: Requested to rewind 32248 bytes.
D: module-alsa-sink.c: Limited to 304 bytes.
D: module-alsa-sink.c: before: 76
D: module-alsa-sink.c: after: 76
D: module-alsa-sink.c: Rewound 304 bytes.
D: sink.c: Processing rewind...
D: sink-input.c: Have to rewind 304 bytes on render memblockq.
D: module-alsa-sink.c: Wakeup from ALSA! OUTPUT
I: module-alsa-sink.c: Underrun!
D: protocol-native.c: Requesting rewind due to end of underrun.
D: module-alsa-sink.c: Requested to rewind 31856 bytes.
D: module-alsa-sink.c: Limited to 276 bytes.
D: module-alsa-sink.c: before: 69
D: module-alsa-sink.c: after: 69
D: module-alsa-sink.c: Rewound 276 bytes.
D: sink.c: Processing rewind...
D: sink-input.c: Have to rewind 276 bytes on render memblockq.
I: module-alsa-sink.c: Underrun!
D: protocol-native.c: Requesting rewind due to end of underrun.
D: module-alsa-sink.c: Requested to rewind 31548 bytes.
D: module-alsa-sink.c: Limited to 344 bytes.
D: module-alsa-sink.c: before: 86
D: module-alsa-sink.c: after: 86
D: module-alsa-sink.c: Rewound 344 bytes.
D: sink.c: Processing rewind...
D: sink-input.c: Have to rewind 344 bytes on render memblockq.
D: module-alsa-sink.c: Wakeup from ALSA! OUTPUT
I: module-alsa-sink.c: Underrun!
D: module-alsa-sink.c: Wakeup from ALSA! OUTPUT
D: module-alsa-sink.c: Wakeup from ALSA! OUTPUT
D: module-alsa-sink.c: Wakeup from ALSA! OUTPUT
D: module-alsa-sink.c: Wakeup from ALSA! OUTPUT
D: module-alsa-sink.c: Wakeup from ALSA! OUTPUT
D: module-alsa-sink.c: Wakeup from ALSA! OUTPUT
D: module-alsa-sink.c: Wakeup from ALSA! OUTPUT
D: module-alsa-sink.c: Wakeup from ALSA! OUTPUT
D: module-alsa-sink.c: Wakeup from ALSA! OUTPUT
D: module-alsa-sink.c: Wakeup from ALSA! OUTPUT
D: module-alsa-sink.c: Wakeup from ALSA! OUTPUT
D: module-alsa-sink.c: Wakeup from ALSA! OUTPUT
D: module-alsa-sink.c: Wakeup from ALSA! OUTPUT
D: module-alsa-sink.c: Wakeup from ALSA! OUTPUT
D: module-alsa-sink.c: Wakeup from ALSA! OUTPUT
D: module-alsa-sink.c: Wakeup from ALSA! OUTPUT
D: module-alsa-sink.c: Wakeup from ALSA! OUTPUT
D: module-alsa-sink.c: Wakeup from ALSA! OUTPUT
D: module-alsa-sink.c: Wakeup from ALSA! OUTPUT
D: module-alsa-sink.c: Wakeup from ALSA! OUTPUT
D: protocol-native.c: Requesting rewind due to end of underrun.
D: module-alsa-sink.c: Wakeup from ALSA! OUTPUT
D: module-alsa-sink.c: Requested to rewind 30852 bytes.
D: module-alsa-sink.c: Limited to 508 bytes.
D: module-alsa-sink.c: before: 127
D: module-alsa-sink.c: after: 127
D: module-alsa-sink.c: Rewound 508 bytes.
D: sink.c: Processing rewind...
D: sink-input.c: Have to rewind 508 bytes on render memblockq.
D: module-alsa-sink.c: Wakeup from ALSA! OUTPUT

Comment 7 Charles R. Anderson 2008-10-31 03:47:40 UTC
*** Bug 469281 has been marked as a duplicate of this bug. ***

Comment 8 Charles R. Anderson 2008-10-31 03:54:17 UTC
kernel-2.6.27.4-68.fc10.i686
alsa-lib-1.0.18-6.rc3.fc10.i386
pulseaudio-0.9.13-4.fc10.i386

emu10k1 driver.

I see similar output, but I don't see any "rewind" messages:

D: module-alsa-sink.c: latency set to 5.80ms
D: module-alsa-sink.c: hwbuf_unused_frames=16129
D: module-alsa-sink.c: setting avail_min=16638
D: module-alsa-sink.c: latency set to 5.80ms
D: module-alsa-sink.c: hwbuf_unused_frames=16129
D: module-alsa-sink.c: setting avail_min=16638
I: module-alsa-sink.c: Underrun!
I: module-alsa-sink.c: Underrun!
I: module-alsa-sink.c: Underrun!
I: module-alsa-sink.c: Underrun!
I: module-alsa-sink.c: Underrun!
I: module-alsa-sink.c: Underrun!
D: module-alsa-sink.c: Wakeup from ALSA! OUTPUT
I: module-alsa-sink.c: Underrun!
I: module-alsa-sink.c: Underrun!
I: module-alsa-sink.c: Underrun!
I: module-alsa-sink.c: Underrun!
I: module-alsa-sink.c: Underrun!
I: module-alsa-sink.c: Underrun!
I: module-alsa-sink.c: Underrun!
I: module-alsa-sink.c: Underrun!
I: module-alsa-sink.c: Underrun!
I: module-alsa-sink.c: Underrun!
I: module-alsa-sink.c: Underrun!
I: module-alsa-sink.c: Underrun!
I: module-alsa-sink.c: Underrun!
I: module-alsa-sink.c: Underrun!
I: module-alsa-sink.c: Underrun!
I: module-alsa-sink.c: Underrun!

Comment 9 Charles R. Anderson 2008-10-31 04:01:20 UTC
After downgrading just this package to the F9 version the problem disappears:

alsa-plugins-pulseaudio-1.0.16-4.fc9.i386

Comment 10 Charles R. Anderson 2008-11-04 01:26:30 UTC
I noticed this doesn't happen if I don't open pavucontrol.  Playing music is fine, then if I open pavucontrol, it starts skipping.  If I close pavucontrol, the skipping mostly stops.

kernel-2.6.27.4-68.fc10.i686
alsa-lib-1.0.18-6.rc3.fc10.i386
alsa-plugins-pulseaudio-1.0.18-1.rc3.fc10.i386
pulseaudio-0.9.13-6.fc10.i386

Comment 11 Charles R. Anderson 2008-11-09 21:36:14 UTC
*** Bug 469591 has been marked as a duplicate of this bug. ***

Comment 12 Dennis Jacobfeuerborn 2008-11-09 22:17:19 UTC
I'm the reporter of bug 469591 and I'm seeing the same problem with the ice1712 driver.

I only see it when directly playing through the pulseaudio plugin of Audacious though. After installing alsa-plugins-pulseaudio and then using the alsa plugin of Audacious the problem went away.

Comment 13 Dennis Jacobfeuerborn 2008-11-09 22:46:48 UTC
Just after I posted the above I got the skipping again with the following messages:

I: module-alsa-sink.c: Underrun!
N: module-alsa-sink.c: Increasing wakeup watermark to 23.95 ms
I: module-alsa-sink.c: Underrun!
N: module-alsa-sink.c: Increasing wakeup watermark to 47.89 ms
I: module-alsa-sink.c: Underrun!
N: module-alsa-sink.c: Increasing wakeup watermark to 71.27 ms
I: module-alsa-sink.c: Underrun!
I: module-alsa-sink.c: Underrun!
I: module-alsa-sink.c: Underrun!
I: module-alsa-sink.c: Underrun!

This was with the latest version of alsa-plugins-pulseaudio. So I went ahead and replaced it with the version mentioned in comment #9. This time it took several minutes until I got the above messages but once the wakeup watermark was set to 71.27 ms the underruns and the skipping began to appear very frequently.

Comment 14 Vlad 2008-11-22 21:21:46 UTC
It seems to be the same bug.
I had updated to fedora 10 five hours ago and after that this problem occurs.

There is some output for "pulseaudio -vv":
...
D: sink-input.c: Have to rewind 25828 bytes on render memblockq.
D: protocol-native.c: Requesting rewind due to end of underrun.
D: module-alsa-sink.c: Requested to rewind 65536 bytes.
D: module-alsa-sink.c: Limited to 472 bytes.
D: module-alsa-sink.c: before: 118
D: module-alsa-sink.c: after: 118
D: module-alsa-sink.c: Rewound 472 bytes.
D: sink.c: Processing rewind...
D: sink-input.c: Have to rewind 472 bytes on render memblockq.
I: module-alsa-sink.c: Underrun!
D: protocol-native.c: Requesting rewind due to end of underrun.
D: module-alsa-sink.c: Requested to rewind 31816 bytes.
D: module-alsa-sink.c: Limited to 460 bytes.
D: module-alsa-sink.c: before: 115
D: module-alsa-sink.c: after: 115
D: module-alsa-sink.c: Rewound 460 bytes.
D: sink.c: Processing rewind...
D: sink-input.c: Have to rewind 460 bytes on render memblockq.
I: module-alsa-sink.c: Underrun!
D: protocol-native.c: Requesting rewind due to end of underrun.
D: module-alsa-sink.c: Requested to rewind 31328 bytes.
D: module-alsa-sink.c: Limited to 328 bytes.
D: module-alsa-sink.c: before: 82
D: module-alsa-sink.c: after: 82
D: module-alsa-sink.c: Rewound 328 bytes.
D: sink.c: Processing rewind...
D: sink-input.c: Have to rewind 328 bytes on render memblockq.
...

kernel.x86_64 2.6.27.5-117.fc10 
alsa-lib.x86_64 1.0.18-6.rc3.fc10
alsa-plugins-pulseaudio.x86_64 1.0.18-1.rc3.fc10
pulseaudio.x86_64 0.9.13-6.fc10
nVidia chipset and... emu10k1 !

Comment 15 Pierre Ossman 2008-11-22 22:34:28 UTC
Occurs here as well with snd_hda_intel (ICH8 HDA audio). Mainly stuff going through the alsa plug-in is affected, although some direct pulse apps also suffer from it (primarily flash through the libflashsupport hook).

Comment 16 Bug Zapper 2008-11-26 03:03:19 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 10 development cycle.
Changing version to '10'.

More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 17 Peter Backes 2008-11-30 00:35:42 UTC
Same problem here, snd_hda_intel. It's really annoying.

I installed alsa-plugins-pulseaudio-1.0.16-4.fc9.i386 as recommended above, and it made the problem go away. But it caused wine to start crashing randomly, with various assertations failed inside the alsa libraries.

Comment 18 Alexander Boström 2008-11-30 09:29:55 UTC
Reproducible here, fully up to date F10. Lots of "Have to rewind X bytes on render memblockq." and sound skipping.

I switched from a PCI Creative Labs SB Live! EMU10k1 to some USB audio thing (which PA did for me on the fly of course!) and now I can enjoy my music again, but there's clearly some bug somewhere. Suggestion on debugging welcome.

Comment 19 James 2008-11-30 22:35:04 UTC
(In reply to comment #10)
> I noticed this doesn't happen if I don't open pavucontrol.  Playing music is
> fine, then if I open pavucontrol, it starts skipping.  If I close pavucontrol,
> the skipping mostly stops.
> 
> kernel-2.6.27.4-68.fc10.i686
> alsa-lib-1.0.18-6.rc3.fc10.i386
> alsa-plugins-pulseaudio-1.0.18-1.rc3.fc10.i386
> pulseaudio-0.9.13-6.fc10.i386

I see this on both Intel HDA/Realtek 883 and ATI-IXP hardware... is it that new live VU-meter is causing trouble? From pulseaudio -vvv, when the volume control is open:

I: module-alsa-source.c: Overrun!
I: module-alsa-sink.c: Underrun!
I: module-alsa-source.c: Overrun!
D: module-alsa-sink.c: Wakeup from ALSA! OUTPUT
I: module-alsa-sink.c: Underrun!
D: module-alsa-sink.c: Wakeup from ALSA! OUTPUT
D: module-alsa-sink.c: Wakeup from ALSA! OUTPUT
D: module-alsa-sink.c: Wakeup from ALSA! OUTPUT
E: module-alsa-sink.c: ALSA woke us up to write new data to the device, but there was actually nothing to write! Most likely this is an ALSA driver bug. Please report this issue to the PulseAudio developers.
D: module-alsa-sink.c: Wakeup from ALSA! OUTPUT
I: module-alsa-source.c: Overrun!
I: module-alsa-sink.c: Underrun!
I: module-alsa-source.c: Overrun!
I: module-alsa-sink.c: Underrun!

Comment 20 Scott Williams 2008-12-04 00:44:38 UTC
I seem to have the same symptoms with my Audigy 2 ZS card, using Audigy2 driver.

Comment 21 Max Kanat-Alexander 2008-12-06 00:59:47 UTC
I have an hda_intel and I'm *not* having this problem, but one of the first things I did after installing Fedora 10 was add my user to the "pulse-rt" group. Does that fix anything for anybody?

Comment 22 Peter Backes 2008-12-06 05:16:56 UTC
(In reply to comment #21)
> I have an hda_intel and I'm *not* having this problem, but one of the first
> things I did after installing Fedora 10 was add my user to the "pulse-rt"
> group. Does that fix anything for anybody?

Did not make a difference for me; sparks are still there.

Comment 23 Lennart Poettering 2008-12-08 18:16:01 UTC
*** Bug 473411 has been marked as a duplicate of this bug. ***

Comment 24 sangu 2008-12-16 01:41:24 UTC
$ uname -r
2.6.28-0.129.rc8.git2.fc11.i686
$ rpm -qa | grep alsa
alsa-lib-1.0.18-7.fc10.i386
alsa-utils-1.0.18-6.fc10.i386
alsa-plugins-pulseaudio-1.0.18-2.fc10.i386
alsa-lib-devel-1.0.18-7.fc10.i386

This bug still happens.
$ pulseaudio -vvv
[skip]
I: module-alsa-sink.c: Starting playback.
D: module-alsa-sink.c: latency set to 180.00ms
D: module-alsa-sink.c: hwbuf_unused_frames=8446
D: module-alsa-sink.c: setting avail_min=36671
D: module-alsa-sink.c: Requesting rewind due to latency change.
D: module-alsa-sink.c: Requested to rewind 65536 bytes.
D: module-alsa-sink.c: Limited to 61784 bytes.
D: module-alsa-sink.c: before: 15446
D: module-alsa-sink.c: after: 15446
D: module-alsa-sink.c: Rewound 61784 bytes.
D: sink.c: Processing rewind...
D: sink-input.c: Have to rewind 61784 bytes on render memblockq.
D: protocol-native.c: Requesting rewind due to end of underrun.
D: module-alsa-sink.c: Requested to rewind 65536 bytes.
D: module-alsa-sink.c: Limited to 27280 bytes.
D: module-alsa-sink.c: before: 6820
D: module-alsa-sink.c: after: 6820
D: module-alsa-sink.c: Rewound 27280 bytes.
D: sink.c: Processing rewind...
D: sink-input.c: Have to rewind 27280 bytes on render memblockq.
I: module-alsa-sink.c: Underrun!
N: module-alsa-sink.c: Increasing wakeup watermark to 40.00 ms
D: protocol-native.c: Requesting rewind due to end of underrun.
D: module-alsa-sink.c: Requested to rewind 53728 bytes.
D: module-alsa-sink.c: Limited to 23880 bytes.
D: module-alsa-sink.c: before: 5970
D: module-alsa-sink.c: after: 5970
D: module-alsa-sink.c: Rewound 23880 bytes.
D: sink.c: Processing rewind...
D: sink-input.c: Have to rewind 23880 bytes on render memblockq.
I: module-alsa-sink.c: Underrun!
N: module-alsa-sink.c: Increasing wakeup watermark to 80.00 ms
D: protocol-native.c: Requesting rewind due to end of underrun.
D: module-alsa-sink.c: Requested to rewind 42792 bytes.
D: module-alsa-sink.c: Limited to 16784 bytes.
D: module-alsa-sink.c: before: 4196
D: module-alsa-sink.c: after: 4196
D: module-alsa-sink.c: Rewound 16784 bytes.
D: sink.c: Processing rewind...
D: sink-input.c: Have to rewind 16784 bytes on render memblockq.

Comment 25 Igor Pires Soares 2008-12-17 23:37:39 UTC
Same problem here. If I switch from PulseAudio to Alsa on GNOME sound settings the problem goes away, but sometimes system ends with no sound after a while.

$ pulseaudio -vvv
...
D: alsa-util.c: snd_pcm_dump():
D: alsa-util.c: Hardware PCM card 0 'SB Live 5.1' device 0 subdevice 0
D: alsa-util.c: Its setup is:
D: alsa-util.c:   stream       : PLAYBACK
D: alsa-util.c:   access       : MMAP_INTERLEAVED
D: alsa-util.c:   format       : S16_LE
D: alsa-util.c:   subformat    : STD
D: alsa-util.c:   channels     : 2
D: alsa-util.c:   rate         : 44100
D: alsa-util.c:   exact rate   : 44100 (44100/1)
D: alsa-util.c:   msbits       : 16
D: alsa-util.c:   buffer_size  : 16384
D: alsa-util.c:   period_size  : 16384
D: alsa-util.c:   period_time  : 371519
D: alsa-util.c:   tstamp_mode  : NONE
D: alsa-util.c:   period_step  : 1
D: alsa-util.c:   avail_min    : 62005
D: alsa-util.c:   period_event : 0
D: alsa-util.c:   start_threshold  : -1
D: alsa-util.c:   stop_threshold   : -1
D: alsa-util.c:   silence_threshold: 0
D: alsa-util.c:   silence_size : 0
D: alsa-util.c:   boundary     : 4611686018427387904
...
D: sink.c: Processing rewind...
D: sink-input.c: Have to rewind 512 bytes on render memblockq.
D: module-alsa-sink.c: Wakeup from ALSA! OUTPUT
D: module-alsa-sink.c: Wakeup from ALSA! OUTPUT
D: module-alsa-sink.c: Wakeup from ALSA! OUTPUT
D: module-alsa-sink.c: Wakeup from ALSA! OUTPUT
D: module-alsa-sink.c: Wakeup from ALSA! OUTPUT
I: module-alsa-sink.c: Underrun!
D: protocol-native.c: Requesting rewind due to end of underrun.
D: module-alsa-sink.c: Requested to rewind 32240 bytes.
D: module-alsa-sink.c: Limited to 400 bytes.
D: module-alsa-sink.c: before: 100
D: module-alsa-sink.c: after: 100
D: module-alsa-sink.c: Rewound 400 bytes.
D: sink.c: Processing rewind...
D: sink-input.c: Have to rewind 400 bytes on render memblockq.
D: module-alsa-sink.c: Wakeup from ALSA! OUTPUT
I: module-alsa-sink.c: Underrun!
D: module-alsa-sink.c: Wakeup from ALSA! OUTPUT
D: module-alsa-sink.c: Wakeup from ALSA! OUTPUT
D: module-alsa-sink.c: Wakeup from ALSA! OUTPUT
D: module-alsa-sink.c: Wakeup from ALSA! OUTPUT
D: module-alsa-sink.c: Wakeup from ALSA! OUTPUT
D: module-alsa-sink.c: Wakeup from ALSA! OUTPUT
D: module-alsa-sink.c: Wakeup from ALSA! OUTPUT
D: module-alsa-sink.c: Wakeup from ALSA! OUTPUT
D: module-alsa-sink.c: Wakeup from ALSA! OUTPUT
D: module-alsa-sink.c: Wakeup from ALSA! OUTPUT
D: module-alsa-sink.c: Wakeup from ALSA! OUTPUT
D: module-alsa-sink.c: Wakeup from ALSA! OUTPUT
D: module-alsa-sink.c: Wakeup from ALSA! OUTPUT
D: module-alsa-sink.c: Wakeup from ALSA! OUTPUT
D: module-alsa-sink.c: Wakeup from ALSA! OUTPUT
D: module-alsa-sink.c: Wakeup from ALSA! OUTPUT
D: module-alsa-sink.c: Wakeup from ALSA! OUTPUT
D: module-alsa-sink.c: Wakeup from ALSA! OUTPUT
D: module-alsa-sink.c: Wakeup from ALSA! OUTPUT
D: protocol-native.c: Requesting rewind due to end of underrun.
D: module-alsa-sink.c: Wakeup from ALSA! OUTPUT
D: module-alsa-sink.c: Requested to rewind 30936 bytes.
D: module-alsa-sink.c: Limited to 512 bytes.
D: module-alsa-sink.c: before: 128
D: module-alsa-sink.c: after: 128
D: module-alsa-sink.c: Rewound 512 bytes.
D: sink.c: Processing rewind...
D: sink-input.c: Have to rewind 512 bytes on render memblockq.
D: module-alsa-sink.c: Wakeup from ALSA! OUTPUT
D: module-alsa-sink.c: Wakeup from ALSA! OUTPUT
D: module-alsa-sink.c: Wakeup from ALSA! OUTPUT
D: module-alsa-sink.c: Wakeup from ALSA! OUTPUT
D: module-alsa-sink.c: Wakeup from ALSA! OUTPUT
...

$ uname -r
2.6.27.7-134.fc10.x86_64
$ rpm -qa | grep alsa
alsa-lib-1.0.18-6.rc3.fc10.x86_64
alsa-plugins-pulseaudio-1.0.18-1.rc3.fc10.x86_64
alsa-oss-libs-1.0.17-1.fc10.x86_64
bluez-alsa-4.19-1.fc10.x86_64
alsa-utils-1.0.18-6.fc10.x86_64
alsa-lib-1.0.18-6.rc3.fc10.i386
alsa-plugins-pulseaudio-1.0.18-1.rc3.fc10.i386
alsa-oss-1.0.17-1.fc10.x86_64

Comment 26 Scott Williams 2008-12-18 02:01:33 UTC
When I run pulseaudio -vv as a user I see the messages:

[scott@scott-desktop ~]$ pulseaudio -vvv
I: caps.c: Limited capabilities successfully to CAP_SYS_NICE.
I: caps.c: Dropping root privileges.
I: caps.c: Limited capabilities successfully to CAP_SYS_NICE.
D: main.c: Started as real root: no, suid root: yes
I: main.c: PolicyKit refuses acquire-high-priority privilege.
N: main.c: Called SUID root and real-time/high-priority scheduling was requested in the configuration. However, we lack the necessary privileges:
N: main.c: We are not in group 'pulse-rt' and PolicyKit refuse to grant us privileges. Dropping SUID again.
N: main.c: For enabling real-time scheduling please acquire the appropriate PolicyKit privileges, or become a member of 'pulse-rt', or increase the RLIMIT_NICE/RLIMIT_RTPRIO resource limits for this user.
I: main.c: setrlimit(RLIMIT_NICE, (31, 31)) failed: Operation not permitted
I: main.c: setrlimit(RLIMIT_RTPRIO, (9, 9)) failed: Operation not permitted
W: main.c: High-priority scheduling enabled in configuration but not allowed by policy.
W: core-util.c: setpriority(): Permission denied
D: main.c: Can realtime: no, can high-priority: no
I: main.c: This is PulseAudio 0.9.13

--------

If I run as root (su -c), I do not see these messages:

D: main.c: Started as real root: yes, suid root: no
I: core-util.c: Successfully gained nice level -11.
D: main.c: Can realtime: yes, can high-priority: yes

Comment 27 Andrew Clayton 2008-12-21 03:19:30 UTC
Whatever the problem is, pavuconrol certainly seems to tickle it.

I'm running F10 (with a 2.8.28-rc9 kernel) with an Audigy2, things are fine until you startup pavucontrol (note: under Fedora 8 & 9 I have no problems with it.) sound becomes choppy.

I tried disabling timer based scheduling and that was much worse, as soon as pavucontrol is started the audio got very choopy and after a few seconds the whole thing just bombed with a "connection refused message" and lots of these from pulseaudio -vv

AO: [pulse] pa_stream_write() failed: Connection terminated 0.7% 218 0          
AO: [pulse] pa_stream_get_latency() failed: Connection terminated
AO: [pulse] pa_stream_get_latency() failed: Connection terminated
AO: [pulse] pa_stream_write() failed: Connection terminated 0.7% 218 0          
AO: [pulse] pa_stream_get_latency() failed: Connection terminated
AO: [pulse] pa_stream_get_latency() failed: Connection terminated
AO: [pulse] pa_stream_write() failed: Connection terminated 0.7% 218 0          
AO: [pulse] pa_stream_get_latency() failed: Connection terminated
AO: [pulse] pa_stream_get_latency() failed: Connection terminated
AO: [pulse] pa_stream_write() failed: Connection terminated 0.7% 218 0          


As someone else eluded to, I think the volume meter is a large cause/trigger of the problems. I take it there is no simple way to disable it?

Comment 28 Andrew Clayton 2008-12-21 03:22:08 UTC
Correction, those errors where from mplayer not pavucontrol.

Comment 29 Andrew Clayton 2008-12-21 03:54:48 UTC
As another data point, things seem to behave OK with the pavucontrol from F9.

pulseaudio takes 1.7-2.0% cpu and the F9 pavucontrol is negligible. While with the F10 pavucontrol, pulseaudio goes upto 20% cpu and pavucontrol takes 10%.

Comment 30 Igor Pires Soares 2008-12-28 20:25:55 UTC
Disabling PulseAudio timer-based scheduling fixes this for me.

I followed the instructions available at:
https://fedoraproject.org/wiki/Features/GlitchFreeAudio

Comment 31 James 2008-12-29 19:47:43 UTC
(In reply to comment #30)
> Disabling PulseAudio timer-based scheduling fixes this for me.
> 
> I followed the instructions available at:
> https://fedoraproject.org/wiki/Features/GlitchFreeAudio

I tried that (snd_intel_hda, Realtek 883) and it got rid of the cracking when using pavucontrol, but eventually I run into something resembling the 100%-CPU-and-die bug 462200.

Comment 32 Dennis Jacobfeuerborn 2008-12-31 18:44:02 UTC
After adding the "tsched" parameter I get problems playing back videos through alsa. Mplayer freezes about 1 second into the video and VLC plays the video but the audio get chopped up severly.

Comment 33 John Pitney 2009-01-11 14:36:46 UTC
Created attachment 328658 [details]
possibly relevant lines from lsmod

Comment 34 John Pitney 2009-01-11 14:39:41 UTC
I have the skipping and glitching on my Fedora 10 x86_64 system.  

pulseaudio -vv outputs many lines like the following: 

I: module-alsa-source.c: Overrun!
I: module-alsa-source.c: Overrun!
D: module-alsa-sink.c: Wakeup from ALSA! OUTPUT
I: module-alsa-sink.c: Underrun!
D: module-alsa-sink.c: Wakeup from ALSA! OUTPUT
D: module-alsa-sink.c: Wakeup from ALSA! OUTPUT
D: module-alsa-sink.c: Wakeup from ALSA! OUTPUT
I: module-alsa-source.c: Overrun!
I: module-alsa-source.c: Overrun!

My lsmod and lspci output are attached.

Comment 35 John Pitney 2009-01-11 14:40:39 UTC
Created attachment 328659 [details]
possibly relevant lines from lspci

Comment 36 Peter Backes 2009-01-16 01:08:59 UTC
The recent update to alsa-plugins-pulseaudio-1.0.18-2, which contains 1.0.18 final (instead of 1.0.18rc3 from the previous alsa-plugins-pulseaudio-1.0.18-1.rc3) fixed this issue for me.

Comment 37 antonio montagnani 2009-01-17 12:39:22 UTC
I have similar problems in F11 rawhide.
alsa-plugins-1.0.18-2.fc11 installed.

Does this package include alsa-lib 18a???

Anyway sparkles are very reduced in respect to some time ago....

Running  2.6.28-3.fc11.i686 kernel

Comment 38 James 2009-01-20 10:27:32 UTC
I still get pops and clicks when using the PulseAudio volume control. Versions:

kernel-2.6.29-0.43.rc2.git1.fc11.x86_64
kernel-2.6.27.12-170.2.2.fc10.x86_64
alsa-lib-1.0.18-7.fc10.x86_64
alsa-lib-1.0.18-7.fc10.i386
alsa-plugins-pulseaudio-1.0.18-2.fc10.x86_64
alsa-plugins-pulseaudio-1.0.18-2.fc10.i386
pulseaudio-0.9.14-2.fc10.x86_64
pavucontrol-0.9.7-3.fc10.x86_64

Comment 39 antonio montagnani 2009-01-20 21:50:17 UTC
I still have some a few interruptions after installing alsa-lib, alsa-utils, alsa-lib-development 1.0.19-1.fc11.i386.
alsa-plugins-pulseaudio is still 18.

Much better situation than before.

Then I introduced the tsched=0 option in pulseaudio and now things seem fine.

Running on hda intel, and kernel 2.6.28-3.fc11.i686.
I do not know what I am missing with tsched 0 option :-)

Comment 40 antonio montagnani 2009-01-20 22:08:41 UTC
Created attachment 329515 [details]
pulseaudio -vv

After latest updates and tsched 0

Comment 41 James 2009-01-21 10:33:44 UTC
The combination

2.6.28.1-17.fc10.x86_64
alsa-lib-1.0.19-1.fc10.x86_64

shows some improvement, but I still hear glitches when using pavucontrol, and still see "module-alsa-sink.c: ALSA woke us up to write new data to the device, but there was actually nothing to write!" messages.

Comment 42 James 2009-01-21 10:54:44 UTC
Created attachment 329586 [details]
pulseaudio -vvvv log for Comment #41

I've attached the output of pulseaudio -vvvv for the config in Comment #41 (using Realtek ALC 883 hardware). Note that the overruns/underruns are more frequent when the volume control is running.

Comment 43 A.Bourinsky 2009-01-24 05:46:37 UTC
The sound get normal after
cd
mv .pulse pulse_old
mv .pulse-cookie pulse-cookie_old

Alex

Comment 44 Andreas Utterberg 2009-01-26 17:53:44 UTC
Can the update of xine-lib (https://bugzilla.redhat.com/show_bug.cgi?id=470568) also solve this issue?, the problems described with sparky sound is simular, i also got logs in syslog before the latest update:

Jan 24 08:44:18 localhost pulseaudio[3021]: module-alsa-sink.c: ALSA woke us up
to write new data to the device, but there was actually nothing to write! Most
likely this is an ALSA driver bug. Please report this issue to the PulseAudio
developers.

Just a thought...

Comment 45 Max Kanat-Alexander 2009-01-30 13:49:52 UTC
There are now detailed fix and workaround instructions for anybody experiencing this at:

  http://www.fedorafaq.org/f10/#sound-pops

Feel free to point people there if they continue to experience this problem and need a workaround.

Comment 46 James 2009-02-21 11:04:22 UTC
Since this only tends to happen when tsched is enabled, is there any chance that this might be a kernel timer bug?

Comment 47 sangu 2009-04-04 05:17:37 UTC
Fixed in pulseaudio-0.9.15-8.test7.fc11?

Music play works well (no spark).

$ uname -r
2.6.29-21.fc11.i686.PAE

Comment 48 Vlad 2009-04-05 17:20:45 UTC
Works for me too.

Comment 49 James 2009-04-07 13:38:20 UTC
Absolutely not for me. With pulseaudio-0.9.15-8.test7.fc11.x86_64, sound jumps around all over the place (worse than F10) no matter what media player is being used. This is with kernel-2.6.29.1-54.fc11.x86_64 on Intel HDA/Realtek hardware.

Comment 50 James 2009-04-07 17:26:59 UTC
Created attachment 338547 [details]
pulseaudio -vvvv output for comment #49

Comment 51 James 2009-04-07 20:10:51 UTC
Hmm... comment #49 might be dubious. If I boot nohz=off, audio runs smoothly. On my notebook, the problems might be cpuidle/timer related, cf. bug 443155.

Comment 52 Chris Shoemaker 2009-05-25 01:15:32 UTC
Based on comments 45, 47, 48, and 51, I believe this bug should no longer have status NEW.  I'd guess that CLOSED is appropriate, but can someone more familiar with triage practices here please suggest the best resolution?

Comment 53 Peter Backes 2009-06-18 21:46:46 UTC
(In reply to comment #36)
> The recent update to alsa-plugins-pulseaudio-1.0.18-2, which contains 1.0.18
> final (instead of 1.0.18rc3 from the previous
> alsa-plugins-pulseaudio-1.0.18-1.rc3) fixed this issue for me.  

That was wrong; the problem actually persisted until the most recent f10 version.

However, I now yum upgraded to f11.

The problem with the sparks seems to be gone, however, /var/log/messages still contains entries like these:

Jun 18 20:13:48 helen pulseaudio[2320]: alsa-sink.c: Increasing minimal latency to 1.00 ms
Jun 18 20:14:33 helen pulseaudio[2320]: alsa-sink.c: Increasing minimal latency to 2.00 ms
Jun 18 20:15:32 helen pulseaudio[2320]: alsa-sink.c: Increasing minimal latency to 4.00 ms
Jun 18 20:15:32 helen pulseaudio[2320]: alsa-sink.c: Increasing minimal latency to 8.00 ms
Jun 18 20:15:35 helen pulseaudio[2320]: alsa-sink.c: Increasing minimal latency to 16.00 ms
Jun 18 20:15:36 helen pulseaudio[2320]: alsa-sink.c: Increasing minimal latency to 26.00 ms
Jun 18 20:15:42 helen pulseaudio[2320]: alsa-sink.c: Increasing wakeup watermark to 15.99 ms
Jun 18 20:36:28 helen pulseaudio[2320]: alsa-sink.c: Increasing minimal latency to 36.00 ms
Jun 18 20:36:29 helen pulseaudio[2320]: alsa-sink.c: Increasing wakeup watermark to 25.99 ms
Jun 18 20:45:29 helen pulseaudio[2320]: alsa-sink.c: Increasing minimal latency to 46.00 ms
Jun 18 20:48:24 helen pulseaudio[2320]: alsa-sink.c: Increasing wakeup watermark to 35.99 ms
Jun 18 20:48:29 helen pulseaudio[2320]: alsa-sink.c: Increasing minimal latency to 56.00 ms
Jun 18 20:53:53 helen pulseaudio[2320]: alsa-sink.c: ALSA woke us up to write new data to the device, but there was actually nothing to write!
Jun 18 20:53:53 helen pulseaudio[2320]: alsa-sink.c: Most likely this is a bug in the ALSA driver 'snd_hda_intel'. Please report this issue to the ALSA developers.
Jun 18 20:53:53 helen pulseaudio[2320]: alsa-sink.c: We were woken up with POLLOUT set -- however a subsequent snd_pcm_avail() returned 0 or another value < min_avail.

Comment 54 Amadeus 2009-06-21 00:22:54 UTC
I have this problem too on 64bit Fedora 10

* Fedora 10 x64
* AMD Phenom II dual core
* Onboard Audio (ALC887 High Definition Audio 8 -Channel CODEC)

I have it on OSS, Alsa, and Pulse when I use mplayer.

Comment 55 Amadeus 2009-07-29 00:21:42 UTC
This guy have figured out how to work around this bug.

http://forums.fedoraforum.org/showthread.php?t=225660

Many have confirmed the hack to work.

Comment 56 Michael Schwendt 2009-07-31 18:20:18 UTC
This is ticket is not assigned correctly. Component is "alsa-lib", but it's assigned to "kernel" maintainers. When changing the component, make sure you ask bugzilla to reset the default assignee, too.

Comment 57 Bug Zapper 2009-11-18 07:54:36 UTC
This message is a reminder that Fedora 10 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 10.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '10'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 10's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 10 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 58 Bug Zapper 2009-12-18 06:23:18 UTC
Fedora 10 changed to end-of-life (EOL) status on 2009-12-17. Fedora 10 is 
no longer maintained, which means that it will not receive any further 
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of 
Fedora please feel free to reopen this bug against that version.

Thank you for reporting this bug and we are sorry it could not be fixed.