Bug 466314

Summary: Audigy2: Pulseaudio underruns
Product: [Fedora] Fedora Reporter: David Andersson <david>
Component: pulseaudioAssignee: Lennart Poettering <lpoetter>
Status: CLOSED WONTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: 10CC: daniel, farrellj, knutjbj, lkundrak, lpoetter, madko, marc_bouffard, marko.macek, mclasen, mgregg, n.coghill, rookcifer, steven.cote, supersonicandtails, vchelban
Target Milestone: ---Keywords: Reopened, Triaged
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-12-18 01:32:30 EST Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Bug Depends On:    
Bug Blocks: 438944, 465130    
Attachments:
Description Flags
Pulseaudio log
none
Ouput from opreport -l /usr/bin/pulseaudio
none
Output from opreport -l /usr/bin/pulseaudio none

Description David Andersson 2008-10-09 13:52:13 EDT
Description of problem:
Every 10 seconds or so pulseaudio gets an underrun (see attached pulseaudio -vvvvvv log) with an audible gap in the sound as a result.
There are also (before the underruns begins) lot of rewind events, though I can't tell if their are abnormal or not (My spider sense say they are).

Version-Release number of selected component (if applicable):
pulseaudio-0.9.13-1.fc10.i386

How reproducible:
Always

Steps to Reproduce:
1. Play music/movie
2. Try to enjoy the music/movie
3. Get underruns and audible silent gaps every 10-15 seconds
  
Actual results:
Obvious

Expected results:
Obvious

Additional info:
The stress of the system at these times are 5-10% cpu-wise and near 0 IO-wise

$less /proc/asound/cards 0 [I82801DBICH4   ]: ICH4 - Intel 82801DB-ICH4
                      Intel 82801DB-ICH4 with AD1980 at irq 17
 1 [Bt878          ]: Bt87x - Brooktree Bt878
                      Brooktree Bt878 at 0xc6800000, irq 18
 2 [Audigy2        ]: Audigy2 - Audigy 2 Platinum [SB0240P]
                      Audigy 2 Platinum [SB0240P] (rev.4, serial:0x10021102) at 
0x9400, irq 22

I'm also plagued (as seen in the log file) by what could be bug https://bugzilla.redhat.com/show_bug.cgi?id=464816 , every 45 minutes or so.
Comment 1 David Andersson 2008-10-09 13:58:47 EDT
Created attachment 319887 [details]
Pulseaudio log
Comment 2 John Poelstra 2008-10-09 18:13:22 EDT
This bug has been triaged
Comment 3 Lennart Poettering 2008-10-19 16:43:22 EDT
Hmm, the Audigy2 driver has some issues...

Could you please do some profiling for me as described here: 

http://pulseaudio.org/wiki/HowToUseOProfile

This will help me figuring out where exactly PA starts to spin.
Comment 4 David Andersson 2008-10-19 19:16:49 EDT
opreport  -l /usr/bin/pulseaudio just gives me
warning: [vdso] (tgid:2774 range:0x110000-0x111000) could not be found.
warning: [vdso] (tgid:3917 range:0x110000-0x111000) could not be found.
warning: [vdso] (tgid:4351 range:0x110000-0x111000) could not be found.
warning: [vdso] (tgid:4636 range:0x110000-0x111000) could not be found.
warning: [vdso] (tgid:4768 range:0x110000-0x111000) could not be found.
CPU: P4 / Xeon, speed 2004.53 MHz (estimated)
Counted GLOBAL_POWER_EVENTS events (time during which processor is not stopped) with a unit mask of 0x01 (mandatory) count 100000
bfd_get_section_contents:get_debug:: Bad value

This is after profiling pulseaudio for 45 minutes (at which point it quits with the cpu limit-thingie)

