[mythtv-commits] Ticket #12972: Frontend idle timeout cannot be fully disabled

MythTV noreply at mythtv.org
Tue Aug 15 18:55:17 UTC 2017


#12972: Frontend idle timeout cannot be fully disabled
------------------------------+------------------------
 Reporter:  amb@…             |          Owner:
     Type:  Patch - Bug Fix   |         Status:  new
 Priority:  minor             |      Milestone:  29.0
Component:  MythTV - General  |        Version:  0.28.0
 Severity:  low               |     Resolution:
 Keywords:                    |  Ticket locked:  0
------------------------------+------------------------

Comment (by amb@…):

 The point rsiddons makes about the database entry not existing until
 created is a good point and one that I will admit having forgotten.
 However where it is used in MythMainWindow the code does assume a non-zero
 default (90 minutes in this case) so not being set is equivalent to being
 set non-zero:

 {{{
     d->idleTime = gCoreContext->GetNumSetting("FrontendIdleTimeout",
                                               STANDBY_TIMEOUT);
 }}}

 Using the same default in my patch would make it equivalent to the other
 uses of this configuration setting which makes it consistent with its
 documentation string.


 The problem with the patch, which hasn't been fully explained above, is
 that the **backend** also has an automatic startup test.  If the backend
 was started automatically and the frontend hasn't connected then it will
 be allowed to go to sleep after the recording //even if the idle timeout
 is zero//.  The patch will not make the frontend go to standby so it will
 connect to the backend and cancel the idle timeout for the special case.

 This problem only exists if the backend's idle timeout is set to zero.  If
 this is not the case then when the machine is started so that a recording
 can be performed the frontend will go to standby after 90 minutes (or the
 value of FrontendIdleTimeout if set) anyway and the backend will allow
 shutdown after its own timeout.

 We could fix the patch for this special case by checking for the backend's
 idle timeout as well, like this:

 || **FrontendIdleTimeout** || **idleTimeoutSecs** || **mythfrontend
 action** || **explanation** ||
 || set to zero || not set or set to zero || go to standby || Current
 behaviour ||
 || set to zero || set to non-zero || normal start up || User's explicit
 choice to set FrontendIdleTimeout to zero, requires patch ||
 || not set or set to non-zero || not set or set to zero || go to standby
 || Current behaviour ||
 || not set or set to non-zero || set to non-zero || go to standby ||
 Current behaviour ||

 I think that this works for everybody.

--
Ticket URL: <https://code.mythtv.org/trac/ticket/12972#comment:8>
MythTV <http://www.mythtv.org>
MythTV Media Center


More information about the mythtv-commits mailing list