You are not logged in.
Pages: 1
My goal is that I do not want my laptop (S10) suspend when lid close.
As far as I know, this should something concerning with acpi.
I searched on the web, but most of the articles either mention how to configure acpid or report bugs.
I ran acpid -d -l, the messages seem to me that it ran correctly ( correct conf, receiving signal, calling script).
My script (/etc/acpi/handler.sh) is just the default script which I think it do nothing,
and I added a test cmd "echo LID >> /etc/acpi/debug" to ensure the script is called and works.
It seems to me that something other than acpid also handle the lid close signal.
Could anyone give me some ideas? Thanks in advanced.
# acpid --d -l
Deprecated /proc/acpi/event was not found. Trying netlink and the input layer...
input layer /dev/input/event0 (AT Translated Set 2 keyboard) opened successfully, fd 4
input layer /dev/input/event1 (Power Button) opened successfully, fd 5
input layer /dev/input/event11 (HDA Intel Mic) opened successfully, fd 6
input layer /dev/input/event12 (HDA Intel Headphone) opened successfully, fd 7
input layer /dev/input/event2 (Sleep Button) opened successfully, fd 8
input layer /dev/input/event3 (Lid Switch) opened successfully, fd 9
input layer /dev/input/event4 (Power Button) opened successfully, fd 10
input layer /dev/input/event5 (Video Bus) opened successfully, fd 11
input layer /dev/input/event7 (Ideapad extra buttons) opened successfully, fd 12
inotify fd: 13
inotify wd: 1
netlink opened successfully
acpid: starting up with netlink and the input layer
parsing conf file /etc/acpi/events/anything
acpid: 1 rule loaded
acpid: waiting for events: event logging is on
acpid: received input layer event "button/lid LID close"
acpid: rule from /etc/acpi/events/anything matched
acpid: executing action "/etc/acpi/handler.sh button/lid LID close"
BEGIN HANDLER MESSAGES
END HANDLER MESSAGES
acpid: action exited with status 0
acpid: 1 total rule matched
acpid: completed input layer event "button/lid LID close"
acpid: received input layer event "button/lid LID open"
acpid: rule from /etc/acpi/events/anything matched
acpid: executing action "/etc/acpi/handler.sh button/lid LID open"
BEGIN HANDLER MESSAGES
END HANDLER MESSAGES
acpid: action exited with status 0
acpid: 1 total rule matched
acpid: completed input layer event "button/lid LID open"
acpid: received input layer event "video/switchmode VMOD 00000080 00000000"
acpid: rule from /etc/acpi/events/anything matched
acpid: executing action "/etc/acpi/handler.sh video/switchmode VMOD 00000080 00000000"
BEGIN HANDLER MESSAGES
END HANDLER MESSAGES
acpid: action exited with status 0
acpid: 1 total rule matched
acpid: completed input layer event "video/switchmode VMOD 00000080 00000000"
#!/bin/bash
# Default acpi script that takes an entry for all actions
case "$1" in
button/power)
case "$2" in
PBTN|PWRF)
logger 'PowerButton pressed'
;;
*)
logger "ACPI action undefined: $2"
;;
esac
;;
button/sleep)
case "$2" in
SLPB|SBTN)
logger 'SleepButton pressed'
;;
*)
logger "ACPI action undefined: $2"
;;
esac
;;
ac_adapter)
case "$2" in
AC|ACAD|ADP0)
case "$4" in
00000000)
logger 'AC unpluged'
;;
00000001)
logger 'AC pluged'
;;
esac
;;
*)
logger "ACPI action undefined: $2"
;;
esac
;;
battery)
case "$2" in
BAT0)
case "$4" in
00000000)
logger 'Battery online'
;;
00000001)
logger 'Battery offline'
;;
esac
;;
CPU0)
;;
*) logger "ACPI action undefined: $2" ;;
esac
;;
button/lid)
case "$3" in
close)
echo LID >> /etc/acpi/debug
logger 'LID closed'
;;
open)
logger 'LID opened'
;;
*)
logger "ACPI action undefined: $3"
;;
esac
;;
*)
logger "ACPI group/action undefined: $1 / $2"
;;
esac
# vim:set ts=4 sw=4 ft=sh et:
Last edited by jackhftang (2012-11-15 17:42:55)
Offline
Are you running initscripts or systemd, or a mixture? Systemd handles power & events in it's own way, including lid closure events.
Offline
Thanks, working on systemd.
for those who are interested
https://wiki.archlinux.org/index.php/Sy … management
Last edited by jackhftang (2012-11-15 17:35:54)
Offline
Yep you got it, you just need to set the appropriate section to "ignore" and you should be fine. Don't forget to prepend the title with (Solved).
Offline
Pages: 1