Skip to contentSkip to conversation

ACPI wake up event (alarm)

DISCUSSION Dino Klein 2 participants 2 messages Apr 15, 2004 1 message not in the archive ACPI

lore
Share & tools
lore

Dino Klein

author
#0 lore raw

According to the specs the RTC must be able to wakeup a system from S1, S2, or S3, S4 is optional, and S5 is not even considered a sleep state, so the RTC is not required to support S5. (check ACPI 2.0c, section 4.7.2.4, and table 5-9) Even still, the chipset might support it, as my Via 686B which treats S4 & S5 the same way.

This is just a guess, but perhaps the handling of the wakeup bits in the linux ACPI is inconsistent, so when you transition to S1, it does allow for a wakeup from the RTC, and then doesn't clear it before entering S5 (as specified in the footnote). However, when you go directly to S5, the RTC is not set as wakup source, and that's why it doesn't work. If S3 or S4 work for you, then perhaps you should use them, thus avoiding this whole issue.

One sidenote - are you unmounting the filesystems before putting the machine to S5? after all, that's the equivalent of pressing the power button.

Quoted 43 lines

-----Original Message-----
From: Jarek Zuk [mailto:[email protected]]
Sent: Thursday, April 15, 2004 12:48 PM
To: [email protected]
Subject: [ACPI] ACPI wake up event (alarm)

I have a question about ACPI alarm (/proc/acpi/alarm).

I have a cron job that runs early in the morning, so I need my machine to be up at that time. I dont want to have it up all night, so I want to use the alarm feature.

I use kernel 2.4.25 with your corresponding patch. I read everything on acpi page about /proc/acpi/sleep and /proc/acpi/alarm .
What I want to do is :
echo 2004-04-15 14:40:00 > /proc/acpi/alarm
echo 5 > /proc/acpi/sleep

and get the computer up when the specified time comes.

My problem is that it works sometimes, well what I noticed is that it works providing that before I put the system into sleep mode (5) I do :
echo 1 > /proc/acpi/sleep
(the power button starts blinking)
press the button ( system is awake )

When I dont do this "echo 1 > /proc/acpi/sleep" thing , the computer doesn't turn on whet time comes. :(

Looks like putting system into a sleep mode 1 changes something that allows later to do proper wakeup.

Does the system have to be in sleep mode to be woken up by alarm event ? or it should work also after shutdown ?

I want to have this procedure in a script and presing the power button is kinda difficult from a script.

Any pointers are welcome.
Jarek Zuk

Quoted 10 lines

-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
Acpi-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/acpi-devel

-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id70&alloc_id638&op=click

A message that is not in the archive (sent off-list or not yet received): [email protected]

#2 lore raw

I have Intel 845 . S2 S3 S4 dont work , no reaction at all.
Only S5 does something.
Yes my script unmoutns the filesystems before going to S5, to avoid fsck on boot . I have noticed also that when i invoke alarm event before going to S5 it also works, but not always ( i tried scheduling it in rc.local , but this workaroud doesnt help) . Any ideas why S3 or S4 doesnt work for me ?

Jarek Zuk

Dnia czw 15. kwietnia 2004 18:11, napisałeś:

Quoted 13 lines

According to the specs the RTC must be able to wakeup a system from S1, S2, or S3, S4 is optional, and S5 is not even considered a sleep state, so the RTC is not required to support S5. (check ACPI 2.0c, section 4.7.2.4, and table 5-9) Even still, the chipset might support it, as my Via 686B which treats S4 & S5 the same way.

This is just a guess, but perhaps the handling of the wakeup bits in the linux ACPI is inconsistent, so when you transition to S1, it does allow for a wakeup from the RTC, and then doesn't clear it before entering S5 (as specified in the footnote). However, when you go directly to S5, the RTC is not set as wakup source, and that's why it doesn't work. If S3 or S4 work for you, then perhaps you should use them, thus avoiding this whole issue.

Quoted 57 lines

One sidenote - are you unmounting the filesystems before putting the machine to S5? after all, that's the equivalent of pressing the power button.

Quoted 53 lines

-----Original Message-----
From: Jarek Zuk [mailto:[email protected]]
Sent: Thursday, April 15, 2004 12:48 PM
To: [email protected]
Subject: [ACPI] ACPI wake up event (alarm)

I have a question about ACPI alarm (/proc/acpi/alarm).

I have a cron job that runs early in the morning, so I need my machine to be up at that time. I dont want to have it up all night, so I want to use the alarm feature.

I use kernel 2.4.25 with your corresponding patch. I read everything on acpi page about /proc/acpi/sleep and /proc/acpi/alarm .
What I want to do is :
echo 2004-04-15 14:40:00 > /proc/acpi/alarm
echo 5 > /proc/acpi/sleep

and get the computer up when the specified time comes.

My problem is that it works sometimes, well what I noticed is that it works providing that before I put the system into sleep mode (5) I do :
echo 1 > /proc/acpi/sleep
(the power button starts blinking)
press the button ( system is awake )

When I dont do this "echo 1 > /proc/acpi/sleep" thing , the computer doesn't turn on whet time comes. :(

Looks like putting system into a sleep mode 1 changes something that allows later to do proper wakeup.

Does the system have to be in sleep mode to be woken up by alarm event ? or it should work also after shutdown ?

I want to have this procedure in a script and presing the power button is kinda difficult from a script.

Any pointers are welcome.
Jarek Zuk

-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
Acpi-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/acpi-devel

-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id70&alloc_id638&op=click