Difference between revisions of "Touchpad Synaptics"

From ArchWiki
Jump to: navigation, search
(Restructured the article, partly rewritten and a few sections added)
Line 2: Line 2:
 
[[Category:HOWTOs (English)]]
 
[[Category:HOWTOs (English)]]
  
==What is this ?==
+
==Introduction==
 +
synaptics is a driver for the Synaptics TouchPad which is manufactured in most laptops. This article will help install and configure the driver according to your needs.
  
This tutorial will help install and make your touchpad work properly on your laptop machine.
+
==Installation==
 +
You can install the synaptics modules via pacman from the extra repository:
 +
# pacman -S synaptics
  
==Loading appropriate modules==
+
Both '''evdev''' and '''psmouse''' kernel modules have to be loaded. They may be loaded automatically but it is always safe to add them to your MODULES array in the /etc/rc.conf file:
 +
MODULES = (... evdev psmouse ...)
  
Both ''evdev'' and ''psmouse'' kernel modules have to be loaded in memory. You can check their presence by typing in a console :
+
In case you are using the gnome or kde desktop environment or just want an graphical interface to configure your touchpad, you can install gsynaptics for gnome (community repository) or
<pre>
+
ksynaptics for kde.
lsmod
+
</pre>
+
  
 +
This article will stick to the configuration without a graphical interface.
  
In case of problem with these modules, add the following in the MODULES line of your /etc/rc.conf :
+
==Configuration==
<pre>
+
Configuration for the synaptics driver is most likely done in the Xorg configuration file.
MODULES = (... evdev psmouse ...)
+
</pre>
+
  
==Driver installation==
+
At least you have to load the synaptics module by adding it to your Modules section:
 +
Section "Module"
 +
        ...
 +
        Load "synaptics"
 +
        ...
 +
EndSection
  
As root user type in a console:
+
And you have to add your synaptics input device to your server layout:
<pre>
+
Section "ServerLayout"
pacman -S synaptics
+
        ...
</pre>
+
        InputDevice "Touchpad" "AlwaysCore"
 +
        ...
 +
EndSection
  
Additional packages may be installed too for graphical post-configuration of the touchpad : ksynaptics (for KDE), gsynaptics (for GNOME). Gsynaptics is in the community repository, which is not enabled by default.
+
Further more you have to configure your new input device named ''Touchpad''. We recommend using some kind of template which is discussed in the next section.
  
==Checking for the right device name==
+
===Using a sane template===
 +
The easiest way is to configure your input device section properly is by using a template and then adjusting it according to your needs if you want or need to:
  
Type in a console :
+
Section "InputDevice"
<pre>
+
        Identifier  "Touchpad"
cat /proc/bus/input/devices
+
        Driver      "synaptics"
</pre>
+
        Option      "Device"      "/dev/input/mouse0"
 +
        Option      "Protocol"    "auto-dev"
 +
        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.12"
 +
        Option      "AccelFactor"  "0.0010"
 +
        Option      "SHMConfig"    "on"
 +
EndSection
  
 +
'''Identifier''' is the name of this input device you've specified in the server layout section above.
  
The device name is in the Handlers line of the Synaptics / ALPS block.
+
'''Device''' defines where your synaptic device is located. See  Troubleshooting to find your device handler if it isn't /dev/input/mouse0 for you.
<pre>
+
I: Bus=0011 Vendor=0002 Product=0007 Version=0000
+
N: Name="SynPS/2 Synaptics TouchPad"
+
P: Phys=isa0060/serio4/input0
+
S: Sysfs=/class/input/input1
+
H: Handlers=mouse0 event1
+
B: EV=b
+
B: KEY=6420 0 7000f 0 0 0 0 0 0 0 0
+
B: ABS=11000003
+
</pre>
+
  
e.g.
+
'''LeftEdge''', '''RightEdge''', '''TopEdge''' and '''BottomEdge''' are integer values which indicate the dimensions of your touchpad as x or y coordinates.
H: Handlers=mouse0 event1
+
  
