v16 Black screen on exit (Rapbian Jessie, Kodi 16.1)
#1
Hi,

exiting Kodi 16.1. on my up to date Raspbian (Raspberry Pi3) ends up in a black screen. It does not matter if I start Kodi from terminal before startx or starting it from the desktop.

I tried everything that I found in other posts (see here). Everyone seems to have fixed the problem using the startkodi script. I tried this but it does not help. Even the manual Ctrl-Alt-F... approach does not help.
What am I doing wrong? Everyone seems to have solved the problem using the script.

Thanks!
Reply
#2
Hi, I've been facing the same issue myself. I've realized that the startkodi script on it's own was not enough as I still ended up with the black screen. But I was able to fix this with a few modifications to the script by simply adding sleep commands. Here's the modified script:

Code:
#!/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`
  echo "found depth2: $DEPTH2"
fi
echo "kodi params: $@"
kodi
sleep 2
if [ ! -z $fbset_bin ]; then
  if [ "$DEPTH2" == "8" ]; then
    DEPTH1=16
  else
    DEPTH1=8
  fi
  echo "switching from $DEPTH1 to $DEPTH2"
  $fbset_bin -depth $DEPTH1 > /dev/null 2>&1
  sleep 2
  $fbset_bin -depth $DEPTH2 > /dev/null 2>&1
  sleep 2
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
  echo "display check for $DISPLAY is $?"
    if [ "$?" == "0" ]; then
      echo "refreshing"
      $xrefresh_bin -display $DISPLAY > /dev/null 2>&1
    fi
fi

Follow the same exact steps as this thread explains, but instead paste the code above in startkodi script.

In case anyone is wondering why the sleep commands, without them the screen would not have refreshed. I tried to execute the commands manually (fbset and xrefresh) and it worked, however within the script it didn't and I think that's due to some delay with the screen that is causing the script not to work. What's happening is when kodi exits, the screen sort of turns off for a sec and then turns back on but with the black screen and backlight on. So I believe that if the commands executed while the screen is off, it won't fix it. Hence the delays allowed the screen to turn back on, probably got synced with the raspberry pi, and then run the fbset and xrefresh command to get the raspberry pi screen back.

Also note that I've removed the VT commands (CTRL+ALT+F..), and the script still worked.
Reply
#3
Do you NEED Raspbian, if not try a different OS like LibreELEC, OSMC, openELEC.

I gave Kodi a try in Raspbian and was profoundly underwhelmed.
Reply

Logout Mark Read Team Forum Stats Members Help
Black screen on exit (Rapbian Jessie, Kodi 16.1)0