Bug 97604 - [GST] Too high CPU usage in idle mode
Summary: [GST] Too high CPU usage in idle mode
Status: RESOLVED FIXED
Alias: None
Product: amarok
Classification: Applications
Component: general (show other bugs)
Version: 1.2-CVS
Platform: Debian testing Linux
: NOR normal
Target Milestone: ---
Assignee: Amarok Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-01-21 16:31 UTC by Marcel Dischinger
Modified: 2006-06-11 12:32 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marcel Dischinger 2005-01-21 16:31:49 UTC
Version:            (using KDE KDE 3.3.1)
Installed from:    Debian testing/unstable Packages
Compiler:          gcc 3.3.4 
OS:                Linux

When amaroK is started up, cpu usage in idle mode (which means minimized and not playing anything) is about 0% (according to top output). After playing a song when amarok is idle again it still consumes a remarkeable amount of CPU time (at my 1GHz system about 4%).
For being in idle mode this is far to high, it should consume the same CPU time as just after start.

I use gstreamer engine for output, amaroK is self-compiled with --without-arts option only.

GStreamer is 0.8.6

This bug is present in all 1.2beta versions so far (also CVS snapshots).
Comment 1 Mark Kretschmann 2005-02-06 08:33:34 UTC
There was a bug which made Gst-Engine eat heaps of CPU when idle, this is now fixed. But still it will consume a little CPU; this is due to the design of the crossfading pipeline. I may at some point implement some kind of auto-suspend when idle.
Comment 2 Marcel Dischinger 2005-02-07 10:58:53 UTC
OK, I tried cvs snapshot of 2005-02-07 and I see no change (or was the bug in gstreamer itself?).
BTW: The same problem is true for pausing songs (same cpu usage as in idle mode).
Comment 3 Marcel Dischinger 2005-02-08 10:27:51 UTC
BTW: This cpu usage is also true when disabling crossfading!
Comment 4 djandruczyk 2005-03-24 03:01:31 UTC
I see the issue are well, amarok 1.2.2, libvisual 0.2.0, kde 3.3.2.  An strace on the amarokapp that uses about 4% on my 1.2Ghz machine when idle after a playing a song and minimize (no visual plugins activated) shows this:

gettimeofday({1111629327, 514866}, NULL) = 0
gettimeofday({1111629327, 515746}, NULL) = 0
gettimeofday({1111629327, 515811}, NULL) = 0
gettimeofday({1111629327, 515863}, NULL) = 0
gettimeofday({1111629327, 515913}, NULL) = 0
gettimeofday({1111629327, 515963}, NULL) = 0
ioctl(3, FIONREAD, [0])                 = 0
gettimeofday({1111629327, 516092}, NULL) = 0
select(24, [3 4 5 8 10 12 21 23], [], [], {0, 31677}) = 0 (Timeout)

  -repeats indefinitely....

Comment 5 Daniel Eckl 2005-03-30 12:47:35 UTC
That's my problem, too... Strangely only on one of two similar machines.....
Comment 6 Christian Lambert 2005-04-01 01:17:14 UTC
I see this here too with gstreamer and amarok 1.2.3.

Using a gap at 0ms and no fade in/out.   I get the same strace output as reported above.   Now the question is, is this problem only affected certain systems, or even the developpers can see this on their machines too?   

If it's something that cannot be reproduced, I will start looking for something that could be different with my system configuration.

-Chris
Comment 7 Christian Lambert 2005-04-22 20:38:46 UTC
Any updates on this bug?
Comment 8 Anthony Ivanoff 2005-05-22 11:37:04 UTC
I also noticed this bug. My CPU is 1,67 GHz Sempron 2400+ and I have the same problem: when I start amaroK, it's all right, when I play something, CPU usage is 8-10% according to gkrellm, and when I pause/stop it, CPU usage is 25-45%. 

This is quite annoying :(
Any ideas how to fix this?

I'm using amaroK 1.2.4 and KDE 3.4.0.
Comment 9 Anthony Ivanoff 2005-05-22 11:57:25 UTC
Aha! Setting "Fade-out duration" from "2000 msec" to zero did the trick - it works fine now.

I'm using gstreamer, BTW.
Comment 10 Dan 2005-06-06 23:18:18 UTC
I get ~100% CPU usage by amaroK if:
1) I'm using GST engine
2) The equalizer is active
3) Playback is paused or stopped.

So I solve the problem by leaving the equalizer off.  But the music doesn't SPARKLE!  :(  Please fix...  See also bug #98544
Comment 11 Anthony Ivanoff 2005-06-07 03:45:22 UTC
Dan,

Will you please vote for this bug, because otherwise the developers are not going to pay any attention to this nasty bug. Shame on them! :)
Comment 12 Mark Kretschmann 2005-09-22 10:17:46 UTC
Fixed in amaroK 1.3.2.