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: 26
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: 26
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 Kodi
Posts: 11,434
Joined: Jul 2011
Reputation: 165
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,758
Joined: Dec 2008
Reputation: 22
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: 26
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 Online
Team-Kodi Member
Posts: 3,749
Joined: Jun 2011
Reputation: 92
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
Snippo Offline
Senior Member
Posts: 142
Joined: Dec 2011
Reputation: 4
Post: #11
(2012-04-06 19:48)wsnipex Wrote:  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.

I had the same problem as nouniques. xbmc.bin kept using 100% cpu when it idles, even after enabling v-sync and dirty regions. I just tried your suggestion and I can confirm that it works Smile. I downgraded to fglrx 8.850 (Catalyst 11.5) and everything works fine again now.
find quote
nouniques Offline
Junior Member
Posts: 2
Joined: Apr 2012
Reputation: 0
Post: #12
Thanks for letting us know Snippo.

I decided to investigate further when Ubuntu 12.04 will be released, then I'll reinstall everything anyway. I'm a bit short on time at the moment, so thought if something goes wrong while downgrading, and I would need to reinstall OS, I would rather install to newer version.
It's not a big issue for me, because nothing stutters or anything performance wise, only problem is raising temperature of CPU, because it's fanless at the moment. Plus fingers crossed AMD would do something better with their drivers in a mean time.
find quote
geekmiki Offline
Junior Member
Posts: 26
Joined: Aug 2009
Reputation: 0
Post: #13
Same problem here with the CPU idling at 100% but wih some differences.

XBMC 11 "Eden", running on Ubuntu 10.04
Asrock ION HD330

Upon startup everything is fine, CPU is idling at approx. 10%, once I launch a video file the CPU jumps to 100% and stays like that for the rest of the session.
As nouniques mentioned, this does not compromise performance (even with 1080p), but my Asrock 330 gets extremely warm...

I have tried:
-adding dirty regions
-changing skin (I used Night, but tried with stock Confluence)
-Downgraded NVidia drivers from 295.40 to 275.43
-Deactivated the common plugin cache add-on
-V-sync is enabled

Has anyone managed to solve this issue completely? Is it reported as an Eden bug?
(This post was last modified: 2012-04-17 10:31 by geekmiki.)
find quote
FernetMenta Offline
Team-Kodi Developer
Posts: 3,366
Joined: Jul 2010
Reputation: 66
Location: Munich
Post: #14
So we have this issue on ATI and NVidia systems. Some say that upgrading the OS cured it, other have downgraded Catalayst. I can't reproduce this on any of my systems. Might be due to the fact, that they are all setup the same way, basically a standard installation of Ubuntu 11.10 (64bit) with these characteristics: completely removed pulseaudio, I run XMBC either in window manager gnome-classic (no effect) or Fluxbox.

Does anybody observe this issue having:

- fresh installation of XMBC
- skin confluence
- no additional add-ons
- pulse audio removed
- no 3D window manager

If not, start reverting to your original configuration one by one.
(This post was last modified: 2012-04-17 12:25 by FernetMenta.)
find quote
turbopsi Offline
Junior Member
Posts: 4
Joined: Aug 2010
Reputation: 0
Post: #15
I can confirm the same issue. XBMCbuntu 11.0 out of the box, no other add-ons etc.
ION330 Mobo.

CPU is fine until a video is played. After that one core is at a constant 100% when idle.
find quote
Post Reply