cpu usage jumps from 2% to 50%+ when viewing flash videos

Asked by ernie

Am not sure if this is any longer the right forum for me since I just "downgraded" from Ubuntu 9.04 to Xunbuntu 9.04 on my laptop (Intel Pentium M 1.73Ghz, 1Gig RAM).

The reason for downgrading was to hopefully stop the crashing/freezes that often occured while streaming videos. However, upon running "top" in a terminal, I noticed the big jump in cpu usage when streaming a video in youtube, that is, 50%+ compared to 2-3% otherwise.

The installed Firefox flash plug-in is Shockwave Flash 10.0 r22. Can somebody please help with this particular issue?

Thanks.

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
ernie
Solved:
Last query:
Last reply:

This question was reopened

Revision history for this message
Steven Danna (ssd7) said :
#1

Unfortunately, from what I have seen 50% CPU usage is par for the course when using flash. If you have an intel graphics card you might be able to see some performance improvements by upgrading the the most recent xorg drivers, however, I haven't really seen these drivers improve flash performance since flash itself is the resource hog.

Could you do the following:

1) Open a terminal(Applications->Accessories->Terminal)
2) Run the following command:

lspci | grep -i VGA

3) Copy and paste the output here.

Revision history for this message
ernie (ernieanglade-yahoo) said :
#2

And there it is.

laptop:~$ lspci | grep -i VGA
00:02.0 VGA compatible controller: Intel Corporation Mobile 915GM/GMS/910GML Express Graphics Controller (rev 03)
laptop:~$

Revision history for this message
Steven Danna (ssd7) said :
#3

As I said in my original email, 50% CPU usage when watching flash
videos. If you are interested in trying the latest xorg drivers you can
follow the following directions. There have been a number of
improvements related to Intel video cards since the Jaunty release so
these may be helpful regardless:

To get the latest driver, it is necessary to add the PPA containing
those drivers. Follow these directions to do that.

1) Open a terminal (Applications->Accessories->Terminal)
2) Enter the following command:

gksudo gedit /etc/apt/sources.list

3) Add the following two lines to the bottom of the file:

deb http://ppa.launchpad.net/ubuntu-x-swat/x-updates/ubuntu jaunty main
deb-src http://ppa.launchpad.net/ubuntu-x-swat/x-updates/ubuntu jaunty
main

4) Save and close the file.
5) Enter the following command at the command prompt:

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys
3B22AB97AF1CDFA9

6) Enter the following commands at the command prompt(each on their own
line):

sudo apt-get update
sudo apt-get upgrade

7) This should update the various components of xorg that need to be
updated.
8) Restart your computer.

Revision history for this message
Steven Danna (ssd7) said :
#4

The formatting of the last message went awry the lines you want to add to /etc/apt/sources.list are:

deb http://ppa.launchpad.net/ubuntu-x-swat/x-updates/ubuntu jaunty main
deb-src http://ppa.launchpad.net/ubuntu-x-swat/x-updates/ubuntu jaunty main

Revision history for this message
Andre Mangan (kyphi) said :
#5

Xubuntu is still Ubuntu and I disagree that your move is a "downgrade". Xubuntu is just a bit leaner and requires fewer resources to function. For many it is the operating system of choice.

On systems without separate cards for audio and graphics, resources are shared by audio, video and running programs. So your CPU has to work a bit harder.

It won't break but might get a bit warm especially if you also have Compiz enabled.

Revision history for this message
pablitofuerte (pablitofuerte) said :
#6

As Steven Danna said this is a bug related with intel graphics drivers. Upgrading your xorg drivers will fix the issue.
To get the latest driver, it is necessary to add the PPA containing
those drivers. Follow these directions to do that.

1) Open a terminal (Applications->Accessories->Terminal)
2) Enter the following command:

gksudo gedit /etc/apt/sources.list

3) Add the following two lines to the bottom of the file:

deb http://ppa.launchpad.net/ubuntu-x-swat/x-updates/ubuntu jaunty main
deb-src http://ppa.launchpad.net/ubuntu-x-swat/x-updates/ubuntu jaunty main

4) Save and close the file.
5) Enter the following command at the command prompt:

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys
3B22AB97AF1CDFA9

6) Enter the following commands at the command prompt (each on their own
line):

sudo apt-get update
sudo apt-get upgrade

7) This will update your xserver-xorg-video-intel 2:2.6.3 to xserver-xorg-video-intel 2:2.7.1

8) Theres one step left:

sudo gedit /etc/X11/xorg.conf

You have to locate the "Device" section and activate "uxa" (Option "AccelMethod" "uxa")

Section "Device"
 Identifier "Configured Video Device"
 Option "AccelMethod" "uxa"
EndSection

9) Reboot (or kill X)

Revision history for this message
ernie (ernieanglade-yahoo) said :
#7

Andre, I apologize for using the term "downgrade" -- I put it in quotes because I wasn't sure if that was the correct term in this instance. And just like you said, I find Xubuntu to be esentially the same as Ubuntu -- and I am very happy about that.

Steven & Pablitofuerte, I thank you for the info on fixing the intel graphics drivers. As soon as I get home I will run the commands. Will of course let you know if I have any difficulties doing so.

Revision history for this message
ernie (ernieanglade-yahoo) said :
#8

After executing all the instructions that Pablitofuerte have provided above, I ran the following command, and obtained the same results as before (shown in my 2nd post above). This is after rebooting and all.

Thus, I am not sure if any changes took effect as far as updating from xserver-xorg-video-intel 2:2.6.3 to xserver-xorg-video-intel 2:2.7.1.

laptop:~$ lspci | grep -i VGA
00:02.0 VGA compatible controller: Intel Corporation Mobile 915GM/GMS/910GML Express Graphics Controller (rev 03)
laptop:~$

Would the fact that I am running Xubuntu mean that I should be doing something different to do the update? (Please forgive my ignorance.) Thanks.

Revision history for this message
pablitofuerte (pablitofuerte) said :
#9

Copy & Paste:
dpkg -l xserver-xorg-video-intel|grep ^ii|awk {'print $2" "$3'}

Revision history for this message
pablitofuerte (pablitofuerte) said :
#10

Sorry for the tweet.
Open a terminal, and the Copy & Paste the next line:

dpkg -l xserver-xorg-video-intel|grep ^ii|awk {'print $2" "$3'}

the Enter. It will show you something like .....
xserver-xorg-video-intel 2:2.6.3-0ubuntu9

then it's done. Have you try to see fullscreen flash videos already?

Revision history for this message
pablitofuerte (pablitofuerte) said :
#11

Oh, sorry again (maybe I should go to sleep)

Obviously if you have updated the driver, you should see this instead:

xserver-xorg-video-intel 2:2.7.1-0ubuntu1~xup~1

Sorry

Revision history for this message
ernie (ernieanglade-yahoo) said :
#12

Yes sir, indeed -- see below.

laptop:~$ dpkg -l xserver-xorg-video-intel|grep ^ii|awk {'print $2" "$3'}
xserver-xorg-video-intel 2:2.7.1-0ubuntu1~xup~1
laptop:~$

And yes, much better result with full screen video on youtube.

Am still running a little warm though -- but I think I will live :-) Thanks again.