On Friday 15 September 2006 21:18, Nico Schümann wrote: > Well, my configuration slightly differs from your one. > --- /etc/acpid/events/default > > >event=.* > >action=/etc/acpi/default.sh %e
No it doesn't really. The default entries in mine were as you show above. I just followed the comments in the file to separately define what should happen when the power button is pressed, but it didn't work anyway. > --- /etc/acpid/default.sh > > >set $* > > > >group=${1/\/*/} > >action=${1/*\//} > > > >case "$group" in > > button) > > case "$action" in > > power) echo disk > /sys/power/state > > ;; > > sleep) echo disk > /sys/power/state > > ;; > > *) logger "ACPI action $action is not > > defined" ;; > > esac > > ;; > > > > *) > > logger "ACPI group $group / action $action is not defined" > > ;; > >esac > > button/power and button/sleep are _not_ the same and as the log tells > us, it's a button/sleep event. If I get this right, in your > configuration, only a button/power is handeled. What/who determines what goes in /etc/acpid/default.sh? This is what's in mine: =============================================== #!/bin/sh # /etc/acpi/default.sh # Default acpi script that takes an entry for all actions set $* group=${1/\/*/} action=${1/*\//} device=$2 id=$3 value=$4 log_unhandled() { logger "ACPI event unhandled: $*" } case "$group" in button) case "$action" in power) /sbin/init 0 ;; # if your laptop doesnt turn on/off the display via hardware # switch and instead just generates an acpi event, you can force # X to turn off the display via dpms. note you will have to run # 'xhost +local:0' so root can access the X DISPLAY. #lid) # xset dpms force off # ;; *) log_unhandled $* ;; esac ;; ac_adapter) case "$value" in # Add code here to handle when the system is unplugged # (maybe change cpu scaling to powersave mode) #*0) # ;; # Add code here to handle when the system is plugged in # (maybe change cpu scaling to performance mode) #*1) # ;; *) log_unhandled $* ;; esac ;; *) log_unhandled $* ;; esac =============================================== I don't really understand what this script is telling me. :-( -- Regards, Mick
pgp5rEZMT2QzV.pgp
Description: PGP signature