[mythtv-users] Forcing the backend to acpi suspend with a frontend connected
michael at thewatsonfamily.id.au
Sun Sep 25 06:01:31 UTC 2011
On 25/09/2011 15:01, Marc MERLIN wrote:
> [While I read the list, Cc on replies are appreciated]
> I read http://www.mythtv.org/wiki/ACPI_Wakeup and I understand that due to
> old mythtv design, the RTC wakeup code was meant for when the backend is
> physically powered off and rebooted, as opposed to now using suspend to RAM.
> In my case, I do have a recent PC, suspend to RAM is working and if I kill
> mythfrontend on my htpc, then mythtv-backend goes idle and triggers the right
> scripts to suspend to RAM and resumes on its own.
> I also know about mythwelcome.
> But, this is not my question: I just want my htpc to suspend if mythfrontend
> is runnind and nothing is playing after timeout X, or if something is
> playing but paused for more than Y seconds.
> > From what I read, while this would be the desired behaviour with current
> ACPI sleep capable hardware, there is no support in mythfrontend/mythtv-backend
> for that.
> Am I correct?
> If so, I'm looking at 3 solutions
> 1) use strace/lsof to monitor mythfrontend and kill mythfrontend from an
> outside shell script if it meets my definition of idle, which in turn
> will allow mythtv-backend to timeout and trigger ACPI sleep
> 2) Is there a hook into the mythtv-backend idle code where I can could just
> tell it 'go to sleep now' from an outside shell script?
> I realize I can just suspend linux from the shell script, but that will not
> update the RTC clock to wakeup the PC when the next recording is scheduled.
> I do need some way to get mythtv-backend to dump its 'wake up at X' timer in
> my RTC.
> 3) Better even, does more recent mythtv code just allow mythtv-backend to go to
> sleep even if mythfrontend is connected (either when it's not playing at
> all, or if it's been paused for too long)?
On my Frontends, I run XScreensaver and a script via cron that waits for
the screensaver to be active for X minutes, then shutsdown the machine,
(or if it is a FE/SBE closes mythfrontend and allows mythwelcome to
shutdown the machine when the backend is idle).
I have a 5 Min Delay on xscreensaver, then my script waits for the
xscreensaver to be active for 15 minutes. So after 20 Minutes of idle,
the FE shutdowns automatically.
More information about the mythtv-users