Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
5-10% cpu usage when playing music?!
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Multimedia
View previous topic :: View next topic  
Author Message
kbzium
Tux's lil' helper
Tux's lil' helper


Joined: 31 Jul 2012
Posts: 146

PostPosted: Sat Apr 13, 2013 8:18 pm    Post subject: 5-10% cpu usage when playing music?! Reply with quote

Hello,

I've noticed that amarok is taking up to 10% of my i7 2600 cpu. So I've tried out Juk. It takes up to 5%. Doesn't seem normal... what's happening?
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 9677
Location: almost Mile High in the USA

PostPosted: Sun Apr 14, 2013 2:30 am    Post subject: Reply with quote

Is your UI doing a lot of stuff? Is your display setup properly and accelerated?

I don't think the numbers are a really big deal, they are also inaccurate at times for low loads.

Is it doing something incorrect with this load? Skipping? That would be a real problem...
_________________
Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
PaulBredbury
Watchman
Watchman


Joined: 14 Jul 2005
Posts: 7310

PostPosted: Sun Apr 14, 2013 5:22 am    Post subject: Re: 5-10% cpu usage when playing music?! Reply with quote

kbzium wrote:
10% of my i7 2600 cpu

The audio mixing is being done in software. I suspect that your audio is 44.1k (as usual for music), and is being outputted to your soundcard at 48k. The CPU does the upmixing, and the quality of the algorithm (normal vs best) is probably what makes the difference between 5% and 10% CPU usage.

"best" isn't needed - I've only ever noticed a difference in the resampling, with one special audio file (udial.wav) which was made only to highlight this particular difference!

More info in this thread.

Amarok might alsa be doing other audio tricks, e.g. equalizer, normalization, spatial.
_________________
Improve your font rendering and ALSA sound
Back to top
View user's profile Send private message
kbzium
Tux's lil' helper
Tux's lil' helper


Joined: 31 Jul 2012
Posts: 146

PostPosted: Sun Apr 14, 2013 6:35 am    Post subject: Reply with quote

I failed to mention that I use Audigy 2ZS sound card... and a software raid array, if it's relevant. What's wrong about its setup? It should be doing all the computations, there should be no software mixing at all I think - at least there was a driver & software on Windows which controlled it and I could hear a difference in sound but CPU load was marginal (mostly 0%). It's not a first time I'm using Gentoo and I think it was so too here... but something's wrong now.

As for GUI - my desktop is laggy, I don't know why - it happens when you start to drag window or minimize it, or close it or switch to another desktop. The thing is that after you grab that window there's no lag at all... only one sec after grabbing... as for my setup opengl is set correctly:
Code:
Available OpenGL implementations:
  [1]   nvidia *
  [2]   xorg-x11

nvidia drivers:
Code:
x11-drivers/nvidia-drivers-313.30 was built with the following:
USE="X acpi (multilib) tools -pax_kernel"

or cpu scheduler (might be it...?) it's on demand now. I'm under impression that everytime CPU is loaded with emerging something there's no lagging at all...

Oh one more thing!
My sound works, but alsaconf sees no sound card device... don't know why. It wasn't so before... maybe it's related? Though in alsamixer there's my sound card...



Thanks!
Back to top
View user's profile Send private message
PaulBredbury
Watchman
Watchman


Joined: 14 Jul 2005
Posts: 7310

PostPosted: Sun Apr 14, 2013 8:42 am    Post subject: Reply with quote

I don't know what amarok does. I suggest you set up a ~/.asoundrc which outputs straight to hardware, to make sure that dmix is not involved in ALSA's config side. E.g:
Code:
pcm.!default {
  type hw
  card 0
  device 0
}


cmus is a simpler player, for comparison.

Forget alsaconf, it's obsolete and has been removed from several distros.

For your GUI, if you're using composite, I'm guessing maybe it's the power-saving on the Nvidia card, being at a slow clockspeed initially.
Back to top
View user's profile Send private message
kbzium
Tux's lil' helper
Tux's lil' helper


Joined: 31 Jul 2012
Posts: 146

PostPosted: Sun Apr 14, 2013 9:06 am    Post subject: Reply with quote

Composite? My video card is gtx 560 ti which should be just enough even at lowest frequency which is 50MHz... And making it run at 800MHz all the time is not an option due to power consumption... it would be such a perfect system if I resolved this... I turned off powermizer for a minute and there was no improvement anyway... I would stick to gnome if its kde fault but I think gnome 3 is kind of unstable on Gentoo now
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 9677
Location: almost Mile High in the USA

PostPosted: Sun Apr 14, 2013 4:16 pm    Post subject: Reply with quote

Using pulseaudio? Seems like a good idea but badly implemented... I ended up having to set USE=-pulseaudio for many of my machines...

Why is power consumption a problem? laptop and have to always run off grid? Anyway I'd imagine most modern cards should be fairly smooth when moving windows around, if not, there's probably a setup issue. My old ATI Radeon 9250SE seems pretty quick in 2D apps... though the machine it's attached to is fairly slow (Celeron 1200)...
_________________
Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
kbzium
Tux's lil' helper
Tux's lil' helper


Joined: 31 Jul 2012
Posts: 146

PostPosted: Sun Apr 14, 2013 4:43 pm    Post subject: Reply with quote

It's not a video card issue - I've tried to set it on maximum speed but the result was the same...
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Multimedia All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum