XBMC packages for Raspberry Pi running Raspbian

I recently got a Raspberry Pi, which is an ARM based device which runs Linux. My goal is to use this as my HTPC running XBMC, so that I can move the fileserver out the lounge.

Edit: I've moved the latest information and updates about these packages to this page.

Building

I installed Raspbian on my RPi, which is basically a rebuild of Debian Wheezy specifically for the RPi (targeting the ARMv6 architecture with hard float). I found various instructions on how to build XBMC for Raspbian, but none of them were in the form of deb packages, and installing software without packages just makes me queezy. So I went off and built it myself.

Since the RPi is relatively low powered, I built the package on my laptop using qemu-user, which emulates binaries with a different architecture. I based the packaging on the XBMC package in Wheezy, and the source is from the xbmc-rbp branch on GitHub. I made the modifications to the source as per this forum post and added an initscript so that it can automatically start at bootup.

Installing

The easiest way to install the package is to add my archive to your system. To do this, store the following in /etc/apt/sources.list.d/mene.list:

deb http://archive.mene.za.net/raspbian wheezy contrib

and then import the archive signing key:

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-key 5243CDED

You can then install it as you would with any other package, for example, with apt-get:

sudo apt-get install xbmc

(If you don't want to configure my archive you can download the packages manually, but you'll have to deal with all the dependencies. Note that it requires a newer libcec package which is also in my archive.)

The user which you're going to run XBMC as needs to be a member of the following groups:

audio video input dialout plugdev

Running

To run XBMC, run xbmc-standalone from a VT (i.e. not under X). XBMC accesses the display directly and not via Xorg.

If you want XBMC to automatically start when the system boots, edit /etc/default/xbmc and change ENABLED to 1:

ENABLED=1

You also need to set the user which XBMC should run as (the xbmc user is not automatically created at the moment). Run sudo service xbmc start to test this.

Configuration

The following settings in advancedsettings.xml decreases the CPU usage while showing the UI. Disabling the RSS feeds also helps with this.

<advancedsettings>
    <gui>
        <algorithmdirtyregions>3</algorithmdirtyregions>
        <nofliptimeout>0</nofliptimeout>
    </gui>
</advancedsettings>

Rebuilding

If you want to rebuild this package with a different source (e.g. a later Git revision), you need to prepare the source by running ./bootstrap before creating the orig.tar.gz. You obviously need all the build dependencies (which should be listed in the packaging), as well as the VideoCoreIV libraries in /opt. You probably want to set DEB_BUILD_OPTIONS=nocheck parallel=4 to disable the tests (they failed to build for me), and speed up the build by using more than one core. You can find the packaging in my archive or my Bazaar repository.

Trackback URL for this post:

http://michael.gorven.za.net/trackback/1495

I'm having the following

I'm having the following 'bugs' with my Raspbian/XBMC setup.

1) I got this fixed but I don't know how. The first time I tried using a mp3 file; it would not work. It is only after I did some other stuff such as installing other programs such as mpg123 that it worked through XBMC.

1.1) I do not know what I did to fix it because my testing was done through the terminal window. Audio through HDMI seems to only work through XBMC and not the terminal. Audio from the analog port works fine through the terminal and I did not test to make sure it works through XBMC (although I'm sure it does).

2) The program had a habit of freezing at random but was fixed by lowering the overclocking value. It was changed from Turbo to Medium.

3) The XBMC program is treating the keyboard as a giant remote control rather than a keyboard. This is not a problem until I get to a 'search' box. I have to use the arrow keys and hit enter for each letter rather than just type in what I want. The spacebar works though as it normally does.

4) The XBMC program crashes most of the time, but not all of the time, when I try to exit the program. It also sometimes crashes when I select the shutdown option instead.

Hi, Thank you for your XBMC

Hi,

Thank you for your XBMC package.

You wrote that the user which is going to run XBMC needs to be a member of the following groups:

audio video input dialout plugdev

but it seems (after installing the package) that i don't have any "input" group :

# cat /etc/group | grep input

returns nothing.

does it seems to be a problem ?

Thanks

mgorven, something went

mgorven, something went really wrong with the latest version...

