Safely shutdown Kodi with SSH because of black screen

I’ve hooked up my Raspberry Pi 2 to my receiver and from my receiver i’m going to my tv. Once in a while when i turn on and switch to the RBP2 HDMI input my screen stays black. Nothing happens when i use my remote.

In the past i took out the power adapter and put it back in to reboot the Pi only that resulted in a corrupted Kodi.

I’ve noticed that when the screen is black i still can connect with SSH.

Is there a way to safely shut down Kodi from comandline or does anyone have a solution for the black screen?

shutdown -h now

Sam

You might also want to try to solve the original problem :wink:

Most likely you are experiencing this issue, which can happen if the Pi is powered on before the TV:

http://kodi.wiki/view/Raspberry_Pi_FAQ#TV_is_not_detected_unless_powered_on_first

There is an option in the My OSMC Pi config module to automate the process described in the above FAQ.

1 Like

Thanks @DBMandrake! My Pi is always powerd on and the problem does not occur all the time but i guess it could not harm to try your fix.

I will report back if i know if this fixed the problem.