XBMC for Raspberry Pi

This page describes how to install XBMC on a Raspberry Pi running Raspbian. You can either install packages on an existing Raspbian installation, or you can download a prebuilt image and flash it to an SD card.

Installing packages on an existing installation

I've published a Debian archive containing packages for XBMC and some dependencies which it requires. This can be setup on an existing Raspbian installation (including the foundation image).

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 import the archive signing key:

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

Then update the package lists:

sudo apt-get update

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

sudo apt-get install xbmc

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

audio video input dialout plugdev tty

If the input group doesn't exist, you need to create it:

addgroup --system input

and setup some udev rules to grant it ownership of input devices (otherwise the keyboard won't work in XBMC), by placing the following in /etc/udev/rules.d/99-input.rules:

SUBSYSTEM=="input", GROUP="input", MODE="0660"
KERNEL=="tty[0-9]*", GROUP="tty", MODE="0660"

The GPU needs at least 96M of RAM in order for XBMC to run. To configure this add or change this line in /boot/config.txt:

gpu_mem=128

You will need to reboot if you changed this value.

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.

Release history

  • 13.1-2: Link to libshairplay for better AirPlay support.
  • 13.1-1: Gotham 13.1 release.
  • 12.3-1: Frodo 12.3 release.
  • 12.2-1: Frodo 12.2 release.
  • 12.1-1: Frodo 12.1 release. Requires newer libcec (also in my archive).
  • 12.0-1: Frodo 12.0 release. This build requires newer firmware than the raspberrypi.org archive or image contains. Either install the packages from the raspberrypi.org untested archive, the twolife archive or use rpi-update. (Not necessary as of 2013/02/11.)

Flashing an SD card with a prebuilt image

I've built an image containing a Raspbian system with the XBMC packages which you can download and flash to an SD card. You'll need a 1G SD card (which will be completely wiped).

Flashing

Decompress the image using unx:

% unxz raspbian-xbmc-20121029.img.xz

And then copy the image to the SD card device (make sure that you pick the correct device name!)

% sudo cp xbmc-20121029-1.img /dev/sdb

Customising

The image uses the same credentials as the foundation image, username "pi" and password "raspberry". You can use the raspi-config tool to expand the root filesystem, enable overclocking, and various other configuration tasks.

Updating

Both Raspbian and XBMC can be updated using normal Debian mechanisms such as apt-get:

# sudo apt-get update
# sudo apt-get dist-upgrade

Release history

Unstable versions

I've started building packages for the upcoming Helix release. These are in the new unstable section of the archive. To install these packages update your source list to look like this:

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

Release history

  • 14.0~git20141002.d2a4ee9-1: Helix 14.0 Alpha 4

Trackback URL for this post:

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

Installed on Raspbian/Debian

Hi I installed Kodi on my Rasbian system. It installed fine and runs but the PVR addons do not work specifically the MythTV addon. I have tried installing the mythtv addon but it does not configure/work in Kodi. Do you intent to release any further builds?

Cheers Spart

I edited the file

I edited the file /etc/default/xbmc

to use "pi" instead of "xbmc" as user

I have this error:

pi@raspberrypi ~ $ xbmc-standalone Error: unable to open display :0 XBMC needs hardware accelerated OpenGL rendering. Install an appropriate graphics driver.

Please consult XBMC Wiki for supported hardware http://wiki.xbmc.org/?title=Supported_hardware Error: unable to open display :0 XBMC needs hardware accelerated OpenGL rendering. Install an appropriate graphics driver.

Please consult XBMC Wiki for supported hardware http://wiki.xbmc.org/?title=Supported_hardware Error: unable to open display :0 XBMC needs hardware accelerated OpenGL rendering. Install an appropriate graphics driver.

Please consult XBMC Wiki for supported hardware http://wiki.xbmc.org/?title=Supported_hardware XBMC has exited uncleanly 3 times in the last 2 seconds. Something is probably wrong

UI is bigger than screen and freezed

Hello everyone, I just performed all the steps on a fresh install Raspbian. Everything went well, but after booting XMBC (xmbc-standalone command) it seems that I have two issues:

1) image is to bigger than the screen (I tried to modify something one guy said below, but didn't worked) 2) Image seems to be freeze. I've plugged in a keyboard and mouse, but nothing seems to work.

Any thoughts?

Setting up alternative controller - XBMC remote and/or USBgamepa

Hi!!

Excellent binary source- I was up and running in no time. I have one little problem... I have no keyboard at the moment (just laptops). I've attempted to turn on the webserver controls manually (guisettings.xml) but the official XBMC remote can't find the XMBCpi server. I also have a USB SNES controller I use with RetroPie. I'd love if I could utilize it with XBMC. However, I can't tell if simple keymapping a keymap.xml will work for this (I suspect it will).

Any thoughts? Has anyone else had problems with the xbmc remote?

Anyone else using the snes usb controller for retropie here?

Thank you again!!

Remote working now, keyboard/mouse necessary Audio problems

Looks like I got the remote working now- it required keyboard/mouse to interface with the xbmc software. (borrow from a friend). I was surprised to see I couldn't edit the config files directly- I may have missed something (they were changed using sudo nano- but didn't matter to the system!). But- after using keyboard and mouse, I have remote on iphone using the official app working.

