Tom_A
Posts: 272
Joined: Fri Dec 06, 2013 8:34 am

Re: Exit Fix for Kodi Raspbian built

Wed May 27, 2015 6:47 am

fade2gray wrote: You are absolutely correct - thanks for pointing that out.
Now give my script a shot. Remember, if you ever launch from console, use the second version of the script I posted or I believe it only works once without issue.

hissingshark
Posts: 12
Joined: Wed Apr 29, 2015 6:11 pm

Re: Exit Fix for Kodi Raspbian built

Mon Jun 01, 2015 12:30 pm

Thanks Tom_A for this script.

I needed to use the chvt fix to get the screen back up, but I couldn't use Alt-F2, Alt-F1 etc because the crash also seems to disable my Logitech Unifying USB Receiver. I have to unplug/replug the reciever to get the keyboard back.

So first I bound the chvt fix to a key combination on my Xbox controller in the event of a crash.

After I get the screen back I still had no keyboard so was no better off. I've downloaded and compiled this "usb reset" https://gist.github.com/x2q/5124616 program and added it with some grep action to your script to get everything done in one.

Code: Select all

#!/bin/bash

sleep 5

while [ $(pgrep "kodi.bin") ]
do
    if [[ $(tail -1 /home/pi/.kodi/temp/kodi.log | grep "application stopped...") ]]
    then
        /usr/bin/pkill kodi.bin
        mv /home/pi/.kodi/temp/kodi.log /home/pi/.kodi/temp/kodi.old.log

        # then switch the vt back and force to get the screen back
        chvt 2 && sleep 1 && chvt 1

        # and then restart the usb dongle to get the keyboard back
        kbbus=$(lsusb| grep "Logitech, Inc. Unifying Receiver" | cut -d " " -f 2) # extract bus number
        kbdev=$(lsusb| grep "Logitech, Inc. Unifying Receiver" | cut -d " " -f 4 | cut -d ":" -f 1) # extract device number
        sudo /usr/bin/usbreset /dev/bus/usb/$kbbus/$kbdev # restart the device
    fi
    sleep 1
done
I hope this is of help to someone. I look forward to an official fixed package in the repository. I had no luck compiling the newer version myself.

Thanks again.

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

Re: Exit Fix for Kodi Raspbian built

Mon Jun 01, 2015 2:04 pm

hissingshark wrote:... I look forward to an official fixed package in the repository. I had no luck compiling the newer version myself.

Thanks again.
Have a look here:
viewtopic.php?f=66&t=109088#p749989
kodi-15-beta2, just a few days old, compiled for ARMv7 with NEON support. The download also includes libcec3, which is now required by 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

Tom_A
Posts: 272
Joined: Fri Dec 06, 2013 8:34 am

Re: Exit Fix for Kodi Raspbian built

Wed Jun 03, 2015 4:04 am

Here's a little bit of an improvement on the exit fix scripting. I've come up with a better solution that does not mess with the way that the kodi-standalone handles crashes. In the kodi-standalone script you need to find "$APP" and change it to "$APP &" so that the script will not wait for Kodi to finish before continuing. Then we add my script as a loop directly following "$APP" so the script can check for the exitfix problem.

Code: Select all

#  Fix black screen on exit
  sleep 5
  while [ $(pgrep "kodi.bin") ]
  do
      if [[ $(tail -1 /home/tomalperin/.kodi/temp/kodi.log | grep "application stopped...") ]]
      then
        /usr/bin/pkill kodi.bin
        mv /home/tomalperin/.kodi/temp/kodi.log /home/tomalperin/.kodi/temp/kodi.old.log
        LOOP=0 #Exit loop if Kodi killed
      fi
      sleep 2
  done
  wait %1
#  End black screen fix
If you have previously applied my other fix, you will want to remove the "LOOP=0" you added to the crash section. Make sure you remove the right one, the one YOU added and not the one that was already there. You will also want to remove the part of the script that calls the old exitfix script. Well will be including it in the kodi-standalone script so that we can easily determine whether it was a crash or if the "exit fix" code killed Kodi.

BACK UP YOUR SCRIPTS BEFORE YOU EDIT!

Confused? Here's the entire kodi-standalone as it should look with the fix:

Code: Select all

#!/bin/bash

