Synaptics Touchpad
From Gentoo Linux Wiki
| Please format this article according to the Style Guidelines and Wikification suggestions, then remove this notice {{Wikify}} from the article.
Reason(s): Clean up to the original article |
Contents |
[edit] Introduction
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 configuration, which can be achieved with the normal X11 mouse configuration. THe synaptics driver enables the following functionality:
- Movement with adjustable, non-linear
- 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.
[edit] Installation
[edit] 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 to add:
| Linux Kernel Configuration: Enable Synaptics Support (Apple Users) |
Device Drivers --->
Input Device Support --->
<*> Event Interface
[*] Mice --->
<*> Apple USB Touchpad support
|
[edit] Applications
Add "synaptics" to the INPUT_DEVICES variable in /etc/make.conf. Example:
If you already installed Xorg then only emerge the synaptics driver: emerge -1 x11-drivers/xf86-input-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).
[edit] 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 useHandlers 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 |
all, either the device file is the wrong one, or the kernel driver isn't loaded.
[edit] X.Org
[edit] 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:
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:
Section "InputDevice"
Driver "synaptics"
Identifier "TouchPad"
Option "SendCoreEvents"
Option "Protocol" "auto-dev"
Option "SHMConfig" "on"
EndSection
[edit] Manual Configuration
Synaptics
Section "InputDevice"
Driver "synaptics"
Identifier "TouchPad"
Option "SendCoreEvents"
Option "Protocol" "auto-dev"
Option "SHMConfig" "on"
EndSection
ALPS
Section "InputDevice" Driver "synaptics" Identifier "TouchPad" Option "SendCoreEvents" Option "Protocol" "auto-dev" Option "SHMConfig" "on" EndSection
Use the "alps" protocol if the above fails.
[edit] 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:
| Code: 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"
|
| Code: 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"
|
| Code: 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"
|
| Code: 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"
|
| Code: 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"
|
[edit] Tips and Tricks
[edit] 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:use modifier keys (eg: Ctrl, Alt) while moving the mouse, add -k to the SYNDAEMON_OPTS in the config file:
Read syndaemon's man page for more options to control disabling the touchpad while typing.
[edit] 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
|
[edit] 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:
# 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
[edit] Troubleshooting
[edit] 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 mousewheel.horizscroll.withnokey.sysnumlines false
(Setting numlines to -1 or 1 is used to change directions of a back/forward gesture.)
[edit] 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).
didn't work as intended in my Opera 10.10 (build 4742), deleting the entries made h.scroll behave just like v.scroll, so instad of deleting entries, i edited the actions from (Button6, Back) and (Button7, Forward) to (Button6, Scroll left) and (Button7, Scroll right)
[edit]
- 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
- 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 may solve it. 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 is to use "by-path" addressing, instead of "eventX", for Synaptics in Xorg.conf:
Identifier "Synaptics" ... #Option "Device" "/dev/input/event1" # the old addressing Option "Device" "/dev/input/by-path/platform-i8042-serio-1-event-mouse" # by path addressing
[edit] 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).
[edit] Problems after upgrading to X.Org 7
A symlink might have to be created:
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 [1]
[edit] Tapping does not work anymore
Probably the TapButtons have to be defined since they are not defined by default in some newer drivers.
You can try it on the fly if SHMConfig is enabled:
synclient TapButton1=1 synclient TapButton2=2 synclient TapButton3=3
If this works for you, you can add this configuration to your /etc/X11/xorg.conf Synaptics InputDevice section:
Option "TapButton1" "1" Option "TapButton2" "2" Option "TapButton3" "3"
I do not use the CornerButtons but maybe this is also needed:
Option "RTCornerButton" "2" Option "RBCornerButton" "3"
If tapping still does not work and you are using xf86-input-synaptics-0.15.2-r2, try upgrading to one of the -0.99.* versions. There appears to be a bug in 0.15.2 that disables or at least cripples tapping support, according to a Red Hat bug report.
[edit] Scrolling does not work anymore
Probably the scroll variables must be set.
You can try it on the fly if SHMConfig is enabled:
synclient VertEdgeScroll=1 synclient VertScrollDelta=45 synclient HorizEdgeScroll=1 synclient HorizScrollDelta=45
If this works for you, you can add this configuration to your /etc/X11/xorg.conf Synaptics InputDevice section:
Option "VertEdgeScroll" "1" Option "VertScrollDelta" "45" Option "HorizEdgeScroll" "1" Option "HorizScrollDelta" "45"