However, now, my problem is I'd prefer to use headphone jack out rather than hdmi... so a new series of problems. I appear to only have left-channel output right now, no stereo. I set the output using amixer cset numid=3 1 which didn't appear to work for quite some time, but rebooting appears to have solved the problem... then within xbmc, I noticed that xbmc hits the hardware directly... so I had to set it within settings to use analag output rather than HDMI. No matter what setting I choose in XBMC, it appears analog is stuck on left only. :( I can't confirm if it's on left only in the command line- so I'm turning there next.

Any comments regarding audio setup with raspbian and xbmc, I'd love to hear about! Thank you!!

(web interface using chrome to the web device also works, as well as the official xbmc app)

Thank you. and a tiny problem (picture larger than screen)

First of all I would like to thank you. followed your instructions, installed, updated, rebooted and it works well with all the fonts ant etc. (before I updated and rebooted , there was problem in fonts - it displayed quadrants instead of letters and screen was flicking all the time) . The only issue I have is that a display a bit larger then the screen . I tried to adjust it in settings but unsuccessfully.

all ok.

did it through video settings in xbmc itself. works like a charm :) thanks again ( besides the exit part) .

Try adding the following line

Try adding the following line to /boot/config.txt and rebooting:

disable_overscan=1

did it - the resault is the same

and from some reason now it get stuck on exit and I need to force reboot by unpluging the power

Only exit on the menu

Hi, I ENABLED=1 in /etc/default/xbmc and it runs fine. However when I want to powerdown or reboot the pi, the menu options are missing - it only shows me Exit, while the menu options are then if I log in as PI and run XBMC-Standalone I see the extra menu items fine. XBMC seems to be running as user PI when it runs automatically

White Light Lines ad Border of Movie's

I'am getting Light shining Lines at the Borders of the movies I watch. Anyone else had that Problem? How can I solve it?

Keyboard does not work for search

The keyboard seems to work everywhere except when a text entry box has popped up. Searching for a file by its name would be a good example of this. Everywhere else the keyboard is working as it should though.

Airplay video IOS 8

Hi, thanks for your work Michael

Do you think you will be able to post a release including the fixes for Airplay video support with IOS 8 ?

Laurent

Stuck

Realised I was still on 2.12 and apt-get update doesn't seem to be working.

Removed xbmc and tried from scratch, but for some reason apt-get is convinced 2.12 is the latest? Any ideas?

$ sudo apt-get install xbmc Reading package lists... Done Building dependency tree Reading state information... Done The following extra packages will be installed: xbmc-bin The following NEW packages will be installed: xbmc xbmc-bin 0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded. Need to get 30.5 MB of archives. After this operation, 63.7 MB of additional disk space will be used. Do you want to continue [Y/n]? Err http://archive.mene.za.net/raspbian/ wheezy/contrib xbmc-bin armhf 2:12.2-1 404 Not Found Err http://archive.mene.za.net/raspbian/ wheezy/contrib xbmc all 2:12.2-1 404 Not Found Failed to fetch http://archive.mene.za.net/raspbian/pool/contrib/x/xbmc/xbmc-bin_12.2-1_... 404 Not Found Failed to fetch http://archive.mene.za.net/raspbian/pool/contrib/x/xbmc/xbmc_12.2-1_all.deb 404 Not Found E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

12.2, not 2.12 I mean.

12.2, not 2.12 I mean.

the installation has deleted some important packages

How can I control what packages the installation will remove?

I have a distro of Rasbian wiht Gambas3. And the command : sudo apt-get install xvmc Delets the following packages which I need: Gambas3 , fonts-dejavu-core and more

Dont you need to increase GPU