#      Copyright (C) 2009-2013 Team XBMC
#      http://xbmc.org
#
#  This Program is free software; you can redistribute it and/or modify
#  it under the terms of the GNU General Public License as published by
#  the Free Software Foundation; either version 2, or (at your option)
#  any later version.
#
#  This Program is distributed in the hope that it will be useful,
#  but WITHOUT ANY WARRANTY; without even the implied warranty of
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
#  GNU General Public License for more details.
#
#  You should have received a copy of the GNU General Public License
#  along with XBMC; see the file COPYING.  If not, write to
#  the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
#  http://www.gnu.org/copyleft/gpl.html

APP=Kodi
prefix="/usr"
exec_prefix="${prefix}"
bindir="${exec_prefix}/bin"
bin_name=kodi
APP="${bindir}/${bin_name} --standalone [email protected]"

PULSE_START="$(which start-pulseaudio-x11)"
if [ -n "$PULSE_START" ]; then
  $PULSE_START
else
  PULSE_SESSION="$(which pulse-session)"
  if [ -n "$PULSE_SESSION" ]; then
    XBMC="$PULSE_SESSION $XBMC"
  fi
fi

LOOP=1
CRASHCOUNT=0
LASTSUCCESSFULSTART=$(date +%s)

FB_GEOMETRY="$(fbset --show | grep geometry | cut -d' ' -f 6-)"

while [ $(( $LOOP )) = "1" ]
do
  $APP &
#  Fix black screen on exit
  sleep 5
  while [ $(pgrep "kodi.bin") ]
  do
      if [[ $(tail -1 /home/tomalperin/.kodi/temp/kodi.log | grep "application stopped...") ]]
      then
        /usr/bin/pkill kodi.bin
        mv /home/tomalperin/.kodi/temp/kodi.log /home/tomalperin/.kodi/temp/kodi.old.log
        LOOP=0 #Exit loop if Kodi killed
      fi
      sleep 2
  done
  wait %1
#  End black screen fix
  RET=$?
  NOW=$(date +%s)
  if [ $(( ($RET >= 64 && $RET <=66) || $RET == 0 )) = "1" ]; then # clean exit
    LOOP=0
  else # crash
    DIFF=$((NOW-LASTSUCCESSFULSTART))
    if [ $(($DIFF > 60 )) = "1" ]; then # Not on startup, ignore
      LASTSUCESSFULSTART=$NOW
      CRASHCOUNT=0
    else # at startup, look sharp
      CRASHCOUNT=$((CRASHCOUNT+1))
      if [ $(($CRASHCOUNT >= 3)) = "1" ]; then # Too many, bail out
        LOOP=0
        echo "${APP} has exited uncleanly 3 times in the last ${DIFF} seconds."
        echo "Something is probably wrong"
      fi
    fi
  fi
done

fbset --geometry $FB_GEOMETRY
VT="$(fgconsole)"
if [ "$VT" ]; then
  sudo chvt 7
  sudo chvt "$VT"
fi
If it works, you might want to save a copy somewhere as it will likely be overwritten if Kodi is updated. I'm curious to find out if this works launching from CLI as well as the chvt stuff at the bottom has not been commented out.
---Update----------------------
One problem still exists. It appears that I can't get the exit code when using "&" so the script exits on a crash as it did with the previous solution. If anyone knows how to properly get the exit code when using & (if that is possible) the script would work a little better. I'll keep researching to see if I can find a solution.
---Update 2-------------------
I think I've figured out how to get the proper exit code now so that Kodi can relaunch properly on a crash but not if killed to deal with the black screen issue. I've put the changes into the script above.
Last edited by Tom_A on Wed Jun 03, 2015 8:15 pm, edited 3 times in total.

User avatar
Mequa
Posts: 172
Joined: Sun Sep 09, 2012 9:54 pm
Location: England
Contact: Website

Re: Exit Fix for Kodi Raspbian built

Wed Jun 03, 2015 9:49 am

gkreidl wrote:
hissingshark wrote:... I look forward to an official fixed package in the repository. I had no luck compiling the newer version myself.

Thanks again.
Have a look here:
viewtopic.php?f=66&t=109088#p749989
kodi-15-beta2, just a few days old, compiled for ARMv7 with NEON support. The download also includes libcec3, which is now required by kodi.
Is the YouTube plugin working yet on that build?

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

Re: Exit Fix for Kodi Raspbian built

