* RTC or button wakeup
@ 2008-06-29 16:10 Enno Fennema
2008-06-30 1:06 ` Zhao Yakui
2008-07-01 17:40 ` Henrique de Moraes Holschuh
0 siblings, 2 replies; 6+ messages in thread
From: Enno Fennema @ 2008-06-29 16:10 UTC (permalink / raw)
To: linux-acpi
Could anyone suggest a way to determine in a (shell) program whether my
computer was switched on by RTC alarm or by me pressing the power button.
Normally RTC wakes my computer every evening to do daily routine work
and switches back to soft-off thereafter. If I switched on my computer
manually and am working on it it should not switch off. My best, but
clumsy, effort is at the end of the daily work comparing boot time and
login times.
Thanks in advance,
Enno
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: RTC or button wakeup
2008-06-29 16:10 RTC or button wakeup Enno Fennema
@ 2008-06-30 1:06 ` Zhao Yakui
2008-06-30 14:23 ` Enno Fennema
2008-07-01 17:40 ` Henrique de Moraes Holschuh
1 sibling, 1 reply; 6+ messages in thread
From: Zhao Yakui @ 2008-06-30 1:06 UTC (permalink / raw)
To: Enno Fennema; +Cc: linux-acpi
On Sun, 2008-06-29 at 18:10 +0200, Enno Fennema wrote:
> Could anyone suggest a way to determine in a (shell) program whether my
> computer was switched on by RTC alarm or by me pressing the power button.
>
> Normally RTC wakes my computer every evening to do daily routine work
> and switches back to soft-off thereafter. If I switched on my computer
> manually and am working on it it should not switch off. My best, but
> clumsy, effort is at the end of the daily work comparing boot time and
> login times.
Will you please try the following commit and see whether the problem
still exists?
commit e1094bfa26e5e94af2fea79e004614dbce42b008
Author: Zhao Yakui <yakui.zhao@intel.com>
Date: Wed May 14 11:32:59 2008 +0800
ACPI: Disable Fixed_RTC event when installing RTC handler
In fact the commit is already merged into upstream kernel. Will you
please try the latest kernel(2.6.26-rc7)?
Thanks.
>
> Thanks in advance,
> Enno
> --
> To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: RTC or button wakeup
2008-06-30 1:06 ` Zhao Yakui
@ 2008-06-30 14:23 ` Enno Fennema
2008-07-01 6:26 ` Zhao Yakui
0 siblings, 1 reply; 6+ messages in thread
From: Enno Fennema @ 2008-06-30 14:23 UTC (permalink / raw)
To: linux-acpi
Zhao Yakui wrote:
> On Sun, 2008-06-29 at 18:10 +0200, Enno Fennema wrote:
>> Could anyone suggest a way to determine in a (shell) program whether my
>> computer was switched on by RTC alarm or by me pressing the power button.
>>
> ACPI: Disable Fixed_RTC event when installing RTC handler
>
> In fact the commit is already merged into upstream kernel. Will you
Thanks for yor reply but ... you are streets ahead of me.
I have RTC alarm enabled in BIOS and the alarm starts my machine from
Soft-off and boots correctly at, in my case, 23:05 every evening, and
not at 00:00 or any other time. At 23:10 cron starts my daily jobs.
I think I am not interested in any further RTC alarms, which will not
happen for 24 hours anyway.
My problem is to decide at the end of the daily jobs whether to switch
off the machine with /sbin/halt (if RTC started my machine) or not to
switch off (if pressing the power button had started the machine).
Are you saying that testing (after installing the patch) either RTC_STS
or RTC_ENA would give me my answer.
Before installing the patch I see no both bits look identical when
switched on by hand or by RTC. Sorry, I am an acpi-newbie and probably
missing something.
Regards,
Enno
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: RTC or button wakeup
2008-06-30 14:23 ` Enno Fennema
@ 2008-07-01 6:26 ` Zhao Yakui
0 siblings, 0 replies; 6+ messages in thread
From: Zhao Yakui @ 2008-07-01 6:26 UTC (permalink / raw)
To: Enno Fennema; +Cc: linux-acpi
On Mon, 2008-06-30 at 16:23 +0200, Enno Fennema wrote:
> Zhao Yakui wrote:
> > On Sun, 2008-06-29 at 18:10 +0200, Enno Fennema wrote:
> >> Could anyone suggest a way to determine in a (shell) program whether my
> >> computer was switched on by RTC alarm or by me pressing the power button.
> >>
> > ACPI: Disable Fixed_RTC event when installing RTC handler
> >
> > In fact the commit is already merged into upstream kernel. Will you
>
> Thanks for yor reply but ... you are streets ahead of me.
> I have RTC alarm enabled in BIOS and the alarm starts my machine from
> Soft-off and boots correctly at, in my case, 23:05 every evening, and
> not at 00:00 or any other time. At 23:10 cron starts my daily jobs.
Your problem is how to decide whether the system is booted by RTC or
power button. Is that right? Sorry for misunderstanding what you said in
my previous email. The following commit patch is to avoid that the
system is misfired by RTC alarm even when RTC alarm is not set. It can't
solve your problem.
>commit e1094bfa26e5e94af2fea79e004614dbce42b008
>Author: Zhao Yakui <yakui.zhao@intel.com>
>Date: Wed May 14 11:32:59 2008 +0800
> ACPI: Disable Fixed_RTC event when installing RTC handler
RTC_sts and RTC_ENA also can't give you any help. After the system is
booted, RTC_sts will be clear and RTC_ENA will be disabled. Only when
RTC alarm is required, it will be enabled again.
Maybe you should find another method to identify whether the system is
booted by RTC_alarm.
> I think I am not interested in any further RTC alarms, which will not
> happen for 24 hours anyway.
>
> My problem is to decide at the end of the daily jobs whether to switch
> off the machine with /sbin/halt (if RTC started my machine) or not to
> switch off (if pressing the power button had started the machine).
>
> Are you saying that testing (after installing the patch) either RTC_STS
> or RTC_ENA would give me my answer.
>
> Before installing the patch I see no both bits look identical when
> switched on by hand or by RTC. Sorry, I am an acpi-newbie and probably
> missing something.
>
> Regards,
> Enno
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: RTC or button wakeup
2008-06-29 16:10 RTC or button wakeup Enno Fennema
2008-06-30 1:06 ` Zhao Yakui
@ 2008-07-01 17:40 ` Henrique de Moraes Holschuh
2008-07-02 10:42 ` Enno Fennema
1 sibling, 1 reply; 6+ messages in thread
From: Henrique de Moraes Holschuh @ 2008-07-01 17:40 UTC (permalink / raw)
To: Enno Fennema; +Cc: linux-acpi
On Sun, 29 Jun 2008, Enno Fennema wrote:
> Could anyone suggest a way to determine in a (shell) program whether my
> computer was switched on by RTC alarm or by me pressing the power button.
Check the wakeup reason in dmidecode. There is a very low, but non-zero
chance that the BIOS implemented it properly, and it would tell you if it
was a power-button wakeup, or rtc wakeup.
--
"One disk to rule them all, One disk to find them. One disk to bring
them all and in the darkness grind them. In the Land of Redmond
where the shadows lie." -- The Silicon Valley Tarot
Henrique Holschuh
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: RTC or button wakeup
2008-07-01 17:40 ` Henrique de Moraes Holschuh
@ 2008-07-02 10:42 ` Enno Fennema
0 siblings, 0 replies; 6+ messages in thread
From: Enno Fennema @ 2008-07-02 10:42 UTC (permalink / raw)
To: linux-acpi
Henrique de Moraes Holschuh wrote:
> On Sun, 29 Jun 2008, Enno Fennema wrote:
>> Could anyone suggest a way to determine in a (shell) program whether my
>> computer was switched on by RTC alarm or by me pressing the power button.
>
> Check the wakeup reason in dmidecode. There is a very low, but non-zero
> chance that the BIOS implemented it properly, and it would tell you if it
> was a power-button wakeup, or rtc wakeup.
>
Unfortunately my BIOS makes no such distinction.
Thanks for your suggestion which should have worked (as so many things).
Regards,
Enno
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2008-07-02 10:41 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-29 16:10 RTC or button wakeup Enno Fennema
2008-06-30 1:06 ` Zhao Yakui
2008-06-30 14:23 ` Enno Fennema
2008-07-01 6:26 ` Zhao Yakui
2008-07-01 17:40 ` Henrique de Moraes Holschuh
2008-07-02 10:42 ` Enno Fennema
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).