xbmc.bin idling at 100% CPU usage
#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?
Reply
#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
Reply
#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
Reply
#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.
Reply
#5
Because it's not yet 100% working correctly so you might see some screen glitches while browsing
Read/follow the forum rules.
For troubleshooting and bug reporting, read this first
Interested in seeing some YouTube videos about Kodi? Go here and subscribe
Reply
#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.
Reply
#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.
Reply
#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.
Reply
#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.
Reply
#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.
Reply
#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.
Reply
#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.
Reply
#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?
Reply
#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.
Reply
#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.
Reply

Logout Mark Read Team Forum Stats Members Help
xbmc.bin idling at 100% CPU usage0