You are not logged in.
Pages: 1
Hi all
I've some problem with acpi action script...
First of all here there's my /etc/acpi/events/anything :
event=*
action=/etc/acpi/actions/ibm_hotkey.sh %e
and the ibm_hotkey.sh , founded on the internet with some personalization :
#!/bin/sh
# ACPI action for Thinkpad special keys.
case "$1" in
ibm/hotkey)
case "$2" in
HKEY)
case "$4" in
00001002) # Lock screen
logger "ACPI $2 $4 : Lock screen button pressed."
qdbus org.freedesktop.ScreenSaver /ScreenSaver Lock
;;
00001003) # Switching display off
xset dpms force off
;;
00001004) # Sleep Mode
logger "ACPI $2 $4 : Sleep button pressed."
/usr/sbin/pm-suspend
;;
#00001005) # Switch Bluetooth
#;;
0001007) # Toggle external display
if [ "$(xrandr -q | grep "VGA connected")" ]; then
if [ "$(xrandr -q | grep "VGA connected [0-9]")" ]; then
xrandr --output VGA --off
else
xrandr --output VGA --auto
fi
else
xrandr --output VGA --off
fi
;;
#00001008) # Toggle Trackpoint/Touchpad
#;;
#00001009) # Eject from dock
#;;
0000100c) # Hibernate
logger "ACPI $2 $4 : Hibernate button pressed."
/usr/sbin/pm-hibernate
;;
00001011) # Brightness down
CUR="xbacklight -get"
CUR="echo $CUR | awk '{print $1-5}'"
xbacklight -set $CUR
;;
00001012) # Brightness up
CUR=`xbacklight -get`
CUR="echo $CUR | awk '{print $1+5}'"
xbacklight -set $CUR
;;
#00001014) # Toggle zoom
#;;
#00001018) # ThinkVantage button
#;;
*) logger "ACPI action undefined for $2 / $4" ;;
esac
;;
*) logger "ACPI group/action undefined: $1 / $2" ;;
esac
*) logger "ACPI group/action undefined: $1 / $2" ;;
esac
Now when i try to lock the screen with Fn + F2 it doesnt work.
The first thing i've tought was the acpi code for that key was wrong, but doing acpi_listen and pressing Fn+F2 it returns : ibm/hotkey HKEY 00000080 00001002
I've also tried with the Fn + F4, ibm/hotkey HKEY 00000080 00001004 . The system go into sleep mode, but in the log i cant see the string "ACPI Sleep button pressed."
So it seems like if other programs are catching the actions.
In my system i've also installed laptop-mode-tools, cpufrequtils, and pm-utils. Maybe there's some kind of conflict between these packages ??
Any advices ?
Many thanks to all anyway.
Offline
No there is no conflict between the packages... does xev report events for those keys? If the answer is yes you can bind them through your DE's settings or manually with xmodmap to do anything you like.
Proud Arch Linux user since 2007.
Offline
Pages: 1