New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[raspberry pi] high cpu usage when idle with xbmc gui #607
Comments
Hi, |
I have enabled dirty region mode 3 which seems to reduced the load to around 30%. |
Recommended settings to improve GUI for other users experiencing this issue. Create an advancedsettings.xml within your userdata dir with the following content: |
@s7mx1 you have still the same problems with our latest builds from http://sources.openelec.tv/tmp/image/openelec-rpi/ ? |
Thats by design and no bug. |
[quote] How can 30-90% idle cpu be "by design"? Surely when idling xmbc usage should be negligible or devices which support power save will never enter low-power states, etc. Apart from anything else it reduces CPU available to other processes. |
The main render loop is limited to 100fps/s. On a fast machine you reach this limit and xbmc starts to idle on rendering. |
The thing is if I disable RSS the idle load will go down to around 15% - 20%. |
I have no issue with the renderer doing work when it needs to. The problem I see is that it burns CPU when nothing is changing on the screen. i.e. even sat in the idle state at the menus, with no video running, (and the screen dimmed), the rasppi cpu is pegged. Surely if there's nothing to render the render loop should mostly be sleeping? |
Unless the rendering logic in master isn't changed, it will stay like that. |
I'm not saying you should necessarily be the one to fix it, but presumably it is fixable to some degree. As this is a real issue for raspberry pi owners, can this bug remain open (even if you're not actively looking at fixing it atm)? It bothers me a fair bit, so if no one else gets to it first I'll hopefully get a chance to dig into the code -- any insights you could given would of course be appreciated. |
I see this too on my RPi, devel-20120704203304-r11493. Turning off the RSS crawl drops it from 80% to 20% CPU usage. Then, I see that it's doing an ioctl() on /dev/vchiq, attempting two non-blocking reads (socket and inotify), and checking the time in a busy loop. Couldn't this be put in a select/poll loop? I'll dig into this. |
Looks like this polling loop is pretty fundamental to the design of xbmc. Switching to a fully blocking model sure would save a lot of electricity... |
On my RPi, turning off RSS crawl also reduces CPU usage from 80% to 20%. Power consumption measured at wall socket drops from 4.3 watts to 3 watts. It's still a lot for a device left on 24 hours a day (and far higher than a phone running android but that might not be a fair comparison). When RPi is shut down consumption drops to 1 watt. |
Can confirm that this bug is still present in the build from November 29 2012. On a fresh install, going to settings and turning off the RSS ticker does NOT reduce the CPU usage below 90% on my Pi. Am I missing something here? Also, the link to advancedsettings.xml posted by steeleyjim is broken. Anyone know what was in that file? |
I can confirm this behaviour. I've just done a fresh install of "OpenELEC-RPi.arm-2.95.4"/XBMC-12.0-BETA3 on a 1GB generic/unknown class on a RPi model B. CPU usage was 98-100% and after turning off RSS it is now ~91-96% after 2 hours of being idle. |
I'm seeing the same issue with OpenELEC-Fusion.x86_64-2.95.4 (i.e. beta 4). I can't confirm that it was better with OpenElec beta3 but I never noticed it. I found that changing the dirty regions algorithm to 1 drops the CPU back down to 2-5% and doesn't leave any noticeable artifacts with my hardware. My advancedsettings.xml looks like: <advancedsettings>
<gui>
<algorithmdirtyregions>1</algorithmdirtyregions>
</gui>
</advancedsettings> |
@mpilone: |
I think the advancedsettings.xml may have been a red herring for me. After some more digging I think I tracked the issue down to scripts.common.plugin.cache which gets installed as a dependency of some other add-ons, namely Youtube. You can see my post about it here: http://forum.xbmc.org/showthread.php?tid=116496&page=6 If my conclusion is correct, I think the advancedsettings.xml looked like it worked because I made the change and then restarted the xbmc process which at the same time resolved the timing issue with scripts.common.plugin.cache; however after rebooting the CPU usage returned even with the updated advancedsettings. If you have scripts.common.plugin.cache installed try uninstalling it or disabling it to see if that helps at all. Unfortunately there seems to be a number of causes for high CPU ranging from HW issues to add-on bugs. -mike |
I'm new to Raspberry Pi (got one last Tuesday) and it's pretty much my first experience of Linux. I have OpenELEC installed, the lastest version, I think. BUT, I found you can check the CPU usage through an SSH/Putty session using the "top" command. This shows CPU usage as only 15-20% when XBMC is on the main screen and idle, but jumps to over 90% when looking at Settings-->System. Perhaps, ironically, just looking at the CPU usage in XBMC makes the CPU usage jump up! Owen |
Running latest openelec build as of yesterday and noticed that when xbmc sits idle the cpu usage goes up over 90% as reported by top.
There are similar issues reported on xbmc trac system: http://trac.xbmc.org/ticket/12888 http://trac.xbmc.org/ticket/12614.
CPU usage drops during h264 video playback up to 720p.
The text was updated successfully, but these errors were encountered: