<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">Hi Daryl, here you are.<br>
<br>
Operating System: Ubuntu 12.04.3 LTS<br>
Motherboard: Gigabyte GA-MA785GM-US2H<br>
BIOS RTC (real time clock) is set to UTC (not set to localtime)<br>
<br>
The machine is backend and frontend.<br>
Mythshutdown is controlled by mythwelcome.<br>
<br>
Power Management Setup<br>
---------------------------------------<br>
ACPI Suspend Type: S3 (STR)<br>
HPET-Support: Disabled<br>
Power-On by Alarm: Disabled<br>
ErP Support: Disabled<br>
<br>
Hints<br>
-------<br>
1: With HPET-Support and ErP Support enabled all seemed to work
fine, but the system never waked up.<br>
2: Setting a fixed Power-On by Alarm time can get into conflict
with the time mythtv sets. In my case it only works when I disable
it in BIOS.<br>
3: I can only choose between S1 (Power on Suspend) and S3 (Suspend
to RAM) in BIOS. But I always use S5 (Soft Off).<br>
<br>
Kernel<br>
---------<br>
sjuk@obelix:~$ uname -r<br>
3.2.0-52-generic<br>
<br>
sjuk@obelix:~$ sudo grep -i rtc /var/log/dmesg<br>
[ 0.157612] RTC time: 14:28:52, date: 09/01/13<br>
[ 1.592355] rtc_cmos 00:04: RTC can wake from S4<br>
[ 1.592440] rtc_cmos 00:04: rtc core: registered rtc_cmos as
rtc0<br>
[ 1.592466] rtc0: alarms up to one month, 242 bytes nvram<br>
[ 1.598070] rtc_cmos 00:04: setting system clock to 2013-09-01
14:28:54 UTC (1378045734)<br>
<br>
sjuk@obelix:~$ cat /proc/driver/rtc<br>
rtc_time : 14:50:45<br>
rtc_date : 2013-09-01<br>
alrm_time : 06:10:00<br>
alrm_date : 2013-09-02<br>
alarm_IRQ : no<br>
alrm_pending : no<br>
update IRQ enabled : no<br>
periodic IRQ enabled : no<br>
periodic IRQ frequency : 1024<br>
max user IRQ frequency : 64<br>
24hr : yes<br>
periodic_IRQ : no<br>
update_IRQ : no<br>
HPET_emulated : no<br>
BCD : yes<br>
DST_enable : no<br>
periodic_freq : 1024<br>
batt_status : okay<br>
<br>
Disable hwclock updates<br>
---------------------------------<br>
On my system there is no need to disable the hwclock updates<br>
<br>
Setwakeuptime (don't forget to make it executable)<br>
-----------------------------------------------------------------<br>
sjuk@obelix:~$ cat /usr/bin/setwakeup.sh <br>
#!/bin/sh<br>
#<br>
# set ACPI Wakeup time<br>
# usage: setwakeup.sh seconds<br>
# seconds - number of seconds from epoch to UTC time (time_t
time format)<br>
#<br>
# set UTCBIOS to true if bios is using UTC time<br>
# set UTCBIOS to false if bios is using local time<br>
<br>
UTCBIOS=true<br>
<br>
if $UTCBIOS<br>
then<br>
#utc bios - use supplied seconds<br>
SECS=$1<br>
else<br>
#non utc bios - convert supplied seconds to seconds from<br>
#epoch to local time<br>
SECS=`date -u --date "\`date --date @$1 +%F" "%T\`" +%s`<br>
fi<br>
<br>
echo 0 > /sys/class/rtc/rtc0/wakealarm # clear alarm<br>
echo $SECS > /sys/class/rtc/rtc0/wakealarm # write the
waketime<br>
<br>
Sudo<br>
-------<br>
sjuk@obelix:~$ sudo cat /etc/sudoers.d/mythwelcome <br>
Defaults:mythtv !requiretty<br>
%mythtv ALL = NOPASSWD: /bin/sh, /usr/bin/setwakeup.sh,
/sbin/shutdown, /usr/bin/mythshutdown<br>
<br>
Backend (General > Shutdown/Wakeup Options)<br>
--------------------------------------------------------------<br>
Block shutdown before client connected: unchecked<br>
Idle shutdown timeout (secs): 180<br>
Max. wait for recording (min): 15<br>
Startup before rec. (secs): 600<br>
Wakeup time format: time_t<br>
Command to set Wakeup Time: sudo sh -c "/usr/bin/setwakeup.sh
$time"<br>
Server halt command: sudo shutdown -h now<br>
<br>
<br>
When you have a question please post your settings corresponding
to the question.<br>
<br>
Good Luck ;-)<br>
<br>
Stefan<br>
<br>
Am 31.08.2013 22:44, schrieb Daryl McDonald:<br>
</div>
<blockquote
cite="mid:CAMwtTBD0tKKYcUz_xurbpFNRqr_XsjdZUejc0f4YBkQ2044V9g@mail.gmail.com"
type="cite">
<div dir="ltr"><br>
<div class="gmail_extra"><br>
<br>
<div class="gmail_quote">On Thu, Aug 29, 2013 at 11:56 AM,
Stefan Pappalardo <span dir="ltr"><<a
moz-do-not-send="true" href="mailto:sjuk@gmx.de"
target="_blank">sjuk@gmx.de</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000">
<div>Hello Daryl,<br>
<br>
I did not read the hole thread but I think Michael is
right when pointing to permissions and sudo will be
the solution.<br>
I'm using mythbuntu 12.04 and had to use sudo: search
for sudoers in <a moz-do-not-send="true"
href="http://www.mythtv.org/wiki/ACPI_Wakeup"
target="_blank">http://www.mythtv.org/wiki/ACPI_Wakeup</a><br>
<br>
I'm using the mythwelcome-mythshutdown-solution, and
had to do several configurations.<br>
(Bios, mythtv-setup, mythwelcome, setwakeup.sh,
sudoers, ...)<br>
<br>
When you are interested I can give you more details of
my setup. Only ask what you need.<br>
<br>
<pre cols="72">Stefan Pappalardo</pre>
Am 29.08.2013 17:36, schrieb Daryl McDonald:<br>
</div>
</div>
</blockquote>
<div><br>
</div>
<div>Hey Stefan, I would appreciate it if you would share
your Mythtv configuration with me, specifically:
backend>general>Shutdown/Wakeup Options &
Backend Wakeup Settings. The wiki unclear, for me, on some
of those values. Also, does your BIOS use RTC or UTC?</div>
<div><br>
</div>
<div>Daryl</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> </div>
<div>
<div class="h5">
<blockquote type="cite">
<div dir="ltr"><br>
<div class="gmail_extra"><br>
<br>
<div class="gmail_quote">On Thu, Aug 29, 2013
at 11:29 AM, Michael <span dir="ltr"><<a
moz-do-not-send="true"
href="mailto:mythtv@blandford.net"
target="_blank">mythtv@blandford.net</a>></span>
wrote:<br>
<blockquote class="gmail_quote"
style="margin:0px 0px 0px
0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000">
<div>
<div>
<div>On 08/29/2013 08:27 AM, Daryl
McDonald wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr"><br>
<div class="gmail_extra"><br>
<br>
<div class="gmail_quote">On
Thu, Aug 29, 2013 at 11:11
AM, Michael <span dir="ltr"><<a
moz-do-not-send="true"
href="mailto:mythtv@blandford.net"
target="_blank">mythtv@blandford.net</a>></span>
wrote:<br>
<blockquote
class="gmail_quote"
style="margin:0px 0px 0px
0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div>On 08/29/2013 07:59
AM, Daryl McDonald
wrote:<br>
<blockquote
class="gmail_quote"
style="margin:0px 0px
0px
0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><br>
Of the three commands
the first one gets no
complaint, with the
second attempt I did
add the "sudo" preface
and still I'm denied:<br>
<br>
daryl@daryl-A780L3C:~$
SECS=`date -u --date
"2013-08-29 10:50:00"
+%s`<br>
daryl@daryl-A780L3C:~$
sudo echo 0 >
/sys/class/rtc/rtc0/wakealarm<br>
bash:
/sys/class/rtc/rtc0/wakealarm:
Permission denied<br>
daryl@daryl-A780L3C:~$
sudo echo $SECS >
/sys/class/rtc/rtc0/wakealarm<br>
bash:
/sys/class/rtc/rtc0/wakealarm:
Permission denied<br>
<br>
See! I remain open to
suggestions.<br>
<br>
</blockquote>
<br>
<br>
</div>
This is because the echo
is running as root, but
the redirect is not, hence
the permission denied. If
you want to use sudo you
would need to do something
like:<br>
<br>
sudo sh -c 'echo 0 >
/sys/class/rtc/rtc0/wakealarm'<br>
<br>
Or just become root and
run the command.<span><font
color="#888888"><br>
<br>
Michael</font></span>
<div>
<div><br>
<br>
_______________________________________________<br>
mythtv-users mailing
list<br>
<a
moz-do-not-send="true"
href="mailto:mythtv-users@mythtv.org" target="_blank">mythtv-users@mythtv.org</a><br>
<a
moz-do-not-send="true"
href="http://www.mythtv.org/mailman/listinfo/mythtv-users"
target="_blank">http://www.mythtv.org/mailman/listinfo/mythtv-users</a></div>
</div>
</blockquote>
</div>
</div>
</div>
</blockquote>
</div>
</div>
</div>
</blockquote>
<div><br>
</div>
<div>Thanks Michael, It looks like I'm good
now:</div>
<div><br>
</div>
<div> daryl@daryl-A780L3C:~$ cat
/proc/driver/rtc</div>
<div>rtc_time<span
style="white-space:pre-wrap"> </span>:
11:33:21</div>
<div>rtc_date<span
style="white-space:pre-wrap"> </span>:
2013-08-29</div>
<div>alrm_time<span
style="white-space:pre-wrap"> </span>:
11:37:32</div>
<div>alrm_date<span
style="white-space:pre-wrap"> </span>:
2013-08-29</div>
<div>alarm_IRQ<span
style="white-space:pre-wrap"> </span>:
no</div>
<div>alrm_pending<span
style="white-space:pre-wrap"> </span>:
no</div>
<div>update IRQ enabled<span
style="white-space:pre-wrap"> </span>:
no</div>
<div>periodic IRQ enabled<span
style="white-space:pre-wrap"> </span>:
no</div>
<div>periodic IRQ frequency<span
style="white-space:pre-wrap"> </span>:
1024</div>
<div>max user IRQ frequency<span
style="white-space:pre-wrap"> </span>:
64</div>
<div>24hr<span style="white-space:pre-wrap">
</span>: yes</div>
<div>periodic_IRQ<span
style="white-space:pre-wrap"> </span>:
no</div>
<div>update_IRQ<span
style="white-space:pre-wrap"> </span>:
no</div>
<div>HPET_emulated<span
style="white-space:pre-wrap"> </span>:
yes</div>
<div>BCD<span style="white-space:pre-wrap">
</span>: yes</div>
<div>DST_enable<span
style="white-space:pre-wrap"> </span>:
no</div>
<div>periodic_freq<span
style="white-space:pre-wrap"> </span>:
1024</div>
<div> batt_status<span
style="white-space:pre-wrap"> </span>:
okay</div>
<div>daryl@daryl-A780L3C:~$ </div>
<blockquote class="gmail_quote"
style="margin:0px 0px 0px
0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000">
<div>
<div>
<blockquote type="cite">
<div dir="ltr">
<div class="gmail_extra">
<div class="gmail_quote">
<blockquote
class="gmail_quote"
style="margin:0px 0px 0px
0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div> </div>
</blockquote>
<div><br>
</div>
<div>My son warned me about
becoming root, I am still
quite a newbie, and it
shows, below is what
happened when I tried the
first option:</div>
<div><br>
</div>
<div> daryl@daryl-A780L3C:~$
SECS=`date -u --date
"2013-08-29 11:45:00" +%s`</div>
<div>daryl@daryl-A780L3C:~$
sudo sh -c echo 0 >
/sys/class/rtc/rtc0/wakealarm</div>
<div>bash:
/sys/class/rtc/rtc0/wakealarm:
Permission denied</div>
<div>daryl@daryl-A780L3C:~$
sudo sh -c echo $SECS >
/sys/class/rtc/rtc0/wakealarm</div>
<div>bash:
/sys/class/rtc/rtc0/wakealarm:
Permission denied</div>
<div>daryl@daryl-A780L3C:~$ </div>
<div><br>
</div>
<div>I'm still looking at
bricks, this shouldn't be
that complicated, should
it?</div>
<div><br>
</div>
<div>Daryl</div>
</div>
<br>
</div>
</div>
<br>
</blockquote>
<br>
</div>
</div>
You seem to be missing the ' marks
before the echo and at the end of the
line.<span><font color="#888888"><br>
<br>
Michael<br>
<br>
</font></span></div>
<br>
_______________________________________________<br>
mythtv-users mailing list<br>
<a moz-do-not-send="true"
href="mailto:mythtv-users@mythtv.org"
target="_blank">mythtv-users@mythtv.org</a><br>
<a moz-do-not-send="true"
href="http://www.mythtv.org/mailman/listinfo/mythtv-users"
target="_blank">http://www.mythtv.org/mailman/listinfo/mythtv-users</a></blockquote>
<div><br>
</div>
<div>Shutting down now to test</div>
<div><br>
</div>
<div>Thanks to all Daryl </div>
</div>
<br>
</div>
</div>
<br>
<fieldset></fieldset>
<br>
<pre>_______________________________________________
mythtv-users mailing list
<a moz-do-not-send="true" href="mailto:mythtv-users@mythtv.org" target="_blank">mythtv-users@mythtv.org</a>
<a moz-do-not-send="true" href="http://www.mythtv.org/mailman/listinfo/mythtv-users" target="_blank">http://www.mythtv.org/mailman/listinfo/mythtv-users</a>
</pre>
</blockquote>
<br>
</div>
</div>
</div>
<br>
_______________________________________________<br>
mythtv-users mailing list<br>
<a moz-do-not-send="true"
href="mailto:mythtv-users@mythtv.org">mythtv-users@mythtv.org</a><br>
<a moz-do-not-send="true"
href="http://www.mythtv.org/mailman/listinfo/mythtv-users"
target="_blank">http://www.mythtv.org/mailman/listinfo/mythtv-users</a><br>
<br>
</blockquote>
</div>
<br>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
mythtv-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:mythtv-users@mythtv.org">mythtv-users@mythtv.org</a>
<a class="moz-txt-link-freetext" href="http://www.mythtv.org/mailman/listinfo/mythtv-users">http://www.mythtv.org/mailman/listinfo/mythtv-users</a>
</pre>
</blockquote>
<br>
</body>
</html>