Dont you need to increase GPU mem? If so you should add a note.

Where can i find the source. Its working fine for me so far and i am wondering why i should use openelec anymore :D Thats just great man! A bit more documentation/source would be nice though :)

(and an email notification about new comments/answers)

I thought I had mentioned

I thought I had mentioned that, but seems that I hadn't; thanks. OpenELEC is probably a bit more polished and has additional functionality or improvements, this is pretty much plain XBMC.

LIRC support? Raspbian-settings?

Hi, firstly, thanks for your work Michael, its so good that we able to install xbmc this way.

My question is: Is it possible that in tha latest stable gotham version (im on: deb http://archive.mene.za.net/raspbian wheezy contrib) there is no raspbian-settings addon in PROGRAMS section?

Anyway....im not found it in frodo 12.3 either, so i made a dist-upgrade and now im on gotham, but there is no luck, still not found raspbian-settings.

There is no addon named this, so i unable to enable LIRC.

What am i doing wrong? I missed something..?

Thanks a lot! Viktor

This build doesn't have any

This build doesn't have any additional functionality, the addon you're referring to is probably provided as part of RaspBMC. It doesn't look like LIRC support has to be specifically enabled, so it should be available.

Pingback

[...] http://michael.gorven.za.net/raspberrypi/xbmc Posted in: How-To ⋅ Tagged: KODI, [...]

Airplay

Thanks a lot for your work! Installation and everything went fine.

I tried airplay however (Settings->Enable Airplay) but it is not detected by the two iDevices I have whereas an android device detects the wi-fi reader (surely a different protocol such as UPnP). Both iPad and iPhone are up to date (ios 7.1.2).

Anyone has the same issue? Is it necessary to install a deamon (avahi-daemon) to handle airplay?

Thanks in advance for any help.

Alex

With a fresh install of

With a fresh install of raspbian and xbmc, avahi-daemon is not installed. It is mandatory for airplay to be detected. With a quick :

sudo apt-get install avahi-daemon

the problem is fixed.

Alex

Gotham 13.2 beta 2 hdmi no signal

after play video for some time (i think 20 minutes?) hdmi signal would stop and tv displays "no signal"... i don't think i have enabled power save tho. even if power save was enabled, why would it activate power save mode when video is playing? thx

I had this problem too. I

I had this problem too. I think its firmware-related, downgrade to earlier kernel fixed this for me, now im on somewhat 3.10.** now

[HELP] Broken packages held - Errors

pi@raspberrypi ~ $ sudo apt-get install xbmc Reading package lists... Done Building dependency tree Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation:

The following packages have unmet dependencies: xbmc : Depends: xbmc-bin (>= 2:11.0~git20120510.82388d5-1) but it is not installable Depends: xbmc-bin (< 2:11.0~git20120510.82388d5-1.1~) but it is not installable Recommends: python-qt3 but it is not going to be installed E: Unable to correct problems, you have held broken packages.

followed instructions and the

followed instructions and the same thing happened to me

[HELP] Broken packages held - Errors

You may forget to add to source list or apt-get update

  1. Add this line into /etc/apt/sources.list deb http://archive.mene.za.net/raspbian wheezy contrib
  2. sudo apt-get update
  3. sudo apt-get xbmc

Won't play MP4 video, mouse issues

I installed on Raspbian according to these directions.

If I run

xbmc file.mp4

or

xbmc-standalone file.mp4

the file does not play. In both cases, I see xbmc running fullscren. In fact, the application is slightly larger than fullscreen, and some of the text is clipped.

I used the mouse to navigate the application. Sometimes, the mouse becomes frozen, and other times, I see multiple mouse cursors. If I click on "Files", I get a dialog, but I can't choose anything from it.

h264 encoded video files not playing

i have the exact same issue. unable to play h264 (mpeg4 part 10) encoded video files. (but they do play in omxplayer)

mpeg4 part2 encoded files are playing ok though.

libcec 2.1.4 in contrib

Hey,

any news on that? 2.1.4 is now available in raspbian/jessie and remote control support is broken again on the Pi. Too bad they don't build it with rpi support.

Thanks for this repo :)

Thanks for this repo :)
Will Kodi have another repo?

Pingback

[...] Có hai cách cài XBMC trên RaspBian, hoặc biên dịch từ file nguồn XBMC (mất hơn 12 giờ trên RPI), hoặc dùng gói đã biên dịch sẵn của Michael Gorven. [...]

Pingback

