[ACPI-sppt] Re: lid question

Valentine Kouznetsov <[email protected]>
Newsgroups gmane.linux.acpi.support
Message-ID <[email protected]>
Hello everyone,
thanks for response. I solve the problem and figure out what cause it.

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

I checked both actions. /usr/local/sbin/suspend is swsusp (sofr suspend) and
gotosleep is echo 1 > /proc/acpi/sleep
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?

Of course question remain, why having two events in one file
event=button
...
event=.*
allow acpid to skip first one (or forget about it) and perform second one.
My acpi_handler.sh is
#!/bin/sh
# Default acpi script that takes an entry for all actions

set $*

case "$1" in
  button)
    case "$2" in
   power)  /sbin/init 0
        ;;
       *)      logger "ACPI action $2 is not defined"
        ;;
    esac
        ;;
       *)      logger "ACPI group $1 / action $2 is not defined"
        ;;
esac




Valentine Kouznetsov wrote:

> Hi,
> I don't how to tell the difference, what I see that nothing really 
> changed.
> I tried your suggessions, I modified /etc/acpi/events/default
> as
> event=button lid.*
> action=/etc/acpi/gotosleep
>
> or
>
> event=button/lid C1A4
> action=/etc/acpi/gotosleep
>
> but still have C1A4 is not defined in /var/log/messages when 
> close/open the lid.
> I did restart acpid and I'm just curious how to trace that it actually 
> read my
> /etc/acpi/events/default file for events.
>
> Valentine.
>
>




-------------------------------------------------------
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.