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

  • 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 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-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

Help...video does not play nor sound.

Help...I have followed the steps but can't get the video to play or sound. Not sure what I am missing. Thanks

Thankyou

A big thanks to Michael for this page of brilliant info.

Thanks to you I have been bitten by the bug again and with help from the info here and a few other select places I started out following your tutorial to get me going and really enjoyed the experience bit one thing killed me.. the kodi exit bug. so i started to read about compiling my own version of kodi. so now I have compiled my own version of kodi 15 beta ( much hair tearing and wimpering at the screen as i was running out of space on an 8gig msd card) it`s running as good as i can manage. lcdproc is compiled and installed and running sweet with kodi showing its info during videos / music etc and the system showing Lan and wan stats and its all running from a 32gig ext4 partition on a usb hdd with 155gig ntfs partition with music and videos etc and all booting from a 256meg msd card.

but i have a problem and its foxing me.

The system is setup to auto login user pi to command promt, if i run kodi from the command promt kodi will run and always clean exit but if i try to auto run kodi at login I get the black screen on exit most of the time

at the moment I am auto loading kodi from etc/rc.local with su -l pi -c kodi

loading from command line with kodi

loading from command line with kodi-standalone = black screen on exit

Thanks again for the great information Chris

kodi: unrecognized service

I can start KODI by typing "kodi-standalone" but when i type "sudo service kodi start" i get: "kodi: unrecognized service".

What am i missing? /etc/default/kodi looks like this:

Set this to 1 to enable startup

ENABLED=1

The user to run Kodi as

USER=kodi

Adjust niceness of Kodi (decrease for higher priority)

NICE=-5

look in the folder

look in the folder /etc/init.d for a kodi file, This file i think is the loader for the kodi service if you have it try running :-

sudo update-rc.d kodi defaults

i think this updates the kodi entry thats loaded on reboot so you can then sudo service kodi start

i could be completely wrong but i doubt it will do any damage if you try as it should error out if its wrong

or maybe someone with a wealth more information than me can point you i the right direction

Raspberry Pi 2 error

Hi Michael, thanks for the work on this...

I installed the latest release of 14.1.1 with notation that it should work with Raspberry Pi 2. It boots up and behaves fine until you try playing any videos. It will sometime play sound only and only display a black screen, or it will just be a black screen only. Other times it will show a black screen, no sound, but the progress bar will show the video is playing.

I've tried playing SD and 720p content with same results.

Here is a kodi debug log. I will also open a support thread on kodi and report back here if anything useful is posted.

Kodi debug http://pastebin.com/muMNp4WR

Thank you

Turns out the Raspberry Pi 2

Turns out the Raspberry Pi 2 comes with gpu_mem defaulted to 64MB and should be 128 minimum or 256 ideally.

Problem resolved by setting gpu_mem to 256mb

tanks for your great job

I am using kodi with debian, so I can have both a desktop and a media center. Your job just saved me :).

HTTPS support

Hi, I'm using Kodi on my Pi 2 from your repository. I've installed the YouTube add-on and couldn't get any video to play.After checking the log and contacting the add-on creator, it seems that the build of Kodi I'm using doesn't support HTTPS.I tried downgrading curl as suggested in some places, but that din't work, so I'm guessing it's some internal Kodi stuff that wasn't enabled when building or something.

Any suggestions?

breaking it down better

you're using terms that are unfamiliar to new users. I can navigate around but I have no idea what store means. I cant create a new list in step #1.

sudo nano

sudo nano /etc/apt/sources.list.d/mene.list

type:

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

CTRL X, Y, enter

Done

Pre-built image ?

Hi, can someone please point me in the direction of the URL for the pre-built image ?

Thank you very much.

Mike.

Pingback

[...] Images kann Kodi auch manuell unter einem bereits lauffähigen Raspbian installiert werden. Unter http://michael.gorven.za.net/raspberrypi/xbmc wird dabei ein eigenes Archiv vor- und bereitgestellt. Wie man aus diesem Archiv Kodi unter [...]

HELP!!!

Hi, I hope someone can help. I have followed the above to the best of my ability and everything seamed to go well. Have kodi listed in my applications but when i run kodi-standalone from terminal it just pauses for a couple seconds and seams to crash. monitor turns to standby and keeps switching off and on but with no input. Did manage to get kodi to load once but it froze on start up screen and had to pull the power to reboot and now i can't get it to run. Have erased and reinstalled raspbian image a couple times and retried above instructions but to no avail. When i run groups kodi i am part of all 6 required groups, have done everything on list..... Please Help!! thanks

14.2 release

I am running Retropie which is basically a modified Raspbian. I added the experimental Kodi package and all seems running fine. But i cannot upgrade from 14.1 to 14.2. When i run a apt-get update && apt-get upgrade it does not find any new package. mene.list is correct

If i try the unstable version it does give me an option to upgrade to the 14.2 RC1 package.

My question is: is Kodi 14.2 stable already made available for raspbian?

Thanks in advance for the help :)

...so far it's in incoming

...so far it's in incoming only, not yet in unstable or contrib. You might want to wait another couple of days. or compile yourself ;-)

Thanks :) yeah I will be

Thanks :) yeah I will be patient. Just glad there are no issues on my side

14.2 should work now in

14.2 should work now in unstable for wheezy, if I'm not mistaken.

Pingback

[...] kann man Kodi problemlos unter Raspbian installieren und bei Bedarf starten. Hier gibt es eine Anleitung, der ich gefolgt bin. Das Ganze war in ein paar Minuten erledigt; die Einrichtung von Kodi dauert [...]

Open-source this

Hi Michael,

Great work with this! I imagine it's troublesome to maintain the repository up to date. Would you consider creating a github project where you would maintain the build script? You could then integrate suggestions from the community, reducing the required time you would have to spend working on this. I believe it would benefit us all!

Keep up the good work! :) Tiago

gpu mem

hi is it possible to add value for gpu mem for 256 or higher? im using raspberry pi 2..thanks

Pingback

[...] בהתקנה של kodi על גבי מערכת ההפעלה הלינוקסאית של המחשב, ימצא בהוראות ההתקנה כיצד להעלות את ה- kodi אוטמטית כשהמכונה [...]

Love to see a 14.2 if possible!

thanks :)

+1 :-)

+1 :-)

+1

Thanks!

E: Unable to locate package kodi

After sudo apt-get install kodi I get E: Unable to locate package kodi

kodi on raspbian

I am having trouble with pi@raspberrypi ~ $ sudo apt-get install kodi

after this... After this operation, 115 MB of additional disk space will be used. Do you want to continue [Y/n]? y

I get a load of errors, similar to this...

Err http://mirrordirector.raspbian.org/raspbian/ wheezy/main libmicrohttpd10 armhf 0.9.20-1+deb7u1 404 Not Found

every single archive is not found.

Please advise what I might be doing wrong?

Many thanks

I think I solved it. Kodi

I think I solved it. Kodi seems to be working fine as a separate app on raspbian now.

I used this... http://drcobra.co.uk/?p=25

basically same as here but with sudo apt-get install xbmc instead of kodi

Keyboard Fix

There's a post on the Raspberry Pi forums under the Raspbian section that adds a few steps to the install process that fixes the issue with the keyboard working everywhere in Kodi. You might want to add those steps to your page as it's easier to find your page than a posting that bounces around depending on whether posts have been added or not. There was also some good information on a fix for Kodi exiting properly. I'm not sure if you made that fix part of the last update or not.

With the keyboard fix, I see no reason (for me at least) to run anything other than Kodi installed right into Raspbian. It makes things much simpler than setting up a dual boot in NOOBS and having to reboot every time I want a browser.

Thanks for putting this all together.

raspberrypi.org /forums/

raspberrypi.org /forums/ viewtopic. php?f=91&t=96151&p=668943

can you post a link here for

can you post a link here for us?

Apparently not

Apparently, I can't post the link on here without triggering the spam filter. Go to the raspberry pi forums and find the section with all the different operating system distributions and click on Raspbian. It shouldn't take long then to find a post with the topic Kodi on Raspbian in that section. It was on page 3 last I looked, but it's going to move around as posts are added.

It really would make the whole install experience much better if that information were just part of this guide though.

Need to replug mouse and keyboard

Hi Michael!

When i exiting Kodi i need to replug mouse & keyboard too, only operate agai after this.

Please help!

Best regards!

Need help running modi

I've followed the instructions here and install onto Raspbian with no issues. I'm not sure to to expect when I run kodi-standalone. I'm running "headless" so either I have a putty terminal session or a TightVNC desktop session. In either case, I run kodi-standalone from terminal command line as root ... I don't know what to expect after that. There's no output generated, is there a log file anywhere? I don't get back to my command-line prompt unless a ctrl-c the script. All I see are these 3 process: root 7142 6948 0 18:54 pts/2 00:00:00 /bin/sh /usr/bin/kodi-standalone root 7150 7142 0 18:54 pts/2 00:00:00 /bin/sh /usr/bin/kodi --standalone root 7153 7150 13 18:54 pts/2 00:00:50 /usr/lib/kodi/kodi.bin --standalone

I meant I need help running

I meant I need help running kodi

I added my user to group tty and everything seems to work.

Yeah.... I was previously asking about a lot of bad things that were not acting right with my pi and kodi. Well, I tried OpenElec and Raspbmc as well, but they were not acting correctly either. So I decided to try Raspbian again but this time I followed your instructions exactly. Before when I got to the section where it talks about adding your user to the group tty, because I didn't know how to add my user to the group I figured I would come back to it if nothing was working. This time I looked at the man page to figure out how to do it. I figured it outd that and my user was already a member of every group except tty. After the user was added everything in Kodi seemed to work. Michael, I think you need to tell people how to add the user to the groups instead of telling people to add their user to the group. try:

sudo usermod -a -Gaudio,video,input,dialout,plugdev,tty pi

The original comment I am referring to is:

'Problem that wasn't reported on the first page'

kodi-bin_14.2 in incoming damaged

The package kodi-bin_14.2~git20150311.e7ba06f-1wheezy_armhf.deb in incoming is damaged and impossible to install. I know that packages in the incoming folder are unstable, you probably already know of the file, its just to let you know.

Thanks

Any chance we can get another

Any chance we can get another build of this, or another release build? It seems like there was some pvr problems fixed recently.

Elod

Hi guys,

First of all, a big thanks to Michael, for making this package, it was indeed easy to install it on my brand new Raspberry Pi 2 config.

I have a question though: Everything works perfectly, but my remote control. The navigation buttons work, but nothing else (Ok, back, etc.) I also have OpenElec installed, and there the same remote works by default without any problem.

Could anybody give some some advice?

Thanks in advance! Elod

Reply to comment | Michael Gorven - cocooncrash

aku benar-benar terkesan bersama dengan Anda menulis bakat sebagai rapi sebagai dengan struktur untuk Anda blog.

Apakah ini dibayar tema atau apakah Anda memodifikasi itu diri Anda? Either way menjaga sampai bagus kualitas tinggi menulis, itu langka untuk melihat a bagus weblog seperti ini hari ini .. http://pulautidungsyair.com/

Stopping kodi

Hey,

I'd like to add a shortcut in Kodi (with Advanced launcher) to run a script that would stop kodi, then run emulationstation, and when I close ES it runs kodi again. What's the best way to stop and restart kodi from a bash script ?

Thanks a lot for the repos Michael :)

remove sudo password /media dir.

Hi Micheal, Thanks for creating an wheezy image with Kodi installed on it. I'm new to Linux and i've run into a little problem with this 'Distro' that i haven't encountered on others (OpenElec, OSMC)and i hope you, or everybody else reading this, can help me out, i've been struggling for days now.

When i try opening a folder in /media i can't access it with my SSH-client. I've always used a windows machine with total commander and SSH plugin to access all my pi's to edit and copy files and that has never been a problem. I think i know what the problem is, but not how to solve it: when i open an directory in /media using the commandline i need to re-enter the sudo password to gain access. My ssh client doesn't allow me to re-enter a password. All other all other distros don't need that second verification, so my guess is that it can be 'turned off'. I hope you can help me out here.

Best regards,

Ben

XBMC Server Key

I am having problems receiving the server key.

I have added the mene.list in /etc/apt/sources.list.d and have tried running the command sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-key 5243CDED and as root but I am getting

Executing: gpg --ignore-time-conflict --no-options --no-default-keyring --secret-keyring /tmp/tmp.Z3ddl4Rlbi --trustdb-name /etc/apt//trustdb.gpg --keyring /etc/apt/trusted.gpg --primary-keyring /etc/apt/trusted.gpg --keyserver keyserver.ubuntu.com --recv-key 5243CDED gpg: requesting key 5243CDED from hkp server keyserver.ubuntu.com gpg: keyserver timed out gpg: keyserver receive failed: keyserver error

Is it still available?

Thanks Nick

Problem that wasn't reported on the first page

Great job at getting Kodi on the Pi, Michael. I do have a problem though. The fix for the black screen seems to just rerun kodi and the fix for the keyboard didn't do a thing to fix it. Another issue which I have not seen reported that I am having is that in 1channel when I press the stop button it presents me with a transparent selection box. Then I have to right click of to the side (to get to to the selection screen we are first presented with upon start) then click video-add ons, I get the trasparent selection box, I right click to the side, then I select videos and then all the selections from there to the tv show I want to watch. Another issue is the mouse scroll-wheel doesn't work. Other than that it is great. I had kodi on a NUC and the image on the pi is sharper and brighter on the Pi.

Pingback

[...] XBMC for Raspberry Pi [...]

Great work.....!

A question. Can you add SDL support to control Kodi with gamepads?

Install Fails for Kodi on RPi2

I am new at this, but have tried to carefully follow the above instructions for installing Kodi on my mew (first) RPi2. After the command sudo apt-get install koi I get Unable to locate package kodi

Any suggestions? Am I the only one seeing this?

Bill K.

I had the same problem

my solution was to put his source in /etc/apt/sources.list

Suggestions

Did you add Michael's repository? sudo nano /etc/apt/sources.list.d/mene.list

enter the following and save it: deb http://archive.mene.za.net/raspbian wheezy contrib

Add Michael's key: sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-key 5243CDED

Then install: sudo apt-get install kodi

Same. Sudo apt-cache search

Same.

Sudo apt-cache search kodi Returns nothing

Rob