[mythtv] Shutdown/Wakeup Problems

Michael Schmidt crashedpixels at gmx.de
Sun Dec 21 12:44:45 EST 2003


Hello List,

  I played with the automatic shutdown/wakeup feature today. At first I
couldn't get the backend to become idle at all. After some fiddling I found
out that the backend will become idle if a frontend is started and then quit
it again. Now I stumbled over some problems:

1.) Is there another way to get the backend to become idle except starting
and quiting a frontend? The problem is that once the box automatically
starts to record something it won't become idle again when the show is over.


2.) This is related to problem #1. I'm running backend and frontend on the
same machine. I set it up so that the frontend is automatically started. So
if the box awakes to record a show the frontend will keep the backend from
becoming idle. Right?


3.) I used nvram-wakeup to write the wakeup time. Some mainboards need to be
restarted to make the BIOS recognize the new setting. nvram-wakeup provides
a shutdown-script and a special reboot-kernel to acomplish this. The
shutdown script configures lilo to boot the appropriate kernel and halts or
reboots the machine. So to not get double shutdowns I left the
ServerHaltCommand empty.

Now the problem with that is that myth executes the setwakeuptime-command
only if there's a sheduled recoring in the queue. If the ServerHaltCommand
is empty the box won't shutdown if there's no scheduled recording. Also the
box will wake up on the next month (year?) again because the wake up time
isn't deleted from the bios. I used the following values to get it working
but it's a little fishy:

SetWakeuptimeCommand:
/etc/init.d/mythtv-backend stop; sleep 2; /home/mythtv/bin/mythshutdown
$time

ServerHaltCommand:
/etc/init.d/mythtv-backend stop; sleep 2; /home/mythtv/bin/mythshutdown 0

A solution to this problem would be that either SetWakeuptimeCommand would
be called every time myth automatically shuts down or $time would also be
passed to the ServerHaltCommand.


Did I miss something? Is my understanding of myth's behaviour correct?


Rock on,

   Michael



More information about the mythtv-dev mailing list