xbmc.bin idling at 100% CPU usage

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
NiteShdw Offline
Junior Member
Posts: 6
Joined: Mar 2012
Reputation: 0
Post: #1
I've been using xbmcbuntu with Eden. I've been having an issue with the betas and it still exists in the final. During idle, XBMC will start consuming 100% CPU. I haven't been able to find out what triggers it to start happening, but it doesn't always happen when I'm using it but sometimes it does.

A quick strace shows this repeating over and over again very quickly:

Code:
clock_gettime(CLOCK_MONOTONIC, {29349, 457025715}) = 0
read(17, 0xbfbd8ec0, 4112)              = -1 EAGAIN (Resource temporarily unavailable)
clock_gettime(CLOCK_MONOTONIC, {29349, 457723676}) = 0
read(14, 0x97a000, 4096)                = -1 EAGAIN (Resource temporarily unavailable)
read(7, 0xa43f360, 4096)                = -1 EAGAIN (Resource temporarily unavailable)
select(8, [7], NULL, NULL, {0, 0})      = 0 (Timeout)
clock_gettime(CLOCK_MONOTONIC, {29349, 469872958}) = 0
time(NULL)                              = 1332659133
time(NULL)                              = 1332659133

So it looks like a thread is stuck in a loop. A request appears to be failing and it just keeps repeating it. Is there a way to narrow down exactly what might be causing this? Could it be a skin or plugin?
find quote
generious Offline
Junior Member
Posts: 24
Joined: Oct 2011
Reputation: 0
Post: #2
(2012-03-25 09:15)NiteShdw Wrote:  I've been using xbmcbuntu with Eden. I've been having an issue with the betas and it still exists in the final. During idle, XBMC will start consuming 100% CPU. I haven't been able to find out what triggers it to start happening, but it doesn't always happen when I'm using it but sometimes it does.

A quick strace shows this repeating over and over again very quickly:

Code:
clock_gettime(CLOCK_MONOTONIC, {29349, 457025715}) = 0
read(17, 0xbfbd8ec0, 4112)              = -1 EAGAIN (Resource temporarily unavailable)
clock_gettime(CLOCK_MONOTONIC, {29349, 457723676}) = 0
read(14, 0x97a000, 4096)                = -1 EAGAIN (Resource temporarily unavailable)
read(7, 0xa43f360, 4096)                = -1 EAGAIN (Resource temporarily unavailable)
select(8, [7], NULL, NULL, {0, 0})      = 0 (Timeout)
clock_gettime(CLOCK_MONOTONIC, {29349, 469872958}) = 0
time(NULL)                              = 1332659133
time(NULL)                              = 1332659133

So it looks like a thread is stuck in a loop. A request appears to be failing and it just keeps repeating it. Is there a way to narrow down exactly what might be causing this? Could it be a skin or plugin?

Seeing the exact same problem with a brand new fresh install of Eden,
Debug log is showing nothing at all need to dig further
find quote
generious Offline
Junior Member
Posts: 24
Joined: Oct 2011
Reputation: 0
Post: #3
Added the following to the advancedsettings.xml dropped down to 35/40% when Idle now better than 100%

<gui>
<algorithmdirtyregions>1</algorithmdirtyregions>
<nofliptimeout>0</nofliptimeout>
</gui>

also applied
http://forum.xbmc.org/showthread.php?tid=126182&page=5
(This post was last modified: 2012-03-26 00:39 by generious.)
find quote
calidonia Offline
Junior Member
Posts: 4
Joined: Mar 2012
Reputation: 0
Post: #4
Don't know much about displaying CPU processes on Linux but your solution worked perfect for me. From >50% alterning between my 2 CPUs to my present 0-4% on both.

I don't understand why algorithm dirtyregions and nofliptimeout aren't activated by default.
find quote
Martijn Offline
Team-XBMC
Posts: 7,715
Joined: Jul 2011
Reputation: 115
Location: Dawn of time
Post: #5
Because it's not yet 100% working correctly so you might see some screen glitches while browsing

Always read the XBMC online-manual, FAQ and search the forums before posting.
Do NOT e-mail Team-XBMC members asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting, make sure you read this first


