Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

When I play video on YouTube CPU usage rises to 100% in both Firefox and Chrome.

What I'm running:

  • Processor Intel Core2Duo E4500 2 x 2.2GHz
  • Ubuntu 12.04 amd64 with latest updates
  • Flash Plugin adobe-flashplugin 11.2.202.233-0precise1
  • Firefox 12.0+build1-0ubuntu0.12.04.1
  • Google Chrome 18.0.1025.162

top output

Is this normal? And what can I do with this?

share|improve this question
2  
Unfortunately this may be normal given the fact that Flash uses CPU for video decoding. Please take a look what is the resolution of the video you are watching – if it's 1080p, the CPU workload makes sense. Also, could you add the type of graphics card you are using and with what driver (e.g. output of sudo lshw -C display)? –  jnv May 4 '12 at 13:09
    
@jnv Graphics card NVIDIA GeForce 8600 GT, drivers - NVIDIA 295.40. Resolution of the video doesn't metter... –  Sociologist May 10 '12 at 19:56
1  
I have similar hardware, and this is pretty typical for me. I run in the 85%-95% range for Hulu videos, etc. That said, flash has been much more reliable with 12.04 than 11.10. –  Chris May 10 '12 at 21:12
    
As an aside, if you have more than one core in your processor, i.e. a dual core processor, 100% only means a single CPU core is at full usage, if you have two cores, then it would say 200% for them all being filled, 400% if you had four cores at max, etc. –  Thomas W. Jun 28 '12 at 21:31
add comment

3 Answers 3

I am just guessing here since Flash Player is a buggy binary blob – but high CPU load could mean that Flash Player is not using hardware acceleration. So, go to any YouTube video, open it in fullscreen (this is important due to weird bug in Flash Player in case you're using Unity 3D / Compiz), right click on video, select Settings… and make sure that Enable hardware acceleration is checked.

You could also try to delete Flash player's settings, you may however lose some "important" data like checkpoints in Flash games (data exclusively stored by Flash Player). Quit browser and delete/move away ~/.macromedia/Flash_Player directory with Nautilus or using this command:

rm -r ~/.macromedia/Flash_Player

Also take a look if you have libvdpau1 package installed, this allows video players to use hardware video decoding. Flash Player uses this to some extent too, but it's buggy (under some conditions, videos on YouTube may have swapped blue and red colour channels). See this answer for more details.

share|improve this answer
add comment

reduce buffer manually to 10 mb and you are good to go. (its a setting in Advanced - Network - buffer settings) Restart Firefox and use 'top' to view reduced cpu use. Mine went from 60 to 6% and process ' plugin container (flash) went from 45-50% to 30%

I use Ubuntu 12.04, 64 bit on dual core 2.4 GHZ and 3GB ram

Happy browsin'

share|improve this answer
1  
Is this an Adobe Flash setting or a Firefox setting? Are you talking about enabling the Firefox cache limit mechanism? –  John S Gruber Jul 3 '12 at 5:44
    
Thank you very much. It is the cache size instead of "buffer" size by the way. My CPU fan instantly quieted down after I followed your tip. –  kakyoism Jun 22 '13 at 2:03
    
How to do that (cache or buffer)? –  shgnInc Dec 11 '13 at 6:55
add comment

See this article at Ubuntugeek for more information on the CPU indicator/control applet; you can set your CPU at different frequencies if it is supported.

share|improve this answer
    
On some CPU's this may bring your CPU speed past the specs, @Sociologist you have to accept the risks of using such software possibly causing CPU failure. I don't see this use as being wrong, but it has inherent risks. –  hexafraction Apr 30 '12 at 20:50
1  
@czifro Thank you for your response! I just installed and tested indicator-cpufreq. But nothing has changed. CPU load is 100% with max and min frequency. –  Sociologist Apr 30 '12 at 21:07
    
actually it works great. I have dual core 2 ghz processor and it will only go as high as 2 and as low as .8 which is idle. also there four different settings like on demand performance conserv and power save –  czifro Apr 30 '12 at 21:09
1  
@Robert Arkenin Thank you for your warning! –  Sociologist Apr 30 '12 at 21:16
    
have you tried uninstalling then re-install the programs? Maybe that would work. –  czifro Apr 30 '12 at 22:12
add comment

protected by Community Jan 2 '13 at 23:12

Thank you for your interest in this question. Because it has attracted low-quality answers, posting an answer now requires 10 reputation on this site.

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.