Re: [ACPI-sppt] Re: lid question
Derek Broughton <[email protected]>
| Newsgroups | gmane.linux.acpi.support |
|---|---|
| Organization | Pointer Stop Consulting |
| Message-ID | <[email protected]> |
From: "Valentine Kouznetsov" <[email protected]> > In my file I had > # Optionally you can specify the placeholder %e. It will pass > # through the whole kernel event message to the program you've > # specified. > > event=.* > action=/etc/acpi/acpi_handler.sh %e > > the problem went away when I comment those lines and left only > event=button/lid C1A4 .* > action=/usr/local/sbin/suspend > #action=/etc/acpi/gotosleep Oh! That's documented in acpid. You create ONE event rule in each file. That's just "the way it works" (TM). You can, however, create multiple rule files for the same event (ie, if you keep the event=.* rule in one file, and the lid rule in another, both will be executed - but there's no guarantee in which order!) > I checked both actions. /usr/local/sbin/suspend is swsusp (sofr suspend) and > gotosleep is echo 1 > /proc/acpi/sleep Er, those aren't at all the same function. swsusp is either S3 (suspend-to-ram only under 2.5/2.6 kernels) or S4 (suspend-to-disk). Your 'gotosleep' is S1 which is just (supposedly) an idle state. So you shouldn't get the same results. > Both works, but last one just turn off laptop and when I open the lid I > was need to > press power button and boot is started. Does anyone know how to recover > when this event is happened? There can't possibly be a recovery. Whether you really went to S1, or didn't change sleep states at all, if the machine powered off, it's OFF, not suspended :-( What happens when you execute either gotosleep or "echo 1 > /proc/acpi/sleep" without closing the lid - do you get the expected behaviour? This is why I have asked at least twice how your script knows you closed the lid rather than opened it? It looks to me like when you close the lid, it goes to S1, then when you open the lid...it goes to S1. But I'd really expect to be able to wake it from there. ------------------------------------------------------- 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/psa00100003ave/direct;at.aspnet_072303_01/01