* RTC alarm wake from mechanical power off
@ 2003-11-17 20:21 Jouni Laakso
[not found] ` <20031117202152.3703.qmail-2a1B6O8qcK7GRxTy+Q50vsz6deESKz/lQQ4Iyu8u01E@public.gmane.org>
0 siblings, 1 reply; 6+ messages in thread
From: Jouni Laakso @ 2003-11-17 20:21 UTC (permalink / raw)
To: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
Hello,
I'm a desktop computer user and using apic. Because of
this my problem is different as many others. I want my
computer to somehow wake up from mechanical off.
Acpi specification says at page 75 that Real time
clock alarm is required, but it's optional as fixed
hardware event. I think this means that computer can
optionally be woken up from "Mechanical Off" G3? Am I
right? (I haven't read it all.)
I'm using Abit ZM6 motherboard witch includes Intels
82471eb -chip witch includes this feature (to wake
from mechanical off).
It seems that it's impossible to save alarm time and
date from operating system. From bios settings it's
possible. I don't know why. Does anyone have
experience about this?
Wake time can be setted in bios settings but maby not
from operating system. I have tried with [cat
"2003-11-17 01:00:00" > /proc/acpi/alarm] and made a
kernel module to test writes to alarm register
addresses defined in 82471eb -documents. Anyway, both
cases return the previous values that were setted in
bios settings if machine is rebooted and read from
bios or directly from registry addresses. Anyway if
/proc/acpi/alarm is different than before, computer
does not wake from mechanical off. (I'm not sure, but
/proc/acpi/alarm values might be the same that were
inserted in operating system after reboot.) When
reading and writing and reading again from chips
addresses, the write has no effect.
Isn't it supposed to be, that both time and alarm time
values are in battery backed ram? So they could be
used in programs or kernel modules or in acpi modules?
Why it does not work?
Do you have any pointers what could be done? Is wake
from mechanical off possible in Acpi Linux
implementation? Where should I look? And if some
recoding for this motherboard is necessary, what or
where? Does new DSDT fix the problem? Or did I get it
all wrong?
Chips document says that alarm time address locations
are standard. It seems promising.
regards,
Jouni L.
________________________________________________________________________
Want to chat instantly with your online friends? Get the FREE Yahoo!
Messenger http://mail.messenger.yahoo.co.uk
-------------------------------------------------------
This SF. Net email is sponsored by: GoToMyPC
GoToMyPC is the fast, easy and secure way to access your computer from
any Web browser or wireless device. Click here to Try it Free!
https://www.gotomypc.com/tr/OSDN/AW/Q4_2003/t/g22lp?Target=mm/g22lp.tmpl
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: RTC alarm wake from mechanical power off
[not found] ` <20031117202152.3703.qmail-2a1B6O8qcK7GRxTy+Q50vsz6deESKz/lQQ4Iyu8u01E@public.gmane.org>
@ 2003-11-17 20:45 ` Karol Kozimor
0 siblings, 0 replies; 6+ messages in thread
From: Karol Kozimor @ 2003-11-17 20:45 UTC (permalink / raw)
To: Jouni Laakso; +Cc: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
Thus wrote Jouni Laakso:
> Acpi specification says at page 75 that Real time
> clock alarm is required, but it's optional as fixed
> hardware event. I think this means that computer can
> optionally be woken up from "Mechanical Off" G3? Am I
> right? (I haven't read it all.)
AFAIR, you're supposed to be able to wake up from ACPI S5 state (soft
power-off), which is what shutdown -h should do. Anyway, see if any of the
patches found at http://bugme.osdl.org/show_bug.cgi?id=1320 help.
Best regards,
--
Karol 'sziwan' Kozimor
sziwan-DETuoxkZsSqrDJvtcaxF/A@public.gmane.org
-------------------------------------------------------
This SF. Net email is sponsored by: GoToMyPC
GoToMyPC is the fast, easy and secure way to access your computer from
any Web browser or wireless device. Click here to Try it Free!
https://www.gotomypc.com/tr/OSDN/AW/Q4_2003/t/g22lp?Target=mm/g22lp.tmpl
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: RTC alarm wake from mechanical power off
@ 2003-11-17 21:00 Grover, Andrew
[not found] ` <F760B14C9561B941B89469F59BA3A84702C93127-sBd4vmA9Se4Lll3ZsUKC9FDQ4js95KgL@public.gmane.org>
0 siblings, 1 reply; 6+ messages in thread
From: Grover, Andrew @ 2003-11-17 21:00 UTC (permalink / raw)
To: Karol Kozimor, Jouni Laakso; +Cc: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
> From: acpi-devel-admin-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
> [mailto:acpi-devel-admin-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org] On Behalf Of
> Karol Kozimor
> Thus wrote Jouni Laakso:
> > Acpi specification says at page 75 that Real time
> > clock alarm is required, but it's optional as fixed
> > hardware event. I think this means that computer can
> > optionally be woken up from "Mechanical Off" G3? Am I
> > right? (I haven't read it all.)
>
> AFAIR, you're supposed to be able to wake up from ACPI S5 state (soft
> power-off), which is what shutdown -h should do. Anyway, see
> if any of the
> patches found at http://bugme.osdl.org/show_bug.cgi?id=1320 help.
> Best regards,
Have you read section 4.7.2.4 of the ACPI spec? RTC appears to wake only
from S1-S3 and possibly S4.
Regards -- Andy
-------------------------------------------------------
This SF. Net email is sponsored by: GoToMyPC
GoToMyPC is the fast, easy and secure way to access your computer from
any Web browser or wireless device. Click here to Try it Free!
https://www.gotomypc.com/tr/OSDN/AW/Q4_2003/t/g22lp?Target=mm/g22lp.tmpl
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: RTC alarm wake from mechanical power off
[not found] ` <F760B14C9561B941B89469F59BA3A84702C93127-sBd4vmA9Se4Lll3ZsUKC9FDQ4js95KgL@public.gmane.org>
@ 2003-11-17 21:10 ` Karol Kozimor
2003-11-18 9:20 ` Jouni Laakso
1 sibling, 0 replies; 6+ messages in thread
From: Karol Kozimor @ 2003-11-17 21:10 UTC (permalink / raw)
To: Grover, Andrew; +Cc: Jouni Laakso, acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
Thus wrote Grover, Andrew:
> > AFAIR, you're supposed to be able to wake up from ACPI S5 state (soft
> > power-off), which is what shutdown -h should do. Anyway, see
> > if any of the
> > patches found at http://bugme.osdl.org/show_bug.cgi?id=1320 help.
> Have you read section 4.7.2.4 of the ACPI spec? RTC appears to wake only
> from S1-S3 and possibly S4.
Thanks for clarifying that: I never actually tested the patches with S5,
but forgot to mention it in the original mail. What I meant, anyway, is
that it is unlikely that the ACPI RTC alarm will wake the system up from a
hard power-off, although the type of chip the original poster uses might
have a difference.
Just FYI: wake-up from S4 works if I use Pat's patch from the above site
(ASUS L3C) and doesn't with the other patch.
Best regards,
--
Karol 'sziwan' Kozimor
sziwan-DETuoxkZsSqrDJvtcaxF/A@public.gmane.org
-------------------------------------------------------
This SF. Net email is sponsored by: GoToMyPC
GoToMyPC is the fast, easy and secure way to access your computer from
any Web browser or wireless device. Click here to Try it Free!
https://www.gotomypc.com/tr/OSDN/AW/Q4_2003/t/g22lp?Target=mm/g22lp.tmpl
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: RTC alarm wake from mechanical power off
[not found] ` <F760B14C9561B941B89469F59BA3A84702C93127-sBd4vmA9Se4Lll3ZsUKC9FDQ4js95KgL@public.gmane.org>
2003-11-17 21:10 ` Karol Kozimor
@ 2003-11-18 9:20 ` Jouni Laakso
1 sibling, 0 replies; 6+ messages in thread
From: Jouni Laakso @ 2003-11-18 9:20 UTC (permalink / raw)
To: Grover, Andrew; +Cc: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
Ok. I read from section 4.7.2.4 that wake from s4 is
optional and if implemented in motherboard it should
work in sleep states 1-3. RTC alarm seems to be
optional as a whole as a hardware feature.
Bits RTC_EN and RTC_STS in spec are similar as those
in chips registers. Centenary value CENT is not
supported (if there is not extra space in CMOS RAM to
implement it with a driver?).
Acpi spec includes these lines:
"The OS will disable the RTC_EN bit prior to entering
the G2/S5 or G3 states." [acpi,4.7.2.4]
If hardware rtc alarm is supported, rtc alarm is
disabled by acpi when entering to G3, shutdown? In my
case it's not even possible to write to these
registers, maby the writes are possible if ACPI is
disabled? I mean that writing is possible, but when
reading, the values are not changed. Are rtc-registers
somehow updated by ACPI-driver so that if rtc-alarm
feature is not found, it tries to disable it by
setting standard bit values trough acpi? Is it
possible that bios disables RTC alarm if it finds that
acpi is used? Should I blame bios or acpi?
What is the purpose to try to disable RTC alarm when
shutting down the computer? At startup it could save
previous values from registers and when entering G2/S5
or G3 again, it maby could return saved previous
values when shutting sown? My opinion is that it
should wake optionally from G3 also.. maby in next
specification revision?
It seems in my case that hardware RTC alarm is not in
use (Abit ZM6, Intel 82371eb)?
regards,
Jouni
--- "Grover, Andrew" <andrew.grover-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> wrote:
> > From: acpi-devel-admin-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
> > [mailto:acpi-devel-admin-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org] On
> Behalf Of
> > Karol Kozimor
> > Thus wrote Jouni Laakso:
> > > Acpi specification says at page 75 that Real
> time
> > > clock alarm is required, but it's optional as
> fixed
> > > hardware event. I think this means that computer
> can
> > > optionally be woken up from "Mechanical Off" G3?
> Am I
> > > right? (I haven't read it all.)
> >
> > AFAIR, you're supposed to be able to wake up from
> ACPI S5 state (soft
> > power-off), which is what shutdown -h should do.
> Anyway, see
> > if any of the
> > patches found at
> http://bugme.osdl.org/show_bug.cgi?id=1320 help.
> > Best regards,
>
> Have you read section 4.7.2.4 of the ACPI spec? RTC
> appears to wake only
> from S1-S3 and possibly S4.
>
> Regards -- Andy
=====
_____________________
Jouni J. Laakso
jounijl-/E1597aS9LT10XsdtD+oqA@public.gmane.org
phone: +358-41-5165554
Helsinki, Finland
,
________________________________________________________________________
Want to chat instantly with your online friends? Get the FREE Yahoo!
Messenger http://mail.messenger.yahoo.co.uk
-------------------------------------------------------
This SF. Net email is sponsored by: GoToMyPC
GoToMyPC is the fast, easy and secure way to access your computer from
any Web browser or wireless device. Click here to Try it Free!
https://www.gotomypc.com/tr/OSDN/AW/Q4_2003/t/g22lp?Target=mm/g22lp.tmpl
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: RTC alarm wake from mechanical power off
@ 2003-11-29 19:45 Jouni Laakso
0 siblings, 0 replies; 6+ messages in thread
From: Jouni Laakso @ 2003-11-29 19:45 UTC (permalink / raw)
To: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
Thanks for the help. If anyone asks the same question
again, the right place to look into is
/include/linux/rtc.h and /driver/rtc.c. It's necessary
to compile kernel with option "Character
devices"-->"Enhanced real time support". Still this is
not part of acpi but for you to know if someone asks
again.. This is not supposed to be in acpi list.
Alarm feature is somehow implemented allready in rtc.c
(allthough some ioctl cmd:s seems to be missing). In
my case, writing:
--------clip--------
if((rtc_fd = open("/dev/rtc", O_WRONLY)) == -1){
fprintf(stderr, "Could not open /dev/rtc for
writing.\n");
perror("open");
return -1;
}
if(ioctl(rtc_fd, RTC_ALM_SET, time)<0){
perror("set: ioctl error\n");
return -1;
}
close(rtc_fd);
--------clip--------
produces:
[root-ogj+s9UvmiI@public.gmane.org uspace]# ./wake
set: ioctl error
: Bad address
[root-ogj+s9UvmiI@public.gmane.org uspace]#
Thus, somehow this can't be done with my computer :(.
Don't know why. I allready disabled PCI_bios_address
mode but it did not help.
Anyways, I'm happily using apic. Many thanks to the
developers for the effort! I don't use much else than
shutdown, because I use desktop, but apic seems to be
working fine considering the use and my equipement
troubles and what can be read from /proc directory.
best regards,
Jouni
--- Jouni Laakso <jounijl-/E1597aS9LT10XsdtD+oqA@public.gmane.org> wrote: >
> Ok. I read from section 4.7.2.4 that wake from s4 is
> optional and if implemented in motherboard it should
> work in sleep states 1-3. RTC alarm seems to be
> optional as a whole as a hardware feature.
>
> Bits RTC_EN and RTC_STS in spec are similar as those
> in chips registers. Centenary value CENT is not
> supported (if there is not extra space in CMOS RAM
> to
> implement it with a driver?).
>
> Acpi spec includes these lines:
> "The OS will disable the RTC_EN bit prior to
> entering
> the G2/S5 or G3 states." [acpi,4.7.2.4]
>
> If hardware rtc alarm is supported, rtc alarm is
> disabled by acpi when entering to G3, shutdown? In
> my
> case it's not even possible to write to these
> registers, maby the writes are possible if ACPI is
> disabled? I mean that writing is possible, but when
> reading, the values are not changed. Are
> rtc-registers
> somehow updated by ACPI-driver so that if rtc-alarm
> feature is not found, it tries to disable it by
> setting standard bit values trough acpi? Is it
> possible that bios disables RTC alarm if it finds
> that
> acpi is used? Should I blame bios or acpi?
>
> What is the purpose to try to disable RTC alarm when
> shutting down the computer? At startup it could save
> previous values from registers and when entering
> G2/S5
> or G3 again, it maby could return saved previous
> values when shutting sown? My opinion is that it
> should wake optionally from G3 also.. maby in next
> specification revision?
>
> It seems in my case that hardware RTC alarm is not
> in
> use (Abit ZM6, Intel 82371eb)?
>
> regards,
>
> Jouni
>
> --- "Grover, Andrew" <andrew.grover-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
> wrote:
> > > From: acpi-devel-admin-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
> > > [mailto:acpi-devel-admin-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org]
> On
> > Behalf Of
> > > Karol Kozimor
> > > Thus wrote Jouni Laakso:
> > > > Acpi specification says at page 75 that Real
> > time
> > > > clock alarm is required, but it's optional as
> > fixed
> > > > hardware event. I think this means that
> computer
> > can
> > > > optionally be woken up from "Mechanical Off"
> G3?
> > Am I
> > > > right? (I haven't read it all.)
> > >
> > > AFAIR, you're supposed to be able to wake up
> from
> > ACPI S5 state (soft
> > > power-off), which is what shutdown -h should do.
> > Anyway, see
> > > if any of the
> > > patches found at
> > http://bugme.osdl.org/show_bug.cgi?id=1320 help.
> > > Best regards,
> >
> > Have you read section 4.7.2.4 of the ACPI spec?
> RTC
> > appears to wake only
> > from S1-S3 and possibly S4.
> >
> > Regards -- Andy
>
>
>
________________________________________________________________________
Download Yahoo! Messenger now for a chance to win Live At Knebworth DVDs
http://www.yahoo.co.uk/robbiewilliams
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive? Does it
help you create better code? SHARE THE LOVE, and help us help
YOU! Click Here: http://sourceforge.net/donate/
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2003-11-29 19:45 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-11-17 21:00 RTC alarm wake from mechanical power off Grover, Andrew
[not found] ` <F760B14C9561B941B89469F59BA3A84702C93127-sBd4vmA9Se4Lll3ZsUKC9FDQ4js95KgL@public.gmane.org>
2003-11-17 21:10 ` Karol Kozimor
2003-11-18 9:20 ` Jouni Laakso
-- strict thread matches above, loose matches on Subject: below --
2003-11-29 19:45 Jouni Laakso
2003-11-17 20:21 Jouni Laakso
[not found] ` <20031117202152.3703.qmail-2a1B6O8qcK7GRxTy+Q50vsz6deESKz/lQQ4Iyu8u01E@public.gmane.org>
2003-11-17 20:45 ` Karol Kozimor
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox