Ubuntu – High CPU usage while playing Flash


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
  • 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?

Best Answer

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.

Related Question