Wed Jun 03, 2015 10:01 am

Mequa wrote: Is the YouTube plugin working yet on that build?
Yes, but there's one small problem: If you stop a running youtube video, the video stops, but the stream seems to continue in the background and kodi seems to freeze (but it doesn't, seems to be waiting until the stream is finished).
Workaround: move the slider to the end and it will stop by itself.

There's no difference in the add-on API between kodi 14 and 15, so most add-ons should work, except for the (binary!) pvr-add-ons.
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

Tom_A
Posts: 272
Joined: Fri Dec 06, 2013 8:34 am

Re: Exit Fix for Kodi Raspbian built

Thu Jun 04, 2015 2:47 am

gkreidl wrote:
Mequa wrote: Is the YouTube plugin working yet on that build?
Yes, but there's one small problem: If you stop a running youtube video, the video stops, but the stream seems to continue in the background and kodi seems to freeze (but it doesn't, seems to be waiting until the stream is finished).
Workaround: move the slider to the end and it will stop by itself.

There's no difference in the add-on API between kodi 14 and 15, so most add-ons should work, except for the (binary!) pvr-add-ons.
With the latest changes I made to the the exit fix script additions to kodi-standalone, restart on crash works like it should and I never get stuck at the black screen anymore. Updating to Kodi 15 would require I update it everywhere I run it, even the one core i3 machine I have running Kodi since they all share the same library and that requires they all be on the same version.

Micha1982
Posts: 261
Joined: Wed Oct 03, 2012 11:18 am

Re: Exit Fix for Kodi Raspbian built

Sun Jun 07, 2015 11:56 am

expandables wrote:
Fght wrote:sorry,
i did it but my tv still turning off....... when i exit kodi
If your TV turning off then you have CEC enable.
To disable CEC in kodi go to system settings then go to input devices you will see "Peripherals" click on that and a box will appear saying cec adapter. Now Click on that and where you see enable click on that to disable the cec adapter and press OK.

Also you might want to put this in your config file

Code: Select all

sudo nano /boot/config.txt

Code: Select all

hdmi_ignore_cec=1
hdmi_ignore_cec_init=1
:mrgreen:
But if I do, I am not able anymore to control Kodi through my remote :o
Is there any other way to keep tv powered? Is there a way to change this in future release 15, is there any option in Kodi maybe to choose whether tv stays on or off on exit?
Alles, was schiefgehen kann, wird auch schiefgehen.

Tom_A
Posts: 272
Joined: Fri Dec 06, 2013 8:34 am

Re: Exit Fix for Kodi Raspbian built

Wed Jun 10, 2015 2:58 am

Micha1982 wrote: But if I do, I am not able anymore to control Kodi through my remote :o
Is there any other way to keep tv powered? Is there a way to change this in future release 15, is there any option in Kodi maybe to choose whether tv stays on or off on exit?
I believe the "hdm_ignore_cec_init=1" only prevent's cec from turning on the TV, so you can use that. If you select CEC from Kodi settings, you can edit a number of settings. You should be able to turn off all the settings that have anything to do with waking/sleeping including a setting that turns off the TV when exiting Kodi.

User avatar
fade2gray
Posts: 15
Joined: Fri Apr 24, 2015 2:21 pm

Re: Exit Fix for Kodi Raspbian built

Fri Jun 12, 2015 3:14 pm

This post is superseded by this one.
Last edited by fade2gray on Tue Jun 16, 2015 12:36 am, edited 4 times in total.

Tom_A
Posts: 272
Joined: Fri Dec 06, 2013 8:34 am

Re: Exit Fix for Kodi Raspbian built

Fri Jun 12, 2015 4:14 pm

fade2gray wrote:Firstly, thanks to expandables for starting this thread - otherwise I might not have stumbled on Tom_A's fix which kind of worked for me but still left me with a couple of issues mentioned by others, in that Kodi would still exit with a black screen on every other run, and also communication with my mini wireless keyboard would be lost.
Just curious, did you try the version of my script that fixed restarting in the event of a crash? In that version I left in the chvt parts. It might be possible to just change the chvt parts on the end of the kodi-standalone file as well.

I notice you've opted for putting the fix in kodi instead of kodi-standalone. I like that you used "$USER" so that the script works no matter what user is running kodi.

