hani
Posts: 18
Joined: Mon May 18, 2015 10:11 am

Re: HOWTO: Install Kodi on Raspbian

Wed May 20, 2015 11:11 am

Ok, Rpi newbie here. I managed to get this working for the most part except for the fairly regular black screen on exit issue.

My aim was to be able to launch it from desktop and then return to desktop on exit without shutting down my CEC enabled TV.

I changed the desktop entry to launch kodi-standalone instead of kodi and then within Kodi>System>Setting>System>Input devices>Peripherals, I managed to reconfigure CEC settings to not let Kodi turn off the TV when stoping. You could also play around with some other settings here to get CEC behaviour that you need.

I'm not sure whether to run it as kodi or pi because both seem to have a slightly different effect on the exit freeze issue. What's the difference here?

The only issue remaining is the exit freeze. Sometimes I have to log out (CTL ALT F1) then get back in via command prompt.

Also sometimes when I press the standby (power off button) I get just the 'exit' option while others (first launch after boot usually), I get 'exit', 'power off', 'reboot' and 'custom time' options.

I can't quite figure out what's going on but hoping someone can help or shed some light or fix build.

gkreidl
Posts: 5306
Joined: Thu Jan 26, 2012 1:07 pm
Location: Germany

Re: HOWTO: Install Kodi on Raspbian

Wed May 20, 2015 12:33 pm

With the 15.0-beta-Version I compiled and published it is possible, to start kodi from the desktop and return to it (using my startkodi script, which also patched into the desktop file).
But there may be lots of other problems (especially with plugins); it's an early beta (or even alpha). I'm using it mostly as a media player and that's working fine.
I'll compile a new version next week or so ...
Minimal Kiosk Browser (kweb)
Slim, fast webkit browser with support for audio+video+playlists+youtube+pdf+download
Optional fullscreen kiosk mode and command interface for embedded applications
Includes omxplayerGUI, an X front end for omxplayer

hani
Posts: 18
Joined: Mon May 18, 2015 10:11 am

Re: HOWTO: Install Kodi on Raspbian

Wed May 20, 2015 1:37 pm

gkreidl wrote:With the 15.0-beta-Version I compiled and published it is possible, to start kodi from the desktop and return to it (using my startkodi script, which also patched into the desktop file).
But there may be lots of other problems (especially with plugins); it's an early beta (or even alpha). I'm using it mostly as a media player and that's working fine.
I'll compile a new version next week or so ...
yeah, I saw that on some other posts. People have reported stability issues so I think I'll wait till it's tested and released via normal update. Thanks for working on it, it's nearly where it needs to be. I can live with the exit issues for now.

emeric
Posts: 2
Joined: Sun Nov 16, 2014 6:40 pm

Re: HOWTO: Install Kodi on Raspbian

Sat May 23, 2015 3:50 pm

hi,

Could i run a program on rasbian that reeds a analoge value of a tempsensor in one of the gpio pins and uses that info to control a coolingfan. All while running the kodi program?

gkreidl
Posts: 5306
Joined: Thu Jan 26, 2012 1:07 pm
Location: Germany

Re: HOWTO: Install Kodi on Raspbian

Sat May 23, 2015 4:36 pm

emeric wrote:hi,

Could i run a program on rasbian that reeds a analoge value of a tempsensor in one of the gpio pins and uses that info to control a coolingfan. All while running the kodi program?
Yes, if you run it in the background before starting kodi.
Minimal Kiosk Browser (kweb)
Slim, fast webkit browser with support for audio+video+playlists+youtube+pdf+download
Optional fullscreen kiosk mode and command interface for embedded applications
Includes omxplayerGUI, an X front end for omxplayer

bismosa
Posts: 40
Joined: Sun Dec 23, 2012 11:43 am

Re: HOWTO: Install Kodi on Raspbian

Mon May 25, 2015 7:45 am

Hello,

I have some trouble to get it to work.
I have installed the last Raspian (from Image) and the last Kodi (14.2)
I have also a DVB-S2 Receiver with tvheadend configured.
I dont use the graphical interface from Raspian. I just want to use Kodi and a few other services (small Web-Server, Logitech media Server, File-Server, ...) And for this reason I can not use OpenELEC.

I have added my MPEG2 License key and gpu_mem=256 to my config.txt

My Problems:
1.) Kodi seems to be running fine. But after a few hours (of Idle) it can happen that Kodi will no response. If i try a restart (service kodi restart) Kodi can not be stopped. A "killall kodi.bin" cant stop Kodi. All other services are running fine.
If i try to reboot all services except Kodi are stopped and no reboot is possible.

