[mythtv-users] automatic power down fun and games
blind Pete
0123peter at gmail.com
Wed Dec 23 22:29:19 UTC 2015
On Wed, 23 Dec 2015 01:14:21 +0000
Roger Siddons <dizygotheca at ntlworld.com> wrote:
> On 19 December 2015 at 01:36, blind Pete <0123peter at gmail.com> wrote:
>
> I have not actually played with Mythwelcome yet,
> it does not appear to be strictly necessary.
>
>
> The frontend's Standby mode effectively makes MythWelcome redundant,
> and is a lot easier to set-up and use. I believe the only feature it
> lacks is the pre-set wakeup times (which could be achieved by the
> wake-up script, if necessary)
>
> There seem to be some oddities - at least on this system - or possibly
> I've just mis-understood things. Comments and explanations for
> dummies welcome.
>
> Something clears the wake alarm setting occasionally.
> This is good...
> $ cat /sys/class/rtc/rtc0/wakealarm
> 1450569060
> $ date -d @$(cat /sys/class/rtc/rtc0/wakealarm)
> Sun Dec 20 10:51:00 AEDT 2015
>
> But sometimes this happens...
> $ cat /sys/class/rtc/rtc0/wakealarm
> $ date -d @
> date: invalid date ‘@’
>
> It might be easier if it "cleared" to MAX-INT or even 0, but if you
> are alert to undefined variables here and there it is OK. This could
> be a firmware issue and completely beyond our control.
>
> The firmware (?) does not seem to allow setting the alarm to any time
> in the past. Is this a misguided safety feature?
>
>
> I don't have UEFI firmware but see the same. wakealarm will be empty
> until you have written something to it. Reading it is just a test to
> verify that your write worked. Writing a past time is invalid and
> wakealarm is cleared/unset/emptied by it.
>
> In Mythbuntu 14.04 and Ubuntu 15.10 /etc/init/hwclock.conf
> and /etc/init/hwclock-save.conf contain a line like
> "exec hwclock [many parameters]". After adding many echo to logfile
> lines and many reboots (in Mythbuntu 14.04) it seems that hwclock.conf
> is not executed, it is not leaving anything in my log file. Is the OS
> supposed to execute it independent of MythTV? More strangely
> execution of hwclock-save.conf stops at the "exec hwclock" line, but
> when the "exec" was deleted then hwclock ran (seemingly successfully)
> as did the rest of the commands in hwclock-save.conf! I'm out of my
> depth here.
>
> I think the wiki is out-of-date here. As you suggest, I don't believe
> modern Ubuntu's do write the clock when shutting down. I stopped
> using the hwclock bits of the wiki some years ago and have never had
> a problem. I suggest ignoring it for now.
>
>
> I have also created /usr/local/bin/checklogin.sh that seems to be well
> behaved, but not called and /usr/local/bin/setwakeup.sh that seems
> well behaved except for some echoed comments about time to sleep. It
> will be wrong for sleep times greater than 31 days (the length of
> January) and some time zone setups. (Mine!)
>
>
> Likewise the wiki's checklogin is out-of-date and timezones have a
> small error (but is only a debugging aid).
> https://forum.mythtv.org/viewtopic.php?f=36&t=1035
>
> FWIW my checklogin uses:
>
> who | grep -v "(:0)" && echo "$DATE Remote user is logged in" && exit
> 1
>
> to only prevent shutdown when I'm ssh'ed in from another machine.
That helped, but more experiments are needed.
Thanks.
--
testing
bP
More information about the mythtv-users
mailing list