User avatar
fade2gray
Posts: 15
Joined: Fri Apr 24, 2015 2:21 pm

Re: Exit Fix for Kodi Raspbian built

Tue Jun 16, 2015 12:29 am

Tom_A wrote: Just curious, did you try the version of my script that fixed restarting in the event of a crash? In that version I left in the chvt parts. It might be possible to just change the chvt parts on the end of the kodi-standalone file as well.

I notice you've opted for putting the fix in kodi instead of kodi-standalone.
You do realise that /usr/bin/kodi-standalone just calls /usr/bin/kodi with '--standalone' as a parameter? So fix the latter and you fix the former (apart from the need to insert the additonal LOOP=0 into standalone to prevent it restarting Kodi).
Tom_A wrote:I like that you used "$USER" so that the script works no matter what user is running kodi.
Yes, you forgot to mention a couple of things like the need to swap out the username and that you changed #!/bin/sh to #!/bin/bash. ;)

One thing with your method though, sending kodi.bin to the background prevents crash reports being generated.

Also, I've updated my fix with fewer edits. :)
Last edited by fade2gray on Wed Jun 17, 2015 11:14 am, edited 1 time in total.

User avatar
fade2gray
Posts: 15
Joined: Fri Apr 24, 2015 2:21 pm

Re: Exit Fix for Kodi Raspbian built

Tue Jun 16, 2015 12:33 am

Firstly, thanks to expandables for starting this thread - otherwise I might not have stumbled on Tom_A's fix which kind of worked for me but still left me with a couple of issues mentioned by others, in that Kodi would still exit with a black screen on every other run, and also communication with my mini wireless keyboard would be lost.

So inspired by Tom_A's script, here's my solution that works for both kodi and kodi-standalone (on a raspberry pi 2 running Kodi 14.2 from the default repo), no matter what method is used to call them.

If you just want to launch Kodi from the console/desktop raspberry menu, just follow steps 1 & 2. If you want to launch Kodi from the lightdm login screen, you will also need perform step 3.

1. Create a file named kodi-exit-fix in /usr/bin/ with the following content (it does not need to be executable)

Code: Select all

#Function to monitor status of kodi.bin
KillKodiBinOnExit(){
  # Define some variables
  klog="/home/"$USER"/.kodi/temp/kodi.log"
  koldlog="/home/"$USER"/.kodi/temp/kodi.old.log"

  # Rename kodi.log to kodi.old log
  if [ -f "$klog" ]; then mv "$klog" "$koldlog"; fi
  # Wait for Kodi to start and create new kodi.log
  until [ -e "$klog" ]; do true; done
  # Monitor kodi.bin and kodi.log then kill kodi.bin if necesssary
  while [ $(pgrep "kodi.bin") ]; do
    if [ "$(tail -1 "$klog" | grep "application stopped...")" ]
	then pkill kodi.bin; fi
  done
}

# Call function and start Kodi
KillKodiBinOnExit &
"$LIBDIR/${bin_name}/${bin_name}.bin" $SAVED_ARGS
RET=$?
wait %1

# Fix black screen on exit
sudo chvt "$(ps aux|grep -oP 'noclear\s\d+?\stty\d$'|grep -oP '(?<=tty)\d$')"
sudo chvt "$(ps aux|grep -oP '(?<=tty)\d(?=.*novtswitch$)')"

2. Open /usr/bin/kodi for editing
FIND

Code: Select all

  "$LIBDIR/${bin_name}/${bin_name}.bin" $SAVED_ARGS
  RET=$?
  if [ $(( $RET == 65 )) = "1" ]
CHANGE TO
Important: notice the period and space before 'kodi-exit-fix'

Code: Select all

  #"$LIBDIR/${bin_name}/${bin_name}.bin" $SAVED_ARGS
  #RET=$?
  . kodi-exit-fix
  if [ $(( $RET == 65 )) = "1" ]
3. Open /usr/bin/kodi-standalone for editing (optional step)
FIND

Code: Select all

  else # crash
    DIFF=$((NOW-LASTSUCCESSFULSTART))
CHANGE TO

Code: Select all

  else # crash
	LOOP=0
    DIFF=$((NOW-LASTSUCCESSFULSTART))
For me, the two 'sudo chvt' commands, in step 1, resolve to ' sudo chvt 1' and 'sudo chvt 7' respectively.

