[mythtv-users] IRQ = no

Roger Siddons dizygotheca at ntlworld.com
Mon Sep 2 22:14:32 UTC 2013


On Mon, 02 Sep 2013 22:27:17 +0100, Daryl McDonald <darylangela at gmail.com>  
wrote:

>
> On Mon, Sep 2, 2013 at 4:37 PM, Bill Meek <keemllib at gmail.com> wrote:
>> On 09/02/2013 02:43 PM, Daryl McDonald wrote:
>>> Greetings Mythizens, I'm still having trouble test setting the alarm
>>> wakeup. I enter the test script into the terminal as per the wiki:
>>>
>>> daryl at daryl-A780L3C:~$ cat /sys/class/rtc/rtc0/wakealarm
>>> daryl at daryl-A780L3C:~$ SECS=`date -u --date "2013-09-02 15:45:00" +%s`
>>> daryl at daryl-A780L3C:~$ sudo sh -c 'echo 0 >  
>>> /sys/class/rtc/rtc0/wakealarm'
>>>
>>> And when I ask for a report of the alarm state, IRQ is always "= no" :
>>
>> Hopefully it's just a typo in your email, but there's a step missing:
>>
>>    sudo sh -c 'echo $SECS > /sys/class/rtc/rtc0/wakealarm'
>>
>> --Bill
>> _______________________________________________
>> mythtv-users mailing list
>> mythtv-users at mythtv.org
>> http://www.mythtv.org/mailman/listinfo/mythtv-users
>
> Yes Bill it was a typo, or rather a copy&pasteO. That line was in there,  
> something else I'm noticing is that the " /sys/class/rtc/rtc0/wakealarm"  
> file >is blank, I opened it via the GUI file system. Is that normal  
> and/or functional? Shouldn't I be able to see a script?
>
> Daryl

Haven't we been here last Thursday ?

You need root permissions to write to the alarm and 'sudo sh -c' does not  
work in this case.

The simplest way is to log in as root and run the commands, but as you're  
reluctant to do that you can use Bill's idea of running a script via sudo  
instead. Paste the following into a file "test.sh"

#!/bin/sh
SECS=`date -u --date "2013-09-03 15:45:00" +%s`
echo 0 > /sys/class/rtc/rtc0/wakealarm
echo $SECS > /sys/class/rtc/rtc0/wakealarm
cat /sys/class/rtc/rtc0/wakealarm
cat /proc/driver/rtc

Make the file executable using "chmod +x test.sh", then run it using "sudo  
sh test.sh"

cat /sys/class/rtc/rtc0/wakealarm simply reports the interval (in secs) to  
the next RTC alarm. It's blank/empty if the alarm isn't set. This is the  
first line of the output. The rest shows the alarm_IRQ & alrm_tme being  
set. Choose an appropriate time, shut down & wait for it to wake-up
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.mythtv.org/pipermail/mythtv-users/attachments/20130902/1c046243/attachment.html>


More information about the mythtv-users mailing list