[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: LID button Event ACPI malfunction



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.

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.
-- 
derek



Reply to: