100% Cpu
#1
Hey,

I'm trying to get my ubuntu 7.04 box setup so that I can start playing with some code in XBMC, however whenever I run the resulting compiled XboxMediaCenter it uses 100% CPU and has a framerate of <1fps.

After playing with vallgrind and profiling the calls, it's obviously spending most of it's time in the rendering code. I'm using svn revision 10170.

However, I don't know enough yet to figure out why. I used envy to update to the latest nvidia drivers on my 5700, 3d accel is working nicely on my desktop with beryl.

If I recompile without gl, it runs slightly better (but all the text is in the top left of the window, not actually on the buttons??).

I'd attach the log output and callgrind log, however I can't add attachments...

Any suggestions??
Reply
#2
Hang the log on a server or website outside here... if need be you can always use some fool deal like megaupload lol then just hang a link to it.
Image
Reply
#3
PasteBin.com


'pastebin - collaborative debugging tool'
Reply
#4
Okay, lets see if this works :

callgrind.out.22193.gz
stderr and stdout redirect
xbmc.log
Reply
#5
Could it have something to do with the X config?

Like, do I need dri loaded? or some extra nvidia options?
Reply
#6
What graphics card do you have? Make sure you have Direct Rendering enabled. See the output of 'glxinfo'.

Edit: nvm, I missed the part where you said you got beryl running smooth, meaning direct rendering is probably enabled. Actually it might be that NPOT textures are taking a software path in TextureManager.cpp. See if commenting out lines 695 and 1216 and in guilib/TextureManager.cpp does anything. I'll be out of town tomorrow, so I might not reply right away.

Edit2: Those lines should read something like g_graphicsContext.getScreenSurface()->GetGLVersion(vmaj, vmin);
Reply
#7
that indeed worked.
it now runs nicely at 60fps.

I have a geforce 5700 (d3d 9.0 card, not 9.0c like recommended).

So is this a case of my hardware being to crappy, or something that can be worked around in the code?

thanks
Reply
#8
It's actually a case of the driver doing something it shouldn't really, taking a software path for one of the OpenGL 2.0 features (non power of two textures). I think it affects only Geforce FX and below, but will need to taken care of.

Remember to "svn revert" that file to bring it back to its original state before doing further "svn update"s so that you don't get conflicts with local edits.
Reply
#9
Have a GF5200 and got the 100% cpu, commented out the lines 695 and 1216, now it runs fine.
Reply
#10
Can someone who had this issue paste their 'glxinfo' output please? I'd like to be able to detect at runtime whether or not NPOT textures are hardware accelerated or not.
Reply
#11
d4rk Wrote:Can someone who had this issue paste their 'glxinfo' output please? I'd like to be able to detect at runtime whether or not NPOT textures are hardware accelerated or not.

d4rk,
I have the problem. I pasted my glxinfo here before:

http://forum.xbmc.org/showthread.php?tid=27366

Hope it helps, let me know if you need anything else.

-Ed
Reply
#12
Thanks bortini, let me know if, in the latest SVN, you're still facing the same issue. Remember to revert any locally modified files back to their original state with the "svn revert" command.
Reply
#13
My glxinfo: http://pastebin.ca/696238


Compiled and ran fine with your fix Smile
Reply

Logout Mark Read Team Forum Stats Members Help
100% Cpu0