the screen resolution (in standalone mode) is broken. XBMC renders itself out of the screen resolution. Also, none of the airplay stuff works.

It is simply unusable.

How canI go back to the previous version?

Thanks

The resolution problem is

The resolution problem is caused by this issue. To fix it edit userdata/guisettings.xml and remove the contents of the <resolutions> element. I can't test the airplay functionality unfortunately :-/

If you want to revert to the previous version grab the 20120804 debs from the archive pool and manually install them with dpkg -i.

Thanks mgorven! Re airplay I

Thanks mgorven!

Re airplay I think the issue is libshairport. In the build when trying to play over airtunes the following error comes up: 22:30:20 T:1101959168 DEBUG: AIRTUNES: Failed to create ipv6 socket. Trying ipv4 22:30:20 T:1101959168 DEBUG: AIRTUNES: Error setting up server socket on port 36666, try specifying a different port

Googling solution brought up this: http://forum.xbmc.org/showthread.php?tid=138106&pid=1207877

So basically, libshairport has to be updated with this patch: https://github.com/Memphiz/xbmc/commit/f5770cd1811a4ee0096010eca6bb0a9a6...

this should solve the problem

I've published a new build of

I've published a new build of libshairport to my archive which contains that patch. I tried to test it using PulseAudio as a sender, but couldn't get it working (display shows "Streaming..." but no sound).

Thanks, streaming music now

Thanks, streaming music now works!! Re pulseaudio, I did not have much success with this neither, however streaming from Apple products works fine!

There is one more issue that I'm facing now - CPU usage. I modified advancedsettings.xml, but xbmc still runs on >90% all the time. This is something new as I did not face the problem before. Any suggestions?

<advancedsettings>
    <network>
        <cachemembuffersize>5282880</cachemembuffersize>
    </network>
   <fanartheight>560</fanartheight>
   <thumbsize>256</thumbsize>
   <gui>
       <algorithmdirtyregions>3</algorithmdirtyregions>
       <nofliptimeout>0</nofliptimeout>
   </gui>
   <lookandfeel>
       <enablerssfeeds>false</enablerssfeeds>
   </lookandfeel>
   <bginfoloadermaxthreads>2</bginfoloadermaxthreads>
 
   <enableairtunesdebuglog>0</enableairtunesdebuglog>
</advancedsettings>

XBMC has always used a lot of

XBMC has always used a lot of CPU time for me. The package actually includes a default advancedsettings.xml customised for the Raspberry Pi which contains the best configuration I know of.

Is anyone else finding this

Is anyone else finding this stopped working with a recent upgrade (last week or two)?

I get the background of XBMC displayed but no menu bar across it. Was working fine...

Have anyone tried to use

Have anyone tried to use airplay with this build? For some reason I get to play pictures but no music at all, I found some where saying about libshairplay missing, but my does have it

Any thoughts?

I don't have any Apple

I don't have any Apple devices so I can't test AirPlay unfortunately. My latest build uses a newer libshairport (which is also in my archive) -- can you check that your system is fully updated?

Hi, it's compatible with

Hi, it's compatible with raspbian-19-09-12?

I've this message while I install xbmc:

sudo apt-get install xbmc
Lettura elenco dei pacchetti... Fatto
Generazione albero delle dipendenze       
Lettura informazioni sullo stato... Fatto
Alcuni pacchetti non possono essere installati. Questo può voler dire
che è stata richiesta una situazione impossibile oppure, se si sta
usando una distribuzione in sviluppo, che alcuni pacchetti richiesti
non sono ancora stati creati o sono stati rimossi da Incoming.
Le seguenti informazioni possono aiutare a risolvere la situazione:
 
I seguenti pacchetti hanno dipendenze non soddisfatte:
 xbmc : Dipende: xbmc-bin (>= 2:11.0~git20120510.82388d5-1) ma non è installabile
        Dipende: xbmc-bin (< 2:11.0~git20120510.82388d5-1.1~) ma non è installabile
        Raccomanda: python-qt3 ma non sta per essere installato
E: Impossibile correggere i problemi, ci sono pacchetti danneggiati bloccati.

thank you for your great work, Silvio

You need to run sudo apt-get

