100% Cpu

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
myst123 Offline
Junior Member
Posts: 4
Joined: Sep 2007
Reputation: 0
Post: #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??
find quote
HarshReality Offline
Posting Freak
Posts: 1,544
Joined: Jan 2005
Reputation: 0
Post: #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: x3.jpg]
find quote
Skindred Offline
Senior Member
Posts: 123
Joined: Jan 2007
Reputation: 0
Post: #3
PasteBin.com


'pastebin - collaborative debugging tool'
find quote
myst123 Offline
Junior Member
Posts: 4
Joined: Sep 2007
Reputation: 0
Post: #4
Okay, lets see if this works :

callgrind.out.22193.gz
stderr and stdout redirect
xbmc.log
find quote
myst123 Offline
Junior Member
Posts: 4
Joined: Sep 2007
Reputation: 0
Post: #5
Could it have something to do with the X config?

Like, do I need dri loaded? or some extra nvidia options?
find quote
d4rk Offline
Team-XBMC Developer
Posts: 499
Joined: May 2007
Reputation: 1
Location: Albuquerque
Post: #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);
(This post was last modified: 2007-09-07 12:10 by d4rk.)
find quote
myst123 Offline
Junior Member
Posts: 4
Joined: Sep 2007
Reputation: 0
Post: #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
find quote
d4rk Offline
Team-XBMC Developer
Posts: 499
Joined: May 2007
Reputation: 1
Location: Albuquerque
Post: #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.
find quote
blittan Offline
Team-XBMC Handyman
Posts: 1,739
Joined: Jun 2004
Reputation: 11
Location: Sweden
Post: #9
Have a GF5200 and got the 100% cpu, commented out the lines 695 and 1216, now it runs fine.

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
If you don't have the time to read them, please don't take the time to post in this forum!
For troubleshooting and bug reporting please make sure you read this first.
find quote
d4rk Offline
Team-XBMC Developer
Posts: 499
Joined: May 2007
Reputation: 1
Location: Albuquerque
Post: #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.
find quote
bortoni Offline
Member
Posts: 56
Joined: Jul 2007
Reputation: 0
Post: #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
find quote
d4rk Offline
Team-XBMC Developer
Posts: 499
Joined: May 2007
Reputation: 1
Location: Albuquerque
Post: #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.
find quote
blittan Offline
Team-XBMC Handyman
Posts: 1,739
Joined: Jun 2004
Reputation: 11
Location: Sweden
Post: #13
My glxinfo: http://pastebin.ca/696238


Compiled and ran fine with your fix Smile

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
If you don't have the time to read them, please don't take the time to post in this forum!
For troubleshooting and bug reporting please make sure you read this first.
(This post was last modified: 2007-09-13 22:40 by blittan.)
find quote