Exiting Kodi to Emulationstation

This topic contains 37 replies, has 14 voices, and was last updated by Profile photo of test test 1 year, 8 months ago.

Viewing 35 posts - 1 through 35 (of 38 total)
  • Author
    Posts
  • #93959
    Profile photo of ceuse
    ceuse
    Participant

    Hey Guys,

    I think/know that this Problem occures to quite a few people : After you exit Kodi you come to a blackscreen

    I used the “normal” Script to start kodi via Emulationstation:

    #!/bin/bash
    kodi-standalone

    After some Googleing a found the following script which should solve the Issue.
    Sadly doesnt work and im wondering if anyone can help me out / figure out what (i added the Emulationstation part (last 2 lines) myself but im far too bad in Linux / Python to figure out where i go wrong.

    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
    echo "Killing kodi"
    break
    fi
    done < <(tail --pid=$$ -f -n0 $LOG_FILE)
     
    killall kodi.bin
    fbset -depth 8 && fbset -depth 16
    killall emulationstation
    /opt/retropie/supplementary/emulationstation/emulationstation
     

    Anybody can help me out? i think alot of Ppl would love a working script for this.

    #94042
    Profile photo of davejaca
    davejaca
    Participant

    Hi Ceuse,

    On RetroPie 2.6 and 3.0, if you select exit from the shutdown menu it automatically returns to EmulationStation. I have heard of a few people having the black screen issue but when they exit this way it works fine.

    How do you usually exit Kodi?

    #94077
    Profile photo of pokeparadox
    pokeparadox
    Participant

    I’m not sure what to say apart from that I also have this problem.

    I have to shut down the pi every time I exit Kodi as it just locks on a black screen instead of going back to ES.

    #94089
    Profile photo of ceuse
    ceuse
    Participant

    Also it happens no matter if its exit or shut down from the kodi menue.
    It only occures after a longer period of time though. as far as i read its because emulationstation enters sleep mode and wont react after kodi is quit.

    sooo nobody with a bit of python experience ? 🙁

    #94090
    Profile photo of tank
    tank
    Participant

    i thought it’s not about retropie/emulationstation but about raspbmc… i think there’s an issue with kodi in raspbmc… !? hopefully this will get fixed soon. there seems to be a lot of confusion about this topic as well 😉

    #94097
    Profile photo of ceuse
    ceuse
    Participant

    i thought it’s not about retropie/emulationstation but about raspbmc… i think there’s an issue with kodi in raspbmc… !? hopefully this will get fixed soon. there seems to be a lot of confusion about this topic as well ;)

    I Think you mean Raspbian 😉
    And thats the context where i found the script above that im unable to get to work 🙁 but it seems like a easy fix if i just would know how to get emulationstation killed and restarted. It wont fix the source problem but it would be a great workaround i think

    #94111
    Profile photo of kmhamel
    kmhamel
    Participant

    Hey Guys,

    I think/know that this Problem occures to quite a few people : After you exit Kodi you come to a blackscreen

    I used the “normal” Script to start kodi via Emulationstation:

    #!/bin/bash
    kodi-standalone

    After some Googleing a found the following script which should solve the Issue.
    Sadly doesnt work and im wondering if anyone can help me out / figure out what (i added the Emulationstation part (last 2 lines) myself but im far too bad in Linux / Python to figure out where i go wrong.

    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
    echo "Killing kodi"
    break
    fi
    done < <(tail --pid=$$ -f -n0 $LOG_FILE)
     
    killall kodi.bin
    fbset -depth 8 && fbset -depth 16
    killall emulationstation
    /opt/retropie/supplementary/emulationstation/emulationstation
     

    Anybody can help me out? i think alot of Ppl would love a working script for this.

    Yes I tried this one also, didn’t work for me either. I found this, but haven’t tried it yet.

    http://www.raspberrypi.org/forums/viewtopic.php?f=63&t=100811&hilit=black+screen+kodi

    Looks like we just have to wait until the fix is added to the repository.

    #94126
    Profile photo of ceuse
    ceuse
    Participant

    well it seems though it runs the same command in the end (although checks for other stuff). i checked the kodi.log file while a blackscreen occured and it read (at least on my test) “application stopped”. so i think this one should work.

    also it basicly does the same thing in the end :

    sudo killall /usr/lib/kodi/kodi.bin

    i dont think Kodi itself is the issue but “Waking up” Emulationstation.

    i gotta check in my free time again where the script fails. although i just think the problem occures in my own modification (killing emulationstation and starting it again)

    #94352
    Profile photo of dishins
    dishins
    Participant

    i don’t get exactly the black screen but when i exit kodi the CEC turn my TV OFF, then i just have to turn ir on and its on the E.Station menu.

    #94531
    Profile photo of coderkind
    coderkind
    Participant

    I get the black screen too. While FTP and SSH’d into my Pi at the same time the FTP client disconnects but it seems I’m still connected via SSH.

    This is a problem as essentially it means without keyboard access you’re faced with having to pull the power supply to get the system operational again.

    #94665
    Profile photo of ceuse
    ceuse
    Participant

    Bumpedy..

    no python guru arround? 🙁

    #95264
    Profile photo of coderkind
    coderkind
    Participant
    #95274
    Profile photo of ceuse
    ceuse
    Participant

    no idea. the initial post is the normal script where the blackscreen can occure. and the other way around i didnt try out / dont want to since i want to boot into emulationstation first 🙂

    #95972
    Profile photo of labelwhore
    labelwhore
    Participant

    There’s a fix for the black screen that seems to work. check it out. Replace your kodi.sh script with this. It looks really similar to what was pasted above. I only poked around at this a little last night but it seems to be working ok on my end.

    http://www.th3rdwave.com/tracks/
    ^^ my other hobby

    #98848
    Profile photo of herbfargus
    herbfargus
    Member

    Just in case anyone else is interested, I added a patch to the source code that fixes the black screen issue (assuming that you are booting into emulationstation). I’ve tested it and it no longer freezes on a black screen upon exit or shutdown of Kodi.

    You can either update your setup script and reinstall kodi or modify the kodi.sh file in roms/ports/ to look like this:

    #!/bin/bash
    /opt/retropie/supplementary/runcommand/runcommand.sh 0 "kodi-standalone" "kodi"
    #98849
    Profile photo of Omnija
    Omnija
    Participant

    Nice, so many new additions have been fixed and added this weekend.

    #98856
    Profile photo of pattaboy
    pattaboy
    Participant

    Nice, so many new additions have been fixed and added this weekend.

    in a new update?

    #98866
    Profile photo of tank
    tank
    Participant

    Nice, so many new additions have been fixed and added this weekend.

    what… just one line should fix it? funny, how there are ~5 different very long bash-scripts that DO NOT work…
    i hope this really fixes it for me too, then i wouldn’t need to change to kodi 15 beta 2, which should work also.

    edit: yep, doesn’t work… the same. after starting a video and then closing kodi – blackscreen!

    #98944
    Profile photo of meat
    meat
    Participant

    It seemed to fix the problem for quick use of kodi. (open,close)
    This blank screen still happens after longer use e.g. movie, youtube.
    For me anyway it completely locks up the pi with the only way to restart it SSH.

    edit: Is there a way via keyboard hotkey to force it out of blank screen to restart it safely?

    #98955
    Profile photo of herbfargus
    herbfargus
    Member

    Ah… Perhaps I spoke too soon on the matter and should have tested it more… I’ll keep looking into it and post the real solution when I come up with it. What a bother, sorry for instilling false hope.

    #98959
    Profile photo of Omnija
    Omnija
    Participant

    #!/bin/bash

    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
    echo “Killing kodi”
    break
    fi
    done < <(tail –pid=$$ -f -n0 $LOG_FILE)

    killall kodi.bin

    fbset -depth 8 && fbset -depth 16

    I’ve been using this one for quite some time now, and it seems to help a lot.

    #98962
    Profile photo of herbfargus
    herbfargus
    Member

    yeah, I’ve tested that too but the dev’s want something more concise in the source code… Ideally I’d like to have this be patched upstream so people don’t have to modify configs themselves.

    #98965
    Profile photo of Omnija
    Omnija
    Participant

    At least temporarily until a better method works.

    #99046
    Profile photo of meat
    meat
    Participant

    Yeah I can also confirm that labelwhore’s method works. No worries Herb appreciate the hard work!

    #99055
    Profile photo of tank
    tank
    Participant

    well, with kodi 15 the bug is fixed anyways… i’ll just wait for the stable release.
    maybe you can add an option in the script to install the experimental experimental kodi 15 beta (actually its beta 2 already) instead of 14.2 😉

    #99059
    Profile photo of herbfargus
    herbfargus
    Member

    Yeah I’ve looked at that as well- its definitely worth looking into. Some of the addons have issues with the latest beta but all betas have their bugs.

    #99067
    Profile photo of dishins
    dishins
    Participant

    Maybe this is a bit off topic but how can i update my kodi build to the 15x beta? i installed it within the Retropie Script.

    #99069
    Profile photo of herbfargus
    herbfargus
    Member

    This is a post on compiling the latest kodi:

    https://www.raspberrypi.org/forums/viewtopic.php?f=66&t=109088-

    it may have to be adapted somewhat for retropie and being beta you may run into more issues than just a black screen (broken addons, etc). I’d like to test it myself as well once I’ve got some free time.

    (Note this may only work for a Raspberry Pi 2 Model B.)

    #99100
    Profile photo of herbfargus
    herbfargus
    Member

    For anyone who is interested- if you have a raspberry pi 2, these are the steps I followed to install Kodi 15

    Uninstall current Kodi:

    sudo apt-get remove kodi kodi.bin

    Install Kodi 15

    wget http://steinerdatenbank.de/software/kodi-15.tar.gz
    tar -xzf kodi-15.tar.gz
    cd kodi-15
    sudo ./install

    Replace contents of roms/ports/kodi.sh with:

    #!/bin/bash
    startkodi

    There is no black screen issue with this build (i made sure to test it long enough this time) Some of my addons didn’t work but I think it will just be a matter of time before those are fixed.

    #99102
    Profile photo of dishins
    dishins
    Participant

    i can confirm this work, goodbye black screen! 🙂

    #99106
    Profile photo of tank
    tank
    Participant

    oh nice! i’m gonna try it now… people keep saying the thing about the addons only – so it seems to be quite stable otherwise.
    thank you for posting the way you did it.

    you don’t even have to test it “a long time”. just start kodi, start a video and exit kodi. if it works, it works (i think)

    #99110
    Profile photo of pattaboy
    pattaboy
    Participant

    I have managed to update Kodi to the new Isengard but whenever I quit to emulationstation there is no black screen which is a good thing but emulationstation will have small window in the left corner instead of full screen.
    Any fixes for that?

    #99112
    Profile photo of Omnija
    Omnija
    Participant

    Does installing kodi 15 overwrite the old kodi or do you need to uninstall 14 then install 15?

    #99113
    Profile photo of herbfargus
    herbfargus
    Member

    @pattaboy

    I didn’t have that issue, but you could try changing kodi.sh to

    #!/bin/bash
    /opt/retropie/supplementary/runcommand/runcommand.sh 0 "startkodi" "kodi"

    And see if that makes any difference.

    @omnija

    I think you have to uninstall kodi 14 first (at least according to the post I used to install it- but they were saying to make sure you install kodi 14 first so you have the right dependencies and then you uninstall it before you install kodi 15.) You could try it without uninstalling it and see if it works, but I uninstalled 14 first when I installed 15.

    #99121
    Profile photo of Omnija
    Omnija
    Participant

    @herbfargus what would be the best method of removing/uninstalling kodi

    sudo apt-get --purge remove kodi or sudo apt-get remove kodi

    Also whats the benefits and disadvantages of remove and autoremove and purge?

Viewing 35 posts - 1 through 35 (of 38 total)

Forums are currently read only - please visit the new RetroPie forums at https://retropie.org.uk/forums/

Skip to toolbar