Re: LID button Event ACPI malfunction
On Thursday 23 December 2004 06:26 am, Derek Broughton wrote:
> On Wednesday 22 December 2004 18:10, Benedek Frank wrote:
> > Hi Derek
> > It seems I sent the email too early. I discovered new things.
> > While ACID is shut down, I cat-ed for /proc/acpi/event and I saw that
> > between the event of closing and opening, there isn't any difference.
> > There is only a counter that counts upwards every event counting as one.
> > So when I close the lid, it is 001 when I open it is 002 etc. That isn't
> > very good. Also, if I close the lid and open very fast, there will be
> > only one event recognized.
> > Another thing is that when ACPID runs, and I do a suspend and then
> > resume, the resume (opening lid) might count toward another suspend. But
> > it just gets stored in some cache, and when I stop the machine, it does
> > the suspend again as it finds the wandering suspend event?
> > It is really over my knowledge, so I am just throwing ideas out. Can you
> > help?
> probably not much, I'm afraid. The acpi event is exactly what I see, so I
> would want to run the sleep script only if the lid state was "closed".
> Mine seems to reliably put that state in /proc/acpi/button/lid/LID/state.
> Since yours doesn't, and you obviously couldn't count on closed being an
> odd-numbered event and open being even (besides the fact that I usually
> start mine at work with the lid closed and at home with the lid open, if
> you're losing events that would make it completely unpredictable), you have
> a problem.
Yes, it seems I do have a problem. But it just got deeper. Now, I deleted the
LID script, and copied the contents over to the powerbutton's script. Now,
when I close the LID and OPEN, the computer does not sleep at all. It still
dims the screen though, even though it has no script ran when it triggers the
event. (Maybe it is a sign of a working APM???)
Now, when I press the power button, the computer des go to sleep just fine.
But for waking it up, I still need to close and open the lid. (Usually press
the little lid pin only. I am guessing an event has to pass by, to wake the
laptop up. If I press any buttons, it wont do anything. Only the lid wakes it
up. However, when I shut down, it still goes to suspend twice. I have no clue
what so ever.
> You never told us how you were doing the shutdown? Do you press the power
> button (default acpid behavior is to shutdown on power button events -
> unfortunately Dell expects that to be a wakeup from sleep, making waking
> difficult), use a button in KDM/GDM/etc, or a script from the console?
> If it only happens when using the power button, it's acpid, and we can
> probably fix that just by having the acpid power button script turn off
> acpid first thing.
> If this is happening from anything _but_ pressing the power button, do you
> still have the problem of it trying to suspend twice on shutdown if you
> turn off acpid before shutdown? If not, just have your shutdown script
> turn off acpid. Even if that doesn't work (because suspend is triggering
> before the daemon is killed), we'll know whether the problem is acpid.
I was trying everything possible, believe me. From KDE, then using the power
button (when it had the original script), and also from console using "halt"
or "shutdown -h now" but all came back with the same results. Even if I stop
acpid before shutdown, it still does the same deal. It makes me believe that
while I used the lidbtn.sh for suspend on lid event, it recorded a bunch of
events, and tries to catch up, and it has two chances upon rebooting, so it
uses two suspends, and maybe once it goes away from cache, it will stop doing
that? I think I at least suspended with the lid button 20 times if not more.
That means it has about 20 events recorded in the cache that has not been
executed yet. But shouldn't that clear when I reboot? I even removed the
battery for a while, but it kept doing it.
Do you have any idea, where to go from here? i dont even use the lid anymore,
but it's still suspending.