[mythtv-users] WakeOnAlarm: Searching for the cause of failure
Paul Harrison
mythtv at dsl.pipex.com
Tue Oct 9 15:50:21 UTC 2007
Peter Carlsson wrote:
> Hello Craig!
>
>
>> I found that /etc/init.d/halt included code to write the system clock back
>> to the hardware RTC on shutdown and
>> an article on the web led me to understand that many (if not all) mobo's
>> cancelled RTC alarms when this was
>> done until the alarm was set again. I proceeded to modify my
>> /etc/init.d/halt script to add code that saved the
>> value of the alarm setting before the system clock was written out to the
>> RTC and then immediately reset the
>> alarm. There should be e-mail traffic about this misadventure of mine in
>> the archives.
>>
>> I then had to add code to detect an arbitrarily selected time value (in my
>> case midnight UTC) to be used as a
>> flag that I **didn't** want a wakeup to occur because otherwise my system
>> would keep waking up every day
>> at the time of the last selected alarm time. ;-(
>>
>> With that code in place, then when I echoed a UTC time into
>> /proc/acpi/alarm, it worked, even with a simple
>> "# shutdown -h now".
>>
>> Note that I am pointed about mentioning UTC because I have my system
>> configured to handle DST switching
>> automatically. IIRC, using local time for the RTC results in disabling the
>> DST processing.
>>
>> I tested the alarm with time settings automatically computed using the
>> "date" command and told it to add 60
>> or 120 seconds to the current time before stuffing the output into
>> /proc/acpi/alarm, after which I would shut
>> the system down and wait.
>>
>> Once I had the alarm wakeup working, I pursued getting hibernation and
>> suspend to RAM working with
>> TuxOnIce (aka suspend2). I have been very happy with its flexibility and
>> ease of control.
>>
>> I can't recall if I needed to fiddle with anything in /proc/acpi/wakeup for
>> the ACPI alarm. I **did** have to
>> work with it for successful WOL and wake-on-keyboard/mouse, and unsuccessful
>> wake-on-USB testing,
>> but that's a whole 'nother story.
>>
>> HTH.
>>
>
> Unfortunately not. WOL and wake-on-keyboard works for me. The problem
> for me is that no matter what I set in the BIOS it will not wake up.
>
> If you are able to dig up anything else I would very much appreciate it.
> Thanks for the advice so far.
>
> Best regards,
> Peter Carlsson
>
Here's a few things I've found myself or have heard from other people.
Many BIOS require a reboot before they actually set the wakeup time. If
you just set the time in the BIOS and then shutdown it doesn't work. You
need to set the time in the BIOS then do a reboot then shutdown again
before things work properly. Also pay attention to what Craig said about
/etc/init.d/halt screwing things up by writing the time back to the RTC
when shutting down which causes some BIOS to reset the wakeup time that
has caught me out as well.
Some BIOS require you to set something in addition to the wake on RTC
setting like wake on PME or wake up on PCI before they will work. I've
seen this when trying to get WOL working but it could apply to wake on
RTC as well I guess.
It could also be that your power supply can't supply enough power when
in standby. Many USB devices, keyboard, mice, PCI cards etc require a
small amount of power when in standby. One of my motherboards requires
at least 1Amp on the +5VSB lead. If you have a lot of PCI cards or USB
devices attached it could just be pushing your power supply over the
limit. Although you said WOL was working so that's probably not the problem.
Paul H.
More information about the mythtv-users
mailing list