nV News Forums

 
 

nV News Forums (http://www.nvnews.net/vbulletin/index.php)
-   NVIDIA Linux (http://www.nvnews.net/vbulletin/forumdisplay.php?f=14)
-   -   glxgears needs 100% cpu since update to 256.35 (http://www.nvnews.net/vbulletin/showthread.php?t=152416)

Ragnara 06-26-10 03:53 PM

glxgears needs 100% cpu since update to 256.35
 
1 Attachment(s)
Hello,

I'm using Archlinux i686 (linux 2.6.34; Xorg 1.8.1.902) with a GeForce 9600 GT. When I use 256.35, glxgears needs 100% cpu on both cores (AMD Athlon(tm) 7750 Dual-Core Processor) and only makes ~9000 fps.

With 195.36.31 it still uses 100% (but only on ONE core!) and makes ~16000 fps. I know that glxgears is not a realistic benchmark of any kind, but... could there be a regression with the driver?

Thank you for your time.

AaronP 06-26-10 07:21 PM

Re: glxgears needs 100% cpu since update to 256.35
 
Are you running a composite manager? What processes are using the CPU, besides glxgears? If it's the X server, then it's likely that something is triggering new code that detects when something is listening for Damage events and turns on some fairly expensive damage tracking in OpenGL. Do you see the same behavior if you stop GDM/KDM and just start a bare X server with xinit, then run glxgears from an xterm?

Ragnara 06-27-10 06:01 AM

Re: glxgears needs 100% cpu since update to 256.35
 
My setup uses lxde with fluxbox and is started directly with startx - no compositing, no gdm/kdm/... I tested a little and noticed that this problem seems to correlate with fluxbox:

lxde + fluxbox = error
fluxbox = error
openbox = better than 195.36.31
awesome = better than 195.36.31
pure xterm = also better than 195.36.31

one cpu core gets used fully by glxgears, the other one works a lot on X (>50% of 2nd core). Fluxbox itself doesn't appear in conky nor top. I also noticed that conky itself (which is drawing on the root window) starts to use >25% of the 2nd core while glxgears runs.

I also tested another OpenGL application (dolphin, a gamecube emulator) with lxde+fluxbox and openbox: The behaviour is the same - it uses a heck more cpu on fluxbox with the new driver.

AaronP 06-28-10 10:51 AM

Re: glxgears needs 100% cpu since update to 256.35
 
Hmm, strange. I did a quick search of the Fluxbox code, and it doesn't look like there's any code that would trigger the new Damage tracking. I'll have to see if I can reproduce it to find out what's going on.

AaronP 06-28-10 12:04 PM

Re: glxgears needs 100% cpu since update to 256.35
 
This didn't reproduce for me with Fluxbox on Ubuntu. I guess I'll have to download Arch Linux. :(

Ragnara 06-28-10 01:43 PM

Re: glxgears needs 100% cpu since update to 256.35
 
Thanks for your help, much obliged.
What version of Ubuntu did you try? Lucid? According to Distrowatch it uses Xorg 1.7.6, while Archlinux already uses Xorg 1.8. Maybe that is the difference?

Ragnara 07-06-10 02:45 PM

Re: glxgears needs 100% cpu since update to 256.35
 
Hello again,

I just noticed that I was wrong regarding Fluxbox:
It is a problem with conky. I didn't realize that conky is started with my Fluxbox configuration and not with any other wm.

I just tested awesome + conky and I get the same problem: The framerate in glxgears goes way down, while cpu usage increases.

I use conky 1.8.0 on the root window. Does that explain anything? What has changed with 256.35?

AaronP 07-07-10 05:08 PM

Re: glxgears needs 100% cpu since update to 256.35
 
Thanks, Ragnara. I took a look at the source code for Conky, and it's a bit convoluted, but it does look like it could be triggering this behavior. The problem is that it's requesting to be notified whenever any application renders to the root window, which includes all normal windows. This turns on some tracking code that causes OpenGL to notify the X server every time it displays a frame. For most applications, this is fine, but for a toy app like glxgears that renders hundreds or thousands of frames per second, it can use a lot of CPU time.

The problem is that the driver can't tell the difference between an app that doesn't really care that glxgears is being rendered, and an application like x11vnc that does care. Please try configuring conky with the --disable-xdamage option at compile time.


All times are GMT -5. The time now is 10:16 PM.

Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Copyright 1998 - 2014, nV News.