Author Topic: screensaver.nut calling external shell script? Want to force HDMI power off  (Read 4172 times)

thejipster

  • Newbie
  • *
  • Posts: 2
    • View Profile
The screensaver can be configured to "blank" the screen, however it doesn't put the monitor in the sleep low-power mode.
I would like to modify the screensaver.nut file to call a shell program that puts the HDMI interface into lower power mode forcing the monitor to go into power save mode

Is there a way to call a program call "tvservice --off"  , and likewise, the a button is preset, it would call "tvservice -p" to send power back to the HDMI?

Thanks
-J

raygun

  • Administrator
  • Sr. Member
  • *****
  • Posts: 393
    • View Profile
update your screensaver.nut file to the latest development one and it allows you to do exactly this:

https://github.com/mickelson/attract/blob/master/config/screensaver/screensaver.nut

thejipster

  • Newbie
  • *
  • Posts: 2
    • View Profile
For those who have been trying to get tvservices to turn off the monitor and put it into power save mode, use vcgencmd instead.

vcgencmd display_power 0 turns off the screen
vcgencmd display_power 1 turns on the screen

Running it from command line works perfectly, however when the same command is entered within the screensaver config file, it doesn't seem to run.

Update:
Created a short shell script and called it instead.  I am guessing the cmd field in screensaver.nut has problems interpreting command line arguments being passed in.

Example of "tvOFF"
#!/bin/sh
vcgencmd diplay_power 0

Example of "tvON"
#!/bin/sh
vcgencmd display_power1


« Last Edit: February 14, 2017, 12:48:59 AM by thejipster »