[...] to install it on top of the image I am already building. Back in 2012 I found a blog entry (found here) that seemed to be the easiest way possible to install XBMC with just a few [...]

Gotham 13.2 Beta 2 works

Gotham 13.2 Beta 2 works perfect!

Thanks for your work!

Pingback

[...] / Kodi (教程:http://michael.gorven.za.net/raspberrypi/xbmc ),然后用Yatse [...]

Pingback

[...] Pour installer dernière version d’XBMC (v13) (pour information XBMC sera renommé Kodi à partir de la version 14) je vous propose un excellent tutoriel que j’ai trouvé sur internet, et que je vais traduire en français et modifier un peu. L’article original sur lequel je me suis basé se situe ici [...]

RTMP

Is it possible to stream rtmp? Do I have to add addon? Any help would be greatly appreciate.

Thx

Im testing version 13.2 in

Im testing version 13.2 in unstable and no major problems so far. Looks good. Please push it to contrib.

Thanks

terminate called after

terminate called after throwing an instance of 'dbiplus::DbErrors' Aborted (core dumped) any idea about that crash?

/usr/bin/xbmc: 82: /usr/bin/xbmc: systemd-coredumpctl: not found
Crash report available at /home/pi/xbmc_crashlog-20140824_023124.log
terminate called after throwing an instance of 'dbiplus::DbErrors'
Aborted (core dumped)
/usr/bin/xbmc: 82: /usr/bin/xbmc: systemd-coredumpctl: not found
Crash report available at /home/pi/xbmc_crashlog-20140824_023140.log
terminate called after throwing an instance of 'dbiplus::DbErrors'
Aborted (core dumped)
/usr/bin/xbmc: 82: /usr/bin/xbmc: systemd-coredumpctl: not found
Crash report available at /home/pi/xbmc_crashlog-20140824_023204.log
XBMC has exited uncleanly 3 times in the last 55 seconds.
Something is probably wrong
Couldn't get a file descriptor referring to the console
Couldn't get a file descriptor referring to the console
Couldn't get a file descriptor referring to the console

can't update

i couldn't update from the version 12.3. i have changed the source code with this

deb <a href="http://archive.mene.za.net/raspbian" title="http://archive.mene.za.net/raspbian">http://archive.mene.za.net/raspbian</a> wheezy contrib unstable
and implemented
sudo apt-get update
sudo apt-get dist-upgrade
commands. however it does not update to gotham.

Gotham is in contrib now, so

Gotham is in contrib now, so you don't need to add unstable. What is the output of the apt-get commands?

problem was my sd card. i

problem was my sd card. i think it stuck at non-writable position. thank you.

Config.txt file location

Just wondering If anybody could tell me where the config file is I've looked everywhere

It is in /boot on the sd card

It is in /boot on the sd card

How to compile xbmc for pi

Thanks for providing xbmc package. It works well!! I flashed RetroPie 2.3 img and followed instructions in here to install xbmc.

Could you tell me how to compile xbmc for pi? I don't mind if it works either cross-compile or from pi.

Here is the reason why I'm asking you:

I'm using PS3 controller in emulationstation(sixad)(after appling [1]), but xmbc does not work with PS3 controller.

After enabling debug, I found that xbmc can receive event from PS3 controller in log file(keycode 29x ~ 30x in decimal) even though it looks like compiled with --disable-joystick. So, I like to put my custom keymap at CLinuxInputDevice so that xmbc can handle events from PS3 controller.

I read http://www.raspbian.org/RaspbianXBMC, but I think git://github.com/xbmc/xbmc-rbp.git is too old. So I haven't tried yet.

[1] https://github.com/petrockblog/RetroPie-Setup/wiki/Setting-Up-a-PS3-cont...

Problem when exiting xbmc

Hi, when I exit xbmc via the power off menu and the exit button, I get a black screen and xbmc.bin continues running in the background. I have to reboot my raspberry pi to kill xbmc. Is there a way to exit xbmc cleanly without having to reboot ?

Here is the crash report : http://pastebin.com/ztsL629e

Thank you!

Re: Problem when exiting xbmc

Hi,

I experienced the same problem. Try to run only "xbmc" instead of "xbmc-standalone". It still crashes sometimes when exiting, but it stops running in the background. Hope it helps!

Have the same issue

on exit , it just a black screen . although I can control my pi in ssh without need to restart . but it is not so convenient. I am using xbmc command to start

XBMC Black screen on exit...

It was suggested to run just "XBMC" instead of "XBMC-Standalone". How is this done?