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 Kodi/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 kodi

The user which you're going to run Kodi 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 Kodi), 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 kodi-standalone from a VT (i.e. not under X). XBMC accesses the display directly and not via Xorg.

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

ENABLED=1

Run sudo service kodi start to test this.

Release history

  • 15.2-2: Isengard 15.2 release, and most PVR addons.
  • 14.2-1: Helix 14.2 release.
  • 14.1-1: Helix 14.1 release.
  • 14.0-1: Helix 14.0 release.
  • 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 Kodi 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 Jarvis 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

  • 16.1-1: Jarvis 16.1
  • 16.0-1: Jarvis 16.0
  • 16.0~git20151213.a724f29-1: Jarvis 16.0 Beta 4
  • 15.2-2: Isengard 15.2 with packaging changes to support PVR addons, and most PVR addons.
  • 15.2-1: Isengard 15.2
  • 15.1-1: Isengard 15.1
  • 15.0-1: Isengard 15.0
  • 15.0~git20150702.9ff25f8-1: Isengard 15.0 RC 1.
  • 15.0~git20150501.d1a2c33-1: Isengard 15.0 Beta 1.
  • 14.2-1: Helix 14.2 release.
  • 14.1-1: Helix 14.1 release.
  • 14.0-1: Helix 14.0 release.
  • 14.0~git20141203.35b4f38-1: Helix 14.0 RC 2
  • 14.0~git20141130.ea20b83-1: Helix 14.0 RC 1
  • 14.0~git20141125.4465fbf-1: Helix 14.0 Beta 5
  • 14.0~git20141124.ec361ca-1: Helix 14.0 Beta 4
  • 14.0~git20141116.88a9a44-1: Helix 14.0 Beta 3
  • 14.0~git20141103.d6947be-1: Helix 14.0 Beta 1. This requires firmware as of 2014/10/06 and libcec 2.2.0 (both included in the archive). There are also builds for Jessie but I haven't tested them. PVR addons are also updated.
  • 14.0~git20141002.d2a4ee9-1: Helix 14.0 Alpha 4

Trackback URL for this post:

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

jessie

on raspbian jessie i have these errors :(

xbmc: Depends: xbmc-bin (> = 2:13.1-2) but it is not going to be installed          Depends: xbmc-bin (<2:13.1-2.1 ~) but it is not going to be installed          Recommends: python-qt3 but it is not installable          Recommends: samba-common-bin but it is not going to be installed E: Unable to correct problems, you have held broken packages.

I haven't looked at building

I haven't looked at building XBMC for jessie. The wheezy packages are unlikely to work on jessie.

Screen flickering

After updating to V13.1 I too have bad screen flickering and text overlay. This version is completely usable to me on my raspi. Hope there will be a fix soon.

when screen flickering, set gpu_mem to 128

Hi,

I also had problems with screen flickering in 13.1. Setting gpu_mem=128 helped. Now 13.1 works fine.

Could you please add this to

Could you please add this to the tutorial? I searched for hours and tried various debs until I've found this trick.

Love u!

My gpu mem was on default 64. Did what you said. XBMC works like a charm now!

For me the same. I set

For me the same. I set gpu_men=128 and XBMC works perfectly. Nice work, Thank you!

The same

Hi :) It's the same for me, flickering and a noise sound with the 2:12.3.2 :s

I tried with the version 2:12.3.1 and the problem does not appear and XBMC is realy so good :)

Have a good day :)

Is your firmware up to date?

Is your firmware up to date?

Ok I completely removed xbmc

Ok I completely removed xbmc and all the relevant packages with autoremove. Then updated firmware to 3.12.22+. Installed V13.1 as instructed above. Still screen flickering...

Kernel version

My kernel version is: Linux raspberrypi 3.12.21+ #689 PREEMPT Wed Jun 11 21:45:12 BST 2014 armv6l GNU/Linux

Mine is " Linux raspberrypi

Mine is " Linux raspberrypi 3.12.20+ #687 PREEMPT Fri May 30 16:39:11 BST 2014 armv6l". I ran update and dist-upgrade it says there is nothing new to update.

Screen flickering

Same problem here. Yesterday I upgraded to V13.1-2 on my RasPi but when I try to open any menu, this doesn't work and let's the screen flicker and text overlay. Any idea about this?. I Hope there will be a solution soon. Thank you in advance.

Great... By changing source back to frodo I can't install it too

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:12.3-1) but it is not going to be installed Depends: xbmc-bin (< 2:12.3-1.1~) but it is not going to be installed E: Unable to correct problems, you have held broken packages.

Did you remove all xbmc

Did you remove all xbmc packages first (probably xbmc and xbmc-bin, but check that with dpkg --list | grep xbmc)?

Yes it was clean

Yes it was clean uninstallation. That command you gave me returned nothing

Maybe this works dpkg --list

Maybe this works

dpkg --list | grep xbmc

to check if there're any old packages still present (rc status) that need to be purged. If nothing is shown, updating the sources.list (or the file in sources.list.d) to the version you wish to install (Frodo or the newest), running

apt-get update && apt-get install xbmc

should give you the version you want.

I meant unusable

I meant unusable

Older packages

Hello, since the new 13.1 packages are giving way too much headache - opening any menu doesn't work and let's the screen flicker and I tried some things described below - can you provide us with the older 12.x packages you deleted from your repository ? Would like to do a rollback and downgrade to a working version - maybe old but working. Thanks in advance

