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.

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

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.

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

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

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?

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

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.

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

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... )

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

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.

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

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)

@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