* Lid switch not waking machine
@ 2003-07-07 1:16 Matthew Garrett
[not found] ` <20030707011638.GA19894-1xO5oi07KQx4cg9Nei1l7Q@public.gmane.org>
0 siblings, 1 reply; 7+ messages in thread
From: Matthew Garrett @ 2003-07-07 1:16 UTC (permalink / raw)
To: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
If I press the lid switch to put my laptop to sleep, releasing it
doesn't wake it up. acpi_hw_enable_gpe_for_wakeup only seems to be
called from acpi_enable_gpe and only if ACPI_EVENT_WAKE_ENABLE is set -
acpi_enable_gpe only seems to be called from acpi_ec_gpe_query, and then
only as:
acpi_enable_gpe(NULL, ec->gpe_bit, ACPI_NOT_ISR);
So, should this function be being called for my lid switch, and if so
how? Or am I barking up the wrong tree entirely? Windows resumes happily
if the switch is released, so it's presumably capable of generating a
wakeup event.
--
Matthew Garrett | mjg59-1xO5oi07KQx4cg9Nei1l7Q@public.gmane.org
-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100006ave/direct;at.asp_061203_01/01
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Lid switch not waking machine
[not found] ` <20030707011638.GA19894-1xO5oi07KQx4cg9Nei1l7Q@public.gmane.org>
@ 2003-07-07 2:26 ` Matthew Garrett
2003-07-07 12:13 ` Derek Broughton
0 siblings, 1 reply; 7+ messages in thread
From: Matthew Garrett @ 2003-07-07 2:26 UTC (permalink / raw)
To: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
On Mon, Jul 07, 2003 at 02:16:39AM +0100, Matthew Garrett wrote:
> So, should this function be being called for my lid switch, and if so
> how? Or am I barking up the wrong tree entirely? Windows resumes happily
> if the switch is released, so it's presumably capable of generating a
> wakeup event.
The plot thickens. If I suspend with the lid switch and then release it,
I have to wake the system with the power button. The system resumes, but
no more ACPI events are generated. If I suspend with the sleep button, I
can resume with the power button and ACPI events are still generated.
However, if I suspend with the sleep button, press and release the lid
switch while the system is suspended and then resume with the power
button, the symptoms are identical to having suspending with the lid
switch - no more ACPI events are generated. So, somehow, the act of
causing a lid switch event while the machine is suspended causes ACPI to
cease being useful.
Is there useful debugging output I can generate here?
--
Matthew Garrett | mjg59-1xO5oi07KQx4cg9Nei1l7Q@public.gmane.org
-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100006ave/direct;at.asp_061203_01/01
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Lid switch not waking machine
2003-07-07 2:26 ` Matthew Garrett
@ 2003-07-07 12:13 ` Derek Broughton
[not found] ` <007301c34481$29864080$3746028e-dP0OE4Ef7fWw5LPnMra/2Q@public.gmane.org>
0 siblings, 1 reply; 7+ messages in thread
From: Derek Broughton @ 2003-07-07 12:13 UTC (permalink / raw)
To: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
From: "Matthew Garrett" <mjg59-1xO5oi07KQx4cg9Nei1l7Q@public.gmane.org>
> On Mon, Jul 07, 2003 at 02:16:39AM +0100, Matthew Garrett wrote:
>
> > So, should this function be being called for my lid switch, and if so
> > how? Or am I barking up the wrong tree entirely? Windows resumes happily
> > if the switch is released, so it's presumably capable of generating a
> > wakeup event.
>
> The plot thickens. If I suspend with the lid switch and then release it,
> I have to wake the system with the power button. The system resumes, but
This is normal. Every laptop I've used (even in Windows) expects to be woken
from sleep states with the power button - if your laptop had a dedicated sleep
button, you might use that instead, but the lid switch is never, ime, used for
wakeup.
> no more ACPI events are generated. If I suspend with the sleep button, I
This, however, seems wrong. What you should get when you wake with the power
button is a power button event immediately followed by a lid switch event - and
then any other events.
derek
-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100006ave/direct;at.asp_061203_01/01
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Lid switch not waking machine
[not found] ` <007301c34481$29864080$3746028e-dP0OE4Ef7fWw5LPnMra/2Q@public.gmane.org>
@ 2003-07-07 12:44 ` Simon Gates
2003-07-07 13:12 ` Matthew Garrett
1 sibling, 0 replies; 7+ messages in thread
From: Simon Gates @ 2003-07-07 12:44 UTC (permalink / raw)
To: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
On Mon, 2003-07-07 at 13:13, Derek Broughton wrote:
> From: "Matthew Garrett" <mjg59-1xO5oi07KQx4cg9Nei1l7Q@public.gmane.org>
>
> > The plot thickens. If I suspend with the lid switch and then release it,
> > I have to wake the system with the power button. The system resumes, but
>
> This is normal. Every laptop I've used (even in Windows) expects to be woken
> from sleep states with the power button - if your laptop had a dedicated sleep
> button, you might use that instead, but the lid switch is never, ime, used for
> wakeup.
Toshibas supplied with WinXP have the option, switched on by default.
--
Simon Gates - developer, Email: simon_gates-DKdQRqanwcD3oGB3hsPCZA@public.gmane.org
Tao Group, 62/63 Suttons Business Park, Earley, Reading, Berkshire, RG6
1AZ.
Tel: +44 118 901 2999, Fax: +44 118 901 2963, Web:
http://www.tao-group.com
The contents of this e-mail and any attachments are confidential and may
be legally privileged. If you have received this e-mail and you are not
a named addressee, please inform us as soon as possible on
+44 118 901 2999 and then delete the e-mail from your system. If you are
not a named addressee you must not copy, use, disclose, distribute,
print or rely on this e-mail. Any views expressed in this e-mail or any
attachments may not necessarily reflect those of Tao's management.
Although we routinely screen for viruses, addressees should scan this
e-mail and any attachments for viruses. Tao makes no representation or
warranty as to the absence of viruses in this e-mail or any attachments.
Please note that for the protection of our business, we may monitor and
read e-mails sent to and from our server(s).
-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100006ave/direct;at.asp_061203_01/01
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Lid switch not waking machine
[not found] ` <007301c34481$29864080$3746028e-dP0OE4Ef7fWw5LPnMra/2Q@public.gmane.org>
2003-07-07 12:44 ` Simon Gates
@ 2003-07-07 13:12 ` Matthew Garrett
[not found] ` <20030707131244.GA31883-1xO5oi07KQx4cg9Nei1l7Q@public.gmane.org>
1 sibling, 1 reply; 7+ messages in thread
From: Matthew Garrett @ 2003-07-07 13:12 UTC (permalink / raw)
To: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
On Mon, Jul 07, 2003 at 09:13:23AM -0300, Derek Broughton wrote:
> From: "Matthew Garrett" <mjg59-1xO5oi07KQx4cg9Nei1l7Q@public.gmane.org>
> > The plot thickens. If I suspend with the lid switch and then release it,
> > I have to wake the system with the power button. The system resumes, but
>
> This is normal. Every laptop I've used (even in Windows) expects to be woken
> from sleep states with the power button - if your laptop had a dedicated sleep
> button, you might use that instead, but the lid switch is never, ime, used for
> wakeup.
Under Windows, opening the lid results in the system waking, so it seems
that the hardware is capable of it. It'd be nice if the same were
possible under Linux.
> > no more ACPI events are generated. If I suspend with the sleep button, I
>
> This, however, seems wrong. What you should get when you wake with the power
> button is a power button event immediately followed by a lid switch event - and
> then any other events.
Before suspending (I've stopped acpid so I can do this by hand):
mjg59@asparagine:/tmp$ sudo cat /proc/acpi/event
button/lid LID 00000080 00000001
button/lid LID 00000080 00000002
(once for down, once for up)
button/sleep SBTN 00000080 00000003
(pressing the sleep button)
At this point, I do /etc/acpi/default.sh button SBTN and the machine
suspends. I can press the power button or (for some reason) the Fn key
and the machine resumes - my cat process has died with an Input/output
error. ACPI carries on working, as shown below.
mjg59@asparagine:/tmp$ sudo cat /proc/acpi/event
button/lid LID 00000080 00000003
button/lid LID 00000080 00000004
(lid button still works)
button/sleep SBTN 00000080 00000004
(sleep button still works)
Suspend again - this time I press the lid switch while the system is
suspended. Power button and Fn key still wake the system, but from now
on no ACPI events are generated. I can still do things like control the
CPU throttling and fan state by hand. Removing the ac adapter leaves its
state as "on-line". cat /proc/acpi/button/lid/LID/state shows "open"
even when it's not. It's as if the hardware is waiting for something to
deal with the lid up event and not doing anything else until that's
happened.
I've stuck my DSDT at http://www.codon.org.uk/~mjg59/240x.dsdt if that's
any use.
--
Matthew Garrett | mjg59-1xO5oi07KQx4cg9Nei1l7Q@public.gmane.org
-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100006ave/direct;at.asp_061203_01/01
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Lid switch not waking machine
[not found] ` <20030707131244.GA31883-1xO5oi07KQx4cg9Nei1l7Q@public.gmane.org>
@ 2003-07-09 19:24 ` Nate Lawson
0 siblings, 0 replies; 7+ messages in thread
From: Nate Lawson @ 2003-07-09 19:24 UTC (permalink / raw)
To: Matthew Garrett; +Cc: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
On Mon, 7 Jul 2003, Matthew Garrett wrote:
> On Mon, Jul 07, 2003 at 09:13:23AM -0300, Derek Broughton wrote:
> > From: "Matthew Garrett" <mjg59-1xO5oi07KQx4cg9Nei1l7Q@public.gmane.org>
> > > The plot thickens. If I suspend with the lid switch and then release it,
> > > I have to wake the system with the power button. The system resumes, but
> >
> > This is normal. Every laptop I've used (even in Windows) expects to be woken
> > from sleep states with the power button - if your laptop had a dedicated sleep
> > button, you might use that instead, but the lid switch is never, ime, used for
> > wakeup.
>
> Under Windows, opening the lid results in the system waking, so it seems
> that the hardware is capable of it. It'd be nice if the same were
> possible under Linux.
Under FreeBSD, my IBM T23 suspends/resumes (S3) based on the lid switch
just fine.
-Nate
-------------------------------------------------------
This SF.Net email sponsored by: Parasoft
Error proof Web apps, automate testing & more.
Download & eval WebKing and get a free book.
www.parasoft.com/bulletproofapps
^ permalink raw reply [flat|nested] 7+ messages in thread
* RE: Lid switch not waking machine
@ 2003-07-14 0:44 Grover, Andrew
0 siblings, 0 replies; 7+ messages in thread
From: Grover, Andrew @ 2003-07-14 0:44 UTC (permalink / raw)
To: Nate Lawson, Matthew Garrett; +Cc: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
> From: Nate Lawson [mailto:nate-Y6VGUYTwhu0@public.gmane.org]
> > Under Windows, opening the lid results in the system
> waking, so it seems
> > that the hardware is capable of it. It'd be nice if the same were
> > possible under Linux.
>
> Under FreeBSD, my IBM T23 suspends/resumes (S3) based on the
> lid switch
> just fine.
Yeah this should work.
If we're not enabling the lid device for wakeup then that explains part
of it. As for the other part of the problem, it sounds like we are not
re-enabling GPEs or fixed events properly on wakeup. To be honest don't
think any Linux development has happened to specifically make this work,
so I'm not surprised it doesn't. :) If you have time to figure out what
exactly the problem is on your system and how to fix it then that would
be a big step in the right direction.
Maybe looking at FreeBSD's code and seeing what they're doing would be a
good start? ;-)
Regards -- Andy
-------------------------------------------------------
This SF.Net email sponsored by: Parasoft
Error proof Web apps, automate testing & more.
Download & eval WebKing and get a free book.
www.parasoft.com/bulletproofapps1
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2003-07-14 0:44 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-07-07 1:16 Lid switch not waking machine Matthew Garrett
[not found] ` <20030707011638.GA19894-1xO5oi07KQx4cg9Nei1l7Q@public.gmane.org>
2003-07-07 2:26 ` Matthew Garrett
2003-07-07 12:13 ` Derek Broughton
[not found] ` <007301c34481$29864080$3746028e-dP0OE4Ef7fWw5LPnMra/2Q@public.gmane.org>
2003-07-07 12:44 ` Simon Gates
2003-07-07 13:12 ` Matthew Garrett
[not found] ` <20030707131244.GA31883-1xO5oi07KQx4cg9Nei1l7Q@public.gmane.org>
2003-07-09 19:24 ` Nate Lawson
-- strict thread matches above, loose matches on Subject: below --
2003-07-14 0:44 Grover, Andrew
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox