[mythtv-users] Carbon Footprint
Stefan Pappalardo
sjuk at gmx.de
Sun Sep 1 15:51:47 UTC 2013
Hi Daryl, here you are.
Operating System: Ubuntu 12.04.3 LTS
Motherboard: Gigabyte GA-MA785GM-US2H
BIOS RTC (real time clock) is set to UTC (not set to localtime)
The machine is backend and frontend.
Mythshutdown is controlled by mythwelcome.
Power Management Setup
---------------------------------------
ACPI Suspend Type: S3 (STR)
HPET-Support: Disabled
Power-On by Alarm: Disabled
ErP Support: Disabled
Hints
-------
1: With HPET-Support and ErP Support enabled all seemed to work fine,
but the system never waked up.
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.
3: I can only choose between S1 (Power on Suspend) and S3 (Suspend to
RAM) in BIOS. But I always use S5 (Soft Off).
Kernel
---------
sjuk at obelix:~$ uname -r
3.2.0-52-generic
sjuk at obelix:~$ sudo grep -i rtc /var/log/dmesg
[ 0.157612] RTC time: 14:28:52, date: 09/01/13
[ 1.592355] rtc_cmos 00:04: RTC can wake from S4
[ 1.592440] rtc_cmos 00:04: rtc core: registered rtc_cmos as rtc0
[ 1.592466] rtc0: alarms up to one month, 242 bytes nvram
[ 1.598070] rtc_cmos 00:04: setting system clock to 2013-09-01
14:28:54 UTC (1378045734)
sjuk at obelix:~$ cat /proc/driver/rtc
rtc_time : 14:50:45
rtc_date : 2013-09-01
alrm_time : 06:10:00
alrm_date : 2013-09-02
alarm_IRQ : no
alrm_pending : no
update IRQ enabled : no
periodic IRQ enabled : no
periodic IRQ frequency : 1024
max user IRQ frequency : 64
24hr : yes
periodic_IRQ : no
update_IRQ : no
HPET_emulated : no
BCD : yes
DST_enable : no
periodic_freq : 1024
batt_status : okay
Disable hwclock updates
---------------------------------
On my system there is no need to disable the hwclock updates
Setwakeuptime (don't forget to make it executable)
-----------------------------------------------------------------
sjuk at obelix:~$ cat /usr/bin/setwakeup.sh
#!/bin/sh
#
# set ACPI Wakeup time
# usage: setwakeup.sh seconds
# seconds - number of seconds from epoch to UTC time (time_t time format)
#
# set UTCBIOS to true if bios is using UTC time
# set UTCBIOS to false if bios is using local time
UTCBIOS=true
if $UTCBIOS
then
#utc bios - use supplied seconds
SECS=$1
else
#non utc bios - convert supplied seconds to seconds from
#epoch to local time
SECS=`date -u --date "\`date --date @$1 +%F" "%T\`" +%s`
fi
echo 0 > /sys/class/rtc/rtc0/wakealarm # clear alarm
echo $SECS > /sys/class/rtc/rtc0/wakealarm # write the waketime
Sudo
-------
sjuk at obelix:~$ sudo cat /etc/sudoers.d/mythwelcome
Defaults:mythtv !requiretty
%mythtv ALL = NOPASSWD: /bin/sh, /usr/bin/setwakeup.sh, /sbin/shutdown,
/usr/bin/mythshutdown
Backend (General > Shutdown/Wakeup Options)
--------------------------------------------------------------
Block shutdown before client connected: unchecked
Idle shutdown timeout (secs): 180
Max. wait for recording (min): 15
Startup before rec. (secs): 600
Wakeup time format: time_t
Command to set Wakeup Time: sudo sh -c "/usr/bin/setwakeup.sh $time"
Server halt command: sudo shutdown -h now
When you have a question please post your settings corresponding to the
question.
Good Luck ;-)
Stefan
Am 31.08.2013 22:44, schrieb Daryl McDonald:
>
>
>
> On Thu, Aug 29, 2013 at 11:56 AM, Stefan Pappalardo <sjuk at gmx.de
> <mailto:sjuk at gmx.de>> wrote:
>
> Hello Daryl,
>
> I did not read the hole thread but I think Michael is right when
> pointing to permissions and sudo will be the solution.
> I'm using mythbuntu 12.04 and had to use sudo: search for sudoers
> in http://www.mythtv.org/wiki/ACPI_Wakeup
>
> I'm using the mythwelcome-mythshutdown-solution, and had to do
> several configurations.
> (Bios, mythtv-setup, mythwelcome, setwakeup.sh, sudoers, ...)
>
> When you are interested I can give you more details of my setup.
> Only ask what you need.
>
> Stefan Pappalardo
>
> Am 29.08.2013 17:36, schrieb Daryl McDonald:
>
>
> 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?
>
> Daryl
>
>>
>>
>>
>> On Thu, Aug 29, 2013 at 11:29 AM, Michael <mythtv at blandford.net
>> <mailto:mythtv at blandford.net>> wrote:
>>
>> On 08/29/2013 08:27 AM, Daryl McDonald wrote:
>>>
>>>
>>>
>>> On Thu, Aug 29, 2013 at 11:11 AM, Michael
>>> <mythtv at blandford.net <mailto:mythtv at blandford.net>> wrote:
>>>
>>> On 08/29/2013 07:59 AM, Daryl McDonald wrote:
>>>
>>>
>>> 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:
>>>
>>> daryl at daryl-A780L3C:~$ SECS=`date -u --date
>>> "2013-08-29 10:50:00" +%s`
>>> daryl at daryl-A780L3C:~$ sudo echo 0 >
>>> /sys/class/rtc/rtc0/wakealarm
>>> bash: /sys/class/rtc/rtc0/wakealarm: Permission denied
>>> daryl at daryl-A780L3C:~$ sudo echo $SECS >
>>> /sys/class/rtc/rtc0/wakealarm
>>> bash: /sys/class/rtc/rtc0/wakealarm: Permission denied
>>>
>>> See! I remain open to suggestions.
>>>
>>>
>>>
>>> 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:
>>>
>>> sudo sh -c 'echo 0 > /sys/class/rtc/rtc0/wakealarm'
>>>
>>> Or just become root and run the command.
>>>
>>> Michael
>>>
>>>
>>> _______________________________________________
>>> mythtv-users mailing list
>>> mythtv-users at mythtv.org <mailto:mythtv-users at mythtv.org>
>>> http://www.mythtv.org/mailman/listinfo/mythtv-users
>>>
>>
>> Thanks Michael, It looks like I'm good now:
>>
>> daryl at daryl-A780L3C:~$ cat /proc/driver/rtc
>> rtc_time: 11:33:21
>> rtc_date: 2013-08-29
>> alrm_time: 11:37:32
>> alrm_date: 2013-08-29
>> alarm_IRQ: no
>> alrm_pending: no
>> update IRQ enabled: no
>> periodic IRQ enabled: no
>> periodic IRQ frequency: 1024
>> max user IRQ frequency: 64
>> 24hr: yes
>> periodic_IRQ: no
>> update_IRQ: no
>> HPET_emulated: yes
>> BCD: yes
>> DST_enable: no
>> periodic_freq: 1024
>> batt_status: okay
>> daryl at daryl-A780L3C:~$
>>
>>>
>>> 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:
>>>
>>> daryl at daryl-A780L3C:~$ SECS=`date -u --date "2013-08-29
>>> 11:45:00" +%s`
>>> daryl at daryl-A780L3C:~$ sudo sh -c echo 0 >
>>> /sys/class/rtc/rtc0/wakealarm
>>> bash: /sys/class/rtc/rtc0/wakealarm: Permission denied
>>> daryl at daryl-A780L3C:~$ sudo sh -c echo $SECS >
>>> /sys/class/rtc/rtc0/wakealarm
>>> bash: /sys/class/rtc/rtc0/wakealarm: Permission denied
>>> daryl at daryl-A780L3C:~$
>>>
>>> I'm still looking at bricks, this shouldn't be that
>>> complicated, should it?
>>>
>>> Daryl
>>>
>>>
>>
>> You seem to be missing the ' marks before the echo and at the
>> end of the line.
>>
>> Michael
>>
>>
>> _______________________________________________
>> mythtv-users mailing list
>> mythtv-users at mythtv.org <mailto:mythtv-users at mythtv.org>
>> http://www.mythtv.org/mailman/listinfo/mythtv-users
>>
>>
>> Shutting down now to test
>>
>> Thanks to all Daryl
>>
>>
>>
>> _______________________________________________
>> mythtv-users mailing list
>> mythtv-users at mythtv.org <mailto:mythtv-users at mythtv.org>
>> http://www.mythtv.org/mailman/listinfo/mythtv-users
>
>
> _______________________________________________
> mythtv-users mailing list
> mythtv-users at mythtv.org <mailto:mythtv-users at mythtv.org>
> http://www.mythtv.org/mailman/listinfo/mythtv-users
>
>
>
>
> _______________________________________________
> mythtv-users mailing list
> mythtv-users at mythtv.org
> http://www.mythtv.org/mailman/listinfo/mythtv-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.mythtv.org/pipermail/mythtv-users/attachments/20130901/b076821c/attachment.html>
More information about the mythtv-users
mailing list