[mythtv] No Auto-shutdown if started for wakeup period. Scheduler change required.
matt.doran at papercut.biz
Sat May 19 11:39:07 UTC 2007
I've already submitted a patch to improve the autoshutdown behaviour.
The patch is here: http://svn.mythtv.org/trac/ticket/3403
I've encountered another problem, where the box will not shutdown if the
box was started for a daily wakeup period. The scheduler
(scheduler.cpp), has code that tries to detect if the machine was
started automatically (and hence should allow an auto shutdown). It's
around line 1354. It does this by seeing if a recording is about to
start. But this isn't good enough. It needs to also consider the
The mythshutdown program has code that determines if the startup was
automatic or manual. It takes scheduled recordings and the wakeup
periods into account. The test can be performed by running:
"mythshutdown --startup", which returns an exit status of 0 if
automatic, or 1 if manual startup. I think we should change the
scheduler to also use this technique (possibly in addition to the test
it already does).
Chris Pinkham, the scheduler is your area, what do you think? We could
call "mythshutdown --startup", or refactor that code to be called
directly from the scheduler?
I'd like to work up for a patch for this. Which way do you think is
PS: It is possible to turn off "blockSDWUwithoutClient". This will
allow the backend to shutdown even if a client has never connected.
without having a client connected. But I've had a lot of problems with
this. It's way too trigger happy. If you restart the backend, and
the frontend it started but sitting on a menu .... the backend will
shutdown the box. I even had the backend shutdown my box in the
middle of an ubuntu upgrade because of that, which caused a lot of
pain. So I'd rather leave this setting on ... but have the backend
detect if it was started automatically correctly.
More information about the mythtv-dev