Debian Bug report logs -
#613203
audacious: High CPU usage with snd_hda_intel based soundcard
Reported by: "Fabien C." <nsvoaiwvs9bmebb@jetable.org>
Date: Sun, 13 Feb 2011 14:03:05 UTC
Severity: important
Tags: upstream
Found in version audacious/2.3-2
Fixed in version audacious/2.4.3-1
Done: Bob Bib <bobbibmpn@mail.ru>
Bug is archived. No further changes may be made.
Toggle useless messages
Report forwarded
to debian-bugs-dist@lists.debian.org, Debian Audacious Packagers <pkg-audacious-maintainers@lists.alioth.debian.org>:
Bug#613203; Package audacious.
(Sun, 13 Feb 2011 14:03:08 GMT) (full text, mbox, link).
Acknowledgement sent
to "Fabien C." <nsvoaiwvs9bmebb@jetable.org>:
New Bug report received and forwarded. Copy sent to Debian Audacious Packagers <pkg-audacious-maintainers@lists.alioth.debian.org>.
(Sun, 13 Feb 2011 14:03:08 GMT) (full text, mbox, link).
Message #5 received at submit@bugs.debian.org (full text, mbox, reply):
Package: audacious
Version: 2.3-2
Severity: important
Tags: upstream
CPU Usage is too high when playing audio files. Considering old bug reports and various internet sources, it seems to occur particularly with Intel HDA (snd_hda_intel) soundcards, the model I have on this box.
On Intel Core2 CPU with "ondemand" governor (lowest freq.: 800Mhz) audacious consumes about 12 to 35-40% of CPU according to top while playing a file on a fresh Squeeze install.
This behavior is apparently not new[*], and still it is not sure wheter it comes from a broken soundcard driver, alsa, or audacious. But other players do not have such behavior...
The problem disappears if I change the ALSA Output plugin conf and manually select the PCM device as "front" (Front Speakers), but with this solution other apps are not able to play sound over audacious anymore. The soundcard is not available anymore for them.
Anyway, while browsing the web[**] I found a workaround:
Edit ~/.asoundrc and paste this resamplig stuff:
------------
pcm.!default {
type plug
slave.pcm {
type dmix
ipc_key 1024
slave {
pcm "hw:0,0"
rate 44100
}
}
}
------------
Strange enough? :)
Fabien C.
[*] Archived bugs about audacious CPU usage (mid-2009) : #533559, #532081, #588633
[**] http://boards.audacious-media-player.org/viewtopic.php?f=1&t=193
-- System Information:
Debian Release: 6.0
APT prefers squeeze-updates
APT policy: (500, 'squeeze-updates'), (500, 'stable')
Architecture: amd64 (x86_64)
Kernel: Linux 2.6.37 (SMP w/2 CPU cores)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages audacious depends on:
ii audacious-plugins 2.3+dfsg-1+b1 Base plugins for audacious
ii dbus 1.2.24-4 simple interprocess messaging syst
ii dbus-x11 1.2.24-4 simple interprocess messaging syst
ii gtk2-engines-pixbuf 2.20.1-2 Pixbuf-based theme for GTK+ 2.x
ii libatk1.0-0 1.30.0-1 The ATK accessibility toolkit
ii libaudclient2 2.3-2 audacious dbus remote control libr
ii libaudcore1 2.3-2 audacious core engine library
ii libaudid3tag2 2.3-2 audacious id3 tag manipulation lib
ii libc6 2.11.2-10 Embedded GNU C Library: Shared lib
ii libcairo2 1.8.10-6 The Cairo 2D vector graphics libra
ii libdbus-1-3 1.2.24-4 simple interprocess messaging syst
ii libdbus-glib-1-2 0.88-2.1 simple interprocess messaging syst
ii libfontconfig1 2.8.0-2.1 generic font configuration library
ii libfreetype6 2.4.2-2.1 FreeType 2 font engine, shared lib
ii libglib2.0-0 2.24.2-1 The GLib library of C routines
ii libgtk2.0-0 2.20.1-2 The GTK+ graphical user interface
ii libice6 2:1.0.6-2 X11 Inter-Client Exchange library
ii libmcs1 0.7.1-1 Abstraction library to store confi
ii libmowgli1 0.6.1-1 a high performance development fra
ii libpango1.0-0 1.28.3-1+squeeze1 Layout and rendering of internatio
ii libsm6 2:1.1.1-1 X11 Session Management library
Versions of packages audacious recommends:
ii unzip 6.0-4 De-archiver for .zip files
audacious suggests no packages.
-- no debconf information
Information forwarded
to debian-bugs-dist@lists.debian.org, Debian Audacious Packagers <pkg-audacious-maintainers@lists.alioth.debian.org>:
Bug#613203; Package audacious.
(Tue, 15 Feb 2011 15:45:03 GMT) (full text, mbox, link).
Acknowledgement sent
to John Lindgren <john.lindgren@tds.net>:
Extra info received and forwarded to list. Copy sent to Debian Audacious Packagers <pkg-audacious-maintainers@lists.alioth.debian.org>.
(Tue, 15 Feb 2011 15:45:03 GMT) (full text, mbox, link).
Message #10 received at 613203@bugs.debian.org (full text, mbox, reply):
Hi Fabien,
This is indeed a problem that has plagued Audacious on and off for
years. It is apparently a bug in ALSA's DMix resampler, though still no
one knows exactly what triggers it. Audacious 2.4.3 has a workaround
(http://hg.atheme.org/release/audacious-plugins-2.4.x/release/audacious-plugins-2.4.x/rev/974307743be7)
that should eliminate the high CPU usage.
-- John
Information forwarded
to debian-bugs-dist@lists.debian.org, Debian Audacious Packagers <pkg-audacious-maintainers@lists.alioth.debian.org>:
Bug#613203; Package audacious.
(Tue, 15 Feb 2011 18:27:14 GMT) (full text, mbox, link).
Acknowledgement sent
to "Fabien C." <nsvoaiwvs9bmebb@jetable.org>:
Extra info received and forwarded to list. Copy sent to Debian Audacious Packagers <pkg-audacious-maintainers@lists.alioth.debian.org>.
(Tue, 15 Feb 2011 18:27:14 GMT) (full text, mbox, link).
Message #15 received at 613203@bugs.debian.org (full text, mbox, reply):
Hi John,
Thanks for the info, I should probably report a bug in ALSA in this
case, given the Warning message from the workaround patch...
Fabien C.
PS: Sorry for my first message broken wrapping.
Information forwarded
to debian-bugs-dist@lists.debian.org, Debian Audacious Packagers <pkg-audacious-maintainers@lists.alioth.debian.org>:
Bug#613203; Package audacious.
(Tue, 15 Feb 2011 18:51:06 GMT) (full text, mbox, link).
Acknowledgement sent
to "Fabien C." <nsvoaiwvs9bmebb@jetable.org>:
Extra info received and forwarded to list. Copy sent to Debian Audacious Packagers <pkg-audacious-maintainers@lists.alioth.debian.org>.
(Tue, 15 Feb 2011 18:51:07 GMT) (full text, mbox, link).
Message #20 received at 613203@bugs.debian.org (full text, mbox, reply):
Here is the bugreport in the ALSA bugtracker:
https://bugtrack.alsa-project.org/alsa-bug/view.php?id=5278
Oh, and I tested with the original Debian kernel as well, and it doesn't
change anything.
Fabien C.
Information forwarded
to debian-bugs-dist@lists.debian.org, Debian Audacious Packagers <pkg-audacious-maintainers@lists.alioth.debian.org>:
Bug#613203; Package audacious.
(Tue, 22 Feb 2011 17:39:10 GMT) (full text, mbox, link).
Acknowledgement sent
to "Fabien C." <nsvoaiwvs9bmebb@jetable.org>:
Extra info received and forwarded to list. Copy sent to Debian Audacious Packagers <pkg-audacious-maintainers@lists.alioth.debian.org>.
(Tue, 22 Feb 2011 17:39:10 GMT) (full text, mbox, link).
Message #25 received at 613203@bugs.debian.org (full text, mbox, reply):
> This is indeed a problem that has plagued Audacious on and off for
> years. It is apparently a bug in ALSA's DMix resampler, though still no
> one knows exactly what triggers it. Audacious 2.4.3 has a workaround
> (http://hg.atheme.org/release/audacious-plugins-2.4.x/release/audacious-plugins-2.4.x/rev/974307743be7)
> that should eliminate the high CPU usage.
Well, once again it seems that from both sides, it's the other side's fault.
According to comments in ALSA's bugtracker
(https://bugtrack.alsa-project.org/alsa-bug/view.php?id=5278), audacious:
- does "not calculate the correct buffer size"
- does not write any data by snd_pcm_writei() or snd_pcm_commit() to the sound
card in alsa_write_audio()
Where are you xmms v1? :)
Information forwarded
to debian-bugs-dist@lists.debian.org, Debian Audacious Packagers <pkg-audacious-maintainers@lists.alioth.debian.org>:
Bug#613203; Package audacious.
(Tue, 22 Feb 2011 18:00:06 GMT) (full text, mbox, link).
Acknowledgement sent
to John Lindgren <john.lindgren@tds.net>:
Extra info received and forwarded to list. Copy sent to Debian Audacious Packagers <pkg-audacious-maintainers@lists.alioth.debian.org>.
(Tue, 22 Feb 2011 18:00:06 GMT) (full text, mbox, link).
Message #30 received at 613203@bugs.debian.org (full text, mbox, reply):
On 02/22/2011 12:34 PM, Fabien C. wrote:
> Well, once again it seems that from both sides, it's the other side's fault.
Though I claim that the root problem lies on the ALSA side, I am not so
arrogant as to refuse to fix it on the Audacious side. As I mentioned
before, I added a workaround in 2.4.3 that fixes the problem.
> According to comments in ALSA's bugtracker
> (https://bugtrack.alsa-project.org/alsa-bug/view.php?id=5278), audacious:
> - does "not calculate the correct buffer size"
My understanding, based on much reading of the ALSA docs and discussion
with the ALSA devs, it that ALSA allows applications to set whatever
buffer size they like so that both low-latency applications like games
and high-latency applications like music players can be accommodated.
By default, Audacious tries to set a buffer size of 250 ms. Often, the
driver will not allow a buffer this large, in which case Audacious will
look at the actual buffer size set by the driver and adjust for it by
enlarging the software buffer. This behavior was reached after much
trial and error and after discussion with the ALSA devs. If Raymond
believes this behavior is wrong, I would like to know why he believes that.
> - does not write any data by snd_pcm_writei() or snd_pcm_commit() to the sound
> card in alsa_write_audio()
Raymond obviously did not look very long at the code.
alsa_write_audio(), which is called from the decoding thread, writes
data to the software buffer. pump(), which runs in its own thread, then
reads data from that buffer and calls snd_pcm_writei(). Raymond's claim
that Audacious does not write any data is clearly ridiculous, because in
that case the problem would not be CPU usage but no audio being played
at all. :)
I would also like to hear why the particular commit that Raymond blames
is at fault. His claim in this case is ironic, given that that commit
in fact *fixed* another case of high CPU usage with sound drivers that
set a very small period size by default.
-- John Lindgren
Bug Marked as fixed in versions audacious/2.4.3-1.
Request was from John Lindgren <john.lindgren@tds.net>
to control@bugs.debian.org.
(Tue, 22 Feb 2011 18:03:04 GMT) (full text, mbox, link).
Information forwarded
to debian-bugs-dist@lists.debian.org, Debian Audacious Packagers <pkg-audacious-maintainers@lists.alioth.debian.org>:
Bug#613203; Package audacious.
(Thu, 24 Feb 2011 17:00:02 GMT) (full text, mbox, link).
Acknowledgement sent
to Vitalie Lazu <vitalie.lazu@gmail.com>:
Extra info received and forwarded to list. Copy sent to Debian Audacious Packagers <pkg-audacious-maintainers@lists.alioth.debian.org>.
(Thu, 24 Feb 2011 17:00:03 GMT) (full text, mbox, link).
Message #37 received at 613203@bugs.debian.org (full text, mbox, reply):
Hello,
I also observed this strange behavior today, it happens only on wav
and ape files, it is ok for mp3 format.
--
Best regards,
Vitalie
Reply sent
to Bob Bib <bobbibmpn@mail.ru>:
You have taken responsibility.
(Mon, 30 Jul 2012 21:54:09 GMT) (full text, mbox, link).
Notification sent
to "Fabien C." <nsvoaiwvs9bmebb@jetable.org>:
Bug acknowledged by developer.
(Mon, 30 Jul 2012 21:54:09 GMT) (full text, mbox, link).
Message #42 received at 613203-done@bugs.debian.org (full text, mbox, reply):
> Bug Marked as fixed in versions audacious/2.4.3-1. Request was from John Lindgren <john.lindgren@tds.net> to control@bugs.debian.org. (Tue, 22 Feb 2011 18:03:04 GMT)
Bug archived.
Request was from Debbugs Internal Request <owner@bugs.debian.org>
to internal_control@bugs.debian.org.
(Tue, 28 Aug 2012 07:25:28 GMT) (full text, mbox, link).
Send a report that this bug log contains spam.
Debian bug tracking system administrator <owner@bugs.debian.org>.
Last modified:
Sun Jul 2 00:09:24 2023;
Machine Name:
bembo
Debian Bug tracking system
Debbugs is free software and licensed under the terms of the GNU
Public License version 2. The current version can be obtained
from https://bugs.debian.org/debbugs-source/.
Copyright © 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson,
2005-2017 Don Armstrong, and many other contributors.