<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">On 14/09/18 17:00, Daryl McDonald
      wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CAMwtTBDUoyATMn2qSeJ93i9CAPCFW01atvtMFOzzQEXD0fHq0g@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=utf-8">
      <div dir="ltr"><br>
        <br>
        <div class="gmail_quote">
          <div dir="ltr">On Fri, Sep 14, 2018 at 9:58 AM Mike Bibbings
            <<a href="mailto:mike.bibbings@gmail.com"
              moz-do-not-send="true">mike.bibbings@gmail.com</a>>
            wrote:<br>
          </div>
          <blockquote class="gmail_quote" style="margin:0 0 0
            .8ex;border-left:1px #ccc solid;padding-left:1ex">
            <div bgcolor="#FFFFFF" text="#000000">
              <div class="m_-5554663097155798459moz-cite-prefix">On
                12/09/18 23:54, Daryl McDonald wrote:<br>
              </div>
              <blockquote type="cite">
                <div dir="ltr">
                  <div dir="ltr"><br>
                    <br>
                    <div class="gmail_quote">
                      <div dir="ltr">On Wed, Sep 12, 2018 at 2:03 PM
                        Daryl McDonald <<a
                          href="mailto:darylangela@gmail.com"
                          target="_blank" moz-do-not-send="true">darylangela@gmail.com</a>>
                        wrote:<br>
                      </div>
                      <blockquote class="gmail_quote" style="margin:0px
                        0px 0px 0.8ex;border-left:1px solid
                        rgb(204,204,204);padding-left:1ex">
                        <div dir="ltr"><br>
                          <br>
                          <div class="gmail_quote">
                            <div dir="ltr">On Wed, Sep 12, 2018 at 10:53
                              AM Nicolas Krzywinski <<a
                                href="mailto:myth2@site7even.de"
                                target="_blank" moz-do-not-send="true">myth2@site7even.de</a>>
                              wrote:<br>
                            </div>
                            <blockquote class="gmail_quote"
                              style="margin:0px 0px 0px
                              0.8ex;border-left:1px solid
                              rgb(204,204,204);padding-left:1ex">
                              <div bgcolor="#FFFFFF"> Am 12.09.2018 um
                                13:52 schrieb Daryl McDonald:<br>
                                <blockquote type="cite">
                                  <div dir="ltr"><br>
                                    <br>
                                    <div class="gmail_quote">
                                      <div dir="ltr">On Wed, Sep 12,
                                        2018 at 3:32 AM jksj <<a
                                          href="mailto:jksjdevelop@gmail.com"
                                          target="_blank"
                                          moz-do-not-send="true">jksjdevelop@gmail.com</a>>
                                        wrote:<br>
                                      </div>
                                      <blockquote class="gmail_quote"
                                        style="margin:0px 0px 0px
                                        0.8ex;border-left:1px solid
                                        rgb(204,204,204);padding-left:1ex">
                                        <div bgcolor="#FFFFFF">
                                          <div
class="m_-5554663097155798459gmail-m_5157554160669831483m_3112064276818711734m_-2449391101253579922moz-cite-prefix">On
                                            12/09/18 00:53, Daryl
                                            McDonald wrote:<br>
                                          </div>
                                          <blockquote type="cite">
                                            <div dir="ltr">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</div>
                                            <br>
                                            <fieldset
class="m_-5554663097155798459gmail-m_5157554160669831483m_3112064276818711734m_-2449391101253579922mimeAttachmentHeader"></fieldset>
                                            <br>
                                            <pre>_______________________________________________
