Mailing List Archive

Real Time Clock Alarm Broken with 2.6.22+ kernel
Hi, all

For your information:

I had done a lot of work to figure out how to get the RTC alarm to work in
FC6 on my system so
MythTV can wake from Suspend-to-disk/Power Off to do mythfilldatabase jobs
and to wake
in time to record scheduled programs.

I upgraded everything last week when I needed to move MythTV up to the
latest version to switch
over to SchedulesDirect for collecting TV schedule data.

I posted a message on the atrpms list when I discovered that my system
wasn't waking up anymore
and found that /proc/acpi/alarm didn't exist. A kind soul (apparently a
kindred MythTV user) replied
with a pointer to the updated wiki page:
http://www.mythtv.org/wiki/index.php/ACPI_Wakeup which
has had an update about the change the kernel gurus did, changing the path
to the alarm to be
/sys/class/rtc/rtc0/wakealarm. While they were at it, they changed the
format of the value from the
former, human-readable string to the seconds since the "epoch" (see man-page
regarding "date +%s").
Oh, and they changed the code behind it so that to change the alarm you have
to first reset it, which
can be done (amongst other ways) by "echo 0 >
/sys/class/rtc/rtc0/wakealarm". Finally, don't expect
the value you get back to equal the value you put in to the alarm unless
your mobo is (in my experience)
the rare bird that REALLY takes the WHOLE alarm setting, including month and
year. You're more
likely to see "echo 12345 > /sys/class/rtc/rtc0/wakealarm; cat
/sys/class/rtc/rtc0/wakealarm" return
a value like 87654399899 (made up number on my part). From googling, it
appears that this will be
the original value plus a TBD constant that depends on your mobo. YMMV.

However...

On my system, the code changes behind the new design have broken the alarm
function completely.
I have tried disabling the hwclock update in /etc/init.d/halt, turned on all
the elements in /proc/acpi/wakeup,
and enabled on the (old technology) APM alarm in the BIOS, all to no avail.

If some kind soul has gotten further with this "improvement" and can give me
any ideas how to fix this,
short of regressing to a kernel < 2.6.22, I would appreciate it.
AAAAUUUUGGGHHHH!!!!!

Craig.

P.S. If I forgot to mention some detail of relevance, please remind me to
reply with the appropriate data.
Re: Real Time Clock Alarm Broken with 2.6.22+ kernel [ In reply to ]
On 9/7/07, Craig Huff <huffcslists@gmail.com> wrote:
>
> Hi, all
>
> For your information:
>
> <snip>


P.S. If I forgot to mention some detail of relevance, please remind me to
> reply with the appropriate data.
>

DUH!

I forgot to mention that someone who either A) has edit privileges on the
wiki and B) knows how to edit/update
the wiki page (neither of which is myself) might update the reference to
include ANY distro using a kernel
since 2.6.22 (googling implied even 2.6.21 kernels, but not sure), rather
than just FC7.

Craig.
Re: Real Time Clock Alarm Broken with 2.6.22+ kernel [ In reply to ]
Craig,

I wrote an nvram-wakeup replacement call acpi-wakeup. It is a bash script
that is command line compatible with nvram-wakeup, but uses the proc acpi
interface and handles epoch data etc. The acpi path is just a constant you
can change.

It would need a tweak to work for you situation, but your welcome to play
with it. I can put it on www.generationd.com if you want it.

MD


_____

From: mythtv-users-bounces@mythtv.org
[mailto:mythtv-users-bounces@mythtv.org] On Behalf Of Craig Huff
Sent: Friday, September 07, 2007 8:56 AM
To: mythtv-users@mythtv.org
Subject: [mythtv-users] Real Time Clock Alarm Broken with 2.6.22+ kernel


Hi, all

For your information:

I had done a lot of work to figure out how to get the RTC alarm to work in
FC6 on my system so
MythTV can wake from Suspend-to-disk/Power Off to do mythfilldatabase jobs
and to wake
in time to record scheduled programs.

I upgraded everything last week when I needed to move MythTV up to the
latest version to switch
over to SchedulesDirect for collecting TV schedule data.

I posted a message on the atrpms list when I discovered that my system
wasn't waking up anymore
and found that /proc/acpi/alarm didn't exist. A kind soul (apparently a
kindred MythTV user) replied
with a pointer to the updated wiki page:
http://www.mythtv.org/wiki/index.php/ACPI_Wakeup
<http://www.mythtv.org/wiki/index.php/ACPI_Wakeup> which
has had an update about the change the kernel gurus did, changing the path
to the alarm to be
/sys/class/rtc/rtc0/wakealarm. While they were at it, they changed the
format of the value from the
former, human-readable string to the seconds since the "epoch" (see man-page
regarding "date +%s").
Oh, and they changed the code behind it so that to change the alarm you have
to first reset it, which
can be done (amongst other ways) by "echo 0 >
/sys/class/rtc/rtc0/wakealarm". Finally, don't expect
the value you get back to equal the value you put in to the alarm unless
your mobo is (in my experience)
the rare bird that REALLY takes the WHOLE alarm setting, including month and
year. You're more
likely to see "echo 12345 > /sys/class/rtc/rtc0/wakealarm; cat
/sys/class/rtc/rtc0/wakealarm" return
a value like 87654399899 (made up number on my part). From googling, it
appears that this will be
the original value plus a TBD constant that depends on your mobo. YMMV.

