Thursday, July 26, 2012

100% CPU usage XBMC EDEN in Windows XP and others.

As of January 29th, 2013 There is a new version of XBMC, FRODO version 12. This guide it written for EDEN version 11. If your having issues with FRODO then this guide may or may not apply, however my fix below is now the default setting in FRODO.

So I recently decided to turn my old desktop, that we didn't use since the wireless didn't work anymore, into a HTPC (Home Theater PC). The router is behind the TV, so I had the idea I’d just go wired. I've been using my XBOX 360, but I had a Season of a show I had encoded into a format I’d been using for months, and all of a sudden the XBOX wouldn't play it. It would play the old ones, just not the new ones. So I moved the old desktop over to the HD TV, it has a PC connection, and my HTPC was born.

I've got VLC, and MPC-HT, and I like em’ ok, but I was looking for a remote for my android phone to control them, and kept seeing this “XBMC” mentioned…. I decided to check it out…and it was like a light bulb went off!!! I had found something perfect, and didn’t even know I was looking. To be honest, XBMC is…. AWESOME!! However…….
It has a chronic problem with CPU usage. XBMC stands for XBOX Media Center. And was originally written for the XBOX, and an XBOX works differently then a standard PC when running a program. More or less, it runs like a game, using CPU all the time in an open loop. This varies from how standard computer operating systems work, that are event based. So when the program was ported over, it tried to run like it did on the XBOX. That correlated to high CPU usage on many PC’s. XBMC it trying to run full tilt (60 FPS) all the time. It seems if your Video card and computer are powerful enough, you don’t notice it. But on older, slower, systems you get lag and 100% CPU usage. I would say on even high end systems the Video card is working it’s butt off, and it’s probably running hotter then normal, but that’s just a guess. I’ve even seen reports of newer systems having CPU issues….it varies it seems.

So anyway, Google will yield lots and lots of hits on this, none of which did anything for me really. Changing threaded optimization, V-sync settings in the program, turning off RMS, full-screen settings…. none did much if anything for me. For others it solved their problems. Those are by far easier to try, so I would suggest to try them first and see if it helps. If you already have and still are having issues, read on!

The good news? The DEV’s know this is an issue, and have been working on it. EDEN, the latest version has made some huge steps forward in fixing this issue. (***UPDATE*** Version 12, FRODO, has the below changes enabled by default now, so if your having problems, make sure you try the latest version. If for some reason FRODO doesn't work for you and your using EDEN still then read on)

I found my answer HERE. However I had to tweak the process some to get it right. First of all the linked post was written for Linux, and in this case I’m using windows, also I had to modify the suggested settings to work correctly for me. And the location of the file you have to add is different as well. So that’s why I’m writing this blog, the solution above didn’t work exactly for me, but it got me on the right track! So here we go.

  1. Download the latest version of XBMC, this only works on EDEN and future versions, the latest version of XBMC is EDEN as of 7-26-12 at the time of this writing. Needs to be version 11+. (****UPDATE**** The latest version as of 3-10-13 is FRODO version 12, and it has my changes turned on by default, there might still be some use for setting 1 or 2, but I can't verify)
  2. On XP you have to go to c:\documents and settings\%yourusername%\Application Data\XBMC\userdata and create the file advancedsettings.xml. I did this by opening one of the other .xml files in there with a right click, then “open with….” and I chose WordPad. I then ctrl-a to select everything, hit del to wipe it all out, pasted in the below code, then went for “file” and selected “save as..” I then saved it as advancedsettings.xml. Make sure you select “save as…” and not save…. and please don’t accidently hit the save icon…. it will ruin the file you used to open WordPad.
  3. ***This is my MODIFIDED code that worked for me***   
  4. <advancedsettings>
    You may notice that on the line  <algorithmdirtyregions>3</algorithmdirtyregions>  I used a 3 and the BLOG I got this from used a 1. That’s because 1 didn’t work for me, I’ll explain below.*

  5. Now restart XBMC, and check your CPU. Turns out if your on the Weather or System Info window you’ll still get 100% CPU, but since your not there much, I’m not worried. So the best way to check is go to the Home screen, and if your keyboard has a windows button hit it, if not alt-ctrl-del to get out, it will drop you back to your desktop hit alt-ctrl-del (if you didn’t already) to bring up task manager, the put it on the performance tab. That will give you the graph of CPU usage over time. Now click back on XBMC…and sit there…about 1 min. Then maybe change to a Video’s submenu, sit about one min. Then hit the windows button again. Check the graph, it should show low CPU usage while you were just sitting there. With a spike when you were changing menus.

*Now, to explain my changes to the code. When I used the 1 option it did solve my CPU problem, but it gave me a new issue within XBMC itself….all text would slowly dim and get blurry… it would start about 3-5 seconds after the page came up. Moving the focus or the cursor in an area would brighten all the text in that area for a few, then it would dim again once you stopped moving or moved on. Option 2 did the exact same thing except instead of the whole area lighting back up under the cursor, it would be one letter at a time. Option 3 did the trick, no fading text and low CPU!

On another note, I tried changing the other setting


I changed the setting to 1000, but it just pegged out my CPU again it seemed. I didn’t play with it much.

See HERE to learn about what the coding above does, what the numbers I inputted do, and all about dirty regions…and no, those aren’t your dirty parts…..or the red light district in town…….well, they may be that TOO, but not in this case. Also read the link at the top of that page about Working with dirty regions.


Saturday, July 14, 2012

Trying out Live Essentials Writer

This is a Tech post I posted on my parent below to check it out!

Random Ramblings and other Non-Sense: Trying out Live Essentials Writer: Just trying this out to see how it works! Live Essentials Writer is a tool you can use to write blogs, and it’s free if you have a valid in...