Can’t play video with Xbian / Xbmc on Raspberry Pi – gpu_mem = 256 fixes the problem

A few months ago I decided to get a Raspberry Pi and make a media center out of it using XBMC. I had heard great things about this kind of setup and after many hours trying to get everything up and running I must say it really is amazing. I'm using Xbian 1.0 Beta 1 on a 512mb RPI (together with Sickbeard and Transmission for true automation). I will write another post with more details about the setup and some tips to get it running smoothly but for now I just want to present a solution for a problem I recently had with Xbian.

The problem was that Xbian was refusing to play some episodes of a certain TV series. It would show the spinning "loading" icon for a little while but then a few seconds later nothing happened. I enabled debugging (System/Settings/System/Debugging > Enable debug logging) and checked the xbian log (under ~/.xbmc/temp/xbmc.log). There's a lot of information there so it's not easy to see what really matters. You can try the following to make it easier though: in your terminal, tail the log (tail -f xbmc.log). Then prepare to hit play on the problematic file but just before doing it press enter a few times in your terminal to create a bunch of empty lines. Right after doing that hit play. This will serve as a kind of marker so you know where to start looking. When the loading icon disappears (and the video doesn't play) do the same thing so that you have another marker. After that you can just scroll back and copy paste the relevant part of the log if you want.

In the log, the most interesting parts will be those that have ERROR since they'll normally indicate that something went wrong (even though not necessarily related to this problem). In my case I saw some error lines that looked suspicious:

20:42:34 T:3042451456 ERROR: COMXCoreComponent::AllocOutputBuffers component(OMX.broadcom.resize) - OMX_UseBuffer failed with omx_err(0x80001000)
20:42:34 T:3042451456 ERROR: COMXImage::HandlePortSettingChange m_omx_resize.AllocOutputBuffers result(0x80001000)
20:42:34 T:3042451456 ERROR: COMXImage::Decode HandlePortSettingChange() failed
20:42:34 T:3042451456 ERROR: COMXCoreComponent::SetStateForComponent - OMX.broadcom.resize failed with omx_err(0x80001000)
20:42:34 T:2574251072 ERROR: COMXCoreComponent::AllocInputBuffers component(OMX.broadcom.audio_decode) - OMX_UseBuffer failed with omx_err(0x80001000)
20:42:34 T:2574251072 ERROR: COMXAudio::Initialize - Error alloc buffers 0x80001000
20:42:34 T:2574251072 ERROR: OMXPlayerAudio : Error open audio output

To be honest I have no clue about what those messages actually mean. So I tried my luck in the #xbian IRC channel on and a very nice guy pointed out that this was probably a memory issue and suggested I changed the gpu_mem setting in the config.txt (which can be found under /boot/config.txt). I checked and I had 2 lines for this setting:


This setting specifies the amount of memory that can be used by the gpu. I guess there are two because this is a generic file and the right one will be used depending on which RPI version you have. Both were set to 128 so I changed gpu_mem_512=128 to gpu_mem_512=256 and rebooted the pi. When it came back I tried playing the files again and voilá, pure joy, it just worked.

I hope this can help out someone with a similar issue. Post your findings in the comment section.

2 comments to Can’t play video with Xbian / Xbmc on Raspberry Pi – gpu_mem = 256 fixes the problem

Leave a Reply




You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>