in this example case the Device Option in the xorg.conf will be :
+
'''FingerLow''' and '''FingerHigh''' are integer value which indicate the 'pressure value'  at which the driver counts a touch (pressure value goes above FingerHigh) or a release (pressure value drops below FingerLow).
<pre>
+
Option      "Device" "/dev/input/mouse0"
+
</pre>
+
  
==xorg.conf configuration==
+
'''MaxTapTime''' is an integer value that defines the maximum time for detecting a tap (in milliseconds).
  
Add the followings lines in the following sections of /etc/X11/xorg.conf :
+
'''MaxTapMove''' is an integer value which defines the maximum movement of your finger for detecting a tap.
  
 +
'''MinSpeed''' and '''MaxSpeed''' are set to determin the minimum and maximum speed factor. An floating point value is expected.
  
Section "Module" :
+
'''AccelFactor''' is the acceleration factor as well defined as a floating point value.
<pre>
+
Load "synaptics"
+
</pre>
+
  
 +
'''SHMConfig''' is a boolean value (on/off) for activating or deactivating shared memory. This needs to be enabled if you want to monitor or configure your synaptics device with clients as synclient, which will be using in this article.
  
Section "ServerLayout" :
+
More options are explained in the synaptics' manpage, accessible with:
<pre>
+
man 5 synaptics
InputDevice "Touchpad" "AlwaysCore"
+
</pre>
+
''Note : ServerLayout Section may only contain one "CorePointer" entry. If another pointer is to be used, use "AlwaysCore". There is only one CorePointer allowed...''
+
  
 +
Those values given are sane defaults and will most probably work for you. However if you read on, you'll get to know how you can fine tune your configuration.
  
Create a new "InputDevice" section for the touchpad:
+
===Fine tuning your configuration===
<pre>
+
An easy way to do so is the synclient monitor. It is important for the monitor that the option "SHMConfig" ist set to "on".
Section "InputDevice"
+
 
        Identifier  "Touchpad"
+
You can start the synaptics monitor with the following command:
        Driver      "synaptics"
+
$ synclient -m 100
        Option      "Device" "/dev/input/mouse0"
+
Where -m activates the monitor and the following number specifies the update interval in milliseconds.
        Option      "Protocol" "auto-dev"
+
 
        Option      "LeftEdge" "1700"
+
This monitor provides information about the current state of your touchpad. For example, if you move the mouse with the touchpad, the x and y values in the monitor will change. Therewith you can easy figure out your touchpad's dimension which is defined in the LeftEdge-, RightEdge-, BottomEdge- and TopEdge-Options.
        Option      "RightEdge" "5300"
+
 
        Option      "TopEdge" "1700"
+
The abbreviations are explained as following (summarized from the manpage):
        Option      "BottomEdge" "4200"
+
'''time'''
        Option      "FingerLow" "25"
+
:Time in seconds since the logging was started.
        Option      "FingerHigh" "30"
+
 
        Option      "MaxTapTime" "180"
+
'''x, y'''
        Option      "MaxTapMove" "220"
+
:The x/y coordinates of the finger on the touchpad. The origin is in the upper left corner.
        Option      "VertScrollDelta" "100"
+
 
        Option      "MinSpeed" "0.06"
+
'''z'''
        Option      "MaxSpeed" "0.12"
+
:The pressure value. It represents the pressure you are using to navigate on your thouchpad.
        Option      "AccelFactor" "0.0010"
+
 
        Option      "SHMConfig" "on"
+
'''f'''
EndSection
+
:Number of fingers currently touching the touchpad.
</pre>
+
 
 +
'''w'''
 +
:Value that represents the finger width.
 +
 
 +
'''l,r,u,d,m,multi'''
 +
:Those values represent the state of the left, right, up, down, middle and multi buttons pressed where zero means not pressed and one means pressed.
 +
 
 +
'''gl,gm,gr'''
 +
:For touchpads which have a guest device, this are the accociated button states for guest left, guest middle and guest right pressed (1) and not pressed (0).
 +
 
 +
'''gdx, gdy'''
 +
:x/y coordinates of the guest device.
 +
 
 +
If a value constantly is zero, it means that this option is not supported by your device.
 +
 
 +
