[mythtv-users] wakeup

Daryl McDonald darylangela at gmail.com
Sat Sep 15 03:06:23 UTC 2018


On Fri, Sep 14, 2018 at 2:26 PM Nicolas Krzywinski <myth2 at site7even.de>
wrote:

> Am 14.09.2018 um 19:51 schrieb Bill Meek:
> > On 09/14/2018 11:00 AM, Daryl McDonald wrote:
> >> On Fri, Sep 14, 2018 at 9:58 AM Mike Bibbings <mike.bibbings at gmail.com>
> >> wrote:
> >>
> >>> On 12/09/18 23:54, Daryl McDonald wrote:
> >>>
> >>>
> >>>
> >>> On Wed, Sep 12, 2018 at 2:03 PM Daryl McDonald <darylangela at gmail.com>
> >>> wrote:
> >>>
> >>>>
> >>>>
> >>>> On Wed, Sep 12, 2018 at 10:53 AM Nicolas Krzywinski <
> myth2 at site7even.de>
> >>>> wrote:
> >>>>
> >>>>> Am 12.09.2018 um 13:52 schrieb Daryl McDonald:
> >>>>>
> >>>>>
> >>>>>
> >>>>> On Wed, Sep 12, 2018 at 3:32 AM jksj <jksjdevelop at gmail.com> wrote:
> >>>>>
> >>>>>> On 12/09/18 00:53, Daryl McDonald wrote:
> >>>>>>
> >>>>>> I have the same set up in 18.04 as I did in 16.04 but my box doesn't
> >>>>>> wake up in time, once it came on two hours late, since then I've
> pushed the
> >>>>>> button myself. Is there a time setting I'm missing somewhere? TIA
> Daryl
> >>>>>>
> >>>>>>
> >>>>>> _______________________________________________
> >>>>>> mythtv-users mailing listmythtv-users at mythtv.orghttp://
> lists.mythtv.org/mailman/listinfo/mythtv-usershttp://wiki.mythtv.org/Mailing_List_etiquette
> >>>>>> MythTV Forums: https://forum.mythtv.org
> >>>>>>
> >>>>>> Mine wakes on time to record programs, the same as in 16.04 but I
> think
> >>>>>> it does not do this for the daily wake up time set in Mythwelcome.
> Could
> >>>>>> that be your issue?
> >>>>>> No, I don't use Mythwelcome, but thanks for the reply, I'll go over
> my
> >>>>>> setup again, I must have missed something. Curious that the
> wakeup_test.sh,
> >>>>>> thanks Bill, restarts 16.04 and not 18.04 when the report from (bad
> syntax
> >>>>>> from memory) proc driver rtc is identical from both distros.
> >>>>>> _______________________________________________
> >>>>>> mythtv-users mailing list
> >>>>>> mythtv-users at mythtv.org
> >>>>>> http://lists.mythtv.org/mailman/listinfo/mythtv-users
> >>>>>> http://wiki.mythtv.org/Mailing_List_etiquette
> >>>>>> MythTV Forums: https://forum.mythtv.org
> >>>>>>
> >>>>> Hey Daryl,
> >>>>>
> >>>>> recently I set up a new MythTV system (see signature) and there I
> >>>>> switched to the new method of using only:
> >>>>>      /usr/sbin/rtcwake --date "<datestring>" --mode no
> >>>>> to set the wakeup time.
> >>>>>
> >>>>> This works fine for my system.
> >>>>>
> >>>>> The MythTV wiki was quite confusing as there is a lot of outdated and
> >>>>> ambigous information, but you can find the above mentioned call as
> well, if
> >>>>> you search for it.
> >>>>>
> >>>>> Btw., I made a small script to also update the LCD display with the
> next
> >>>>> scheduled automatic wakeup time:
> >>>>>
> >>>>> me at mysystem:~$ cat /usr/sbin/wakewrapper.sh
> >>>>> #!/bin/bash
> >>>>> # Sets RTC wake time and inserts the time into LCDd.conf for letting
> the
> >>>>> display inform about the next wakeup time when the system is off
> >>>>>
> >>>>> if [ -z "$1" ]
> >>>>>      then
> >>>>>          echo "Usage $0 <time>"
> >>>>>          exit 1
> >>>>> fi
> >>>>>
> >>>>> # set wake time
> >>>>> wakestring=`/usr/sbin/rtcwake --date "$1" --mode no`
> >>>>>
> >>>>> # grab the confirmed wake time
> >>>>> wakestring=`rtcwake --mode show | grep Alarm`
> >>>>>
> >>>>> # extract only time of confirmation output
> >>>>> waketime=${wakestring:15:16}
> >>>>>
> >>>>> # convert utc time string to local time
> >>>>> waketime=`date --date="$waketime +0000" +"%d. %b %T"`
> >>>>>
> >>>>> # update LCDd.conf with wake time
> >>>>> sed -i -e "s/GoodBye = \"[^H].*/GoodBye = \"$waketime\"/g"
> /etc/LCDd.conf
> >>>>>
> >>>>> # reload LCDd to let it use the new config
> >>>>> systemctl reload-or-restart LCDd.service
> >>>>>
> >>>>> The sed command to update the LCDd.conf has to be adapted to the
> target
> >>>>> environment. It needs to filter out the second GoodBye line, that
> should
> >>>>> not be overwritten. Mine begins with "H", therefore the regex skips
> every
> >>>>> GoodBye lines that have a value beginning with "H".
> >>>>>
> >>>>> Have fun!
> >>>>> Nicolas
> >>>>>
> >>>>> --
> >>>>> Nicolas
> >>>>>
> >>>>> MythTV Version : v29.1-22-g675676b
> >>>>> Ubuntu 18.04 LTS (4.15.0-23-generic)
> >>>>> Digital Devices GmbH Octopus DVB Adapter via ddbridge kernel module
> >>>>> 15c2:0036 SoundGraph Inc. LC16M VFD Display/IR Receiver (imon) via
> ir-keytable
> >>>>> VGA compatible controller: Intel Corporation Device 3e91 (Intel(R)
> Core(TM) i3-8100T)
> >>>>>
> >>>>> _______________________________________________
> >>>>> mythtv-users mailing list
> >>>>> mythtv-users at mythtv.org
> >>>>> http://lists.mythtv.org/mailman/listinfo/mythtv-users
> >>>>> http://wiki.mythtv.org/Mailing_List_etiquette
> >>>>> MythTV Forums: https://forum.mythtv.org
> >>>>
> >>>>
> >>>> Thanks Nicolas, I've just changed the BE setting from "$time" to
> "-mode
> >>>> no" That part of the wiki was confusing for me too until now. I'll
> report
> >>>> the results here later this evening.
> >>>>
> >>>
> >>> The box didn't wake on its own, and it looks like the change to "-mode
> no"
> >>> is a step backward, from /var/log/mythtv/hwclock-rebootTime I see no
> new
> >>> writes:
> >>> Current Time      ->Tue Sep 11 23:21:32 EDT 2018
> >>> Shutting down for ->13hrs:27Mins
> >>> Wake up at approx.->Wed Sep 12 17:49:00 EDT 2018
> >>> ------------------------------------------------------
> >>> Current Time      ->Wed Sep 12 09:51:20 EDT 2018
> >>> Shutting down for ->02hrs:57Mins
> >>> Wake up at approx.->Wed Sep 12 17:49:00 EDT 2018
> >>> and if the math can be taken literally, this looks faulty with the
> "$time"
> >>> setting.  Ideas and suggestions welcome.
> >>>
> >>>
> >>> Your original post indicates failure to powerup at the appropriate
> time.
> >>>
> >>> Attached is the script autowakeuptest.sh I use to test wakeup on
> xubuntu
> >>> systems (16.04 and up), it saves copy and paste from the Mythtv ACPI
> wiki
> >>> page.
> >>> Just make it executable (chmod +x) and run it. If it does not powerup
> in 5
> >>> minutes that problem needs to be fixed.
> >>>
> >>> I have also attached an alternative script (autowakeuptest2.sh) which
> uses
> >>> rtcwake instead.
> >>>
> >>> If you want to use rtcwake with mythtv you need to modify script in
> >>> /usr/bin/setwakeup.sh as follows:
> >>> replace lines
> >>> echo 0 > /sys/class/rtc/rtc0/wakealarm      #this clears your alarm.
> >>> echo $1 > /sys/class/rtc/rtc0/wakealarm     #this writes your alarm
> >>>
> >>> with one line
> >>> sudo /usr/sbin/rtcwake --mode no -t $1
> >>>
> >>>
> >>> Note: "--mode no" not "-mode no" (the Mythtv ACPI wiki has a missing -
> >>> character in the example /usr/sbin/rtcwake -mode no)
> >>>
> >>>
> >>> Mike
> >>>
> >>> _______________________________________________
> >>> mythtv-users mailing list
> >>> mythtv-users at mythtv.org
> >>> http://lists.mythtv.org/mailman/listinfo/mythtv-users
> >>> http://wiki.mythtv.org/Mailing_List_etiquette
> >>> MythTV Forums: https://forum.mythtv.or <https://forum.mythtv.org>g
> >>>
> >> Thanks Mike, I'm still struggling with this, I downloaded both scripts,
> >> chmod'd them. I tested each and both shutdown but neither restarted
> after
> >> five minutes. This was all done without any modifications to the BE
> setup,
> >> where do we go from here?
> >
> > 1. The Wiki has been fixed (--mode) thanks Mike.
> >
> > 2. This is the line from my script:
> >
> >     rtcwake --mode no --time ${NEW_TIME} --utc
> >
> > Where $NEW_TIME is the value from: WakeupTimeFormat of time_t
> > or something like: NEW_TIME=$((`date +'%s'` + 60)) for testing.
> >
> Apropos utc, did you checked that the bios time is in UTC?
> Also, have you checked with "rtcwake --mode show" that the time was set
> correctly?
>
> --
> Nicolas
>
> MythTV Version : v29.1-22-g675676b
> Ubuntu 18.04 LTS (4.15.0-23-generic)
> Digital Devices GmbH Octopus DVB Adapter via ddbridge kernel module
> 15c2:0036 SoundGraph Inc. LC16M VFD Display/IR Receiver (imon) via
> ir-keytable
> VGA compatible controller: Intel Corporation Device 3e91 (Intel(R)
> Core(TM) i3-8100T)
>
> _______________________________________________
> mythtv-users mailing list
> mythtv-users at mythtv.org
> http://lists.mythtv.org/mailman/listinfo/mythtv-users
> http://wiki.mythtv.org/Mailing_List_etiquette
> MythTV Forums: https://forum.mythtv.org


It looks like the editing of grub has given me a successful test with
"autosetwakeup.sh" 2 did not restart, I'll confirm tomorrow when the box
behaves itself, thanks to all involved!  Daryl
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mythtv.org/pipermail/mythtv-users/attachments/20180914/65950e81/attachment.html>


More information about the mythtv-users mailing list