Scaling with p4-clockmod causes poor performance (even on laptops)

Bug #13597 reported by JGJones
6
Affects Status Importance Assigned to Milestone
powernowd (Ubuntu)
Fix Released
Medium
Thom May

Bug Description

PC - Intel P3 800MHz with 256Mb and Nvidia GeForce FX5200 (128Mb)

I had Warty with XFree86 - nvidia driver (version 6111 I believe, the latest you
can get in Warty) was installed from apt-get successful, OpenGL applications
worked fine.

Move a window in xGnome however take up to 70% CPU resources and the
XFree86.conf file was edited for "nv" to "nvidia" plus commenting out few lines
- as above, 3D was fine.

As a result Gnome isn't fun to use, you can see windows being redrawn etc (I
have 2nd PC with Windows XP) and I wanted to use Ubuntu as my work machine, but
I keep going back to Windows since it does have a much more snappy feel to the GUI!

Later I updated my Ubuntu system to the Hoary (change Warty to Hoary in
resposity in Synaptic Package Manager) and updated everything using Smart
update. and rebooted.

Then I installed xorg and uninstalled XFree86 and rebooted - I am now running
Ubuntu Hoary with xorg and the Nvidia driver is running fine without needing to
config the xorg.conf file.

OpenGL applications are still running fine without any hitch...but...

Move a window in Gnome still suck up 70% CPU and so it slows down the whole
system to the point that it's just silly.

This problem of xorg/xfree taking up large amount of CPU is ruining what is a
otherwise fantastic Linux distro and from reading the thread in Ubuntu Forums it
seem I'm not isolated. I have included the URL -
http://ubuntuforums.org/showthread.php?t=18197&page=1&pp=10 where someone have
mentioned that they installed KDE and it was smooth so it seem to affect Gnome
but I cannot confirm if that's true for others (I have no desire to install KDE
on my system!)

http://ubuntuforums.org/showthread.php?t=18197&page=1&pp=10: http://ubuntuforums.org/showthread.php?t=18197&page=1&pp=10

Revision history for this message
Daniel Stone (daniels) wrote :

Try Option "RenderAccel" in your xorg.conf -- you also probably need to
blacklist the agpgart module and enable NvAGP. If this works, please let me
know, because I believe this is a configuration issue.

Revision history for this message
JGJones (jgjones) wrote :

Try Option "RenderAccel" in your xorg.conf - Done

blacklist the agpgart module and enable NvAGP. - Added the line Option "NvAGP"
"1" to the xorg.conf file as well