For your mediacenter artwork go to
[Image: fanarttv.png]
find quote
bobo1on1 Offline
cheapass Team-XBMC Developer
Posts: 2,753
Joined: Dec 2008
Reputation: 20
Post: #6
Dirty region rendering is based on the gpu retaining the content of the backbuffer after a flip, or swapping that content with the frontbuffer, but the opengl standard says that the backbuffer content is undefined after a flip, so we can't safely enable this by default.
find quote
NiteShdw Offline
Junior Member
Posts: 6
Joined: Mar 2012
Reputation: 0
Post: #7
Since making that change in the advanced options, the CPU usage is very low.

Another odd thing I've noticed is that it often takes 10-15 seconds to go back to the home screen from any sub-menu (like TV shows or Movies). I'm not sure if the issue is related or not though.
find quote
generious Offline
Junior Member
Posts: 24
Joined: Oct 2011
Reputation: 0
Post: #8
(2012-03-27 08:12)NiteShdw Wrote:  Since making that change in the advanced options, the CPU usage is very low.

Another odd thing I've noticed is that it often takes 10-15 seconds to go back to the home screen from any sub-menu (like TV shows or Movies). I'm not sure if the issue is related or not though.

Are you using a shared thumbnail setup or a local thumbnail setup?
Either way enable debug and post up the log and do it a couple of times so hopefully something will appear in the logs, I will do the same on my own system but so far this has worked okay.
btw I'm using a local thumbnail drive over a shared one, its a bit to slow over smb and nfs when it comes to loading thumbnails.
find quote
nouniques Offline
Junior Member
Posts: 2
Joined: Apr 2012
Reputation: 0
Post: #9
Hello all,

First thing I would like to thank all people involved in developing and supporting this awesome media centre player.

Just recently I've build HTPC from scratch around AMD A6-3500 APU. Everything works flawlessly.
Currently I'm using Xbmc-xvba build, on Xubuntu 11.10 64bit with AMD Catalyst 12.2 drivers installed manually. I've tried original Team-xbmc and Pulse8 builds as well before this.

My only problem is as threads title says xbmc.bin when idle uses a lot of CPU. On average on all 3 cores the load is more that 50%, and randomly jumping to 100%, the load drops significantly when playing video or watching live TV, but as soon as some xbmc skin is visible it raises to high levels again.
The problem persist on all three builds I've tried, straight from fresh install of xbmc, with and without video library and live tv enabled. I've tried many suggestions (v-sync is on, advancedsettings preloaded with different settings tried) but nothing changes really.
Here is my xbmc.log with debugging enabled http://pastebin.com/EVpaqAkg
I've disabled Live TV and video sources for cleaner log.
Thanks everyone in advance.
find quote
wsnipex Offline
Team-XBMC packaging monkey
Posts: 1,821
Joined: Jun 2011
Reputation: 51
Post: #10
(2012-04-06 15:59)nouniques Wrote:  Hello all,

First thing I would like to thank all people involved in developing and supporting this awesome media centre player.

Just recently I've build HTPC from scratch around AMD A6-3500 APU. Everything works flawlessly.
Currently I'm using Xbmc-xvba build, on Xubuntu 11.10 64bit with AMD Catalyst 12.2 drivers installed manually. I've tried original Team-xbmc and Pulse8 builds as well before this.

My only problem is as threads title says xbmc.bin when idle uses a lot of CPU. On average on all 3 cores the load is more that 50%, and randomly jumping to 100%, the load drops significantly when playing video or watching live TV, but as soon as some xbmc skin is visible it raises to high levels again.
The problem persist on all three builds I've tried, straight from fresh install of xbmc, with and without video library and live tv enabled. I've tried many suggestions (v-sync is on, advancedsettings preloaded with different settings tried) but nothing changes really.
Here is my xbmc.log with debugging enabled http://pastebin.com/EVpaqAkg
I've disabled Live TV and video sources for cleaner log.
Thanks everyone in advance.

if you have dirty region rendering enabled, v-sync on and still get very high cpu load(in my case 100% on 1 core) you can try downgrading the ati driver to 11.12 or 11.11. so far this issue has only been reported with ati hd 4000 series and catalyst >12.2, possibly it also affects other ati hardware. Worth a shot, if you are out of ideas. If you try it, plz report back with results.
find quote
Post Reply