[mythtv] Commercial flagging, shutdowns & lost recordings
mythtv at dsl.pipex.com
Sat Feb 4 10:41:38 UTC 2006
----- Original Message -----
From: "Matthew Carle" <matthew_carle at hotmail.com>
To: <mythtv-dev at mythtv.org>
Sent: Friday, February 03, 2006 8:43 AM
Subject: [mythtv] Commercial flagging, shutdowns & lost recordings
>I posted this in the mythtv-users list but didn't get a reply. This is in
>This is a problem I noticed a while ago but it has happened to me twice in
>the last couple of weeks. It seems like it would affect most people who use
>commercial flagging and have their backend set to shutdown when inactive.
>At the end of a recording, the system prepares to shutdown. Commercial
>flagging starts but doesn't interrupt the shutdown process. I see this sort
>of thing in the log:
>2006-01-22 23:20:03.151 I'm idle now... shutdown will occur in 240 seconds.
>2006-01-22 23:20:12.170 230 secs left to system shutdown!
>2006-01-22 23:20:22.192 220 secs left to system shutdown!
>2006-01-22 23:20:32.213 210 secs left to system shutdown!
>2006-01-22 23:20:40.120 Starting Commercial Flagging for "Out of Sight"
>recorded from channel 1015 at Sun Jan 22 20:24:00 2006.
>2006-01-22 23:20:41.118 New DB connection, total: 1
>2006-01-22 23:20:41.166 New DB connection, total: 2
>2006-01-22 23:20:42.233 200 secs left to system shutdown!
>2006-01-22 23:20:52.256 190 secs left to system shutdown!
>When the countdown has finished, it appears to decide to wait for the
>commercial flagging to finish. So more than an hour later, we get this:
>2006-01-23 00:33:55.566 Finished, 5 break(s) found.
>nvram-wakeup: Do NOT write into nvram. Wake Up time must be
>nvram-wakeup: at least 10 minutes in the future.
>There was actually a recording scheduled to start at about this time, but it
>shut down anyway. Additionally, because nvram-wakeup didn't write to the
>bios (the next wakeup must be at least 10 minutes in the future), it won't
>wake up for any future recordings - you have to manually power it up after
>one of these occurrences. This could cause the loss of many recordings if
>the mythtv box isn't used for a longer period. I have also had it do what
>seems like a similar thing while I was watching a recorded show. Does this
>happen to anyone else? Has it been fixed in 0.19?
You can prevent the backend shutting down when it is busy commercial
flagging by adding a script to the "Pre shutdown check command" in the
backend settings. It should check to see if the 'mythcommflag' process is
running and return the appropriate value which prevents the backend starting
its shutdown sequence.
In 0.19 there is an helper program 'mythshutdown' which can, among other
things, check to see if mythcommflag, mythfilldatabase or mythtranscode is
running. All you need to do is change the 'Pre shutdown check command' to
There are more details in the README about mythshutdown and also mythwelcome
which may also interest you if you don't want to leave your system running 24/7.
More information about the mythtv-dev