I've added a new archive

I've added a new archive section frodo; change your source list to this:

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

Frodo not available for installation?

Hello Michael. I'm just setting up RPi B+ with newest Raspbian 2014-06-20.

I experience the same, as reported here before: the new 13.1 XBMC packages are not usable as menu stucks and flickers when trying to select any option from the main menu. I decided to try older XBMC (Frodo), but I can't install it.

Steps 1. Fresh install of Raspbian 2014-06-20 2. created /etc/apt/sources.list.d/mene.list with content: deb http://archive.mene.za.net/raspbian wheezy frodo 3. sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-key 5243CDED 4. sudo apt-get update 5. sudo apt-get install xbmc

The error is:

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:12.3-1) but it is not going to be installed Depends: xbmc-bin (< 2:12.3-1.1~) but it is not going to be installed E: Unable to correct problems, you have held broken packages.

It was installing properly with "contrib" repository (but was not running properly after installation). Could you please help in installing older version?

BR, Artur

I have found setting on which

I have found setting on which 13.1-1 Gotham is working better.

After reducing the resolution to 720p in config.txt, e.g. by: hdmi_group=1 hdmi_mode=4

it stops stucking and flickering in the menu, so browsing is basically possible. However, it still hangs up from time to time. Why is it so? No idea.

Thanks

Thank you. That old version works for some - yet - unknown reason while nothing else has been changed on the system.

External sound card

Has anybody made it work with a USB sound card? I have tried by installing Pulseaudio, but the audio card is not listed in the xbmc audio settings.

My usb sound card is CM106 and it works with both ALSA and Pulseaudio in my Raspbian installation with other media applications like mplayer.

USB Sound Card

I have the same problem and I couldn´t find a solution. Anybody?

Repository for PVR addons

Hi Michael, thank you for your work on this!

I have been using your build of XBMC for a while, but now want to install an add-on from the PVR repository - but that repository isn't listed. I've looked around in various places online but can't find a solution to this. Is it something you can help with? Many thanks

The PVR addons are in the

The PVR addons are in the same repo listed above, you should be able to install the packages with apt-get.

I experience wierd noise

with the old berryboot firmware. trying new raspbian now.

I experienced tha same every

I experienced tha same every time xbmc starts and I use Raspbian. Another problem that persists is when I press exit button and try to go back to Raspbian, the system has black screen.

Black screen

I have the same problem even after a clean install of Raspbian the xbmc as described above (Thanks Michael). Gotham works fine. When I press the Exit button, he leaves but rest on a black screen instead of returning on Raspbian. I wait several minutes but nothing happens. To restart, I log into SSH and do sudo reboot. Please help me solve this problem. Thanks

I Had That Too!

I Had That Too! now i am waiting to finish downloading xbmc. First world problem: Internet too slow!!!

works fine now.

works fine now..

13.1-1: Gotham 13.1 not working

13.1-1: Gotham 13.1 release not working, please return 12.3-1: Frodo 12.3 release to repository

upgraded to 13.1 from

upgraded to 13.1 from contrib, yesterday. works great for me.

sorry

after i install xbmc on reinstalled Raspbian all works fine, thanx

Having the same problem

I am having the exact same problem plus the sound is a noisy snow that rips my ears of ;) BTW, thank you for XBMC :)

Audio problems are usually

Audio problems are usually caused by out of date firmware. Do an apt-get dist-upgrade to update the firmware and reboot.

How is it not working? Many

How is it not working? Many other people have successfully installed and run 13.1.

I also get this when I try to

I also get this when I try to run it: /usr/lib/python2.7/dist-packages/gtk-2.0/gtk/init.py:57: GtkWarning: could not open display warnings.warn(str(e), _gtk.Warning)

It opens, but I can't do anything without it freezing

I'm trying to set it up. When

I'm trying to set it up. When I go to settings, the settings window never loads the whole way. It's like it is stuck in the middle of its load animation.

Do you have airplay enabled?

Do you have airplay enabled? If so, try disabling it. Edit ~xbmc/.xbmc/userdata/guisettings.xml and change the <airplay> setting to false:

<airplay default="true">false</airplay>

That did not solve it. It is

That did not solve it. It is still doing the same thing

nevermind - i found it

nevermind - i found it

Where is that file? it's not

Where is that file? it's not where you indicated

13.1-1: Gotham 13.1 not working

I am getting the same thing - 13.1-1 is not working

Audio support

First of all thank you for your excellent work.

Does anybody know if this 13.1 version supports pulseaudio and/or alsa?

It is built with PulseAudio

It is built with PulseAudio support but I haven't tested it. ALSA is explicitly disabled for the raspberry-pi platform.

Pulseaudio

I upgraded my xbmc from 12.3 to 13.1. Before doing this I installed pulseaudio and pavucontrol. I thought XMBC 13.1 supported pulseaudio but I only see analogue and HDMI outputs in the audio settings. I would like to be able to select pulseaudio too in order to use a usb sound card I have connected to my raspberry. Am I doing something wrong or am I missing something? My usb sound card works perfectly in my raspberry pi with other applications.

Thanks in advance.

It is built with PulseAudio

It is built with PulseAudio support, but I haven't specifically tested this. It could be a permissions issue with the xbmc user

Thanks

Thank you for your answer. I´ll try to research a bit on the permissions. If anybody made it work with pulseaudio, please, post how to.