Forum
Custom power saving mode request!! - Printable Version

+- Forum (http://forum.xbian.org)
+-- Forum: Hardware (/forum-7.html)
+--- Forum: Remotes and CEC support (/forum-26.html)
+--- Thread: Custom power saving mode request!! (/thread-1488.html)



Custom power saving mode request!! - Boushard - 10th Oct, 2013 01:15 AM

Hi guys,

I recently installed my Pi on a LCD in my bedroom, my girlfriend watch some simpson's episode before sleep, so if nobody turn off the tv it will stay on, but dimmed, all night.

I search through the menus on the TV and found a shutdown timer when the tv had no input signal for 10min.

So I wonder if someone have ever try to make a script/fonction to "kill" the HDMI signal after a certain time and revive it when a IR or, in my case, yatse app send a trigger?!?

Thanks


Re: Custom power saving mode request!! - f1vefour - 10th Oct, 2013 01:14 PM

You can do it if your TV has CEC.


RE: Custom power saving mode request!! - mk01 - 12th Oct, 2013 02:32 AM

Beta2 can do this if your TV is HDMI/CEC with support for power related commands.


RE: Custom power saving mode request!! - Boushard - 27th Oct, 2013 11:18 PM

Sorry but no CEC support!!

XBMC(12.2 Frodo for windows) have the feature I want in System > Power Saving > Put display to sleep when Idle. The only option I have in Xbian is Apparence ­> screensaver.

I saw that we can add other screensaver via the repo, so I wonder if someone have the time to script something that can do what I want!!




RE: Custom power saving mode request!! - IriDium - 28th Oct, 2013 02:36 AM

Are you are using a HDMI -> DVI converter to connect to your monitor.

If so, you are out of luck. There is NO way to send a signal to your monitor.


RE: Custom power saving mode request!! - Boushard - 28th Oct, 2013 04:32 AM

No adpater, hdmi straight to TV with sound!!


RE: Custom power saving mode request!! - rikardo1979 - 28th Oct, 2013 05:27 AM

a bit of reading about power saving option from XBMC/RPi devs http://forum.xbmc.org/showthread.php?tid=163016&pid=1404329#pid1404329


RE: Custom power saving mode request!! - rikardo1979 - 28th Oct, 2013 05:31 AM

(27th Oct, 2013 11:18 PM)Boushard Wrote:  I saw that we can add other screensaver via the repo, so I wonder if someone have the time to script something that can do what I want!!


@brantje working on a custom Clock Screensaver so lets see what he thinks Wink
http://forum.xbian.org/thread-1033.html


Re: Custom power saving mode request!! - f1vefour - 29th Oct, 2013 01:04 PM

I don't have HDMI currently so I can't test, does "tvservice -o" disable the HDMI output on the Pi?

If it does then what the OP is wanting should be possible, you could write a bash script that checks XBMC CPU usage and run the above command when it's idle. Of course this wouldn't work 100% of the time because the "home screen" idle usage is almost as high as when playing certain video content. Also if you found yourself on certain plug-in screens or other high CPU usage screens this wouldn't work.

OK better than that, you can write a script that checks if XBMC is playing anything and run the TV service command...this would work 100% of the time.


RE: Custom power saving mode request!! - IriDium - 30th Oct, 2013 02:44 AM

This might help Switching off TV

Beta 2 has System -> Power Saving!

This might be the answer Turning TV off when XBMC is idle


RE: Custom power saving mode request!! - rikardo1979 - 30th Oct, 2013 03:04 AM

(30th Oct, 2013 02:44 AM)IriDium Wrote:  This might help Switching off TV

Beta 2 has System -> Power Saving!

This might be the answer Turning TV off when XBMC is idle

so does it means that when the playback stops the XBMC goes dim and than in certain time it cuts OFF HDMI out?? if so how do you turn it back on than?
just would like to know as so far the RPi was able to operate only screens with the CEC and customizing the libCEC settings

edit: and OFC we want only the screen goes OFF not the XBMC or RPi (well not me as I have the CEC Smile )


RE: Custom power saving mode request!! - mk01 - 31st Oct, 2013 05:15 PM

@Boushard

(29th Oct, 2013 01:04 PM)f1vefour Wrote:  I don't have HDMI currently so I can't test, does "tvservice -o" disable the HDMI output on the Pi?

If it does then what the OP is wanting should be possible, you could write a bash script that checks XBMC CPU usage and run the above command when it's idle. Of course this wouldn't work 100% of the time because the "home screen" idle usage is almost as high as when playing certain video content. Also if you found yourself on certain plug-in screens or other high CPU usage screens this wouldn't work.

tvservice -o turns off HDMI on RPI but this takes my Samsungs TVs not into standby mode. Not even when TV is set to turn-off on loss of signal. I have no idea which signaling this is, maybe it works for other screens.

Koenn was reporting on github that it works with him, but no idea whether he is using TV or HDMI->DVI converter and and PC/LCD panel. There was one more issue with this and that XBMC wasn't able to get re-attached to the screen again, so restart xbmc was needed. Ugly.

the scripting around XBMC's actual status is already implemented in XBian. package name is "xbian-package-upstart-xbmc-bridge". it generates various upstart events - among others screensaver START and screensaver STOP. included in the package is xbmc-screensaver upstart job which uses this to standby / power-on CEC TVs based on those events and xbmc-priority job which utilizes the other statuses (Playing video, Updating library, idling, etc …).

based on those 'templates', write own script is peace of cake. actually the core code just 5 lines as upstart_job.conf file + 2 lines of command user wishes to run.

@f1vefour
the idle cpu usage is definitely addon and/or skin issue. default install XBian B2 is 14% on homescreen, up to 30% when idle in library view. this with Confluence or Amber skin - didn't try others.