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

MythTV noreply at mythtv.org
Thu Aug 17 16:07:46 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 pbennett):

 Replying to [comment:8 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.
 >
 I think this is a reasonable solution.
 >
 > 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.
 I am not with you here - if the backend idle timeout is zero then it never
 goes to sleep, it is on 24x7.
 > 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.
 As I said above, if the backend idle timeout is zero it never goes to
 sleep.
 > 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.
 I don't think that this is needed, I think all that is needed it to change
 the default in your original patch so that it uses STANDBY_TIMEOUT as the
 default if frontend idle timeout does not exist.

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


More information about the mythtv-commits mailing list