I determined this by entering ps aux|grep tty at a terminal while kodi was running...

Image

If that function doesn't fix the black screen for you but you know the two terminal numbers required, just change the code in the functions to (for example)...

Code: Select all

# Fix black screen on exit
# sudo chvt "$(ps aux|grep -oP 'noclear\s\d+?\stty\d$'|grep -oP '(?<=tty)\d$')"
# sudo chvt "$(ps aux|grep -oP '(?<=tty)\d(?=.*novtswitch$)')"
sudo chvt 1
sudo chvt 7
If you try this solution, don't forget to backup any files you edit - good luck ;)

Tom_A
Posts: 272
Joined: Fri Dec 06, 2013 8:34 am

Re: Exit Fix for Kodi Raspbian built

Tue Jun 16, 2015 3:09 am

fade2gray wrote: One thing with your method though, sending kodi.bin to the background prevents crash reports being generated.

Also, I've updated my fix with fewer edits. :)
Can only hope that this gets fixed properly eventually, but I'm thinking it never will in this version.

User avatar
fade2gray
Posts: 15
Joined: Fri Apr 24, 2015 2:21 pm

Re: Exit Fix for Kodi Raspbian built

Tue Jun 16, 2015 11:51 am

Talking about crash logs, if you're fed up with your home directory filling up with Kodi crash logs...

1. Create a folder in your home directory e.g. /home/pi/kodi-crash-logs
2. Edit /usr/bin/kodi

CHANGE

Code: Select all

CRASHLOG_DIR=${CRASHLOG_DIR:-$HOME}
TO

Code: Select all

CRASHLOG_DIR=${CRASHLOG_DIR:-$HOME/kodi-crash-logs}

Tom_A
Posts: 272
Joined: Fri Dec 06, 2013 8:34 am

Re: Exit Fix for Kodi Raspbian built

Tue Jun 16, 2015 2:49 pm

I've just noticed that I still get kodi crash logs with my fix. I don't think that the fix prevents this.

User avatar
fade2gray
Posts: 15
Joined: Fri Apr 24, 2015 2:21 pm

Re: Exit Fix for Kodi Raspbian built

Wed Jun 17, 2015 11:23 am

Tom_A wrote:I've just noticed that I still get kodi crash logs with my fix. I don't think that the fix prevents this.
My bad. Being a novice, while testing your code I commented out wait %1 to determine it's purpose and forgot to uncomment it before forcing a crash. :oops:

Tom_A
Posts: 272
Joined: Fri Dec 06, 2013 8:34 am

Re: Exit Fix for Kodi Raspbian built

Wed Jun 17, 2015 5:27 pm

fade2gray wrote:
Tom_A wrote:I've just noticed that I still get kodi crash logs with my fix. I don't think that the fix prevents this.
My bad. Being a novice, while testing your code I commented out wait %1 to determine it's purpose and forgot to uncomment it before forcing a crash. :oops:
Yeah, it took me awhile to figure that out. It's there so kodi can pass messages back when it exits, otherwise kodi will not relaunch in the event of a crash. I wanted to prevent kodi from relaunching when it was intentionally killed to avoid the exit bug, but I didn't want to prevent it relaunching in the event of a crash.

Methanoid
Posts: 63
Joined: Thu Feb 28, 2013 12:02 pm

Re: Exit Fix for Kodi Raspbian built

Fri Jun 19, 2015 9:34 am

I looked for Popcornmix's post and found 2 interesting ones

http://forum.kodi.tv/showthread.php?tid ... pid1969525 implies all is fine...

https://github.com/popcornmix/xbmc/comm ... cc5bac9cd4 seems to be a fix from 2014 on resuming?

So is it still not working when installed/run as in the first link?

tednilsen
Posts: 10
Joined: Fri Dec 06, 2013 10:37 am

Re: Exit Fix for Kodi Raspbian built

Mon Jun 22, 2015 7:55 pm

To fix the "black-screen" when exiting Kodi, just install console-tools to get the fgconsole and chvt.. Atleast that worked for me, and I also removed the sudo from the kodi-standalone script!

...install the console-setup to get the fgconsole and chvt:

Code: Select all

sudo apt-get install console-tools
...edit the kodi-standalone launcher

Code: Select all

sudo nano /usr/bin/kodi-standalone
...find the lines:

Code: Select all

