HARDWARE_Synaptics_Touchpad
|
This guide describes setting up Synaptics and ALPS touchpads under Linux 2.6. It assumes basic linux knowledge (Kernel installation related tasks, basic editing of xorg.conf)
This is not strictly necessary for normal mouse functionality, which can be achieved with the standard X11 mouse configuration. The synaptics driver enables the following functionality:
- Movement with adjustable, non-linear acceleration and speed.
- Button events through tapping (Click and Double-Click).
- Dragging.
- Middle and right button events on the upper and lower corners.
- Vertical scrolling (button four and five events) through moving the finger on the right side.
- The up/down button sends button four/five events.
- Horizontal scrolling (button six and seven events) through moving the finger on the lower side.
- The multi-buttons send button four/five events, and six/seven events for horizontal scrolling.
- Adjustable finger detection.
- Multifinger taps: two finger for middle button and three finger for right button (Requires hardware support).
- Run-time configuration. This means you can change parameter settings without restarting the X server.
Installation
Kernel Settings
Ensure you have a recent enough kernel:
- True Touchpad: Kernel >=2.6.1
- ALPS: Kernel >=2.6.11
| Linux Kernel Configuration: Enable synaptics support |
Device Drivers --->
Input Device Support --->
<*> Event Interface
[*] Mice --->
<*> PS/2 mouse
Apple users may also need the following option: <*> Apple USB Touchpad support |
Applications
Add "synaptics" to the INPUT_DEVICES variable in /etc/make.conf. Example:
| File: make.conf |
INPUT_DEVICES="evdev keyboard mouse synaptics" |
If you already installed Xorg then only emerge the synaptics driver: emerge -1 x11-drivers/synaptics
If you didn't install Xorg yet, the driver will be added when you do. The driver includes a command line utility (synclient) to control the touchpad. Graphical utilities are also available (ksynaptics, gsynaptics).
19/3/08 Beware it pulling in the 5.10 version of Hal, which can screw your system.
Touchpad device file
If X.Org fails to automatically detect the touchpad, its device file will have to be entered manually. To find the touchpad's device file use cat /proc/bus/input/devices . Look for your device (synaptics or ALPS) in the list. The device file name will be on the Handlers Line below it. If there is more than one listed, it is the first one.
| Code: Example section from /proc/bus/input/devices |
I: Bus=0011 Vendor=0002 Product=0008 Version=7322 N: Name="AlpsPS/2 ALPS GlidePoint" P: Phys=isa0060/serio1/input0 H: Handlers=mouse1 event2 B: EV=f B: KEY=420 0 670000 0 0 0 0 0 0 0 0 B: REL=3 B: ABS=1000003 |
As a basic test, run cat /dev/input/mouse1 (with the appropriate device file) and interact with the touchpad. if there is no output at all, either the device file is the wrong one, or the kernel driver isn't loaded.
X.Org
Automatic Configuration
This guide assumes you have an otherwise working xorg.conf file. The automatic configuration settings are the same for both synaptics and ALPS devices. The following sections need to be modified:
| File: xorg.conf - ServerLayout Section |
InputDevice "TouchPad" "CorePointer" |
If you use a mouse in parallel, you should only have one "CorePointer". For the other device put "SendCoreEvents". Add an input device section for the touchpad:
| File: xorg.conf - New InputDevice Section |
Section "InputDevice" Driver "synaptics" Identifier "TouchPad" Option "SendCoreEvents" Option "Protocol" "auto-dev" Option "SHMConfig" "on" EndSection |
Manual Configuration
Synaptics
| File: xorg.conf - Synaptics InputDevice Section |
Section "InputDevice" Driver "synaptics" Identifier "TouchPad" Option "SendCoreEvents" Option "Protocol" "auto-dev" Option "SHMConfig" "on" EndSection |
ALPS
| File: xorg.conf - ALPS InputDevice Section |
Section "InputDevice" Driver "synaptics" Identifier "TouchPad" Option "SendCoreEvents" Option "Device" "/dev/input/mouse0" Option "Protocol" "event" Option "SHMConfig" "on" Option "Emulate3Buttons" "on" EndSection Use the "alps" protocol if the above fails. Option "Protocol" "alps" |
Additional Settings
Additional options in the InputDevice section can be used to fine tune the touchpad's behavior. A list of these settings and their meaning is available in man synaptics.
These are some examples:
| File: xorg.conf - Defaults similar to MS Windows's behavior |
Option "LeftEdge" "1900" Option "RightEdge" "5400" Option "TopEdge" "1400" Option "BottomEdge" "4500" Option "FingerLow" "25" Option "FingerHigh" "30" Option "MaxTapTime" "180" Option "MaxTapMove" "220" Option "VertScrollDelta" "100" Option "MinSpeed" "0.02" Option "MaxSpeed" "0.18" Option "AccelFactor" "0.0010" |
| File: Example 1 |
Option "LeftEdge" "1700" Option "RightEdge" "5300" Option "TopEdge" "1700" Option "BottomEdge" "4200" Option "FingerLow" "25" Option "FingerHigh" "30" Option "MaxTapTime" "180" Option "MaxTapMove" "220" Option "VertScrollDelta" "100" Option "MinSpeed" "0.09" Option "MaxSpeed" "0.18" Option "AccelFactor" "0.0015" |
| File: Example 2 |
Option "LeftEdge" "130" Option "RightEdge" "840" Option "TopEdge" "130" Option "BottomEdge" "640" Option "FingerLow" "7" Option "FingerHigh" "8" Option "MaxTapTime" "180" Option "MaxTapMove" "110" Option "EmulateMidButtonTime" "75" Option "VertScrollDelta" "20" Option "HorizScrollDelta" "20" Option "MinSpeed" "0.60" Option "MaxSpeed" "1.10" Option "AccelFactor" "0.030" Option "EdgeMotionMinSpeed" "200" Option "EdgeMotionMaxSpeed" "200" Option "UpDownScrolling" "1" Option "CircularScrolling" "1" Option "CircScrollDelta" "0.1" Option "CircScrollTrigger" "2" |
| File: For AlpsPS/2 ALPS GlidePoint |
Option "LeftEdge" "130" Option "RightEdge" "840" Option "TopEdge" "130" Option "BottomEdge" "640" Option "FingerLow" "7" Option "FingerHigh" "8" Option "MaxTapTime" "180" Option "MinTapTime" "110" Option "ClickTime" "0" Option "EmulateMidButtonTime" "75" Option "VertScrollDelta" "20" Option "HorizScrollDelta" "20" Option "MinSpeed" "0.40" Option "MaxSpeed" "0.65" Option "AccelFactor" "0.030" Option "EdgeMotionMinSpeed" "200" Option "EdgeMotionMaxSpeed" "200" Option "UpDownScrolling" "1" Option "CircularScrolling" "1" Option "CircScrollDelta" "0.1" Option "CircScrollTrigger" "3" Option "VertEdgeScroll" "on" |
| File: Example 3 |
Option "Buttons" "7" Option "Emulate3Buttons" "true" Option "LeftEdge" "1700" Option "RightEdge" "5300" Option "TopEdge" "1700" Option "BottomEdge" "4200" Option "FingerLow" "25" Option "FingerHigh" "30" Option "MaxTapTime" "180" Option "MaxTapMove" "220" Option "MinSpeed" "0.06" Option "MaxSpeed" "0.28" Option "AccelFactor" "0.0020" Option "VertScrollDelta" "100" Option "HorizScrollDelta" "430" Option "EmulateMidButtonTime" "75" Option "EdgeMotionUseAlways" "1" |
Tips & Tricks
Prevent Accidental Mouse Movement
NB. Starting syndaemon from init.d doesn't work. See bug #37767. Autostart syndaemon from your windowmanager instead.
If your laptop has a compact physical layout, you may often have accidental mouse clicks while typing. syndaemon (part of the synaptics package) can be used to disable the Touchpad while keyboard keys are pressed.
Add the daemon to system startup (rc-update add syndaemon default). It's configuration file is /etc/conf.d/syndaemon. If you wish to use modifier keys (eg: Ctrl, Alt) while moving the mouse, add -k to the SYNDAEMON_OPTS in the config file:
| File: /etc/conf.d/syndaemon |
SYNDAEMON_OPTS="-k" |
Read syndaemon's man page for more options to control disabling the touchpad while typing.
Two Finger Click Transforms
There is a patch for the synaptics driver version 0.14.6 written by Douglas Mayle which enables two finger clicking similar to that found in OS X. To install, you'll need to create a portage overlay and patch the synaptics sources.
| Code: Two finger click installation steps |
get the sources: emerge -1f =x11-drivers/synaptics-0.14.6 unzip them to the current working directory: tar xjvf /usr/portage/distfiles/synaptics-0.14.6.tar.bz2 Patch the sources: wget http://douglas.mayle.org/synaptics-two-finger-click.diff -q -O- | patch -p0 place the patched sources into distfiles: tar cjvf /usr/portage/distfiles/synaptics-0.14.6.tar.bz2 synaptics-0.14.6 prepare the overlay: mkdir -p /usr/local/portage/x11-drivers/synaptics copy the existing ebuild and files: cp -R /usr/portage/x11-drivers/synaptics/{synaptics-0.14.6.ebuild,files} /usr/local/portage/x11-drivers/synaptics
redigest the ebuild to accept the patched sources: ebuild /usr/local/portage/x11-drivers/synaptics/synaptics-0.14.6.ebuild digest enable the overlay if needed: sed -i -e 's@^\(PORTDIR_OVERLAY=.*\)$@\1 /usr/local/portage@' -e 's@^#PORTDIR_OVERLAY=.*$@PORTDIR_OVERLAY=/usr/local/portage@' /etc/make.conf emerge the package emerge -1 =x11-drivers/synaptics-0.14.6 |
These new options will be available in Input Device Section of /etc/X11/xorg.conf:
| File: Two-finger transform options |
Two finger left-click becomes right-click Option "TwoFingerButton1" "2" Two finger right-click becomes middle-click Option "TwoFingerButton2" "3" Disable Two finger middle-click Option "TwoFingerButton3" "0" |
Real-Time Tweaking
As of version 0.14.4 of the synaptics package, changes can be made to the touchpad configuration without restarting X using synclient. These changes are not permanent, and must be explicitly set via xorg.conf, or in a startup script.
Examples:
- List of available parameters : synclient -l
- Decreasing the RightEdge value to 5000 may allow for easier verticall scrolling: synclient RightEdge=5000.
- Turn off the Tap-to-Click feature: synclient MaxTapTime=0.
Usability Tips:
- Convenient one-liner to format the output of synclient -l for use in xorg.conf: synclient -l | awk '/=/{printf "Option \"%s\" \"%s\"\n",$1,$3}'
- Bash completion script for synclient:
| File: /etc/bash_completion.d/synclient |
# synclient(1) completion
# For /etc/bash_completion.d/
# by Luke W. Hudson
have synclient && \
_synclient()
{
local cur
COMPREPLY=()
cur=${COMP_WORDS[COMP_CWORD]}
if [[ "$cur" == "-*" ]]; then
T_IFS="$IFS"
else
WORDS=$(synclient -l | awk '{print $1$2$3}' | grep -v '^Parameter' | sort)
COMPREPLY=($(compgen -W "$WORDS" -- $cur ))
fi
}
complete -F _synclient synclient
|
Troubleshooting
Horizontal Scroll Issues with Firefox
Firefox may misinterpret the horizontal scroll as 'back' and 'forward'.
One option is to disable horizontal scroll (by adding in xorg.conf input section: Option "HorizScrollDelta" "0").
Another options is to configure Firefox so that it doesn't misinterpret the horizontal scroll. In firefox type in the address about:config. Double-click the line mousewheel.horizscroll.withnokey.action. Set it to 0 (2 is forward and back pages. 1 enables Horizontal scrolling). Set mousewheel.horizscroll.withnokey.sysnumlines to true.
If you actually want this feature (left scrolling takes you back, and right scrolling makes firefox go forward), set these values:
mousewheel.horizscroll.withnokey.action 2
mousewheel.horizscroll.withnokey.numlines -1 (Setting it to -1 or 1 is used to change directions of a back/forward gesture)
mousewheel.horizscroll.withnokey.sysnumlines false
Opera
To configure Opera to recognize horizontal scrolling, go to Preferences > Advanced > Shortcuts and click the Edit button next to Mouse setup. Expand the Application section and delete the two entries (Button6, Back) and (Button7, Forward).
"Can't access shared memory area. SHMConfig disabled?" error
Check that "Option" "SHMConfig" "on" is present in xorg.conf. Check that the "Device" option is configured properly. Make sure that your touchpad configuration is not overruled by your mouse configuration. That may happen if the mouse InputDevice comes before the touchpad InputDevice in Section "ServerLayout" in /etc/X11/xorg.conf.
Make sure that xorg-server package was compiled with the debug USE-Flag disabled, otherwise modules loading is not possible.
It might also be that your computer does not recognize that you have a synaptics touchpad due to a bug. Compiling your kernel with psmouse as module, load it, unload it, touch the pad and load it again solved it for me. If you have X started you have to restart it after you have reloaded the module.
-- Adding additional input devices afterwards may induce this error, because the enumeration of Synaptic input device may change, e.g. from event1 to event2 (or mouse0 to mouse1). A better practice for me was to use "by-path" adressing, instead of "eventX", for Synaptics in Xorg.conf:
Identifier "Synaptics" ... #Option "Device" "/dev/input/event1" Option "Device" "/dev/input/by-path/platform-i8042-serio-1-event-mouse"
Misbehaving external PS/2 mouse
Use "AlwaysCore" instead of "CorePointer" in the ServerLayout section for the "Touchpad" device. A "CorePointer" option will have to be set on another pointer input device (eg: external mouse).
Problems after upgrading to X.Org 7
A symlink might have to be created:
ln /usr/lib/modules/input/synaptic_drv.so /usr/lib/xorg/modules/input -s
This is not needed in the latest version of the synaptics driver.
If your mouse stops working, you may need to replace "AlwaysCore" with "CorePointer" or "SendCoreEvents" in the "ServerLayout" section of xorg.conf. The "AlwaysCore" option no longer exists. See http://forums.gentoo.org/viewtopic-t-583148.html
Links
- Synaptic Driver Homepage
- Synaptics Manual with all the variables explained
- http://ubuntuforums.org/archive/index.php/t-3993.html
- http://forums.gentoo.org/viewtopic-t-476739.html).
Created by NickStallman.net, Luxury Homes Australia
Real estate agents should list their apartments, townhouses and units in Australia.