Clearly I'm not getting the symbolinfo, but I am not familiar enough with oprofile to figure out what's wrong.
Comment 5 David Andersson 2008-10-19 20:07:50 EDT
After a opcontrol --reset I got
warning: [vdso] (tgid:3174 range:0x110000-0x111000) could not be found.
CPU: P4 / Xeon, speed 2004.53 MHz (estimated)
Counted GLOBAL_POWER_EVENTS events (time during which processor is not stopped) with a unit mask of 0x01 (mandatory) count 100000
samples  %        image name               symbol name
5514     100.000  [vdso] (tgid:3174 range:0x110000-0x111000) [vdso] (tgid:3174 range:0x110000-0x111000)
Comment 6 Lennart Poettering 2008-10-20 07:26:56 EDT
Have you installed the debuginfo packages of PA?
Comment 7 David Andersson 2008-10-20 12:13:37 EDT
Well the only relevant package I could find was pulseaudio-debuginfo, are there more?
$rpm -q pulseaudio
pulseaudio-0.9.13-2.fc10.i386
Comment 8 Matthias Clasen 2008-10-20 12:54:21 EDT
bfd_get_section_contents:get_debug:: Bad value

points at oprofile and/or libbdf being busted. 
I've filed a bug against oprofile.
Comment 9 Lennart Poettering 2008-10-22 14:05:40 EDT
Matthias: do you happen to have the bug id of that bug handy?
Comment 10 David Andersson 2008-10-22 14:23:43 EDT
https://bugzilla.redhat.com/show_bug.cgi
Comment 11 David Andersson 2008-10-22 14:24:52 EDT
https://bugzilla.redhat.com/show_bug.cgi?id=467651
Comment 12 Lennart Poettering 2008-10-24 16:39:22 EDT
Please retry with 0.9.3-4!
Comment 13 Lennart Poettering 2008-10-24 17:04:15 EDT

*** This bug has been marked as a duplicate of bug 462200 ***
Comment 14 David Andersson 2008-11-07 12:33:40 EST
Sorry about not answering sooner, been away from the computer that was affected by this.
I don't agree with this being a duplicate, that bug #462200 is about pulseaudio quitting after a high cpu load (which I don't experience anymore). This is about underruns every 5 to 10 seconds on an audigy 2 with little (5-10% cpu load) tax on the system. 
I finally got an oprofile log after downgrading to oprofile 9.3
the attached file is the output of opreport -l /usr/bin/pulseaudio after playing 1 minute of music on xmms with the pulseaudio output; Yell if you want the annotated sources.
Comment 15 David Andersson 2008-11-07 12:36:18 EST
Created attachment 322872 [details]
Ouput from opreport -l /usr/bin/pulseaudio

Ouput from opreport -l /usr/bin/pulseaudio after playing 1 minute of music via xmms with pulseaudio output
Comment 16 David Andersson 2008-11-09 14:16:37 EST
Created attachment 323020 [details]
Output from opreport -l /usr/bin/pulseaudio

The first one was missing symbols, this one does not.
Comment 17 Rex Dieter 2008-11-17 10:46:02 EST
*** Bug 471892 has been marked as a duplicate of this bug. ***
Comment 18 Bug Zapper 2008-11-25 22:42:54 EST
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 19 N Coghill 2008-11-28 01:25:35 EST
This also happens with an Audigy 1

# lspci|grep audio ; rpm -q kernel
02:03.0 Multimedia audio controller: Creative Labs SB Audigy (rev 03)
kernel-2.6.27.5-117.fc10.i686
Comment 20 marc_bouffard 2009-01-15 11:29:18 EST
Confirmed using mplayer.  Fedora Core 10, audigy 2...get sound underruns.  Very annoying.
Comment 21 Marko Macek 2009-01-16 12:40:36 EST
Fedora 10 (upgraded from 9), Audigy: 

mplayer stops randomly (10-30 seconds). No problems with mplayer -ao oss.
Comment 22 Lennart Poettering 2009-02-24 22:16:23 EST
*** Bug 479775 has been marked as a duplicate of this bug. ***
Comment 23 Lennart Poettering 2009-04-04 20:33:18 EDT
*** Bug 494141 has been marked as a duplicate of this bug. ***
Comment 24 Daniel 2009-04-05 05:22:26 EDT
What has changed? In F11 Beta I don't have any sound at all (sblive) and I don't even get a reasonable result as with "gnome-sound-properties" under F10. Until F9 there where never any sound problems & it seems to get only worse. Sorry for the comment, but this is very disappointing.
Comment 25 Knut J BJuland 2009-04-22 16:06:11 EDT
I too is also affect by this bug. I have Audigy2.
Comment 26 Daniel 2009-04-30 15:44:17 EDT
Have brought a new soundcard, Asus Xonar DX PCIe 7.1 Audio, and all problems (described also for Bug 479775) disappeared. Thus, it seems to me, that all trouble is a emu10k1 driver/kernel problem and not related to pulseaudio at all.