I don't know how to disabled the agpgart module directly, but the above options
does not work sadly. Once I find out how to blacklist the agpgart module I'll
try again and report back.(In reply to comment #1)

Revision history for this message
JGJones (jgjones) wrote :

Section "Device"
 Identifier "NVIDIA Corporation NV34 [GeForce FX 5200]"
 Driver "nvidia"
 BusID "PCI:1:0:0"
 VideoRam 131072
        Option "NoLogo" "yes"
 Option "RenderAccel" "true"
 Option "NvAGP" "1"

agpgart is in /etc/hotplug/blacklist (there is a text file, so I entered agpgart
into that as a single line at end of file) however as for the folder -
/blacklist.d - I wasn't sure so I created a text file in there and a single line
- agpgart.

According to dmesg (another command found in the forums) I previously had nvagp
not loaded due to agpgart already loaded. After blacklisting I believe it isn't
loaded anymore as my dmesg now give me one line which I think is the correct one:

NVRM: loading NVIDIA Linux x86 NVIDIA Kernel Module 1.0-6629 Wed Nov 3 13:12:
51 PST 2004

Before that NVRM was not loaded due to AGPGART and after blacklisting it is now
loaded.

And I'm afraid it still doesn't solve the CPU usage in X windows (Firefox is now
painfully slow in redrawing websites etc...for example just to scroll up down
this mainly text page - it is taking up 25% CPU?! It should be taking almost
none really)

Any other suggestions for me to try out?

Cheers

Revision history for this message
Daniel Stone (daniels) wrote :

sudo invoke-rc.d powernowd stop, or upgrade to a recent Hoary system.

Revision history for this message
JGJones (jgjones) wrote :

(In reply to comment #4)
> sudo invoke-rc.d powernowd stop, or upgrade to a recent Hoary system.

I don't have powernowd installed (removed it by apt-get) so it's not running. I
am also using Hoary that's fully updated.

I've changed depth bits from 24 to 16 and I've run dpkg-reconfigure xserver-xorg
as well and tried using the kernal framebuffer and disabling it.

I've got two screenshots (one as 24bits and one as 16bits), both are just one
window - which is the terminal, running top in maximised screen. Just updating
the screen, as you can see take about 15-20% CPU resources to do so??

This means my GUI is still stuttering slow. I'll ask again in forums if anyone
else is having the same problem.

Revision history for this message
Hans A. Kestler (kestler) wrote :

(In reply to comment #5)
> (In reply to comment #4)
> > sudo invoke-rc.d powernowd stop, or upgrade to a recent Hoary system.
>
> I don't have powernowd installed (removed it by apt-get) so it's not running. I
> am also using Hoary that's fully updated.
>
> I've changed depth bits from 24 to 16 and I've run dpkg-reconfigure xserver-xorg
> as well and tried using the kernal framebuffer and disabling it.
>
> I've got two screenshots (one as 24bits and one as 16bits), both are just one
> window - which is the terminal, running top in maximised screen. Just updating
> the screen, as you can see take about 15-20% CPU resources to do so??
>
> This means my GUI is still stuttering slow. I'll ask again in forums if anyone
> else is having the same problem.

I have exactly the same problem. I am running a dual-opteron with 8Gb and a
Nvidia GForce 5900.

Revision history for this message
JGJones (jgjones) wrote :

After reading the posts in the forums, you're correct in that there's nothing
wrong with the nvidia drivers.

Someone mentioned that it's an issue to do with Gnome/GTX+ and I will agree.

Today I installed Kubuntu (the full monty) from the Ubuntu reposity and I logged
onto KUbuntu and I'm posting this update to the bug from Firefox in Kubuntu and
it is smooth, no slow down that I get using gdm.

When I run Kterminal (KDE's terminal) and maximise it and run top - you can see
xorg is taking 0.1% CPU at most during top updates.

When I run Gterminal (Gnome terminal) in KDE and maximise it and run top - xorg
is taking 15% to refresh screen when top updates.

Thus this bug is now wrongly named as it's not just an issue with nvidia but
with Gnome/GLX+ - they are taking up too much CPU resources and making no use of
2D accerelation

I don't like Kubuntu to be honest, but until Gnome can be made to use 2D
accleration, I'll have to stick with kdm.

Revision history for this message
Daniel Stone (daniels) wrote :

Your analysis is incorrect for two reasons:
a) GNOME/GTK+ uses a lot of Xrender. If this is not accelerated, then this is
the driver's fault (in this case, nVidia).
b) gnome-terminal generally uses a lot more resources than Konsole.

Revision history for this message
Rui Matos (tiagomatos) wrote :

Hello,

I'm not sure if this bug is related to what I am going through, yet I also have
an unresponsive system.

I updated my laptop today from warty to hoary and the only complaint I have
about this process is that I now have a quite unresponsive system like firefox
scrolling.

Yet I don't think this is xorg's problem as even w3m is slow scrolling in the
linux console (and it was quite fast before).

Rui

Revision history for this message
Rui Matos (tiagomatos) wrote :

Another symptom I am seeing (and this one is quite visible and not just "an
impression") is that in emacs if you grab the mode-line with the mouse and dragg
it to move it adjusting the height of the emacs window this moving will be seen
as a lot of mode-line being rendered one-after the other without the last one
dissapearing thus creating something like 6-7 mode-lines on a stack which just
then dissapear leaving only the "real" one. In every other linux system I have
used (including warty) this would be so fast that I couldn't see all these
mode-lines.

And, btw, I tested with the Hoary Live CD from Array-CD 7 where everything works
just right.

Revision history for this message
Rui Matos (tiagomatos) wrote :

Well I solved my problem! It was powernowd all the time trying to be smart and
adjust the clock on my p4 2.5GHz on the fly so that most of the time the
processor was at ~300MHz. Geez, that hurts...

Right now I have installed powernowd (0.90-3ubuntu12). Just had to issue "sudo
/etc/init.d/powernowd stop" and the crawling came to an end :)

Better fix this package.

Revision history for this message
Matt Zimmerman (mdz) wrote :

(In reply to comment #11)
> Well I solved my problem! It was powernowd all the time trying to be smart and
> adjust the clock on my p4 2.5GHz on the fly so that most of the time the
> processor was at ~300MHz. Geez, that hurts...
>
> Right now I have installed powernowd (0.90-3ubuntu12). Just had to issue "sudo
> /etc/init.d/powernowd stop" and the crawling came to an end :)
>
> Better fix this package.

If you're running on a laptop, this is not a bug. If you aren't using a laptop,
your system might be incorrectly detected as a laptop, but this seems unlikely.

Revision history for this message
Rui Matos (tiagomatos) wrote :

(In reply to comment #12)
>
> If you're running on a laptop, this is not a bug. If you aren't using a laptop,
> your system might be incorrectly detected as a laptop, but this seems unlikely.

Yes, this is a laptop. If it is not a bug, it is at least a misconfiguration?

Revision history for this message
Rui Matos (tiagomatos) wrote :

This problem is quite anoying. The idea is good, but the scaling from the lower
to higher frequencies takes too much time making such things as scrolling after
being idle for a little while really slow and then suddenly fast again in a way
that you actually feel like losing control of things - not good.

Maybe on centrinos powernowd works OK, but on laptops with p4s I guess it would
be better to not enable this daemon (or is it just my p4 that behaves badly?).

Revision history for this message
JGJones (jgjones) wrote :

I orginally reported this bug as a result of high CPU usage by xorg in Gnome
which is slowing down the system overall (INCLUDING high end machines with
plenty of memory) and was suggested to remove powernowd but this did not cure
anything.

Different distro's have quicker Gnome compared to Ubuntu, and it is a growing
problem - http://ubuntuforums.org/showthread.php?t=18197&page=7&pp=10 - many
people are noticing the excessive slowdown and it seem not to affect just nvidia
but ATI owners as well. Some have switched to other distro's such as Fedora and
some are swtiching to use Kubutnu instead as well instead of the default Gnome.

Since it's not a Nvidia problem (there are some with ATI's) it's a problem with
Gnome and the fact that the CPU is doing the work NOT the video card itself.
People are noticing the problem more and more. However this bug have now ended
up as a powernowd issue instead of being about Gnome performance itself.

Most of those people, including myself have used the DEFAULT method of
installing/upgrading to Hoary Hedgehog, nothing fancy, which mean all newcomers
to Ubuntu are going to face this problem too.

Revision history for this message
Thom May (thombot) wrote :

powernowd (0.90-3ubuntu14) hoary; urgency=low

  * Disable p4-clockmod across the board (Ubuntu: #8587, #7250)

 -- Thom May <email address hidden> Mon, 4 Apr 2005 17:38:47 +0100

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.