sploo
Posts: 3
Joined: Fri Mar 11, 2016 9:55 pm

Black screen on Kodi exit

Fri Mar 11, 2016 11:04 pm

I've just set up my first Pi (a v3), using Raspbian Jessie from the raspberrypi.org site.

I installed Kodi using the instructions on http://kodi.wiki/view/HOW-TO:Install_Ko ... spberry_Pi, namely:

sudo apt-get update
sudo apt-get install kodi

That gave me Kodi version 15.2, build date 28 December 2015.

When I exit Kodi (Exit rather than Reboot) I just get a black screen - but the Pi appears to still be outputting a monitor signal (i.e. my monitor doesn't sleep). The only "fix" is to unplug the Pi.

A bit of searching shows this is a well known problem, and there are a variety of suggested fixes, including starting Kodi with kodi-standalone. Unfortunately that only seems to work once (i.e. I can run Kodi and exit, but starting Kodi just to the main screen and exiting again gives the same black screen problem).

I see there's a v16, but it's not obvious that it's easily available for the Pi. Is v16 the solution to this problem, or is there another fix?

BTW I've disabled the only CEC in the Kodi settings.

User avatar
DougieLawson
Posts: 28836
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website

Re: Black screen on Kodi exit

Sat Mar 12, 2016 8:52 am

Search the forum and you WILL discover the solution.
https://www.google.co.uk/search?q=kodi+ ... errypi.org
Microprocessor, Raspberry Pi & Arduino Hacker
Mainframe database troubleshooter
MQTT Evangelist
Twitter: @DougieLawson

Since 2012: 1B*5, 2B*2, B+, A+, Zero*2, 3B*3

Please post ALL technical questions on the forum. Do not send private messages.

sploo
Posts: 3
Joined: Fri Mar 11, 2016 9:55 pm

Re: Black screen on Kodi exit

Sat Mar 12, 2016 9:29 am

DougieLawson wrote:Search the forum and you WILL discover the solution.
https://www.google.co.uk/search?q=kodi+ ... errypi.org
Call me dumb but I'm afraid that just finds what I found before: lots of discussion threads with various suggestions, script hacks, the use of kodi-standalone, several "that didn't work for me" replies, and nothing definitive? Any hints as to which thread is "the one"?

User avatar
DougieLawson
Posts: 28836
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website

Re: Black screen on Kodi exit

Sat Mar 12, 2016 10:46 am

Read some of the results. viewtopic.php?t=100811
Microprocessor, Raspberry Pi & Arduino Hacker
Mainframe database troubleshooter
MQTT Evangelist
Twitter: @DougieLawson

Since 2012: 1B*5, 2B*2, B+, A+, Zero*2, 3B*3

Please post ALL technical questions on the forum. Do not send private messages.

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

Re: Black screen on Kodi exit

Sat Mar 12, 2016 12:02 pm

This is maybe an overkill but it does definitely work (I added that to may kodi packages):

Code: Select all

sudo nano /usr/local/bin/startkodi
This will come up with an empty text file. Copy the following into it:

Code: Select all

#!/bin/bash
fbset_bin=`which fbset`
xset_bin=`which xset`
xrefresh_bin=`which xrefresh`
if [ ! -z $fbset_bin ]; then
  DEPTH2=`$fbset_bin | head -3 | tail -1 | cut -d " " -f 10`
fi
kodi "$@"
if [ ! -z $fbset_bin ]; then
  if [ "$DEPTH2" == "8" ]; then
    DEPTH1=16
  else
    DEPTH1=8
  fi
  $fbset_bin -depth $DEPTH1 > /dev/null 2>&1
  $fbset_bin -depth $DEPTH2 > /dev/null 2>&1
fi
if [ ! -z $xset_bin ] && [ ! -z $xrefresh_bin ]; then
  if [ -z $DISPLAY ]; then
    DISPLAY=":0"
  fi

  $xset_bin -display $DISPLAY -q > /dev/null 2>&1
    if [ "$?" == "0" ]; then
      $xrefresh_bin -display $DISPLAY > /dev/null 2>&1
    fi
fi
VT="$(fgconsole)"
if [ "$VT" ]; then
  sudo chvt 7
  sudo chvt "$VT"
fi
Type CTRL+o to save and the CTRL-x to quit. Run

Code: Select all

sudo chmod a+x /usr/local/bin/startkodi
Now you can use "startkodi" for starting kodi. You can also modify the kodi.desktop file to use it from the application menu.
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

sploo
Posts: 3
Joined: Fri Mar 11, 2016 9:55 pm

Re: Black screen on Kodi exit

Tue Mar 15, 2016 10:53 pm

gkreidl wrote:This is maybe an overkill but it does definitely work (I added that to may kodi packages):...
Many thanks for the clear answer - that's working well.

I'm having a few issues with Kodi locking up when trying to play some videos but I'm assuming that's very much a Kodi "problem", so I'll look into it separately.

skilip
Posts: 1
Joined: Sat Jan 07, 2017 12:43 pm

Re: Black screen on Kodi exit

Sat Jan 07, 2017 12:46 pm

For me changing settings in System -> Settings -> System -> Input Devices -> Peripherals -> CEC adapter fixed this issue. Seemed that the TV was set to screensaver or something like that.

joshcsepegi
Posts: 3
Joined: Sun Mar 27, 2016 1:42 pm

kodi will not start

Mon Jan 16, 2017 8:44 pm

Kodi keeps crashing on me

here is what the crash logs are saying i'm a noob please help.

Code: Select all

############## Kodi CRASH LOG ###############

################ SYSTEM INFO ################
 Date: Mon Jan 16 15:35:01 EST 2017
 Kodi Options: 
 Arch: armv7l
 Kernel: Linux 4.4.34-v7+ #930 SMP Wed Nov 23 15:20:41 GMT 2016
 Release: Raspbian GNU/Linux 8 (jessie)
############## END SYSTEM INFO ##############

############### STACK TRACE #################
=====>  Core file: /home/pi/core (2017-01-16 15:35:01.912725253 -0500)
        =========================================
[New LWP 1419]
[New LWP 1420]
[New LWP 1434]
[New LWP 1427]
[New LWP 1431]
[New LWP 1430]
[New LWP 1429]
[New LWP 1432]
[New LWP 1428]
[New LWP 1426]
[New LWP 1433]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/arm-linux-gnueabihf/libthread_db.so.1".
Core was generated by `/usr/lib/kodi/kodi.bin --standalone'.
Program terminated with signal SIGABRT, Aborted.
#0  0x754ebf70 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56

Thread 11 (Thread 0x703783b0 (LWP 1433)):
#0  0x7685ca40 in do_futex_wait (isem=isem@entry=0x72c02dfc) at ../nptl/sysdeps/unix/sysv/linux/sem_wait.c:48
#1  0x7685caf4 in __new_sem_wait (sem=0x72c02dfc) at ../nptl/sysdeps/unix/sysv/linux/sem_wait.c:69
#2  0x76398b60 in vchiu_queue_pop () from /opt/vc/lib/libvchiq_arm.so
#3  0x70bd9d70 in ilcs_task () from /opt/vc/lib/libopenmaxil.so
#4  0x763accc4 in vcos_thread_entry (arg=0x72c02cb8) at /home/dc4/projects/staging/userland/interface/vcos/pthreads/vcos_pthreads.c:144
#5  0x76855e90 in start_thread (arg=0x703783b0) at pthread_create.c:311
#6  0x7558f598 in ?? () at ../ports/sysdeps/unix/sysv/linux/arm/nptl/../clone.S:92 from /lib/arm-linux-gnueabihf/libc.so.6
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

Thread 10 (Thread 0x6f5fe3b0 (LWP 1426)):
#0  0x7685ab30 in __pthread_cond_timedwait (cond=0x40686a8, mutex=0x40686e0, abstime=0x6f5fdd28) at pthread_cond_timedwait.c:199
#1  0x005e7304 in ActiveAE::CActiveAE::Process() ()
#2  0x01741ba8 in CThread::Action() ()
#3  0x01741e44 in CThread::staticThread(void*) ()
#4  0x76855e90 in start_thread (arg=0x6f5fe3b0) at pthread_create.c:311
#5  0x7558f598 in ?? () at ../ports/sysdeps/unix/sysv/linux/arm/nptl/../clone.S:92 from /lib/arm-linux-gnueabihf/libc.so.6
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

Thread 9 (Thread 0x72bff3b0 (LWP 1428)):
#0  0x75587f2c in ioctl () at ../sysdeps/unix/syscall-template.S:81
#1  0x76396010 in completion_thread () from /opt/vc/lib/libvchiq_arm.so
#2  0x763accc4 in vcos_thread_entry (arg=0x763a9318 <vchiq_instance+16>) at /home/dc4/projects/staging/userland/interface/vcos/pthreads/vcos_pthreads.c:144
#3  0x76855e90 in start_thread (arg=0x72bff3b0, arg@entry=<error reading variable: Cannot access memory at address 0xc>) at pthread_create.c:311
#4  0x7558f598 in ?? () at ../ports/sysdeps/unix/sysv/linux/arm/nptl/../clone.S:92 from /lib/arm-linux-gnueabihf/libc.so.6
/home/pi/dev/gdb-7.7.1+dfsg/gdb/frame.c:472: internal-error: get_frame_id: Assertion `fi->this_id.p' failed.
A problem internal to GDB has been detected,
further debugging may prove unreliable.
Quit this debugging session? (y or n) [answered Y; input not from terminal]
/home/pi/dev/gdb-7.7.1+dfsg/gdb/frame.c:472: internal-error: get_frame_id: Assertion `fi->this_id.p' failed.
A problem internal to GDB has been detected,
further debugging may prove unreliable.
Create a core file of GDB? (y or n) [answered Y; input not from terminal]
############# END STACK TRACE ###############

################# LOG FILE ##################

15:35:01 T:1945276992  NOTICE: special://profile/ is mapped to: special://masterprofile/
15:35:01 T:1945276992  NOTICE: -----------------------------------------------------------------------
15:35:01 T:1945276992  NOTICE: Starting Kodi (15.2 Git:02e7013). Platform: Linux ARM 32-bit
15:35:01 T:1945276992  NOTICE: Using Release Kodi x32 build (version for Raspberry Pi)
15:35:01 T:1945276992  NOTICE: Kodi compiled Dec 28 2015 by GCC 4.9.2 for Linux ARM 32-bit version 3.16.7 (200711)
15:35:01 T:1945276992  NOTICE: Running on Raspbian GNU/Linux 8 (jessie), kernel: Linux ARM 32-bit version 4.4.34-v7+
15:35:01 T:1945276992  NOTICE: FFmpeg statically linked, version: 2.6.4-kodi-2.6.4-Isengard
15:35:01 T:1945276992  NOTICE: Host CPU: ARMv7 Processor rev 5 (v7l), 4 cores available
15:35:01 T:1945276992  NOTICE: ARM Features: Neon disabled
15:35:01 T:1945276992  NOTICE: special://xbmc/ is mapped to: /usr/share/kodi
15:35:01 T:1945276992  NOTICE: special://xbmcbin/ is mapped to: /usr/lib/kodi
15:35:01 T:1945276992  NOTICE: special://masterprofile/ is mapped to: /home/pi/.kodi/userdata
15:35:01 T:1945276992  NOTICE: special://home/ is mapped to: /home/pi/.kodi
15:35:01 T:1945276992  NOTICE: special://temp/ is mapped to: /home/pi/.kodi/temp
15:35:01 T:1945276992  NOTICE: The executable running is: /usr/lib/kodi/kodi.bin
15:35:01 T:1945276992  NOTICE: Local hostname: Josh_PI2
15:35:01 T:1945276992  NOTICE: Log File is located: /home/pi/.kodi/temp/kodi.log
15:35:01 T:1945276992  NOTICE: -----------------------------------------------------------------------
15:35:01 T:1945276992   ERROR: DBus: Error org.freedesktop.DBus.Error.InvalidArgs - No such property CanSuspend
15:35:01 T:1945276992   ERROR: DBus: Error org.freedesktop.DBus.Error.InvalidArgs - No such property CanHibernate
15:35:01 T:1945276992  NOTICE: load settings...
15:35:01 T:1945269168  NOTICE: Thread FDEventMonitor start, auto delete: false
15:35:01 T:1945276992  NOTICE: Found 2 Lists of Devices
15:35:01 T:1945276992  NOTICE: Enumerated PI devices:
15:35:01 T:1945276992  NOTICE:     Device 1
15:35:01 T:1945276992  NOTICE:         m_deviceName      : HDMI
15:35:01 T:1945276992  NOTICE:         m_displayName     : HDMI
15:35:01 T:1945276992  NOTICE:         m_displayNameExtra:
15:35:01 T:1945276992  NOTICE:         m_deviceType      : AE_DEVTYPE_HDMI
15:35:01 T:1945276992  NOTICE:         m_channels        : FL,FR
15:35:01 T:1945276992  NOTICE:         m_sampleRates     : 8000,11025,16000,22050,24000,32000,44100,48000,88200,96000,176400,192000
15:35:01 T:1945276992  NOTICE:         m_dataFormats     : AE_FMT_FLOAT,AE_FMT_S32NE,AE_FMT_S16NE,AE_FMT_S32LE,AE_FMT_S16LE,AE_FMT_FLOATP,AE_FMT_S32NEP,AE_FMT_S16NEP,AE_FMT_AC3,AE_FMT_DTS,AE_FMT_EAC3
15:35:01 T:1945276992  NOTICE:     Device 2
15:35:01 T:1945276992  NOTICE:         m_deviceName      : Analogue
15:35:01 T:1945276992  NOTICE:         m_displayName     : Analogue
15:35:01 T:1945276992  NOTICE:         m_displayNameExtra:
15:35:01 T:1945276992  NOTICE:         m_deviceType      : AE_DEVTYPE_PCM
15:35:01 T:1945276992  NOTICE:         m_channels        : FL,FR
15:35:01 T:1945276992  NOTICE:         m_sampleRates     : 48000
15:35:01 T:1945276992  NOTICE:         m_dataFormats     : AE_FMT_FLOAT,AE_FMT_S32LE,AE_FMT_S16LE,AE_FMT_FLOATP,AE_FMT_S32NEP,AE_FMT_S16NEP
15:35:01 T:1945276992  NOTICE:     Device 3
15:35:01 T:1945276992  NOTICE:         m_deviceName      : Both
15:35:01 T:1945276992  NOTICE:         m_displayName     : HDMI and Analogue
15:35:01 T:1945276992  NOTICE:         m_displayNameExtra:
15:35:01 T:1945276992  NOTICE:         m_deviceType      : AE_DEVTYPE_PCM
15:35:01 T:1945276992  NOTICE:         m_channels        : FL,FR
15:35:01 T:1945276992  NOTICE:         m_sampleRates     : 48000
15:35:01 T:1945276992  NOTICE:         m_dataFormats     : AE_FMT_FLOAT,AE_FMT_S32LE,AE_FMT_S16LE,AE_FMT_FLOATP,AE_FMT_S32NEP,AE_FMT_S16NEP
15:35:01 T:1945276992  NOTICE: Enumerated ALSA devices:
15:35:01 T:1945276992  NOTICE:     Device 1
15:35:01 T:1945276992  NOTICE:         m_deviceName      : default
15:35:01 T:1945276992  NOTICE:         m_displayName     : Playback/recording through the PulseAudio sound server
15:35:01 T:1945276992  NOTICE:         m_displayNameExtra:
15:35:01 T:1945276992  NOTICE:         m_deviceType      : AE_DEVTYPE_PCM
15:35:01 T:1945276992  NOTICE:         m_channels        : FL,FR,BL,BR,FC,LFE,SL,SR,UNKNOWN1,UNKNOWN2,UNKNOWN3,UNKNOWN4,UNKNOWN5,UNKNOWN6,UNKNOWN7,UNKNOWN8
15:35:01 T:1945276992  NOTICE:         m_sampleRates     : 5512,8000,11025,16000,22050,32000,44100,48000,64000,88200,96000,176400,192000
15:35:01 T:1945276992  NOTICE:         m_dataFormats     : AE_FMT_FLOAT,AE_FMT_S32NE,AE_FMT_S16NE,AE_FMT_S16LE,AE_FMT_S16BE,AE_FMT_U8
15:35:01 T:1945276992  NOTICE:     Device 2
15:35:01 T:1945276992  NOTICE:         m_deviceName      : pulse
15:35:01 T:1945276992  NOTICE:         m_displayName     : PulseAudio Sound Server
15:35:01 T:1945276992  NOTICE:         m_displayNameExtra:
15:35:01 T:1945276992  NOTICE:         m_deviceType      : AE_DEVTYPE_PCM
15:35:01 T:1945276992  NOTICE:         m_channels        : FL,FR,BL,BR,FC,LFE,SL,SR,UNKNOWN1,UNKNOWN2,UNKNOWN3,UNKNOWN4,UNKNOWN5,UNKNOWN6,UNKNOWN7,UNKNOWN8
15:35:01 T:1945276992  NOTICE:         m_sampleRates     : 5512,8000,11025,16000,22050,32000,44100,48000,64000,88200,96000,176400,192000
15:35:01 T:1945276992  NOTICE:         m_dataFormats     : AE_FMT_FLOAT,AE_FMT_S32NE,AE_FMT_S16NE,AE_FMT_S16LE,AE_FMT_S16BE,AE_FMT_U8
15:35:01 T:1945276992  NOTICE: Loaded settings file from special://xbmc/system/advancedsettings.xml
15:35:01 T:1945276992  NOTICE: Contents of special://xbmc/system/advancedsettings.xml are...
                                            <?xml version="1.0" encoding="UTF-8" ?>
                                            <advancedsettings>
                                              <video>
                                                <defaultplayer>dvdplayer</defaultplayer>
                                                <defaultdvdplayer>dvdplayer</defaultdvdplayer>
                                              </video>
                                              <gui>
                                                <algorithmdirtyregions>3</algorithmdirtyregions>
                                                <nofliptimeout>0</nofliptimeout>
                                              </gui>
                                              <splash>false</splash>
                                              <lookandfeel>
                                                <enablerssfeeds>false</enablerssfeeds>
                                              </lookandfeel>
                                              <cputempcommand>sed -e &apos;s/\([0-9]*\)[0-9]\{3\}.*/\1 C/&apos; /sys/class/thermal/thermal_zone0/temp</cputempcommand>
                                              <gputempcommand>/opt/vc/bin/vcgencmd measure_temp | sed "s,temp=\([0-9]*\)\.[0-9]&apos;C,\1 C,"</gputempcommand>
                                            </advancedsettings>
15:35:01 T:1945276992  NOTICE: No settings file to load (special://masterprofile/advancedsettings.xml)
15:35:01 T:1945276992  NOTICE: Default DVD Player: dvdplayer
15:35:01 T:1945276992  NOTICE: Default Video Player: dvdplayer
15:35:01 T:1945276992  NOTICE: Default Audio Player: paplayer
15:35:01 T:1945276992  NOTICE: Disabled debug logging due to GUI setting. Level 0.
15:35:01 T:1945276992  NOTICE: Log level changed to "LOG_LEVEL_NORMAL"
15:35:01 T:1945276992  NOTICE: Loading player core factory settings from special://xbmc/system/playercorefactory.xml.
15:35:01 T:1945276992  NOTICE: Loaded playercorefactory configuration
15:35:01 T:1945276992  NOTICE: Loading player core factory settings from special://masterprofile/playercorefactory.xml.
15:35:01 T:1945276992  NOTICE: special://masterprofile/playercorefactory.xml does not exist. Skipping.
15:35:01 T:1868555184  NOTICE: Thread ActiveAE start, auto delete: false
15:35:01 T:1935668144  NOTICE: Thread AESink start, auto delete: false
15:35:01 T:1858073520  NOTICE: Thread CRBPWorker start, auto delete: false
15:35:01 T:1945276992   ERROR: SQL: SQL error or missing database
                                            Query: SELECT idVersion FROM version


############### END LOG FILE ################

############ END Kodi CRASH LOG #############

Return to “Troubleshooting”

Who is online

Users browsing this forum: No registered users and 34 guests