2.) All Videos are Playing fine. I also can use Timeshift without trouble. But very often (i dont know when it will happen) If i try to play a movie from my Harddisk Kodi crashes. I have uploaded a crashlog here: http://xbmclogs.com/plddde1cw
I have to repeatedly restart until it works again...
If i watch the CPU and Memory usage everything looks fine.

I don´t know how i can find the error. I have reinstalled the system and the same problems. I have also tried with a different SD-Card...no luck.
I'm not happy with the problems. I hope someone can give me a hint...before the raspberry still fly out the window...

Regards
Bismosa

gkreidl
Posts: 5306
Joined: Thu Jan 26, 2012 1:07 pm
Location: Germany

Re: HOWTO: Install Kodi on Raspbian

Mon May 25, 2015 8:25 am

It seems, that you are running kodi as root, which is not a good idea for any program connecting to the internet.

But if you do so, you have to log in as root, to stop the service or use killall, or to use sudo.
Minimal Kiosk Browser (kweb)
Slim, fast webkit browser with support for audio+video+playlists+youtube+pdf+download
Optional fullscreen kiosk mode and command interface for embedded applications
Includes omxplayerGUI, an X front end for omxplayer

bismosa
Posts: 40
Joined: Sun Dec 23, 2012 11:43 am

Re: HOWTO: Install Kodi on Raspbian

Mon May 25, 2015 1:24 pm

Yes, i run this as root. So can i reboot the machine from the Exit menu.
It makes no difference if i run as root or as user. I cant kill it if does not respond. I tried to kill it as root...

It is important for me that it no longer crashes. So it is not useful for me...

gkreidl
Posts: 5306
Joined: Thu Jan 26, 2012 1:07 pm
Location: Germany

Re: HOWTO: Install Kodi on Raspbian

Mon May 25, 2015 1:36 pm

bismosa wrote:Yes, i run this as root. So can i reboot the machine from the Exit menu.
It makes no difference if i run as root or as user. I cant kill it if does not respond. I tried to kill it as root...

It is important for me that it no longer crashes. So it is not useful for me...
Either use one of the black screen bug fixes or kill it from another computer using ssh or use kodi-15-beta (which has other problems but the black screen, hanging kodi bug is fixed)
Minimal Kiosk Browser (kweb)
Slim, fast webkit browser with support for audio+video+playlists+youtube+pdf+download
Optional fullscreen kiosk mode and command interface for embedded applications
Includes omxplayerGUI, an X front end for omxplayer

bismosa
Posts: 40
Joined: Sun Dec 23, 2012 11:43 am

Re: HOWTO: Install Kodi on Raspbian

Mon May 25, 2015 5:56 pm

It is not the classic black screen...I do not want to quit Kodi. But Kodi does not respond and i try to restart it.

I have even made a few tests. I can not figure out at what point the problem of crashes arises. I can boot up...everything works well. I can play all my Movies and Live TV. If i reboot again nothing works. Playing the same Video...Kodi crashes and restart...then it will work again...and so on.
Often after a restart Kodi crashes at the first Video. If then only Kodi is restarted it will work fine.
But it seems more crashing when I connect my external DVD player. I don´t have problems with my power supply. I have never seen the colorful square...and sometimes it just works again.

I have made a short test with Openelec...everything works fine. But that's not an option for me.

I just do not understand it...please help me! Where can I start looking for the error?

raspi_fan
Posts: 3
Joined: Sun May 24, 2015 6:34 pm

Re: HOWTO: Install Kodi on Raspbian

Tue Jun 02, 2015 7:28 pm

I don't want to just bother so I ask - is anybody interested in my set of scripts that keeps working fine since a few weeks with the standard

Code: Select all

kodi --version
14.2 Git:7cc53a9 Media Center Kodi
Copyright (C) 2005-2013 Team Kodi - http://kodi.tv
that I installed from the standard repository? I have to mention that I replaced Lxde with Xfce and removed Xscreensaver (I prefer Xserver screen blanking) before I started to fiddle around with Kodi - which may make a difference (?). Basically I copied most of the stuff I found in this thread and then tried this and that. Accidentally I seem to have come across something that works on two Raspberries here. Still a framebuffer-resetting and desktop-restarting flickering on exiting Kodi, but it does the job. Surely could be optimized by the pros here...

G160
Posts: 7
Joined: Sun Dec 23, 2012 1:32 pm

Re: HOWTO: Install Kodi on Raspbian

Fri Jun 19, 2015 6:55 am