mythtv-users mailing list
<a class="m_-5554663097155798459gmail-m_5157554160669831483m_3112064276818711734m_-2449391101253579922moz-txt-link-abbreviated" href="mailto:mythtv-users@mythtv.org" target="_blank" moz-do-not-send="true">mythtv-users@mythtv.org</a>
<a class="m_-5554663097155798459gmail-m_5157554160669831483m_3112064276818711734m_-2449391101253579922moz-txt-link-freetext" href="http://lists.mythtv.org/mailman/listinfo/mythtv-users" target="_blank" moz-do-not-send="true">http://lists.mythtv.org/mailman/listinfo/mythtv-users</a>
<a class="m_-5554663097155798459gmail-m_5157554160669831483m_3112064276818711734m_-2449391101253579922moz-txt-link-freetext" href="http://wiki.mythtv.org/Mailing_List_etiquette" target="_blank" moz-do-not-send="true">http://wiki.mythtv.org/Mailing_List_etiquette</a>
MythTV Forums: <a class="m_-5554663097155798459gmail-m_5157554160669831483m_3112064276818711734m_-2449391101253579922moz-txt-link-freetext" href="https://forum.mythtv.org" target="_blank" moz-do-not-send="true">https://forum.mythtv.org</a>
</pre>
                                          </blockquote>
                                          <p>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?<br>
                                          </p>
                                        </div>
                                        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. 
                                        _______________________________________________<br>
                                        mythtv-users mailing list<br>
                                        <a
                                          href="mailto:mythtv-users@mythtv.org"
                                          target="_blank"
                                          moz-do-not-send="true">mythtv-users@mythtv.org</a><br>
                                        <a
                                          href="http://lists.mythtv.org/mailman/listinfo/mythtv-users"
                                          rel="noreferrer"
                                          target="_blank"
                                          moz-do-not-send="true">http://lists.mythtv.org/mailman/listinfo/mythtv-users</a><br>
                                        <a
                                          href="http://wiki.mythtv.org/Mailing_List_etiquette"
                                          rel="noreferrer"
                                          target="_blank"
                                          moz-do-not-send="true">http://wiki.mythtv.org/Mailing_List_etiquette</a><br>
                                        MythTV Forums: <a
                                          href="https://forum.mythtv.org"
                                          rel="noreferrer"
                                          target="_blank"
                                          moz-do-not-send="true">https://forum.mythtv.org</a><br>
                                      </blockquote>
                                    </div>
                                  </div>
                                </blockquote>
                                Hey Daryl,<br>
                                <br>
                                recently I set up a new MythTV system
                                (see signature) and there I switched to
                                the new method of using only:<br>
                                    <tt>/usr/sbin/rtcwake --date
                                  "<datestring>" --mode no</tt><br>
                                to set the wakeup time.<br>
                                <br>
                                This works fine for my system.<br>
                                <br>
                                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.<br>
                                <br>
                                Btw., I made a small script to also
                                update the LCD display with the next
                                scheduled automatic wakeup time:<br>
                                <blockquote><font size="-2"><tt>me@mysystem:~$
                                      cat /usr/sbin/wakewrapper.sh </tt><tt><br>
                                    </tt><tt>#!/bin/bash</tt><tt><br>
                                    </tt><tt># 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</tt><tt><br>
                                    </tt><tt><br>
                                    </tt><tt>if [ -z "$1" ]</tt><tt><br>
                                    </tt><tt>    then</tt><tt><br>
                                    </tt><tt>        echo "Usage $0
                                      <time>"</tt><tt><br>
                                    </tt><tt>        exit 1</tt><tt><br>
                                    </tt><tt>fi</tt><tt><br>
                                    </tt><tt><br>
                                    </tt><tt># set wake time</tt><tt><br>
                                    </tt><tt>wakestring=`/usr/sbin/rtcwake
                                      --date "$1" --mode no`</tt><tt><br>
                                    </tt><tt><br>
                                    </tt><tt># grab the confirmed wake
                                      time</tt><tt><br>
                                    </tt><tt>wakestring=`rtcwake --mode
                                      show | grep Alarm`</tt><tt><br>
                                    </tt><tt><br>
                                    </tt><tt># extract only time of
                                      confirmation output</tt><tt><br>
                                    </tt><tt>waketime=${wakestring:15:16}</tt><tt><br>
                                    </tt><tt><br>
                                    </tt><tt># convert utc time string
                                      to local time</tt><tt><br>
                                    </tt><tt>waketime=`date
                                      --date="$waketime +0000" +"%d. %b
                                      %T"`</tt><tt><br>
                                    </tt><tt><br>
                                    </tt><tt># update LCDd.conf with
                                      wake time</tt><tt><br>
                                    </tt><tt>sed -i -e "s/GoodBye =
                                      \"[^H].*/GoodBye =
                                      \"$waketime\"/g" /etc/LCDd.conf</tt><tt><br>
                                    </tt><tt><br>
                                    </tt><tt># reload LCDd to let it use
                                      the new config</tt><tt><br>
                                    </tt><tt>systemctl reload-or-restart
                                      LCDd.service</tt><tt><br>
                                    </tt></font></blockquote>
                                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".<br>
                                <br>
                                Have fun!<br>
                                Nicolas<br>
                                <br>
                                <pre class="m_-5554663097155798459gmail-m_5157554160669831483m_3112064276818711734moz-signature" cols="0">-- 
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)</pre>
                              </div>