However...

On my system, the code changes behind the new design have broken the alarm
function completely.
I have tried disabling the hwclock update in /etc/init.d/halt, turned on all
the elements in /proc/acpi/wakeup,
and enabled on the (old technology) APM alarm in the BIOS, all to no avail.

If some kind soul has gotten further with this "improvement" and can give me
any ideas how to fix this,
short of regressing to a kernel < 2.6.22, I would appreciate it.
AAAAUUUUGGGHHHH!!!!!

Craig.

P.S. If I forgot to mention some detail of relevance, please remind me to
reply with the appropriate data.
Re: Real Time Clock Alarm Broken with 2.6.22+ kernel [ In reply to ]
On Friday 07 September 2007 07:56:11 am Craig Huff wrote:

> I had done a lot of work to figure out how to get the RTC alarm to work in
> FC6 on my system so

i did the same for my fc7 system, then realized that all i needed to do was
change the wakup time format in mythtv-settings to "time_t"

and have my script contain:

#!/bin/sh
echo 0 > /sys/class/rtc/rtc0/wakealarm
echo $1 > /sys/class/rtc/rtc0/wakealarm

now it works like a charm every time.

--
Anthony - http://messinet.com - http://messinet.com/~amessina/gallery
8F89 5E72 8DF0 BCF0 10BE 9967 92DC 35DC B001 4A4E
Re: Real Time Clock Alarm Broken with 2.6.22+ kernel [ In reply to ]
On 9/7/07, Michelle Dupuis <support@ocg.ca> wrote:
>
> Craig,
>
> I wrote an nvram-wakeup replacement call acpi-wakeup. It is a bash script
> that is command line compatible with nvram-wakeup, but uses the proc acpi
> interface and handles epoch data etc. The acpi path is just a constant you
> can change.
>
> It would need a tweak to work for you situation, but your welcome to play
> with it. I can put it on www.generationd.com if you want it.
>
> MD
>

Sil vous plait!

Craig.
Re: Real Time Clock Alarm Broken with 2.6.22+ kernel [ In reply to ]
On 9/7/07, Anthony Messina <amessina@messinet.com> wrote:
>
> On Friday 07 September 2007 07:56:11 am Craig Huff wrote:
>
> > I had done a lot of work to figure out how to get the RTC alarm to work
> in
> > FC6 on my system so
>
> i did the same for my fc7 system, then realized that all i needed to do
> was
> change the wakup time format in mythtv-settings to "time_t"
>
> and have my script contain:
>
> #!/bin/sh
> echo 0 > /sys/class/rtc/rtc0/wakealarm
> echo $1 > /sys/class/rtc/rtc0/wakealarm
>
> now it works like a charm every time.
>
> --
> Anthony - http://messinet.com - http://messinet.com/~amessina/gallery
> 8F89 5E72 8DF0 BCF0 10BE 9967 92DC 35DC B001 4A4E
>
> _______________________________________________
> mythtv-users mailing list
> mythtv-users@mythtv.org
> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
>
>
> Anthony,

