Version: 2.0-r1 (using Devel) OS: Linux Installed from: Compiled sources When not playing music, Amarok uses about 2% CPU and X also uses about 2% CPU. When playing music, Amarok jumps up to around 8% (fluctuates) and X jumps up to 33% (around that). The jump for Amarok to 8% (mpd only uses 3%) is probably due to Amarok's bulk, but why is it causing X to leap up? CPU: AMD Turion X2 dual-core GPU: NVIDIA GeForce 9100M G KDE: 4.1.87 Notice I am using NVIDIA, so this could be an NVIDIA issue. However, I would be good to look into this.
Can confirm this and it is definetely caused by the ProgressSlider in Amarok which is updating too fast it seems. Workaround for me: Add m_slider->hide(); in ProgressSlider.cpp. Solves high CPU usage. GPU: NVIDIA GeForce 8600M GT KDE: 4.2.60
Ok, I'm currently hacking on this class anyway, so I'll have a look at this problem.
Just tested: My X-server uses about 4% CPU while Amarok is visible. This doesn't sound excessive to me... * NVIDIA 7300 GPU with proprietary driver * AMD Athlon 64 X2 5000 * Amarok SVN, KDE 4.1.3 So the issue could well be something else. E.g. your graphics driver. @Kevin: The update interval is currently 100ms. That's definitely not too much. Any less would make the animation very jerky.
Note, I have got Amarok installed from the kde-testing overlay (keyworded ~amd64) from Gentoo Portage. When Amarok is just visible, it takes up around 5-6 or so %, however when it starts playing music, then X jumps up.
Ah, I forgot to mention: 4% was while playing.
After commenting out a lot of code and replacing Amarok::TimeSlider with a normal QSlider I found that the bottleneck is the QSlider::setValue() function. The X cpu usage gets down if you use a very small progress bar aswell. Please report upstream, seems to be a serious issue in Qt itself.
The Qt people (well #qt) have suggested that Amarok should provide a work around, or perhaps it might be caused by the intervals at which QSlider::SetValue() is called, perhaps it should be less. Might I recommend that Amarok find a workaround for this issue?
Moult, the QSlider is updated every ~100ms (=> ~10 FPS), thats not much. The slider would get very skippy if you slow that down even more. Markey said that already. I dont know how to fix it, to be true.
Why don't you use valgrind to profile Amarok and see what is actually eating the cpu rather then guessing?
I remember this bug being fixed some time ago, and I can no longer reproduce the problem here.
Sorry, I was looking at Amarok's cpu usage, not X's.
Even so, my X CPU usage is at something like 2% while Amarok is playing and visible, with SVN trunk. So I would say, either this "bug" has been fixed, or rather people's graphics drivers are to blame. Especially on Linux problems with those are not uncommon, are they? :) I don't think it makes sense to keep this report open, as I don't think Amarok is causing the issue.
Okay, I'm on the release version - so may be something changed in SVN. But: I'm on a 5 year old laptop. It runs just fine and things work basically smooth, but not so with amarok - When playing music, amarok minimized: 5% amarok, 5% X - When amarok is maximized: 10% amarok, 12% X (wtf??) - when I run powertop, amarok causes ~150 wakeups even when not playing music at all!! This bug is not fixed. Please reopen. I know, the maximized case could be an xorg thing - 12% is a lot. But 10% inside amarok is also way too much
@Benjamin: Are you using KDE 4.2? Older versions have a bug in Phonon that's causing the high number of wakeups.
Yes, I'm on kde-4.2
reopening based on previous comments
Not so fast. This is a very diffuse report, talking about two different things: 1) High CPU usage of X server (not reproducible by me). 2) High number of wakeups shown in PowerTOP. I could in fact reproduce this issue (with KDE 4.2.2, Phonon-xine, Amarok trunk), but only after starting to play one track, then stopping it. This may still be a Phonon issue; further testing (especially with different backends) is required. For my taste this report is too fuzzy to be of use at this point - of the sort that stays open forever without ever reaching a real conclusion. So please let's try to look at each issue separately. Benjamin could start by using a different Phonon backend, and then comparing wakeups in PowerTOP.
(In reply to comment #17) > Not so fast. This is a very diffuse report, talking about two different things: > > 1) High CPU usage of X server (not reproducible by me). I'm seeing about 10%. If you take a modern machine, this is likely to drop to about 1% so may be that's why you're not seing this? > > 2) High number of wakeups shown in PowerTOP. I could in fact reproduce this > issue (with KDE 4.2.2, Phonon-xine, Amarok trunk), but only after starting to > play one track, then stopping it. This may still be a Phonon issue; further > testing (especially with different backends) is required. > > For my taste this report is too fuzzy to be of use at this point - of the sort > that stays open forever without ever reaching a real conclusion. > > So please let's try to look at each issue separately. Benjamin could start by > using a different Phonon backend, and then comparing wakeups in PowerTOP. I'll do so asap. I only have the xine backend installed. I'm right now finishing my master thesis so it might take a few days until I get back
Closing the report for lack of feedback and lack of reproducibility. I've just tested this again with the latest Amarok SVN code and KDE 4.2.2 on Kubuntu 8.10, and X was at about 1% CPU, while Amarok was visible and playing. So this is probably not an Amarok issue, but rather a problem somewhere else in the graphics stack.
When Amarok is playing, the X.org CPU usage jumps up to over 70%. If I stop or pause the music, it immediately drops to the normal level (below 10%). This is with Amarok 2.2.1-2 on Debian amd64, Qt 4:4.6.0~rc1-1. The system is a Thinkpad T61, Intel Core 2 Duo, Intel graphics.
Marcus, I can't reproduce this at all, using Amarok 2.2-git o today, KDE 4.3.3, Kubuntu 9.10, on a Lenovo Thinkpad W500, ATI graphic card. There must be something wrong with your graphic installation, not an Amarok problem.
Being the original bug reporter I would like to say that I also, for quite some time have no longer been experiencing this bug. KDE 4.3.3, amd64, Gentoo. (Now using nvidia-drivers 190.42-r3)
Experiencing this again in KDE 4.3.80, Amarok 2.2.1-r2, Gentoo, nvidia-drivers 195.22. Amarok, visible or not, when playing is ~10%-13% CPU. X itself seems to be behaving and is at it's usual CPU %. Using Xine backend.
Again, no way to reproduce this with my settings and a current Amarok 2.2-git, build of this morning. Please, don't reopen bugs that are clearly due to something else than Amarok, since none of the devs can reproduce it. Check your graphics settings, X settings, whatever. Amarok uses 0% CPU when idle here and 1-6% of one core when playing, same machine as in comment #21, KDE 4.3.4