[mythtv-users] backend suspend and wake

Mark Lord mythtv at rtr.ca
Wed Mar 28 13:31:11 UTC 2012


On 12-03-27 08:15 PM, Monkey Pet wrote:
> I am wondering if anyone has scripted up a suspend and wakeup script for their mythbackend.
>  Basically, I want to suspend the backend until the next time the DVR needs to record something.
>  This can done using rtcwake and feeding it the time to wake up.  I am guessing that I only need the
> earliest next recording time and wake up before that.  Wondering what's the easiest way to obtain
> that time.  Anyways, any suggestions would be appreciated.  Otherwise, I will just need to do mysql
> queries for the upcoming recordings, then reformat the time to time_t and feed that into rtcwake.
>  Any other caveats I should be concerned about?

Others have given links to the wiki.
I'll add here that my very recent experience is that
my custom suspend script has to stop mythbackend
before suspending, otherwise it all fails.

I also have it stop mysql, so that the database won't be messed
up if there's a power loss while suspended.

The script then has to restart both of those on resume.
Works fine.

I also use HVR-950Q USB tuners, so the script resets those
before suspend (so they'll cool down instead of staying at
full power), and then resets/reloads the drivers/firmware
for them on resume, before restarting mythbackend.

It took a bit of tweaking, but now works beautifully.
This is all on my Zbox HD-ID11/ID41 combo systems
that I maintain for friends and family.

Cheers


More information about the mythtv-users mailing list