pulseaudio takes 100 % CPU when using 5.1 profile

Bug #466957 reported by Jiří Ježek
50
This bug affects 10 people
Affects Status Importance Assigned to Milestone
pulseaudio (Ubuntu)
Expired
Medium
Unassigned

Bug Description

Binary package hint: pulseaudio

Description: Ubuntu 9.10
Release: 9.10
pulseaudio:
  Instalovaná verze: 1:0.9.19-0ubuntu4
  Kandidát: 1:0.9.19-0ubuntu4
  Tabulka verzí:
 *** 1:0.9.19-0ubuntu4 0
        500 http://cz.archive.ubuntu.com karmic/main Packages
        100 /var/lib/dpkg/status

When I play music, watch films (mpd, mplayer, exaile) pulseaudio in 20 minutes or even in hours takes 95-100 % CPU usage. System is still responding and sound is without changes. I don't have to kill pulseaudio. Stop or pause playing sinks CPU usage to 7 - 9 %. This never happened me in Jaunty Jackalope. I'm using Creative Labs CA0106 Soundblaster.

ProblemType: Bug
Architecture: i386
Card0.Amixer.info:
 Card hw:0 'ICH7'/'Intel ICH7 with ALC850 at irq 17'
   Mixer name : 'Realtek ALC850 rev 0'
   Components : 'AC97a:414c4790'
   Controls : 42
   Simple ctrls : 27
Card1.Amixer.info:
 Card hw:1 'CA0106'/'AudigyLS [SB0310] at 0xc880 irq 16'
   Mixer name : 'CA0106'
   Components : 'AC97a:83847609'
   Controls : 35
   Simple ctrls : 19
Card2.Amixer.info:
 Card hw:2 'Camera'/'Camera at usb-0000:00:1d.0-1, full speed'
   Mixer name : 'USB Mixer'
   Components : 'USB046d:08f6'
   Controls : 3
   Simple ctrls : 2
Date: Sat Oct 31 17:05:21 2009
DistroRelease: Ubuntu 9.10
ExecutablePath: /usr/bin/pulseaudio
InstallationMedia: Ubuntu 9.10 "Karmic Koala" - Release Candidate i386 (20091020.3)
NonfreeKernelModules: nvidia
Package: pulseaudio 1:0.9.19-0ubuntu4
ProcEnviron:
 LANG=cs_CZ.UTF-8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 2.6.31-14.48-generic
SourcePackage: pulseaudio
Uname: Linux 2.6.31-14-generic i686
mtime.conffile..etc.pulse.daemon.conf: 2009-10-31T14:56:25.918574

Revision history for this message
Jiří Ježek (cmudik) wrote :
Revision history for this message
Daniel T Chen (crimsun) wrote : Re: [Bug 466957] Re: pulseaudio takes randomly 100 % CPU
Revision history for this message
Jiří Ježek (cmudik) wrote : Re: pulseaudio takes randomly 100 % CPU

Thanks for your quick reaction.

Revision history for this message
Greg White (gregw-launchpad) wrote :

Was originally filing my own bug report when launchpad showed this one. My platform is AMD64, but the OP and I appear to have the same sound card - CA0106.

[ 5.627643] CA0106 0000:01:09.0: PCI INT A -> Link[LNKB] -> GSI 19 (level, low) -> IRQ 19
[ 5.627675] snd-ca0106: Model 1002 Rev 00000000 Serial 10021102

I can and will attach another verbose pulseaudo log if it would be useful.