raspi_fan wrote:I don't want to just bother so I ask - is anybody interested in my set of scripts that keeps working fine since a few weeks with the standard

Code: Select all

kodi --version
14.2 Git:7cc53a9 Media Center Kodi
Copyright (C) 2005-2013 Team Kodi - http://kodi.tv
that I installed from the standard repository? I have to mention that I replaced Lxde with Xfce and removed Xscreensaver (I prefer Xserver screen blanking) before I started to fiddle around with Kodi - which may make a difference (?). Basically I copied most of the stuff I found in this thread and then tried this and that. Accidentally I seem to have come across something that works on two Raspberries here. Still a framebuffer-resetting and desktop-restarting flickering on exiting Kodi, but it does the job. Surely could be optimized by the pros here...
I'm interested in looking at your scripts mate...could you post/upload them somewhere?
Also could you go into detail about how you replaced LXDE ?
Cheers.

gkreidl
Posts: 5306
Joined: Thu Jan 26, 2012 1:07 pm
Location: Germany

Re: HOWTO: Install Kodi on Raspbian

Fri Jun 19, 2015 7:09 am

There's a separate thread about scripts to "fix" the black screen bug:
viewtopic.php?f=63&t=100811
Minimal Kiosk Browser (kweb)
Slim, fast webkit browser with support for audio+video+playlists+youtube+pdf+download
Optional fullscreen kiosk mode and command interface for embedded applications
Includes omxplayerGUI, an X front end for omxplayer

raspi_fan
Posts: 3
Joined: Sun May 24, 2015 6:34 pm

Re: HOWTO: Install Kodi on Raspbian

Sat Jun 20, 2015 7:59 pm

Hi G160, here is what I did.

Regarding the switch LXDE to XFCE I got my inspiration from here:

Code: Select all

http://gizmeo.eu/raspbian-mit-xfce/
Since this in German let me summarize the most relevant.
Install XFCE:

Code: Select all

sudo apt-get install xfce4 xfce4-goodies
I did not use the mentioned

Code: Select all

sudo dpkg --set-selections
because I want to receive updates for XFCE from the repository in case they become available.
Remove LXDE:

Code: Select all

sudo apt-get remove lxde lxappearance lxde-common lxde-core lxde-icon-theme lxinput lxmenu-data lxpanellxpolkit lxrandr lxsession lxsession-edit lxshortcut lxtasklxterminal
and reboot. I also removed Xscreensaver since I was unsure if something might be going wrong with it in the background while Kodi is running. I created two very basic and small scripts to turn on and off the screensaver option from xserver (shown below). The startscript I have also executed at boot time.

These are the relevant scripts (mentioned with location to be precise but certainly they could be stored anywhere). All scripts certainly have to made executable with

Code: Select all

sudo chmod +x path_to_script/scriptname.sh
~/Dokumente/startkodi.sh (almost completely gathered from this forum)

Code: Select all

cd /home/pi/Dokumente
./scoff.sh
LOG_FILE=$HOME/.kodi/temp/kodi.log
rm $LOG_FILE 2>/dev/null
/usr/lib/kodi/kodi.bin --standalone &
while [[ ! -f $LOG_FILE ]] ; do
sleep 1s
done
while read line ; do
if [[ ${line} =~ "application stopped" ]] ; then
break
fi
done < <(tail --pid=$$ -f -n0 $LOG_FILE)
killall kodi.bin 2>/dev/null
cd /home/pi/Dokumente
./sc.sh
fbset -depth 8 && fbset -depth 16
xfce4-panel -r -d 2>/dev/null
xfdesktop --reload 2>/dev/null
xrefresh
~/Dokumente/sc.sh

Code: Select all

xset s on
xset -dpms
xset s 120
~/Dokumente/scoff.sh

Code: Select all

xset s off
I created a starter in the XFCE panel containing this command (intentionally runs Kodi in a xfce terminal). Most of this is to only show a black rectangle rather than the commands executed while starting Kodi (wife acceptance factor gets better that way... ;) )

Code: Select all

xfce4-terminal --hide-borders --hide-toolbars --hide-menubar -x /home/pi/Dokumente/startkodi.sh
which results in a file like this
~/.config/xfce4/panel/launcher-8/14311711514.desktop containing this

Code: Select all

Desktop Entry]
Version=1.0
Name=Kodi Media Center
GenericName=Media Center
Comment=Manage and view your media
Exec=xfce4-terminal --hide-borders --hide-toolbars --hide-menubar -x /home/pi/Dokumente/startkodi.sh
Icon=kodi
Terminal=false
Type=Application
Categories=AudioVideo;Video;Player;TV;
Actions=Fullscreen;Standalone;
X-XFCE-Source=file:///usr/share/applications/start-kodi.desktop