Thanks for that idea. I had already figured out the recoding necessary
using options to the date command to reformat the value in an update of the
script I had posted to the list a month or two ago, but I like yours
better. My problem isn't so much getting the time into the right format,
but that the system no longer will wake from suspend-to-disk (and power down
to standby power only, essentially "off"). I'm sure the kernel developers
would say I have a defective mobo, but I suspect they didn't do a very large
sample of mobos. Whatever they did to "improve" the alarm code broke it on
my system. That makes me %^(.

Craig.
Re: Real Time Clock Alarm Broken with 2.6.22+ kernel [ In reply to ]
On Friday 07 September 2007 08:16:45 pm Craig Huff wrote:
> On 9/7/07, Anthony Messina <amessina@messinet.com> wrote:
> > On Friday 07 September 2007 07:56:11 am Craig Huff wrote:
> > > I had done a lot of work to figure out how to get the RTC alarm to work
> >
> > in
> >
> > > FC6 on my system so
> >
> > i did the same for my fc7 system, then realized that all i needed to do
> > was
> > change the wakup time format in mythtv-settings to "time_t"
> >
> > and have my script contain:
> >
> > #!/bin/sh
> > echo 0 > /sys/class/rtc/rtc0/wakealarm
> > echo $1 > /sys/class/rtc/rtc0/wakealarm
> >
> > now it works like a charm every time.
> >
> > --
> > Anthony - http://messinet.com - http://messinet.com/~amessina/gallery
> > 8F89 5E72 8DF0 BCF0 10BE 9967 92DC 35DC B001 4A4E
> >
> > _______________________________________________
> > mythtv-users mailing list
> > mythtv-users@mythtv.org
> > http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
> >
> >
> > Anthony,
>
> Thanks for that idea. I had already figured out the recoding necessary
> using options to the date command to reformat the value in an update of the
> script I had posted to the list a month or two ago, but I like yours
> better. My problem isn't so much getting the time into the right format,
> but that the system no longer will wake from suspend-to-disk (and power
> down to standby power only, essentially "off"). I'm sure the kernel
> developers would say I have a defective mobo, but I suspect they didn't do
> a very large sample of mobos. Whatever they did to "improve" the alarm
> code broke it on my system. That makes me %^(.
>
> Craig.

i have a "desktop" system where the user's dir is mounted via nfs4, so i can't
suspend to anything or nfs will halt and prevent anything from happening,
including wakeup. i'm ok with the complete shutdown as it only takes two
minutes to start up and be ready to record anyway.

--
Anthony - http://messinet.com - http://messinet.com/~amessina/gallery
8F89 5E72 8DF0 BCF0 10BE 9967 92DC 35DC B001 4A4E
Re: Real Time Clock Alarm Broken with 2.6.22+ kernel [ In reply to ]
On 9/7/07, Craig Huff <huffcslists@gmail.com> wrote:
>
> <snip>
>
has had an update about the change the kernel gurus did, changing the path
> to the alarm to be
> /sys/class/rtc/rtc0/wakealarm. While they were at it, they changed the
> format of the value from the
> former, human-readable string to the seconds since the "epoch" (see
> man-page regarding "date +%s").
> <snip>
> However...
>
> On my system, the code changes behind the new design have broken the alarm
> function completely.
> I have tried disabling the hwclock update in /etc/init.d/halt, turned on
> all the elements in /proc/acpi/wakeup,
> and enabled on the (old technology) APM alarm in the BIOS, all to no
> avail.
>

I reported this as bug # 8995 to the Kernel Bug Tracker
(http://bugzilla.kernel.org). <http://bugzilla.kernel.org> We'll see if any
help comes from that quarter.

Craig.
Re: Real Time Clock Alarm Broken with 2.6.22+ kernel [ In reply to ]
I see the same problem on my laptop, an ASUS A6U series laptop running
FC6. I rolled back to kernel-2.6.21 (with the latest myth rpms from
atrpms) and everything works again. According to the bug report there
is a fix for this, but it will be 2.6.23 at the earliest before it's
usable

Chris.

On 9/8/07, Craig Huff <huffcslists@gmail.com> wrote:
> On 9/7/07, Craig Huff <huffcslists@gmail.com> wrote:
> > <snip>
> >
> > has had an update about the change the kernel gurus did, changing the path
> to the alarm to be
> > /sys/class/rtc/rtc0/wakealarm. While they were at it, they changed the
> format of the value from the
> > former, human-readable string to the seconds since the "epoch" (see
> man-page regarding "date +%s").
> > <snip>
> > However...
> >
> > On my system, the code changes behind the new design have broken the alarm
> function completely.
> > I have tried disabling the hwclock update in /etc/init.d/halt, turned on
> all the elements in /proc/acpi/wakeup,
> > and enabled on the (old technology) APM alarm in the BIOS, all to no
> avail.
> >
>
> I reported this as bug # 8995 to the Kernel Bug Tracker
> (http://bugzilla.kernel.org). We'll see if any help comes from that
> quarter.
>
> Craig.
>
> _______________________________________________
> mythtv-users mailing list
> mythtv-users@mythtv.org
> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
>
>


--
Regards,

Chris
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
Re: Real Time Clock Alarm Broken with 2.6.22+ kernel [ In reply to ]
I should have reported back that I was able (not on the first try!) to roll
back to my previous kernel version (2.6.20, I think) and get the "old"
method working again.

It probably wouldn't hurt if Chris were to post on the bug his information
so they have confirmation that it's not just one squeaky wheel.

Craig.
Re: Real Time Clock Alarm Broken with 2.6.22+ kernel [ In reply to ]
On 9/20/07, Craig Huff <huffcslists@gmail.com> wrote:
> I should have reported back that I was able (not on the first try!) to roll
> back to my previous kernel version (2.6.20, I think) and get the "old"
> method working again.
>
> It probably wouldn't hurt if Chris were to post on the bug his information
> so they have confirmation that it's not just one squeaky wheel.
>

I've added my comments and to cut to the chase, there are patches that
fix the problem (on my laptop at least) against the 2.6.23-rc8 kernel,
but they won't make it into a release kernel until 2.6.24 at the
earliest.

--
Regards,

Chris
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users