fbset --geometry $FB_GEOMETRY
VT="$(fgconsole)"
if [ "$VT" ]; then
  sudo chvt 7
  sudo chvt "$VT"
fi
...and replace it with:

Code: Select all

fbset --geometry $FB_GEOMETRY
VT="$(fgconsole)"
if [ "$VT" ]; then
  chvt 7
  chvt "$VT"
fi
...also, make sure your user (pi?) belongs to the correct groups

Code: Select all

sudo usermod -a -G "audio,video,input,dialout,plugdev,tty" pi
sudo addgroup --system input
...Kodi 14.2.1 exists nice everytime here now

vankogt
Posts: 3
Joined: Thu Mar 05, 2015 6:59 pm

Re: Exit Fix for Kodi Raspbian built

Tue Jun 23, 2015 11:22 am

When I apply this fix, Kodi exits and started again. I need to exit again and then is OK.

Where is the problem?

I fixed. Forgot to comment two lines.

mjrival
Posts: 5
Joined: Mon Jul 20, 2015 6:38 pm

Re: Exit Fix for Kodi Raspbian built

Mon Jul 20, 2015 7:47 pm

tednilsen wrote:To fix the "black-screen" when exiting Kodi, just install console-tools to get the fgconsole and chvt.. Atleast that worked for me, and I also removed the sudo from the kodi-standalone script!

...install the console-setup to get the fgconsole and chvt:

Code: Select all

sudo apt-get install console-tools
...edit the kodi-standalone launcher

Code: Select all

sudo nano /usr/bin/kodi-standalone
...find the lines:

Code: Select all

fbset --geometry $FB_GEOMETRY
VT="$(fgconsole)"
if [ "$VT" ]; then
  sudo chvt 7
  sudo chvt "$VT"
fi
...and replace it with:

Code: Select all

fbset --geometry $FB_GEOMETRY
VT="$(fgconsole)"
if [ "$VT" ]; then
  chvt 7
  chvt "$VT"
fi
...also, make sure your user (pi?) belongs to the correct groups

Code: Select all

sudo usermod -a -G "audio,video,input,dialout,plugdev,tty" pi
sudo addgroup --system input
...Kodi 14.2.1 exists nice everytime here now
Hi! I've tried all solutions is these the definitive?

rg57
Posts: 12
Joined: Sun Jun 24, 2012 8:24 pm

Re: Exit Fix for Kodi Raspbian built

Mon Aug 03, 2015 7:47 am

mjrival wrote:
tednilsen wrote:To fix the "black-screen" when exiting Kodi, just install console-tools to get the fgconsole and chvt.. Atleast that worked for me, and I also removed the sudo from the kodi-standalone script!

:
:

...Kodi 14.2.1 exists nice everytime here now
Hi! I've tried all solutions is these the definitive?
Almost. To get Kodi working from the desktop, I had to also edit /usr/share/applications/kodi.desktop using sudo, so that it would launch kodi-standalone (where the changes are) instead of kodi, by making the Exec line look like this:

Code: Select all

Exec=kodi-standalone
My approach seems kludgy, so I assume there's a better way to do it.[/s]

Ultimately I gave up, and autoremoved kodi. I found this solution for omxplayer which is lighter and sufficient for my needs. http://jeffhoogland.blogspot.ca/2012/08 ... a-gui.html I used ChrisR's version from the comments. I had to edit my /boot/config.txt (uncomment hdmi_drive=2) to ensure the HDMI Audio worked. For some reason, setting it via raspi-config or in the GUI did not work.

tom-s
Posts: 1
Joined: Mon Aug 24, 2015 5:34 pm

Re: Exit Fix for Kodi Raspbian built

Mon Aug 24, 2015 5:43 pm

Hi guys,

I've been struggling with the same issue for a couple of hours. None of the solutions above worked for me, so I've modified the solutions above to have it working.

You can find it here : https://gist.github.com/tom-s/b8ff98f37230126f6ef8

It works on my raspbian wheezy. It might restart lightdm service twice when you exit kodi, but that's not really an issue.

All credits go the the people who posted before.

I hope it helps.

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

Re: Exit Fix for Kodi Raspbian built

Tue Aug 25, 2015 12:03 am

Install kodi 15.1 and all the problems are gone and no clumsy workarounds required.
viewtopic.php?f=66&t=109088#p749989
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 “General discussion”