Path=/home/pi/Dokumente
StartupNotify=false

[Desktop Action Fullscreen]
Name=Open in fullscreen
Exec=/home/pi/Dokumente/startkodi.sh
OnlyShowIn=Unity;

[Desktop Action Standalone]
Name=Open in standalone mode
Exec=/home/pi/Dokumente/startkodi.sh
OnlyShowIn=Unity;
I hope this will work for others too. Good luck!

rubiks
Posts: 32
Joined: Mon Jul 13, 2015 10:14 pm

Re: HOWTO: Install Kodi on Raspbian

Fri Jul 17, 2015 11:53 pm

Very new to Raspbian.

For step 2. "enter the following and save "deb http://archive.mene.za.net/raspbian wheezy contrib"

I Ctl +O to write out, but it shows Doc, Mac etc. What do I need to do to save the repository? Thanks.

gkreidl
Posts: 5306
Joined: Thu Jan 26, 2012 1:07 pm
Location: Germany

Re: HOWTO: Install Kodi on Raspbian

Sat Jul 18, 2015 4:41 am

rubiks wrote:Very new to Raspbian.

For step 2. "enter the following and save "deb http://archive.mene.za.net/raspbian wheezy contrib"

I Ctl +O to write out, but it shows Doc, Mac etc. What do I need to do to save the repository? Thanks.
Most important, it shows the file name with a blinking cursor at the end. Just hit Return (and afterwards CTRL +x to quit).

If you are nor comfortable with using a command line editor, you can also use leafpad (if you're on the desktop). Simply replace
sudo nano ...
with
gksudo leafpad ...
Minimal Kiosk Browser (kweb)
Slim, fast webkit browser with support for audio+video+playlists+youtube+pdf+download
Optional fullscreen kiosk mode and command interface for embedded applications
Includes omxplayerGUI, an X front end for omxplayer

rubiks
Posts: 32
Joined: Mon Jul 13, 2015 10:14 pm

Re: HOWTO: Install Kodi on Raspbian

Sun Jul 19, 2015 3:28 pm

Thanks for the guide. Got everything working on my Pi 2 except the black screen. How do get back to Raspbian or Kodi screen from the black screen? Thanks.

gkreidl
Posts: 5306
Joined: Thu Jan 26, 2012 1:07 pm
Location: Germany

Re: HOWTO: Install Kodi on Raspbian

Sun Jul 19, 2015 6:27 pm

rubiks wrote:Thanks for the guide. Got everything working on my Pi 2 except the black screen. How do get back to Raspbian or Kodi screen from the black screen? Thanks.
There are some workarounds, which you can find on the forum. But a much better solution may be to upgrade to kodi-15, where the bug has been fixed. It's very stable now (Release Candidate 3).
viewtopic.php?f=66&t=109088
Minimal Kiosk Browser (kweb)
Slim, fast webkit browser with support for audio+video+playlists+youtube+pdf+download
Optional fullscreen kiosk mode and command interface for embedded applications
Includes omxplayerGUI, an X front end for omxplayer

rubiks
Posts: 32
Joined: Mon Jul 13, 2015 10:14 pm

Re: HOWTO: Install Kodi on Raspbian

Wed Jul 22, 2015 3:28 am

New to Kodi and Raspbian.

Installed kodi on my Rasbian and put some addons (genesis and sportdevil).

When I watched anything from the addons, most of them just hang there with black screen with pause, stop etc at the bottom. Does anyone know why? Internet speed is 25mb which should be sufficient.

Thanks

gkreidl
Posts: 5306
Joined: Thu Jan 26, 2012 1:07 pm
Location: Germany

Re: HOWTO: Install Kodi on Raspbian

Wed Jul 22, 2015 8:23 am

Probably blocked by geolocation.
Minimal Kiosk Browser (kweb)
Slim, fast webkit browser with support for audio+video+playlists+youtube+pdf+download
Optional fullscreen kiosk mode and command interface for embedded applications
Includes omxplayerGUI, an X front end for omxplayer

Mark2013
Posts: 8
Joined: Sat Aug 10, 2013 10:27 pm

Re: HOWTO: Install Kodi on Raspbian

Wed Aug 19, 2015 4:19 pm

Using the Nano editor I made all the copy & pastes in this HOWTO. On running kodi --standalone (or was that only one hyphen -standalone) the terminal seized up and returned a "bad line . . . Python". I had to reboot my PI, which is Raspbian with Kodi selectable under Graphics.

Using the Android app: RaspPi check, I can reboot and Kodi is OK, but the Isengard update stuff is still there and Isengard is unlikely to be installed.

gkreidl
Posts: 5306
Joined: Thu Jan 26, 2012 1:07 pm
Location: Germany

Re: HOWTO: Install Kodi on Raspbian

Wed Aug 19, 2015 5:35 pm

kodi-standalone (no space!) is a separate script to launch kodi.

kodi won't upgrade itself to version 15 Isengard and it's also not available in the Raspbian repository. But you can download and install it: viewtopic.php?f=66&t=109088
Minimal Kiosk Browser (kweb)
Slim, fast webkit browser with support for audio+video+playlists+youtube+pdf+download
Optional fullscreen kiosk mode and command interface for embedded applications
Includes omxplayerGUI, an X front end for omxplayer

scar4ace
Posts: 11
Joined: Wed May 06, 2015 9:26 am

Re: HOWTO: Install Kodi on Raspbian

Mon Nov 02, 2015 12:52 am

Hey, just trying to understand how people run kodi on raspbian, and why the exit issue (kodi 14.x) was such a big deal. I am probably not making the most of my raspberry pi capabilities. :)

