[mythtv-users] Long time Mythwelcome bugs?

Neil Cooper neilcoo at yahoo.co.uk
Mon Aug 15 19:47:38 UTC 2011

--- On Mon, 8/15/11, Douglas Mackay <douglas.mackay at gmail.com> wrote:

> From: Douglas Mackay <douglas.mackay at gmail.com>
> Subject: Re: [mythtv-users] Long time Mythwelcome bugs?
> To: "Discussion about MythTV" <mythtv-users at mythtv.org>
> Date: Monday, August 15, 2011, 11:51 AM
> On 15 August 2011 17:58, Thomas Boehm
> <mythtv-users at lists.boehmi.net>
> wrote:
> > Craig Huff wrote:
> >
> > I had it unchecked, but after reading Richard's and
> Douglas's postings I
> > checked it because they said mythwelcome will know
> whether the PC was
> > started manually or automatically.
> >
> > >From the wiki: "Automatic startup of the frontend.
> If the system has
> > been started due to a scheduled recording the
> mythwelcome status page
> > will be shown instead to allow the system to shut
> itself back down."
> >
> > Who is right here?
> >
> >
> > If it should do what Richard and Douglas wrote, then
> there is a bug
> > somewhere...
> On a correctly configured system (i.e. mythtV is configured
> to
> shutdown itself when idle and has the correct settings in
> the
> mythwelcome and mythbackend settings) then what the wiki
> states is
> correct.
> I have a combined FE/BE and it stays at the mythwelcome
> screen if it
> starts for a recording. If I manually start the machine it
> will launch
> the frontend.
> Reference:
> mythshutdown source -
> https://github.com/MythTV/mythtv/blob/v0.23.1/mythtv/programs/mythshutdown/main.cpp
> Lines 582 - 583 MythshutdownWakeupTime value gets saved to
> database
> when mythshutdown --shutdown is called (this will either be
> the next
> defined wakeup period or value set by mythshutdown
> --setwakeup)
> Lines 692 - 729. mythshutdown --startup checks the
> MythshutdownWakeupTime is the dabase and if within 15 mins
> of the time
> return that it's an automatic startup
> mythwelcome source -
> https://github.com/MythTV/mythtv/blob/v0.23.1/mythtv/programs/mythwelcome/welcomedialog.cpp
> Lines 123 - 142 checks result of mythshutdown --startup to
> determine
> if it should auto start frontend
> (this is based on the 0.23.1 source but it works fine in
> 0.24 as well)
> -- 
> Doug
> _______________________________________________
> mythtv-users mailing list
> mythtv-users at mythtv.org
> http://www.mythtv.org/mailman/listinfo/mythtv-users

So the whole mechanism is dependent on using mythshutdown to tell the database when it needs to wake up, but there's also a configuration setting in the backend config for how long prior to a recording to autmoatically wake up... then when it actually wakes up mythwelcome ignores both of these and just uses an arbitrary "are we within 15 minutes of a recording" test to guess if it got started in order to do a recording? 
So I also don't get a frontend if I happen to manually power up the mythbox within 15 minutes of the next recording?
Is it just me or does anyone else also think the whole existing mechanism is seriously overcomplicated, especially for something that doesn't work right anyway?
Could I suggest we do away with mythshutdown entirely and when mythwelcome starts up just have it directly read the time last stored in the RTC flash and compare it to (system time - uptime). That would seem to be a much simpler, cleaner and more accurate way to figure out if the box was started by automatic wakeup or by the user.

More information about the mythtv-users mailing list