With this in mind you should be able to figure the proper values out for you.
 +
 
 +
==Features of the synaptics driver==
 +
===Circular scrolling===
 +
Circular scrolling is a feature that synaptics offers which you probably know from the iPod. Instead (or additional) of scrolling horizontally or vertically, you can scroll circular. Some users find this more precise and fast.
 +
To enable circular scorlling, you have to add the following options to your input device section as defined above:
 +
 
 +
Section "InputDevice"
 +
        ...
 +
        Option      "CircularScrolling"         "on"
 +
        Option      "CircScrollTrigger"         "0"
 +
        ...
 +
EndSection
 +
 
 +
As you've might guessed '''CircularScrolling''' enables or disables circular scrolling.
 +
The option '''CircScrollTrigger''' may be one of the following values, determining on which edge circular scrolling should start:
 +
0    All Edges
 +
1    Top Edge
 +
2    Top Right Corner
 +
3    Right Edge
 +
4    Bottom Right Corner
 +
5    Bottom Edge
 +
6    Bottom Left Corner
 +
7    Left Edge
 +
8    Top Left Corner
 +
 
 +
Specifying something different from zero may be useful if you want to use circular scrolling in conjunction with horizontal and / or vertical scrolling. If you do so, the type of scrolling is determined by the edge you're starting.
 +
 
 +
To scroll fast, draw small circles in the center of your touchpad. To scroll slow and more precise, draw large circles.
  
 
==Troubleshooting==
 
==Troubleshooting==
===Firefox misinterprets horizontal scrolling===
+
===My touchpad device isn't located at /dev/input/mouse0===
Even though this problem isn't concerning the synaptics drivers, you will probably look up here for a solution anyway.
+
If that's the case, you can use this command to display information about your all input devices:
To prevent firefox from "scrolling" the history and make it scroll the site, you have to set the following settings:
+
cat /proc/bus/input/devices
<pre>mousewheel.horizscroll.withnokey.action = 1
+
Search for an input device which has the name "SynPS/2 Synaptics TouchPad". The Handler in this section will tell you which Device you have to specify in your xorg.conf.
mousewheel.horizscroll.withnokey.sysnumlines = true</pre>
+
 
You can edit them by opening '''about:config'''. (Tip taken from [http://gentoo-wiki.com/HARDWARE_Synaptics_Touchpad#Horizontal_Scroll_Issues_with_Firefox gentoo wiki].)
+
''Example output:''
 +
I: Bus=0011 Vendor=0002 Product=0007 Version=0000
 +
N: Name="SynPS/2 Synaptics TouchPad"
 +
P: Phys=isa0060/serio4/input0
 +
S: Sysfs=/class/input/input1
 +
H: Handlers=mouse0 event1
 +
B: EV=b
 +
B: KEY=6420 0 7000f 0
 +
 
 +
As your Handlers are mouse0 and event1, you use /dev/input/mouse0.
  
 
===Stopping the mouse from clicking while typing===
 
===Stopping the mouse from clicking while typing===
This is a neat little trick incorporated with the synaptics driver, you can actually make sure that touchpad tap is disabled while typing. It is a very simple procedure, so here is how it is done.
+
This is a neat little trick incorporated with the synaptics driver, you can actually make sure that the touchpad is disabled while typing. It is a very simple procedure, so here is how it is done.
  
In you profiles .xinitrc, that is the file in your home directory of you user, if your username is john it is /home/john/.xinitrc.
+
Just add the following line to your .xinitrc before you run your window manager:
You have probably already messed with this file to get your WM(window manager) to start, so to make it short, you just have to add "syndaemon -t -i 2 &" before the execution of your WM. The "-t" tells the daemon not to freeze your cursor and the "-i 2" tells the daemon for how long tapping should be disabled. Tapping will be enabled immediately if you click one of your touchpad buttons, hope this helps, for more options write "syndaemon -h" in a terminal.  
+
sysdaemon -i &
 +
 
 +
The '''-i''' switch sets the idle time to the default value (2.0s). The idle time specifies how many seconds to wait after the last key press before enabling the touchpad again. Off course you can specify other values as: -i 3 and so on. Show a little creativity!
 +
 
 +
Additionally you can add the '''-t''' switch that tells the daemon not to disable mouse movement when typing and only disable tapping and scrolling:
 +
sysdaemon -t -i &
 +
 
 +
As usual you may find further information in the manpage:
 +
$ man 1 syndaemon
 +
 
 +
===Firefox misinterprets horizontal scrolling===
 +
Even though this problem isn't concerning the synaptics drivers, you will probably look up here for a solution anyway.
 +
To prevent firefox from scrolling through the history and make it scroll the site, you have to set the following settings:
 +
mousewheel.horizscroll.withnokey.action = 1
 +
mousewheel.horizscroll.withnokey.sysnumlines = true
 +
You can edit them by opening '''about:config'''. (Tip taken from [http://gentoo-wiki.com/HARDWARE_Synaptics_Touchpad#Horizontal_Scroll_Issues_with_Firefox gentoo wiki].)
  
 
==Links==
 
==Links==

Revision as of 13:10, 27 July 2007


Introduction

synaptics is a driver for the Synaptics TouchPad which is manufactured in most laptops. This article will help install and configure the driver according to your needs.

Installation

You can install the synaptics modules via pacman from the extra repository:

# pacman -S synaptics

Both evdev and psmouse kernel modules have to be loaded. They may be loaded automatically but it is always safe to add them to your MODULES array in the /etc/rc.conf file:

MODULES = (... evdev psmouse ...)

In case you are using the gnome or kde desktop environment or just want an graphical interface to configure your touchpad, you can install gsynaptics for gnome (community repository) or ksynaptics for kde.

This article will stick to the configuration without a graphical interface.

Configuration

Configuration for the synaptics driver is most likely done in the Xorg configuration file.

At least you have to load the synaptics module by adding it to your Modules section:

Section "Module"
        ...
        Load "synaptics"
        ...
EndSection

And you have to add your synaptics input device to your server layout:

Section "ServerLayout"
        ...
        InputDevice "Touchpad" "AlwaysCore"
        ...
EndSection

Further more you have to configure your new input device named Touchpad. We recommend using some kind of template which is discussed in the next section.

Using a sane template

The easiest way is to configure your input device section properly is by using a template and then adjusting it according to your needs if you want or need to:

Section "InputDevice"
        Identifier  "Touchpad"
        Driver      "synaptics"
        Option      "Device"       "/dev/input/mouse0"
        Option      "Protocol"     "auto-dev"
        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.12"
        Option      "AccelFactor"  "0.0010"
        Option      "SHMConfig"    "on"
EndSection

Identifier is the name of this input device you've specified in the server layout section above.

Device defines where your synaptic device is located. See Troubleshooting to find your device handler if it isn't /dev/input/mouse0 for you.

LeftEdge, RightEdge, TopEdge and BottomEdge are integer values which indicate the dimensions of your touchpad as x or y coordinates.

FingerLow and FingerHigh are integer value which indicate the 'pressure value' at which the driver counts a touch (pressure value goes above FingerHigh) or a release (pressure value drops below FingerLow).

MaxTapTime is an integer value that defines the maximum time for detecting a tap (in milliseconds).

MaxTapMove is an integer value which defines the maximum movement of your finger for detecting a tap.

MinSpeed and MaxSpeed are set to determin the minimum and maximum speed factor. An floating point value is expected.

AccelFactor is the acceleration factor as well defined as a floating point value.

SHMConfig is a boolean value (on/off) for activating or deactivating shared memory. This needs to be enabled if you want to monitor or configure your synaptics device with clients as synclient, which will be using in this article.

More options are explained in the synaptics' manpage, accessible with:

man 5 synaptics

Those values given are sane defaults and will most probably work for you. However if you read on, you'll get to know how you can fine tune your configuration.

Fine tuning your configuration

An easy way to do so is the synclient monitor. It is important for the monitor that the option "SHMConfig" ist set to "on".

You can start the synaptics monitor with the following command:

$ synclient -m 100

Where -m activates the monitor and the following number specifies the update interval in milliseconds.

This monitor provides information about the current state of your touchpad. For example, if you move the mouse with the touchpad, the x and y values in the monitor will change. Therewith you can easy figure out your touchpad's dimension which is defined in the LeftEdge-, RightEdge-, BottomEdge- and TopEdge-Options.

The abbreviations are explained as following (summarized from the manpage): time

Time in seconds since the logging was started.

x, y

The x/y coordinates of the finger on the touchpad. The origin is in the upper left corner.

z

The pressure value. It represents the pressure you are using to navigate on your thouchpad.

f

Number of fingers currently touching the touchpad.

w

Value that represents the finger width.

l,r,u,d,m,multi

Those values represent the state of the left, right, up, down, middle and multi buttons pressed where zero means not pressed and one means pressed.

gl,gm,gr

For touchpads which have a guest device, this are the accociated button states for guest left, guest middle and guest right pressed (1) and not pressed (0).

gdx, gdy

x/y coordinates of the guest device.

If a value constantly is zero, it means that this option is not supported by your device.

With this in mind you should be able to figure the proper values out for you.

Features of the synaptics driver

Circular scrolling

Circular scrolling is a feature that synaptics offers which you probably know from the iPod. Instead (or additional) of scrolling horizontally or vertically, you can scroll circular. Some users find this more precise and fast. To enable circular scorlling, you have to add the following options to your input device section as defined above:

Section "InputDevice"
        ...
        Option      "CircularScrolling"          "on"
        Option      "CircScrollTrigger"          "0"
        ...
EndSection

As you've might guessed CircularScrolling enables or disables circular scrolling. The option CircScrollTrigger may be one of the following values, determining on which edge circular scrolling should start:

0    All Edges
1    Top Edge
2    Top Right Corner
3    Right Edge
4    Bottom Right Corner
5    Bottom Edge
6    Bottom Left Corner
7    Left Edge
8    Top Left Corner

Specifying something different from zero may be useful if you want to use circular scrolling in conjunction with horizontal and / or vertical scrolling. If you do so, the type of scrolling is determined by the edge you're starting.

To scroll fast, draw small circles in the center of your touchpad. To scroll slow and more precise, draw large circles.

Troubleshooting

My touchpad device isn't located at /dev/input/mouse0

If that's the case, you can use this command to display information about your all input devices:

cat /proc/bus/input/devices

Search for an input device which has the name "SynPS/2 Synaptics TouchPad". The Handler in this section will tell you which Device you have to specify in your xorg.conf.

Example output:

I: Bus=0011 Vendor=0002 Product=0007 Version=0000
N: Name="SynPS/2 Synaptics TouchPad"
P: Phys=isa0060/serio4/input0
S: Sysfs=/class/input/input1
H: Handlers=mouse0 event1 
B: EV=b
B: KEY=6420 0 7000f 0

As your Handlers are mouse0 and event1, you use /dev/input/mouse0.

Stopping the mouse from clicking while typing

This is a neat little trick incorporated with the synaptics driver, you can actually make sure that the touchpad is disabled while typing. It is a very simple procedure, so here is how it is done.

Just add the following line to your .xinitrc before you run your window manager:

sysdaemon -i &

The -i switch sets the idle time to the default value (2.0s). The idle time specifies how many seconds to wait after the last key press before enabling the touchpad again. Off course you can specify other values as: -i 3 and so on. Show a little creativity!

Additionally you can add the -t switch that tells the daemon not to disable mouse movement when typing and only disable tapping and scrolling:

sysdaemon -t -i &

As usual you may find further information in the manpage:

$ man 1 syndaemon

Firefox misinterprets horizontal scrolling

Even though this problem isn't concerning the synaptics drivers, you will probably look up here for a solution anyway. To prevent firefox from scrolling through the history and make it scroll the site, you have to set the following settings:

mousewheel.horizscroll.withnokey.action = 1
mousewheel.horizscroll.withnokey.sysnumlines = true

You can edit them by opening about:config. (Tip taken from gentoo wiki.)

Links

Synaptics TouchPad driver for XOrg/XFree86 : [1]