Current setup kodi 14.2 on raspbian (wheezy). Headless setup, rPi connected to my TV over HDMI. rPI also hooked up via LAN and is attached to USB storage which feeds into Kodi for local media playback, and the rpi also acts as NAS around my house. I SSH to the rPI for everything. On the TV display I only see the login prompt when rpi boots up, but I cannot control it (no USB Keyboard/mouse). I SSH to the rPi mainly, and sometimes have tried GUI display from MAC (but its too small and annoying to use). I wouldnt want to run kodi there and playback media!

SO, when I SSH to rPI, and I run "kodi-standalone" kodi will immediately start-up on my TV (HDMI - cec). So I am just trying to understand what session is this attached to?. What session is the HDMI connection, and why does kodi run on that by default

At that stage whether kodi exits or not, I still have my SSH session available, and can always have new SSH sessions. or graphical VNC sessions right?

So those users complaining of the exit problem (later fixed in Kodi 15) , is this when you run kodi via a GUI session (something like VNC?) Or to to a Physical Display connected to HDMI?

And when Kodi is not running, what do you use on the HDMI display? do you use it like a normal computer? is it a terminal (command line stuff) or does it appear as a GUI interface? So do you run other apps/media etc?

Cause I also run deluge on my but again its launched via command line and then runs in the background. I just manage it from another computer

CHeers
Raspberry Pi 2B (Raspbian wheezy)

scar4ace
Posts: 11
Joined: Wed May 06, 2015 9:26 am

Re: HOWTO: Install Kodi on Raspbian

Mon Nov 02, 2015 4:23 am

Also, I have now lost control of Kodi (CEC remote controller doesn't work even though no settings were changed, and CEC still enabled on Samsung TV)

Its a new raspbian/kodi install so I hadn't enabled the web control interface on Kodi (cannot use phone app). So i seem to be locked out of controlling kodi apart from start/stop via commands

Is there a way I can run Kodi AND view/control it over xrdp or other X/gui session? When I tried starting it over xrdp it seems to start somewhere else (display on TV) and no way I can control it to check CEC settings)

I tried remove kodi then reinstalll

Code: Select all

sudo dpkg -r kodi
sudo apt-get install kodi
But still no luck with CEC.
Raspberry Pi 2B (Raspbian wheezy)

gkreidl
Posts: 5306
Joined: Thu Jan 26, 2012 1:07 pm
Location: Germany

Re: HOWTO: Install Kodi on Raspbian

Mon Nov 02, 2015 9:18 am

@scar4ace: You use of kodi on Raspbian looks a bit special to me. I think that the main reason for installing kodi on Raspbian is to use it as a media player alternative, from the Desktop, for example. This also means, that you can control kodi with mouse and keyboard, which I prefer to using a TV remote (which is not available on a monitor anyway).

I once lost CEC connection on my TV. Re-powering it solved the issue (really removing power and connecting it again).
Minimal Kiosk Browser (kweb)
Slim, fast webkit browser with support for audio+video+playlists+youtube+pdf+download
Optional fullscreen kiosk mode and command interface for embedded applications
Includes omxplayerGUI, an X front end for omxplayer

Return to “Raspbian”

Who is online

Users browsing this forum: No registered users and 23 guests