You are not logged in.

#1 2010-06-17 01:59:08

asarkar
Member
Registered: 2010-06-16
Posts: 6

[SOLVED] T400: thinkpad_acpi keys conflict with acpid

With acpid and without thinkpad_acpi, Fn+F4 or closing the lid suspend to RAM, but Fn+F2 does nothing (it doesn't even register on xev or showkey). With thinkpad_acpi, Fn+F2 locks, but Fn+F4 and closing the lid do nothing regardless of whether acpid is running. I've tried messing with hotkey_mask, but even using hotkey_all_mask didn't work. Has anyone else run up against this problem? What else should I try to get this working?

Last edited by asarkar (2010-06-19 01:46:01)

Offline

#2 2010-06-17 02:29:04

takedown
Member
From: Argentina
Registered: 2008-08-31
Posts: 219

Re: [SOLVED] T400: thinkpad_acpi keys conflict with acpid

in my T500 I have my own events handler by /etc/acpi/events/* and his respective scripts in /etc/acpi/actions/*
For example: Lock Screen Fn+F2 under KDE

root:/home/takedown # cat /etc/acpi/events/lock
event=ibm/hotkey HKEY 00000080 00001002
action=/etc/acpi/actions/lock.sh
root:/home/takedown # cat /etc/acpi/actions/lock.sh
#!/bin/bash
PATH="/bin:/usr/bin:/sbin:/usr/sbin"
export DISPLAY=:0
USER=`who | grep ':0' | grep -o '^\w*' | head -n1`

su "$USER" -c "qdbus org.freedesktop.ScreenSaver /ScreenSaver Lock"
su "$USER" -c "xset dpms force off"

or toggle touchpad/trackpoint:

root:/home/takedown # cat /etc/acpi/events/mouse
event=ibm/hotkey HKEY 00000080 00001008
action=/etc/acpi/actions/mouse.sh
root:/home/takedown # cat /etc/acpi/actions/mouse.sh                                                                                                                                                             
#!/bin/bash                                                                                                                                                                                                      
PATH="/bin:/usr/bin:/sbin:/usr/sbin"
export DISPLAY=:0

USER=`who | grep ':0' | grep -o '^\w*' | head -n1`

if [ `su $USER -c 'synclient -l | grep TouchpadOff | cut -b 31-32'` -ne 0 ]; then
        su "$USER" -c "synclient TouchpadOff=0"
        su "$USER" -c "xinput set-int-prop \"TPPS/2 IBM TrackPoint\" \"Device Enabled\" 8 0"
        su "$USER" -c "/usr/bin/kdialog --passivepopup Touchpad\ enable --title Thinkpad\ T500 "5""
else
        su "$USER" -c "synclient TouchpadOff=1"
        su "$USER" -c "xinput set-int-prop \"TPPS/2 IBM TrackPoint\" \"Device Enabled\" 8 1"
        su "$USER" -c "/usr/bin/kdialog --passivepopup Touchpad\ disable --title Thinkpad\ T500 "5""
fi

May be I can help you with this examples (but sorry my poor english)

Offline

#3 2010-06-17 02:34:20

asarkar
Member
Registered: 2010-06-16
Posts: 6

Re: [SOLVED] T400: thinkpad_acpi keys conflict with acpid

I tried something similar for Fn+F4 standby, but it doesn't seem to be working. I'm observing some strange behavior in acpi_listen, too: it registers Fn+F4 correctly the first time I press it but not subsequent times (unlike the other Fn key combinations).

Last edited by asarkar (2010-06-17 02:55:00)

Offline

#4 2010-06-17 02:58:05

takedown
Member
From: Argentina
Registered: 2008-08-31
Posts: 219

Re: [SOLVED] T400: thinkpad_acpi keys conflict with acpid

try with acpi_listen and change the var event in yours /etc/events/someEvent
remember to make your scripts exectutables with:

chmod +x /etc/actions/someAction

Offline

#5 2010-06-17 15:20:45

takedown
Member
From: Argentina
Registered: 2008-08-31
Posts: 219

Re: [SOLVED] T400: thinkpad_acpi keys conflict with acpid

any new?

Offline

#6 2010-06-18 22:11:22

asarkar
Member
Registered: 2010-06-16
Posts: 6

Re: [SOLVED] T400: thinkpad_acpi keys conflict with acpid

Still no luck. I tried using Fn+F3, which appears to work correctly (according to acpI_listen), for suspend.

/etc/acpi/events/suspend

key=ibm/hotkey HKEY 00000080 00001003
action=/etc/acpi/actions/suspend.sh

/etc/acpi/actions/suspend.sh

#!/bin/sh
pm-suspend

Offline

#7 2010-06-19 01:17:28

takedown
Member
From: Argentina
Registered: 2008-08-31
Posts: 219

Re: [SOLVED] T400: thinkpad_acpi keys conflict with acpid

try add some output information in suspend.sh like this to know if the script is executing:

#!/bin/sh
pm-suspend &
echo -e "Suspending to RAM" >> /home/YOURUSER/suspend.log

and check this file after press Fn+F3
remember to make this script executable

Offline

#8 2010-06-19 01:45:43

asarkar
Member
Registered: 2010-06-16
Posts: 6

Re: [SOLVED] T400: thinkpad_acpi keys conflict with acpid

It should be "event=", not "key=" in the event handler. Now things are working.

Offline

#9 2010-06-19 17:25:09

takedown
Member
From: Argentina
Registered: 2008-08-31
Posts: 219

Re: [SOLVED] T400: thinkpad_acpi keys conflict with acpid

tongue

Last edited by takedown (2010-06-19 17:25:33)

Offline

Board footer

Powered by FluxBB