I have a somewhat esoteric combination of programs that triggers this pretty much instantly - playing music via Rythmbox or Amarok + playing "Titan Attacks" from Puppy Games (http://www.puppygames.net) via 32-bit Java, but it's not required, eventually anything using sound will trigger it.

Did not occur with the previous release but has occurred since at least the -RC version of 9.10 (pretty sure I triggered it in the beta as well).

Happy to provide and further debugs or information if it will help.

Revision history for this message
HXT (voegel4711) wrote :

I experience the same bug too, using Karmic AMD64 and CA0106 Soundcard (Soundblaster Audigy).

01:09.0 Multimedia audio controller: Creative Labs CA0106 Soundblaster
 Subsystem: Creative Labs Device 100a
 Flags: bus master, medium devsel, latency 32, IRQ 19
 I/O ports at 9000 [size=32]
 Capabilities: [dc] Power Management version 2
 Kernel driver in use: CA0106
 Kernel modules: snd-ca0106

CPU goes up to 100% randomly when I use the card in 5.1 - it never happens when set to Stereo Output and it is also OK if I disable the lfe-upmix. Playing music via Rythmbox ore Banshee doesn't trigger it, but if I watch a 5.1 movie in totem or DVB-T via xine-sxfe it happens in about 5 to 20mins, sometimes it takes even an hour.

When I switch to my onboard Realtek Sound it doesn't happen.
All packages are up to date. Everything was fine in Jaunty. I experience this since I updated to Karmic (3 days before oficial release).

For me it seems like this is something with the lfe-upmix option.

If I can provide you with any further information let me know.

Revision history for this message
Greg White (gregw-launchpad) wrote :

Setting:

enable-lfe-remixing = no

in daemon.conf does _not_ fix the issue for me.

Revision history for this message
Greg White (gregw-launchpad) wrote :

Forcing analog stereo output instead of 5.1 _does_ "fix" the issue - no more 100% CPU.

That's good enough for me for the moment. :)

Thanks to HXT for the decent workaround.

Hope this helps the original poster as well.

Revision history for this message
HXT (voegel4711) wrote :

I have to admit it had been a while between my tests and adding my comment here...

It wasn't the lfe-option that fixed it, it was enable-remixing = no.

Messed that one up, sry.

Daniel T Chen (crimsun)
Changed in pulseaudio (Ubuntu):
status: New → Confirmed
importance: Undecided → Medium
summary: - pulseaudio takes randomly 100 % CPU
+ pulseaudio takes 100 % CPU when using 5.1 profile
Revision history for this message
TJ (tj) wrote :

I was seeing this with Karmic (x86) and a CA0106 when trying to use more than 2 channels: 4, 5.0, 5.1, or the surround-sound system installed with this PC, 7.1, for home theatre.

After upgrading to Lucid this same issue occurs. The only workable configuration is stereo. It is incredibly frustrating, especially as the custom 7.1 ALSA configuration that was used pre-Jaunty worked fine.

Revision history for this message
Daniel T Chen (crimsun) wrote :

Does using PULSE_NO_SIMD=1 alleviate the symptom?

Revision history for this message
HXT (voegel4711) wrote :

I tried putting the line "export PULSE_NO_SIMD=1" in /etc/profile which did not help. Before that I tried putting it in /usr/bin/start-pulseaudio-x11 which also did not change anything.

I admit I am not sure if this is the correct way to use this option...

Revision history for this message
Raymond (superquad-vortex2) wrote :

>> #3 * pulseverbose.log (192.6 KiB, text/plain)

>> Thanks for your quick reaction.

I: alsa-sink.c: Starting playback.
I: (alsa-lib)pcm_hw.c: SNDRV_PCM_IOCTL_START failed
D: module-suspend-on-idle.c: Sink alsa_output.pci-0000_02_00.0.analog-surround-51 becomes busy.

Revision history for this message
HXT (voegel4711) wrote :

As I never figured out how to solve this problem, I switched to my Realtek-Onboard-Sound for a while. A few days ago I tried to use the CA0106 (SB Live!) again with 5.1 channels and noticed, that no more 100% CPU occured. Instead pulseaudio randomly crashed and sound suddenly stopped on any application.

/var/log/messages:
"stale PID file, overwriting", due to the auto-respawn-option I guess.

I deactivated that and started pulseaudio manually -vvvv:

E: alsa-sink.c: ALSA woke us up to write new data to the device, but there was actually nothing to write!
E: alsa-sink.c: Most likely this is a bug in the ALSA driver 'snd_ca0106'. Please report this issue to the ALSA developers.
E: alsa-sink.c: We were woken up with POLLOUT set -- however a subsequent snd_pcm_avail() returned 0 or another value < min_avail.
D: protocol-native.c: Underrun on 'Audio Stream', 0 bytes in queue"

Even when I tried to fix the 100% CPU thing, there were some thoughts about it being a CA0106 driver problem, and not really a pulseaudio issue. So I decided to try the upstream-version of linux-alsa-driver-modules, following this guide: https://wiki.ubuntu.com/Audio/InstallingLinuxAlsaDriverModules

That did the job. No more 100% CPU, no more sudden crashes, everything is working fine now.

Revision history for this message
HXT (voegel4711) wrote :

Ah, yeah, I forgot: I'm on Ubuntu 10.04.2, all packages up to date

Revision history for this message
Daniel T Chen (crimsun) wrote :

@Jiří Ježek Can you confirm that the latest updates in 10.04 resolve this symptom for you?

Revision history for this message
Daniel T Chen (crimsun) wrote :

@Jiří Ježek You'll also need an alsa-driver snapshot; please see https://wiki.ubuntu.com/Audio/InstallingLinuxAlsaDriverModules.

Revision history for this message
Jiří Ježek (cmudik) wrote :

One year ago I switched to Arch Linux and pure alsa without pulseaudio and never noticed something like this bug. So I can confirm, that the newest alsa drivers resolve this problem for me.

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

Thank you for reporting this bug to Ubuntu.
Ubuntu 9.10 (karmic) reached end-of-life on April 30, 2011.

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

Please upgrade to the latest 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.