[mythtv] RFE: Allowing backend to trigger S3 sleep while frontend is connected and idle

Chris Pinkham cpinkham at bc2va.org
Wed Sep 28 19:57:32 UTC 2011

* On Wed Sep 28, 2011 at 03:33:21PM +0100, Stuart Morgan wrote:
> On Wednesday 28 Sep 2011 13:35:59 Petr Stehlik wrote:
> > I have a script that starts the frontend upon booting the
> > machine/resuming from sleep and as soon as the frontend quits the
> > machine goes to sleep again. So normally when we finish watching the
> > MythTV we quit the frontend manually and then the machine falls asleep
> > (and then the backend goes to sleep as well automatically because there
> > are no frontends connected - that's an old and very useful feature of
> > mythbackend).
> Would allowing a script to be run when the frontend goes idle work? That would 
> seem to be much more flexible than a frontend quit option. It would allow you 
> to put the frontend machine to sleep without first exiting the frontend and of 
> course the frontend would be running when you resume from sleep.

This makes sense to me, it goes along with the SleepCommand setting used
by the master to take inactive slave backends offline (via either sleeping or
shutdown, whichever the user prefers to run in their SleepCommand).  You
could even use the same setting name.  I probably should have called it
something like IdleCommand or similar, but I figured it was up to the user
whether it was a deep sleep (aka shutdown) or a simple suspend to ram or disk.

We could also use this to integrate the FE and SBE idle shutdown.
In this case, the FE could check to see if it was also a SBE, and
if so, it could leave it up to the master to shutdown the system by telling
the slave to run its SleepCommand when it was idle.  The MBE scheduler
could be modified to verify that any FE on the SBE was idle before telling
an idle SBE to run its SleepCommand.


More information about the mythtv-dev mailing list