IBM T41
From OpenSource-WiKi
Contents |
Some steps especially for IBM T41/T42
How-to install and configure synaptics driver
Synaptics driver enables some nice features (you'd love to possess) in your TouchPad.
- Palm detection - no more wandering mouse pointer while you type with your clumsy fingers
- Vertical scrolling
- Horizontal scrolling
- Two finger scrolling, both vertical and horizontal - touch with two fingers anywhere on the TouchPad and then scroll vertically or horizontally. Feeling difficulty using 2 finger scrolling ? try while keeping 2 fingers horizontally i.e. keep 2 fingers on left and right
- You can click on TouchPad and drag as well
- Left click - click on TouchPad with one finger
- Middle click - click on TouchPad with two fingers
- Right click - click on TouchPad with three fingers
- Wondering what happens when you try with 4 or 5 fingers ?
Emerge synaptics drivers if you haven't done yet
emerge -v x11-drivers/xf86-input-synaptics
Section "ServerLayout"
Identifier "X.org Configured"
Screen 0 "Screen0" 0 0
InputDevice "Mouse0" "CorePointer"
InputDevice "TouchPad" "SendCoreEvents"
InputDevice "Keyboard0" "CoreKeyboard"
EndSection
Section "InputDevice"
Identifier "Mouse0"
Driver "mouse"
Option "Protocol" "auto"
Option "Device" "/dev/input/mice"
Option "ZAxisMapping" "4 5 6 7"
EndSection
Section "InputDevice"
Driver "synaptics"
Identifier "TouchPad"
Option "SendCoreEvents"
Option "Protocol" "auto-dev"
Option "SHMConfig" "on"
Option "PalmDetect" "1"
Option "VertEdgeScroll" "1"
Option "HorizEdgeScroll" "1"
Option "VertTwoFingerScroll" "1"
Option "HorizTwoFingerScroll" "1"
Option "TapButton1" "1"
Option "TapButton2" "2"
Option "TapButton3" "3"
EndSection
Some test values
Option "UpDownScrolling" "1"
Option "LeftRightScrolling" "1"
Option "RTCornerButton" "2"
Option "RBCornerButton" "3"
Option "LTCornerButton" "0"
Option "LBCornerButton" "0"
Option "CircularScrolling" "1"
Option "CircularPad" "1"
Option "CircScrollTrigger" "2"
How-to make Fn-F3 to Blank LCD
If radeontool was not already emerged.
emerge -v radeontool
Create file /etc/acpi/actions/fnf3_blank_lcd.sh
and chmod it 755.
| File: /etc/acpi/actions/fnf3_blank_lcd.sh |
#/bin/sh
# 23-jun-2008 - keshav@wlink.com.np, keshav.maharjan@worldlink.com.np
# /etc/acpi/actions/fnf3_blank_lcd.sh
# if test fails do whatever is after ||
# if test succeds do whatever is after &&
test -f /usr/sbin/radeontool || { echo "You need to \"emerge radeontool\" to be able to use Fn F3 to blank the LCD" | tee | logger; exit; }
test -f /var/state/lcd || { echo -ne "on" > /var/state/lcd; }
LCD_STATE=`cat /var/state/lcd`
LCD_STATE=`/usr/sbin/radeontool light | awk '{printf $5}'`
test $LCD_STATE = "on" && {
/usr/sbin/radeontool light off;
echo -ne "off" > /var/state/lcd;
logger "LCD switched OFF"
exit
}
test $LCD_STATE = "off" && {
/usr/sbin/radeontool light on;
echo -ne "on" > /var/state/lcd;
logger "LCD switched ON"
}
#test $LCD_STATE = "off" || { /usr/sbin/radeontool light off; echo -ne "off" > /var/state/lcd; }
#test $LCD_STATE = "on" || { /usr/sbin/radeontool light on; echo -ne "on" > /var/state/lcd; }
|
Create file /etc/acpi/actions/ibm_hotkey.sh
and chmod it 755.
| File: /etc/acpi/actions/ibm_hotkey.sh |
#!/bin/sh
# 23-jun-2008 - keshav@wlink.com.np, keshav.maharjan@worldlink.com.np
# /etc/acpi/actions/ibm_hotkey.sh
set $*
# button/lid LID 00000080 00000001
group=${1%%/*} # button ibm
action=${1#*/} # lid hotkey
device=$2 # LID HKEY
id=$3 # 00000080 00000080
value=$4 # 00000001 00001003
log_unhandled() {
logger "ibm_hotkey.sh unhandled: $*"
}
case "$group" in
ibm)
# ibm Handler
case "$action" in
hotkey)
# ibm/hotkey Handler
case "$id" in
# ibm/hotkey HKEY 00000080
00000080)
case "$value" in
# ibm/hotkey HKEY 00000080 0000101
00001018)
# Access IBM
# logger "$0 Access IBM"
logger "Access IBM"
;;
00001014)
# Fn Spacebar
logger "Fn Spacebar"
;;
0000100d)
# Fn Backspace
logger "Fn Backspace"
;;
00001001)
# Fn F1
logger "Fn F1"
;;
00001002)
# Fn F2
logger "Fn F2"
;;
00001003)
# Fn F3 IBM Blank LCD
logger "Fn F3 IBM Blank LCD"
/etc/acpi/actions/fnf3_blank_lcd.sh
;;
00001004)
# Fn F4 IBM Sleep
logger "Fn F4 IBM Sleep"
#/etc/acpi/actions/fnf4_sleep.sh
;;
00001005)
# Fn F5 IBM Wireless
logger "Fn F5 IBM Wireless"
/etc/acpi/actions/fnf5_wireless.sh
;;
00001006)
# Fn F6
logger "Fn F6"
;;
00001007)
# Fn F7 IBM Switch LCD/Video
logger "Fn F7 IBM Switch LCD/Video"
#/etc/acpi/actions/fnf7_switch_lcd_video.sh
;;
00001008)
# Fn F8
logger "Fn F8"
;;
00001009)
# Fn F9
logger "Fn F9"
;;
0000100a)
# Fn F10
logger "Fn F10"
;;
0000100b)
# Fn F11
logger "Fn F11"
;;
0000100c)
# Fn F12 IBM Hibernate
logger "Fn F4 IBM Hibernate"
#/etc/acpi/actions/fnf12_hibernate.sh
;;
*)
;;
# case "$value"
esac
# case 00000080)
# end
;;
*)
;;
esac
;;
*)
log_unhandled $*
;;
esac
esac
|
Create file /etc/acpi/events/ibm_hotkey
and chmod it 644.
| File: /etc/acpi/events/ibm_hotkey |
# 23-jun-2008 - keshav@wlink.com.np, keshav.maharjan@worldlink.com.np event=ibm[ /]hotkey action=/etc/acpi/actions/ibm_hotkey.sh %e |
Edit file /etc/acpi/default.sh
and add
# ibm Handled by /etc/acpi/actions/ibm_hotkey.sh
ibm)
;;
#
between lines
case "$group" in
and
button)
and it should look like file shown below:
| File: /etc/acpi/default.sh |
...
case "$group" in
# ibm Handled by /etc/acpi/actions/ibm_hotkey.sh
ibm)
;;
#
button)
...
|
Debug
watch cat /var/state/lid
tail -f /var/log/syslog-ng/daemon/logger.log
or
tail -f /var/log/logger.log
How-to make Fn-F5 to Switch WiFi APs
I assume you've already followed steps in "How-to make Fn-F3 to Blank LCD"
Create file /etc/acpi/actions/fnf5_wireless.sh
and chmod it 755.
| File: /etc/acpi/actions/fnf5_wireless.sh |
#/bin/sh
# 23-jun-2008 - keshav@wlink.com.np, keshav.maharjan@worldlink.com.np
# /etc/acpi/actions/fnf3_blank_lcd.sh
#function CUR_ESSID () {
# out=`/sbin/iwconfig eth1 | head -n1 | awk -F\" '{print $2}'`
# return $out
# }
function wlink1 () {
/sbin/ifconfig eth1 up
/sbin/iwconfig eth1 essid Wlink1 key "xxx" txpower 20
sleep 1
CUR_ESSID=`/sbin/iwconfig eth1 | head -n1 | awk -F\" '{printf $2}'`
##logger "CUR_ESSID=<$CUR_ESSID>";
test "$CUR_ESSID" = "Wlink1" && {
/sbin/dhcpcd eth1
logger "WL Wlink1"
echo "Wlink1" > /var/state/wireless
exit 0
}
echo "Wlink2" > /var/state/wireless
exit 0
}
function wlink2 () {
/sbin/ifconfig eth1 up
/sbin/iwconfig eth1 essid Wlink2 key "xxx" txpower 20
sleep 1
CUR_ESSID=`/sbin/iwconfig eth1 | head -n1 | awk -F\" '{printf $2}'`
test "$CUR_ESSID" = "Wlink2" && {
/sbin/dhcpcd eth1
logger "WL Wlink2"
echo "Wlink2" > /var/state/wireless
exit 0
}
echo "kriti" > /var/state/wireless
exit 0
}
function kriti () {
/sbin/ifconfig eth1 up
/sbin/iwconfig eth1 essid kriti txpower 20 enc off
sleep 1
CUR_ESSID=`/sbin/iwconfig eth1 | head -n1 | awk -F\" '{printf $2}'`
##logger "CUR_ESSID=<$CUR_ESSID>";
test "$CUR_ESSID" = "kriti" && {
/sbin/dhcpcd eth1
logger "WL kriti"
echo "kriti" > /var/state/wireless
exit 0
}
echo "Wlink1" > /var/state/wireless
exit 0
}
# if test fails do whatever is after ||
# if test succeds do whatever is after &&
test -f /var/state/wireless || { echo -ne "off" > /var/state/wireless; }
WL_STATE=`cat /var/state/wireless`
#test "$WL_STATE" = "off" && {
case "$WL_STATE" in
off)
wlink1
;;
Wlink1)
wlink1
;;
Wlink2)
wlink2
;;
kriti)
kriti
;;
*)
kriti
;;
esac
#}
exit
|
How-to manually control fan speed
Fan is automatically controlled and its speed is changed as per change in CPU temperature. Manually controlling is risky, though, its useful when you're running laptop for long duration and want to run fan at maximum speed when temperature is too hot to put laptop on your lap !
Kernel Configuration
Get into menuconfig (cd /usr/src/linux && make menuconfig) and check the following:
| Linux Kernel Configuration: ATI Drivers |
General setup ---> [*] ... |