Moreover, both of my "old" Creative soundcards (Soundblaster Live! and Audigy) produce under F11 Preview lots of entries in /var/log/messages of type

bl4ckh0l3 kernel: ALSA sound/core/pcm_lib.c:166: BUG: stream = 0, pos = 0x2000, buffer size = 0x2000, period size = 0x2000

everytime I start a sound related application, whereas the Asus card runs smoothly in both F10 and F11 Preview; no "jumping" no underruns etc..

The buggy behaviour of the Soundblaster Live! and Audigy cards I have tested in different machines - i386 and x86_64 (everywhere the same sad story). The bug-free Asus card I've tested only in a x86_64 machine.

Asus
03:04.0 Multimedia audio controller: C-Media Electronics Inc CMI8788 [Oxygen HD Audio]

Soundblaster Live!
03:02.0 Multimedia audio controller: Creative Labs SB Live! EMU10k1 (rev 04)

Audigy
01:0a.0 Multimedia audio controller: Creative Labs CA0106 Soundblaster
        Subsystem: Creative Labs SB0570 [SB Audigy SE]
Comment 27 rookcifer 2009-06-10 00:52:01 EDT
(In reply to comment #24)
> What has changed? In F11 Beta I don't have any sound at all (sblive) and I
> don't even get a reasonable result as with "gnome-sound-properties" under F10.
> Until F9 there where never any sound problems & it seems to get only worse.
> Sorry for the comment, but this is very disappointing.  

I also have an emu10k1 card, and am getting similar problems (kernel oops in my case).  See the bug here:  https://bugzilla.redhat.com/show_bug.cgi?id=502698
Comment 28 Peter Fernandes 2009-06-10 12:31:59 EDT
I'm pretty sure its a problem with the proprietary audio driver in the kernel, unfortunately.  You can thank Soundblaster for not providing free drivers (I have the same problem with an Audigy 4).  Although my sound is still somewhat messed up, I did get it to play without skipping by reinstalling PA (though this was a while ago, I may have done something else as well).  The only thing is, PA will crash sometimes if more than one source is playing, and when I open pavucontrol, the sound slows down immensely until the application is closed.
Comment 29 David Andersson 2009-11-05 16:56:27 EST
I no longer experience any of these symptoms on an up-to-date  f12 beta system.
Comment 30 Edouard Bourguignon 2009-11-11 03:32:15 EST
Hi David, How did you get your audigy2 working on f12 beta? mine has all its volume up and unmuted but no sound is coming out :( was it working out of the box?
Comment 31 David Andersson 2009-11-11 07:16:18 EST
(In reply to comment #30)
> Hi David, How did you get your audigy2 working on f12 beta? mine has all its
> volume up and unmuted but no sound is coming out :( was it working out of the
> box?  

Well this system has followed rawhide since the FC2 days, so it probably carries a few changes to its configuration. But your problem sounds like the switch for digital out is on, you use analog speakers right? (The card outputs analog or digital but not at the same time)
You should probably be able to (i haven't got my hands on an audigy2 card or an f12 box right now) change the output via pulseaudio profiles, which is the last tab in sound preferences and choose analog speakers. If this doesn't work please file a bug about it against pulseaudio, cause i really think you should be able to set this up within pulseaudio now.
If that don't work try changing the digital switch with alsamixer, it should be named something like "Audigy Analog/Digital Output Jack". (alsamixer -c 0 in a terminal gets you the raw alsa device). If this works please file a bug against alsa cause analog should really be the default, i now tons of people who have been bitten by this.
Comment 32 Edouard Bourguignon 2009-11-11 08:40:31 EST
Thank you David, I was able to get sound just by selecting Digital stereo output profile. It's weird because I only have analog speakers... Analog stereo output doesn't work. But I may have misunderstood something. The most important thing is that everything is working great now. Thanks
Comment 33 Bug Zapper 2009-11-18 03:32:47 EST
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 34 Bug Zapper 2009-12-18 01:32:30 EST
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.