Kodi - Turning screen on and off
#1
Hi!

I have a slideshow running in Kodi.
When no motion is detected the following command is run, which successfully turns off the screen.
/opt/vc/tvservice -o

When motion is detected then the following command successfully turns on the screen.
/opt/vc/tvservice -p

HOWEVER... the screen is blank... if I tell the script to kill Kodi and then start Kodi, the screen displays Kodi once again...

I've tried
sudo chvt 6
sudo chvt 7

to try and force a refresh... doesn't work.

I'm running raspbian and wondering if anyone could suggest a solution... whilst it does work the way I have it, killing and restarting the program is not really ideal, just to get it displaying on the screen again.

Cheers,
John
Reply
#2
Try using
Code:
vcgencmd display_power 0
and
Code:
vcgencmd display_power 1

instead of using tvservice.
Reply
#3
Thank you very very much! That was exactly what I needed.... hours of googling didn't turn up that gem!
I've added to your 'reputation' for being such a help :-)
Cheers,
John
Reply

Logout Mark Read Team Forum Stats Members Help
Kodi - Turning screen on and off0