_______________________________________________<br>
                              mythtv-users mailing list<br>
                              <a href="mailto:mythtv-users@mythtv.org"
                                target="_blank" moz-do-not-send="true">mythtv-users@mythtv.org</a><br>
                              <a
                                href="http://lists.mythtv.org/mailman/listinfo/mythtv-users"
                                rel="noreferrer" target="_blank"
                                moz-do-not-send="true">http://lists.mythtv.org/mailman/listinfo/mythtv-users</a><br>
                              <a
                                href="http://wiki.mythtv.org/Mailing_List_etiquette"
                                rel="noreferrer" target="_blank"
                                moz-do-not-send="true">http://wiki.mythtv.org/Mailing_List_etiquette</a><br>
                              MythTV Forums: <a
                                href="https://forum.mythtv.org"
                                rel="noreferrer" target="_blank"
                                moz-do-not-send="true">https://forum.mythtv.org</a></blockquote>
                            <div><br>
                            </div>
                            <div>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.</div>
                          </div>
                        </div>
                      </blockquote>
                      <div><br>
                      </div>
                      <div>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:</div>
                      <div>
                        <div>Current Time      ->Tue Sep 11 23:21:32
                          EDT 2018</div>
                        <div>Shutting down for ->13hrs:27Mins</div>
                        <div>Wake up at approx.->Wed Sep 12 17:49:00
                          EDT 2018</div>
                        <div>------------------------------------------------------</div>
                        <div>Current Time      ->Wed Sep 12 09:51:20
                          EDT 2018</div>
                        <div>Shutting down for ->02hrs:57Mins</div>
                        <div>Wake up at approx.->Wed Sep 12 17:49:00
                          EDT 2018 </div>
                      </div>
                      <div>and if the math can be taken literally, this
                        looks faulty with the "$time" setting.  Ideas
                        and suggestions welcome.</div>
                    </div>
                  </div>
                </div>
              </blockquote>
              <br>
              Your original post indicates failure to powerup at the
              appropriate time.<br>
              <br>
              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.<br>
              Just make it executable (chmod +x) and run it. If it does
              not powerup in 5 minutes that problem needs to be fixed.<br>
              <br>
              I have also attached an alternative script
              (autowakeuptest2.sh) which uses rtcwake instead. <br>
              <br>
              If you want to use rtcwake with mythtv you need to modify
              script in /usr/bin/setwakeup.sh as follows:<br>
              replace lines<br>
              echo 0 > /sys/class/rtc/rtc0/wakealarm      #this
              clears your alarm.<br>
              echo $1 > /sys/class/rtc/rtc0/wakealarm     #this
              writes your alarm<br>
              <br>
              with one line<br>
              sudo /usr/sbin/rtcwake --mode no -t $1<br>
              <br>
              <br>
              Note: "--mode no" not "-mode no" (the Mythtv ACPI wiki has
              a missing - character in the example /usr/sbin/rtcwake
              -mode no)<br>
              <br>
              <br>
              Mike<br>
              <br>
            </div>
            _______________________________________________<br>
            mythtv-users mailing list<br>
            <a href="mailto:mythtv-users@mythtv.org" target="_blank"
              moz-do-not-send="true">mythtv-users@mythtv.org</a><br>
            <a
              href="http://lists.mythtv.org/mailman/listinfo/mythtv-users"
              rel="noreferrer" target="_blank" moz-do-not-send="true">http://lists.mythtv.org/mailman/listinfo/mythtv-users</a><br>
            <a href="http://wiki.mythtv.org/Mailing_List_etiquette"
              rel="noreferrer" target="_blank" moz-do-not-send="true">http://wiki.mythtv.org/Mailing_List_etiquette</a><br>
            MythTV Forums: <a href="https://forum.mythtv.org"
              rel="noreferrer" target="_blank" moz-do-not-send="true">https://forum.mythtv.or</a>g<br>
          </blockquote>
          <div>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?<br>
             </div>
        </div>
      </div>
    </blockquote>
    Looks like there is something in your Bios settings preventing
    wakeup from working.<br>
    Assuming that you have not made any changes to the Bios settings
    between using ubuntu 16.04 and 18.04, it is possible that the
    default grub entry needs adjusting. <br>
    <br>
    But first just make sure mythtv-backend does not run (I don't know
    what mythtv-backend does, if anything, when the system is shutdown
    via "sudo shutdown -h now" ) you need to temporarily disable
    mythtv-backend  :<br>
    sudo systemctl stop mythtv-backend<br>
    sudo systemctl disable mythtv-backend<br>
     <br>
    now reboot the system and try the scripts again. If it wakes up
    after 5 minutes, there is likely a problem with mythtv backend
    settings, if it does not wakeup try changing
    GRUB_CMDLINE_LINUX_DEFAULT command line in file /etc/default/ grub,
    it is unfortunately a bit of trial and error to get this working.<br>
    <br>
    In the past, depending on the motherboard I have had add either
    iommu=soft and/or hpet=disable to the default
    GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" command line before rtc
    wakeup would work.<br>
    <br>
    Before changing file /etc/default/grub make a copy and put it some
    where safe just in case it all goes wrong.<br>
    try changing to <br>
    GRUB_CMDLINE_LINUX_DEFAULT="quiet splash iommu=soft hpet=disable"<br>
    <br>
    after editing file /etc/default/grub you need to run<br>
    sudo update-grub<br>
    sudo reboot<br>
    <br>
    now try the scripts again, if wakeup works great, you can then
    narrow down which of the two options you really need. Then enable
    mythtv-backend:<br>
    sudo systemctl enable mythtv-backend<br>
    sudo systemctl start mythtv-backend   # or simply reboot<br>
    <br>
    <br>
     If wakeup does not work, it means going into the Bios to try some
    different settings e.g. disable RTC Wakeup, disable C states - if
    you can post details of your motherboard and the CPU it might help.<br>
    <br>
    Mike<br>
    <br>
    <br>
    <br>
  </body>
</html>