You need to run sudo apt-get update This will pull in the package lists.

Thank you, simple error :)

Thank you,

simple error :)

Are you referring to the

Are you referring to the 2012-09-18-wheezy-raspbian image? Or do you just mean Raspbian as of 2012/09/19? I haven't tested with the recent image, but am using it on a fully updated Raspbian installation.

Hi ! There are 2 things

Hi !

There are 2 things which you could expand on your blog (for better understanding).

  1. at the installing procedure, say that the existing /etc/apt/sources.list remain unchanged, because package "xbmc" will have double entry then and it seems to overlap, its ok to just keep the /etc/apt/sources.list intact

  2. say that advancedsettings.xml go into ~/.xbmc/userdata directory

Kind regards, Jan

just me or does the youtube

just me or does the youtube plugin not work?

Any plans to refresh the

Any plans to refresh the build? i.e. bake another snapshot?

I've just updated it to the

I've just updated it to the latest version in Git (which is 2012/08/04).

You need to rebuild your XBMC

You need to rebuild your XBMC packages to account for a newer libcec1 ... that is the error these users (and I) are having.

Cheers.

I packaged libCEC 1.8.0 and

I packaged libCEC 1.8.0 and built XBMC against that (since the version of libCEC in Raspbian is incompatible), so unless Raspbian now has an even later libCEC I don't think that that is the problem. I think the problem lies with the older kernel and VC libraries -- try following my instructions in this comment to update these, it seems to have worked for Goliat.

Bizarre. I reboot and

Bizarre. I reboot and suddenly it works. O_o

Move on, nothing to see here. :)

Sorry for the trouble.

I did that and very very

I did that and very very little was upgrade (only scratch).

I'm showing libcec1 1.8.0-1 ...

# dpkg -s libcec1
Package: libcec1
Status: install ok installed
Priority: optional
Section: libs
Installed-Size: 474
Maintainer: Andres Mejia <amejia@debian.org>
Architecture: armhf
Multi-Arch: same
Source: libcec
Version: 1.8.0-1
Depends: libc6 (>= 2.13-28), libgcc1 (>= 1:4.4.0), liblockdev1, libstdc++6 (>= 4.3.0), libudev0 (>= 0.140)
Pre-Depends: multiarch-support
Description: USB CEC Adaptor communication Library (shared library)
 This library provides support for the Pulse-Eight USB-CEC adapter.

Same error as already listed in comments here.

This does not work for me on

This does not work for me on a fresh Raspbian install (official build). When i try to launch XBMC i get:

pi@raspberrypi ~ $ xbmc-standalone 
/usr/lib/xbmc/xbmc.bin: symbol lookup error: /usr/lib/arm-linux-gnueabihf/libcec.so.1: undefined symbol: vc_cec_set_passive
/usr/lib/xbmc/xbmc.bin: symbol lookup error: /usr/lib/arm-linux-gnueabihf/libcec.so.1: undefined symbol: vc_cec_set_passive
/usr/lib/xbmc/xbmc.bin: symbol lookup error: /usr/lib/arm-linux-gnueabihf/libcec.so.1: undefined symbol: vc_cec_set_passive
XBMC has exited uncleanly 3 times in the last 21 seconds.
Something is probably wrong
pi@raspberrypi ~ $ 

Do you have the following on

Do you have the following on your system?

$ cat /etc/ld.so.conf.d/00-vmcs.conf 
/opt/vc/lib

And does /opt/vc/lib/libbcm_host.so exist?

Did you use the 2012-07-15-wheezy-raspbian image? Please make sure that your system is fully up to date. If it still doesn't work, try running rpi-update.

$ cat

$ cat /etc/ld.so.conf.d/00-vmcs.conf 
/opt/vc/lib

But

/opt/vc/lib/libbcm_host.so

does not exist. And yes I am using 2012-07-15-wheezy-raspbian and my system is fully up2date. By the way, is it safe to use rpi-update? I thought the kernel and firmware are updated already?

I've just booted the clean

I've just booted the clean 2012-07-15-wheezy-raspbian image and libbcm_host.so does exist, so I'm not sure what's going on with your system :-/ rpi-update isn't ideal because it does things without packages, but I've found it to be necessary. You can also try enabling the untested component of the raspberrypi.org archive and updating to the packages there. To do this make /etc/apt/sources.list.d/raspi.list look like this:

deb http://archive.raspberrypi.org/debian/ wheezy main untested

and run apt-get update and apt-get dist-upgrade.

Ive used the same image and

Ive used the same image and directly started on your guide after going through the config script. I seem to have the two files you mentioned but I also had the same problem until i enabled untested components and did dist-upgrade.

I saw that during the upgrade start.elf was commented to be the same as some other .elf that i think has the same memory split size, what memory split do you recommend yourself? 128Mb or does it work with 64Mb also?

I don't know if I was impatient but XBMC seems to crash when using exit, though it only happened the first time and now it works, reboot also works.

Thank you for this guide. I tried one other before this one and it worked but I had black screens occasionally while playing a movie. I have not tested playing a movie but this looks really promising :D

Sincerely Goliat

I've actually only tested the

I've actually only tested the 128/128 memory split, since that's what the Internet said should be used. 128M is enough RAM for XBMC to run in though, so it's not a problem.

Ok. Ive tried this guide two

Ok. Ive tried this guide two times now, one with official raspbian and with unofficial. The install works fine and it runs fine in menu, i have also tried the different configurations to run the UI smoother. The problem is playing movies though, i keep getting black screens and lose sound frequently. Do you have any idea what it might be?

What codecs do the videos

What codecs do the videos you're testing with use? The RPi can only decode H.264 in hardware, so if you're using any other video codec it has to use the CPU which probably isn't fast enough. It also apparently can't decode DTS audio fast enough (at least without overclocking), so if you're not using passthrough audio this may be the problem. What is the CPU usage like when trying to play videos?

It's a 720p movie h264

It's a 720p movie h264 encoded, I'm not sure what the cpu use is but when checking the cpu use in the menu it's at about 80-90%. But I have found out that the movies i have tested with have an fps of 23.97. It seems like many have issues getting those to run smoothly. I have tried my movie in omxplayer and it seems to run it without problems.

My raspberry is connected to my pc screen with hdmi and i get audio through my headphones output on the screen. I'm not sure if DTS in the movie affects also but then since omx does not have a gui i guess it could decode DTS then?

But it seems after checking this i think it's related to xbmc not being able to identify screens and then get the correct output. I not sure about this but it seems very likely.

that fixed it for me ;)

that fixed it for me ;)

Hi, I've just installed xbmc

Hi,
I've just installed xbmc from your repository on my raspbian, however it is not able to start:


pi@raspberrypi ~ $ xbmc-standalone
/usr/lib/xbmc/xbmc.bin: symbol lookup error: /usr/lib/arm-linux-gnueabihf/libcec.so.1: undefined symbol: vc_cec_set_passive
/usr/lib/xbmc/xbmc.bin: symbol lookup error: /usr/lib/arm-linux-gnueabihf/libcec.so.1: undefined symbol: vc_cec_set_passive
/usr/lib/xbmc/xbmc.bin: symbol lookup error: /usr/lib/arm-linux-gnueabihf/libcec.so.1: undefined symbol: vc_cec_set_passive
XBMC has exited uncleanly 3 times in the last 25 seconds.
Something is probably wrong

Do you know what could be wrong? :)

I am having the same problem

I am having the same problem ...

pi@raspberrypi ~ $ xbmc-standalone /usr/lib/xbmc/xbmc.bin: symbol lookup error: /usr/lib/arm-linux-gnueabihf/libcec.so.1: undefined symbol: vc_cec_set_passive /usr/lib/xbmc/xbmc.bin: symbol lookup error: /usr/lib/arm-linux-gnueabihf/libcec.so.1: undefined symbol: vc_cec_set_passive /usr/lib/xbmc/xbmc.bin: symbol lookup error: /usr/lib/arm-linux-gnueabihf/libcec.so.1: undefined symbol: vc_cec_set_passive XBMC has exited uncleanly 3 times in the last 17 seconds. Something is probably wrong

Can anyone help?? Scott

Try upgrading your kernel and

Try upgrading your kernel and firmware as explained in this comment.