Difference between revisions of "Touchpad Synaptics"

From ArchWiki
Jump to: navigation, search
(HAL policy movearound for Xorg server 1.8)
Line 86: Line 86:
 
For more read the man page and look at [[#Fine-tuning_with_synclient]]
 
For more read the man page and look at [[#Fine-tuning_with_synclient]]
  
=== HAL policy (deprecated) ===
+
=== HAL policy (deprecated in favor of udev, /etc/X11/xorg.conf/10-synaptics.conf) ===
  
 
With [[Xorg input hotplugging|hotplugging]] (enabled by default) and HAL installed and running, your Synaptics should work "out-of-the-box".
 
With [[Xorg input hotplugging|hotplugging]] (enabled by default) and HAL installed and running, your Synaptics should work "out-of-the-box".
Line 247: Line 247:
 
   </device>
 
   </device>
 
</deviceinfo></pre>
 
</deviceinfo></pre>
 +
 +
=== udev ===
 +
Same as HAL, but settings go in /etc/X11/xorg.conf/10-synaptics.conf instead of /etc/hal/fdi/policy/11-x11-synaptics.fdi. See http://andreascarpino.it/2010/04/xorg-1-8-synaptics-touchpad-configuration/.
  
 
=== Advanced policy configuration ===
 
=== Advanced policy configuration ===

Revision as of 08:37, 21 June 2010

This template has only maintenance purposes. For linking to local translations please use interlanguage links, see Help:i18n#Interlanguage links.


Local languages: Català – Dansk – English – Español – Esperanto – Hrvatski – Indonesia – Italiano – Lietuviškai – Magyar – Nederlands – Norsk Bokmål – Polski – Português – Slovenský – Česky – Ελληνικά – Български – Русский – Српски – Українська – עברית – العربية – ไทย – 日本語 – 正體中文 – 简体中文 – 한국어


External languages (all articles in these languages should be moved to the external wiki): Deutsch – Français – Română – Suomi – Svenska – Tiếng Việt – Türkçe – فارسی

This article details the installation and configuration process of the Synaptics input driver for Synaptics (and ALPS) touchpads found on most notebooks.

Installation

The Synaptics driver is now bundled as xf86-input-synaptics, and is available in the [extra] repository:

# pacman -S xf86-input-synaptics

Configuration

Configuration for the touchpad should done by an Xorg server configuration file. As of Xorg server 1.8 configuration by HAL policy is deprecated.

Xorg method

Edit /etc/X11/xorg.conf as root and add InputDevice "Touchpad" "SendCoreEvents" to the ServerLayout:

Section "ServerLayout"
   ...
   InputDevice    "USB Mouse" "CorePointer"
   InputDevice    "SynapticsTouchpad"  "SendCoreEvents"
EndSection

Add Load "synaptics" to the Module section:

Section "Module"
   ...
   Load  "glx"
   Load  "freetype"
   Load "synaptics"
   ...
EndSection

Lastly, add a new InputDevice section for the touchpad itself. For example:

Section "InputDevice"
   Identifier  "SynapticsTouchpad"
   Driver      "synaptics"
   Option      "AlwaysCore"        "true"  # send events to CorePointer
   #Option      "Device"            "/dev/input/mice"
   Option      "Device"            "/dev/psaux"
   Option      "Protocol"          "auto-dev"
   Option      "SHMConfig"         "false" # configurable at runtime? security risk
   Option      "LeftEdge"          "1700"  # x coord left
   Option      "RightEdge"         "5300"  # x coord right
   Option      "TopEdge"           "1700"  # y coord top
   Option      "BottomEdge"        "4200"  # y coord bottom
   Option      "FingerLow"         "25"    # pressure below this level triggers release
   Option      "FingerHigh"        "30"    # pressure above this level triggers touch
   Option      "MaxTapTime"        "180"   # max time in ms for detecting tap
   Option      "VertEdgeScroll"    "true"  # enable vertical scroll zone
   Option      "HorizEdgeScroll"   "true"  # enable horizontal scroll zone
   Option      "CornerCoasting"    "true"  # enable continuous scroll with finger in corner
   Option      "CoastingSpeed"     "0.30"  # corner coasting speed
   Option      "VertScrollDelta"   "100"   # edge-to-edge scroll distance of the vertical scroll
   Option      "HorizScrollDelta"  "100"   # edge-to-edge scroll distance of the horizontal scroll
   Option      "MinSpeed"          "0.10"  # speed factor for low pointer movement
   Option      "MaxSpeed"          "0.60"  # maximum speed factor for fast pointer movement
   Option      "AccelFactor"       "0.0020"    # acceleration factor for normal pointer movements
   Option      "VertTwoFingerScroll"   "true"  # vertical scroll anywhere with two fingers
   Option      "HorizTwoFingerScroll"  "true"  # horizontal scroll anywhere with two fingers
   Option      "TapButton1" "1"
   Option      "TapButton2" "2"
   Option      "TapButton3" "3"
EndSection

The bold lines are important because users must now explicitly enable the side and bottom scroll zones of the touchpad. If you already had an InputDevice section configured for the old touchpad driver, you'll still need to add these two lines if you wish to use the scroll zones.

To list all options in Template:Filename format, and their current values use this line:

synclient  -l | awk '/=/{printf "Option \"%s\" \"%s\"\n",$1,$3}'

Save, exit and restart X. The touchpad should now have working scroll zones. You can further tweak the InputDevice settings if desired. See Advanced Configuration for more information.

Note that Xorg will automatically load the evdev and psmouse kernel modules required by Synaptics, however you may also add them explicitly to the MODULES array in the /etc/rc.conf file if desired.

The syntax is similar to the HAL method, for instance:

<merge key="input.x11_options.RightEdge" type="string">5300</merge>

equates to this Xorg configuration line:

Option "RightEdge" "5300"

For more read the man page and look at #Fine-tuning_with_synclient

HAL policy (deprecated in favor of udev, /etc/X11/xorg.conf/10-synaptics.conf)

With hotplugging (enabled by default) and HAL installed and running, your Synaptics should work "out-of-the-box".

If it doesn't or you want to tweak the configuration, you will need to edit the appropriate HAL policy file (XML format). Note that in this case.

Copy /usr/share/hal/fdi/policy/10osvendor/11-x11-synaptics.fdi into /etc/hal/fdi/policy/

cp /usr/share/hal/fdi/policy/10osvendor/11-x11-synaptics.fdi /etc/hal/fdi/policy/

Now you can modify the new file appending new options.

Here's a simple template to begin with, covering the more common features:

   <?xml version="1.0" encoding="UTF-8"?>
       <deviceinfo version="0.2">
           <device>
               <match key="info.product" contains="Synaptics TouchPad">
                   <merge key="input.x11_driver" type="string">synaptics</merge>
                   <merge key="input.x11_options.AlwaysCore" type="string">true</merge>
                   <merge key="input.x11_options.VertEdgeScroll" type="string">true</merge>
                   <merge key="input.x11_options.HorizEdgeScroll" type="string">true</merge>
                   <merge key="input.x11_options.TapButton1" type="string">1</merge>
                   <merge key="input.x11_options.TapButton2" type="string">2</merge>
                   <merge key="input.x11_options.TapButton3" type="string">3</merge>
                   <merge key="input.x11_options.protocol" type="string">event</merge>
                   <merge key="input.x11_options.touchpadoff" type="string">0</merge>
                   <merge key="input.x11_options.shmconfig" type="string">on</merge>
               </match>
           </device>
       </deviceinfo>

Template:Box Note Template:Box Note

Here is a complete Template:Filename configuration example. Do not use this example blindly. It is best practice to work from the default values (Template:Codeline) and work from there. For more read the man page and look at #Fine-tuning_with_synclient:

<?xml version="1.0" encoding="ISO-8859-1"?>
<deviceinfo version="0.2">
  <device>

    <!-- Type -->
    <match key="info.capabilities" contains="input.touchpad">
      <match key="info.product" contains="Synaptics TouchPad">
        <merge key="input.x11_driver" type="string">synaptics</merge>
      </match>

    <!-- Values -->

      <!-- Enable -->
      <merge key="input.x11_options.TouchpadOff" type="string">0</merge>

      <!-- Run-time Configuration Allow -->
      <merge key="input.x11_options.SHMConfig" type="string">on</merge>

      <!-- Edge Limits -->
      <merge key="input.x11_options.LeftEdge" type="string">1478</merge>
      <merge key="input.x11_options.RightEdge" type="string">5640</merge>
      <merge key="input.x11_options.TopEdge" type="string">1274</merge>
      <merge key="input.x11_options.ButtonEdge" type="string">4752</merge>

      <!-- Speed -->
      <merge key="input.x11_options.MinSpeed" type="string">0.4</merge>
      <merge key="input.x11_options.MaxSpeed" type="string">0.7</merge>
      <merge key="input.x11_options.AccelFactor" type="string">0.00995223</merge>

      <!-- Pressure -->
      <merge key="input.x11_options.FingerLow" type="string">24</merge>
      <merge key="input.x11_options.FingerHigh" type="string">29</merge>
      <merge key="input.x11_options.FingerPress" type="string">255</merge>

      <!-- Tapping -->
      <!-- Disable -->
      <merge key="input.x11_options.MaxTapTime" type="string">0</merge>
      <!-- Detect -->
      <merge key="input.x11_options.MaxTapMove" type="string">29</merge>
      <merge key="input.x11_options.MaxDoubleTapTime" type="string">255</merge>
      <merge key="input.x11_options.SingleTapTimeout" type="string">180</merge>
      <merge key="input.x11_options.ClickTime" type="string">100</merge>
      <merge key="input.x11_options.FastTaps" type="string">0</merge>
      <!-- Buttons (number of fingers) -->
      <merge key="input.x11_options.TapButton1" type="string">1</merge>
      <merge key="input.x11_options.TapButton2" type="string">2</merge>
      <merge key="input.x11_options.TapButton3" type="string">3</merge>
      <!-- Tap Dragging -->
      <merge key="input.x11_options.LockedDrags" type="string">0</merge>
      <merge key="input.x11_options.LockedDragTimeout" type="string">5000</merge>
      <!-- Tap Gesture Dragging -->
      <merge key="input.x11_options.TapAndDragGesture" type="string">0</merge>
      <!-- Corner Tap Buttons -->
      <merge key="input.x11_options.RTCornerButton" type="string">0</merge>
      <merge key="input.x11_options.RBCornerButton" type="string">0</merge>
      <merge key="input.x11_options.LTCornerButton" type="string">0</merge>
      <merge key="input.x11_options.LBCornerButton" type="string">0</merge>

      <!-- Scrolling -->
      <!-- Vertical (Right Edge)-->
      <merge key="input.x11_options.VertEdgeScroll" type="string">true</merge>
      <merge key="input.x11_options.VerteScrollDelta" type="string">100</merge>
      <!-- Horizontal (Bottom Edge)-->
      <merge key="input.x11_options.HorizEdgeScroll" type="string">false</merge>
      <merge key="input.x11_options.HorizScrollDelta" type="string">100</merge>
      <!-- Circular Scrolling -->
      <merge key="input.x11_options.CircularScrolling" type="string">false</merge>
      <merge key="input.x11_options.CircScrollDelta" type="string">0.1</merge>
      <merge key="input.x11_options.CircScrollTrigger" type="string">0</merge>
      <!-- Two Finger -->
      <merge key="input.x11_options.VertTwoFingerScroll" type="string">false</merge>
      <merge key="input.x11_options.HorizTwoFingerScroll" type="string">false</merge>
      <!-- Corner Coasting -->
      <merge key="input.x11_options.CornerCoasting" type="string">false</merge>
      <merge key="input.x11_options.CoastingSpeed" type="string">0</merge>

      <!-- Other -->
      <!-- Kernel Event Protocol -->
      <merge key="input.x11_options.GrabEventDevice" type="string">1</merge>
      <!-- Edge Ignore Boundaries -->
      <merge key="input.x11_options.AreaLeftEdge" type="string">0</merge>
      <merge key="input.x11_options.AreaRightEdge" type="string">0</merge>
      <merge key="input.x11_options.AreaTopEdge" type="string">0</merge>
      <merge key="input.x11_options.AreaBottomEdge" type="string">0</merge>
      <!-- Trackstick -->
      <merge key="input.x11_options.TrackstickSpeed" type="string">40</merge>
      <!-- Circular Trackpad -->
      <merge key="input.x11_options.CircularPad" type="string">0</merge>
      <!-- Trackpad w/ Scroll Buttons -->
      <merge key="input.x11_options.UpDownScrolling" type="string">1</merge>
      <merge key="input.x11_options.LeftRightScrolling" type="string">1</merge>
      <merge key="input.x11_options.UpDownScrollRepeat" type="string">1</merge>
      <merge key="input.x11_options.LeftRightScrollRepeat" type="string">1</merge>
      <merge key="input.x11_options.ScrollButtonRepeat" type="string">100</merge>
      <!-- Multi-function Buttons -->
      <merge key="input.x11_options.ClickFinger1" type="string">1</merge>
      <merge key="input.x11_options.ClickFinger2" type="string">1</merge>
      <merge key="input.x11_options.ClickFinger3" type="string">1</merge>
      <!-- Edge Movements (Pressure and Speed) -->
      <merge key="input.x11_options.EdgeMotionMinZ" type="string">29</merge>
      <merge key="input.x11_options.EdgeMotionMaxZ" type="string">159</merge>
      <merge key="input.x11_options.EdgeMotionMinSpeed" type="string">1</merge>
      <merge key="input.x11_options.EdgeMotionMaxSpeed" type="string">401</merge>
      <merge key="input.x11_options.EdgeMotionUseAlways" type="string">0</merge>
      <!-- Pressure Motion -->
      <merge key="input.x11_options.PressureMotionMinZ" type="string">29</merge>
      <merge key="input.x11_options.PressureMotionMaxZ" type="string">159</merge>
      <merge key="input.x11_options.PressureMotionMinFactor" type="string">1</merge>
      <merge key="input.x11_options.PressureMotionMaxFactor" type="string">1</merge>
      <!-- Emulations -->
      <merge key="input.x11_options.EmulateMidButtonTime" type="string">75</merge>
      <merge key="input.x11_options.EmulateTwoFingerMinZ" type="string">280</merge>
      <merge key="input.x11_options.EmulateTwoFingerMinW" type="string">7</merge>
      <!-- Palm Detection -->
      <merge key="input.x11_options.PalmDetect" type="string">0</merge>
      <merge key="input.x11_options.PalmMinWidth" type="string">10</merge>
      <merge key="input.x11_options.PalmMinZ" type="string">199</merge>
      <!-- Guest Mouse -->
      <merge key="input.x11_options.GuestMouseOff" type="string">0</merge>

    </match>
  </device>
</deviceinfo>

udev

Same as HAL, but settings go in /etc/X11/xorg.conf/10-synaptics.conf instead of /etc/hal/fdi/policy/11-x11-synaptics.fdi. See http://andreascarpino.it/2010/04/xorg-1-8-synaptics-touchpad-configuration/.

Advanced policy configuration

The Synaptics driver allows for a vast amount of options to be tweaked. Luckily, all of them are consistently named and well documented in Synaptic's manpage.

man synaptics

Other products

  • ALPS users may try the following if the above does not work:
   <match key="info.product" contains="AlpsPS/2 ALPS">
       <merge key="input.x11_driver" type="string">synaptics</merge>
   </match>
  • Apple users with MacBook (1,1 2,1 etc...)
   <match key="info.product" contains="appletouch">
       <merge key="input.x11_driver" type="string">synaptics</merge>
   </match>
  • Apple users with latest MacBook (5,1)
   <match key="info.product" contains="bcm5974">
       <merge key="input.x11_driver" type="string">synaptics</merge>
   </match>

Template:Box Note

Or, if you find HAL is not loading your settings, try this template (the "append" child is necessary for some setups):

    <?xml version="1.0" encoding="ISO-8859-1"?>
    <deviceinfo version="0.2">
    <device>
        <match key="info.product" contains="SynPS/2 Synaptics TouchPad">
        <append key="info.capabilities" type="strlist">input.touchpad</append>
        </match>
        <match key="info.capabilities" contains="input.touchpad">
        <merge key="input.x11_driver" type="string">synaptics</merge>
        [...]
        </match>
    </device>
    </deviceinfo>
    

ALPS Touchpads

For ALPS Touchpads, if the above configuration does not provide the desired results, try the following configuration instead:

 Section "ServerLayout"
   ...
   InputDevice    "USB Mouse" "CorePointer"
   InputDevice    "Touchpad"  "SendCoreEvents"
 EndSection
 Section "InputDevice"
       Identifier  "Touchpad"
   Driver  "synaptics"
   Option  "Device"   "/dev/input/mouse0"
   Option  "Protocol"   "auto-dev"
   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.25"
   Option  "MaxSpeed"   "0.50"
   Option  "AccelFactor"   "0.010"
   Option  "EdgeMotionMinSpeed"   "200"
   Option  "EdgeMotionMaxSpeed"   "200"
   Option  "UpDownScrolling"   "1"
   Option  "CircularScrolling"   "1"
   Option  "CircScrollDelta"   "0.1"
   Option  "CircScrollTrigger"   "2"
   Option  "SHMConfig"   "on"
   Option  "Emulate3Buttons"   "on"
 EndSection

Advanced Configuration

Input device options

There are a number of arbitrary parameters that can be tweaked for Synaptics touchpads. The following is a brief list of some of these options--see man synaptics for full details:

+Option+ +Description+ +Type+
Device Input device location. See Troubleshooting to find your device handler if it isn't /dev/input/mouse0 String
MinSpeed Minimum cursor speed Decimal(float)
MaxSpeed Maximum cursor speed Decimal(float)
AccelFactor Cursor Acceleration Factor Decimal(float)
HorizScrollDelta Horizontal [edge] scrolling speed(lower means faster) Integer
VertScrollDelta Vertical [edge] scrolling speed(lower means faster) Integer
SHMConfig Activation of shared memory(must be enabled for real-time configuration or [Disable touchpad upon external mouse detection| udev-based disabling] Boolean

Gsynaptics

Once the touchpad is configured, users can also install the gsynaptics package from [community] to provide a GUI-based configuration solution for the device (note that it depends on libgnomeui):

# pacman -S gsynaptics

Note: The gsynaptics web page [1] indicates that it is becoming obsolete and users should consider GPointingDeviceSettings [2], currently available in AUR and as source code.

With hotplugging enabled(default), append this the match section of your 99-x11-synaptics.fdi or 11-x11-synaptics.fdi:

 <merge key="input.x11_options.SHMConfig" type="string">on</merge>

Fine-tuning with synclient

The synclient monitor can display pressure and placement on the touchpad in real-time, allowing further refinement of the default Synaptics settings. In order for synclient to work properly, the SHMConfig option must be set to on or true.

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 for the parameters are as follow:

+Abbreviation+ +Description+
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 touchpad.
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 associated 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 implies that this option is not supported by your device.

Now use Template:Codeline to test new values (SHMConfig will first need to be enabled to allow this). For example, to adjust minimum pointer speed:

synclient MinSpeed=0.5

The changes will not be permanent, they will need to be put in your HAL policy file or Template:Filename to make them so.

Edge scrolling

To enable the scroll zones found along the edges of the touchpad, add one or both of the following options to the touchpad device section in /etc/X11/xorg.conf:

Section "InputDevice"
        ...
      Option "VertEdgeScroll" "true"         #vertical scrolling when dragging along the right edge.
      Option "HorizEdgeScroll" "true"        #horizontal scrolling when dragging along the bottom edge.
        ...
EndSection

In /etc/hal/fdi/policy/11-x11-synaptics.fdi(or if that doesn't work, /etc/hal/fdi/policy/99-x11-synaptics.fdi) for Hotplugging:

 <match key="info.product" contains="Synaptics TouchPad">
   ...
   <merge key="input.x11_options.HorizEdgeScroll" type="string">1</merge>
   <merge key="input.x11_options.VertEdgeScroll" type="string">1</merge>
   ...
 </match>

Two-Finger scrolling

Recent Synaptics touchpads support two-finger scrolling. This allows you to use two fingers together anywhere on the touchpad, similar to the behaviour of Macbooks.

If your hardware supports this feature, you can enable it by inserting the following lines into the touchpad device section of /etc/X11/xorg.conf:

Section "InputDevice"
        ...
      Option      "VertTwoFingerScroll"   "true"   # vertical scroll anywhere with two fingers
      Option      "HorizTwoFingerScroll"  "true"   # horizontal scroll anywhere with two fingers
      Option      "EmulateTwoFingerMinZ"  "120"    # this may vary between different machines
        ...
EndSection

EmulateTwoFingerMinZ is only necessary for the ALPS Touchpad, which several Dell machines have. (from Ubuntu forums)

Firefox users: You might find the default behaviour of Firefox pretty annoying relating to the horizontal scrolling. Just see Firefox and special touchpad events below to find out how to disable it.

In /etc/hal/fdi/policy/11-x11-synaptics.fdi(or /etc/hal/fdi/policy/99-x11-synaptics.fdi) for hotplugging:

 <match key="info.product" contains="Synaptics TouchPad">
   ...
   <merge key="input.x11_options.VertTwoFingerScroll" type="string">1</merge>
   <merge key="input.x11_options.HorizTwoFingerScroll" type="string">1</merge>
   <merge key="input.x11_options.EmulateTwoFingerMinZ" type="string">120</merge>
   ...
 </match>

Some users might need to modify the EmulateTwoFingerMinW parameter, as their touch pads sense two fingers as one wide finger. You can check which parameters you need to modify by running synclient -m 150 -- when you touch two fingers to the touch pad, observe which parameters (z, w, or f) change. Those will determine the minimum threshold values you must set (if f changes, don't bother with EmulateTwoFingerMin[W,Z] since you do not need to emulate two fingers, your touch pad can simply sense two different fingers). Depending on your touchpad, these parameters can take relatively high values or ones close to zero.

Circular scrolling

Circular scrolling is a feature that Synaptics offers which closely resembles the behaviour of iPods. Instead of (or additional to) scrolling horizontally or vertically, you can scroll circularly. Some users find this faster and more precise. To enable circular scrolling, add the following options to the touchpad device section of /etc/X11/xorg.conf:

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

In /etc/hal/fdi/policy/11-x11-synaptics.fdi';'(or /etc/hal/fdi/policy/99-x11-synaptics.fdi) for Hotplugging:

 <match key="info.product" contains="Synaptics TouchPad">
   ...
   <merge key="input.x11_options.CircularScrolling" type="string">on</merge>
   <merge key="input.x11_options.CircScrollTrigger" type="string">0</merge>
   ...
 </match>

The option CircScrollTrigger may be one of the following values, determining 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 start from.

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

Software Toggle

You may find it useful to have a software toggle that will turn on or off your touchpad, esplicially if it's extremely sensitive and your doing a lot of typing. Please also see #Disable touchpad upon external mouse detection and #Stopping the mouse from clicking while typing as those may be better solutions, again a matter of choice. The advantage here is you have the control, while the other solutions have daemons determine when to turn off the trackpad.

You will want to grab xbindkeys if you don't already have key binding software.

Then save this script to something such as /sbin/trackpad-toggle.sh:

#!/bin/bash

if [ `synclient -l | grep TouchpadOff | gawk -F '= ' '{ print $2 }'` -eq 0 ]; then
    synclient TouchpadOff=1
else
    synclient TouchpadOff=0
fi

Then finally add a key binding to use the script. It is best to call with xbindkeys like so (file ~/.xbindkeysrc):

"/sbin/trackpad-toggle.sh"
    m:0x5 + c:65
    Control+Shift + space

Now just (re)start xbindkeys and ctrl+Shift+Space will now toggle your trackpad !

Of course you could easily use any other keybinding software, such as the ones provided by Xfce4 and Gnome.

Troubleshooting

Touchpad not working properly in Gnome (No tap zones, scrolling etc.)

Settings in /etc/hal/fdi/policy/11-x11-synaptics.fdi are not respected by Gnome. Gnome uses its own inferior mouse control plugin in the gnome-settings-daemon.

If you only need to enable tapping, edge scrolling or two finger scrolling, you can use the settings tool in System->Preferences->Mouse->Touchpad to enable this in Gnome, but this will not allow you to define touchpad size, tap zones, tap sensitivity, etc.

If you need or want more control of the touchpad settings, you are out of luck using the built-in settings apps in System->Preferences->Mouse->Touchpad, as it is only good for setting a fraction of the availibe options. There is no other way of controlling the gnome mouse plugin either (at least that I know of).If you need more control over the touchpad settings, the best solution is probably to disable the plugin alltogether. The system will then use the settings in /etc/hal/fdi/policy/11-x11-synaptics.fdi correctly.

To disble the gnome settings daemons mouse plugin, you launch gconf-editor, navigate to apps/gnome_settings_daemon/plugins/mouse/ and un-tick the "activate" box. Changes takes affect after a restart of gdm.

Synaptics Special Ability

By default, Synaptics touchpads are able to detect the number of fingers on the touchpad; ALPS touchpads are not. If the touchpad is tapped with two fingers, it will emulate a middle click. If the touchpad is typed with three fingers, a right click will be emulated.

Disable touchpad upon external mouse detection

In assistance to udev, it is possible to automatically disable the touchpad if an external mouse has been plugged in. To achieve this, add the following udev rule to /etc/udev/rules.d/01-touchpad.rules:

ACTION=="add", SUBSYSTEM=="input", ENV{ID_CLASS}="mouse", RUN+="/usr/bin/synclient TouchpadOff=1"
ACTION=="remove", SUBSYSTEM=="input", ENV{ID_CLASS}="mouse", RUN+="/usr/bin/synclient TouchpadOff=0"

SHMConfig must be enabled (see the Configuration section for details)

Cursor Jump

Some users have their cursor inexplicably jump around the screen. There currently no patch for this, but the developers are aware of the problem and are working on it.

Multitouch

Multitouch gesture like in Mac OS X will be in future version of the driver.

Touchpad device isn't located at /dev/input/mouse0

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

cat /proc/bus/input/devices

Search for an input device which has the name "SynPS/2 Synaptics TouchPad". The "Handlers" section of the output specifies what device you need to specify.

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

In this case, the Handlers are mouse0 and event1, so /dev/input/mouse0 would be used.

Disable Trackpad while Typing

There are two approaches on how run this command depending on your setup. But first you will need to have SHMConfig enable in your HAL policy (Template:Filename), or Template:Filename. Some users may need to specify touchpad preferences in Template:Filename instead.

Using Template:Filename

To have the touchpad disabled automatically when you begin typing, add the following line to your .xinitrc before you run your window manager (if not using a login manager):

syndaemon -i 2 &

The -i 2 switch sets the idle time to 2 seconds. The idle time specifies how many seconds to wait after the last key-press before enabling the touchpad again.

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

syndaemon -t -i 2 &

More details are available in the man page:

$ man syndaemon

If you are using a login manager, you will need to specify the command where your DE allows you to do so.

Using a Login Manager

The "-d" option is necessary to start syndaemon as a background process for post Login instructions.

For GNOME: (GDM)

To start syndaemon you need to use Gnome's Startup Applications Preferences program. Login to Gnome and go to System > Preferences > Startup Applications. In the Startup Programs tab click the Add button. Name the Startup Program whatever you like and input any comments you like (or leave this field blank). In the command field add:

syndaemon -i 2 -d

When you're done click the Add button in the Add Startup Program dialogue. Make sure the check box next to the startup program you've created is checked, in the list of additional startup programs. Close the Startup Applications Preferences window and you're done.

For KDE: (KDM)

Goto System Settings > Advanced Tab > Autostart, then click Add Program, enter:

syndaemon -i 2 -d

Then check 'Run in terminal'.

Firefox and special touchpad events

By default, Firefox is set up to do special events upon tapping or scrolling certain parts of your touchpad. You can edit the settings of those actions by typing about:config in your Firefox address bar. To alter these options, double-click on the line in question, changing "true" to "false" and vise versa.

To prevent Firefox from scrolling (backward/forward) through browser history and instead scroll through pages, edit these settings as shown:

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

To prevent Firefox from redirecting you to URLs formed from your clipboard content upon tapping the upper-right corner of your touchpad (or middle mouse button), set the following option to "false":

middlemouse.contentLoadURL = false

Opera: horizontal scrolling issues

Same as above. To fix it, go to Tools -> Preferences -> Advanced -> Shortcuts. There you edit the mouse preferences: Delete the entries with "Button 5" and "Button 6".

Scrolling and multiple actions with Synaptics on LG Laptops

These problems seem to be occurring on several models of LG laptops. Symptoms include: when pressing Mouse Button 1, Synaptics interprets it as ScrollUP and a regular button 1 click; same goes for button 2.

The scrolling issue can be resolved by entering in xorg.conf:

Option "UpDownScrolling" "0"

NOTE that this will make Synaptics interpret one button push as three. There is a patch written by Oskar Sandberg[3] that removes these clicks.

Apparently, when trying to compile this against the latest version of Synaptics it fails. The solution to this is using the GIT repository for Synaptics[4] .

There is also a package build file in the AUR to automate this: [5].

To build the package after downloading the tarball and unpacking it, execute:

cd synaptics-git
makepkg

If you want it to be automatically installed after being built, just add '-i' after makepkg.

Other external mouse issues

First, make sure your section describing the external mouse contains this line (or that the line looks like this):

Option     "Device" "/dev/input/mice"

If the "Device" line is different, change it to the above and try to restart X. If this doesn't solve your problem, make your touchpad the CorePointer in the "Server Layout" section:

InputDevice    "Touchpad" "CorePointer"

and make your external device "SendCoreEvents":

InputDevice    "USB Mouse" "SendCoreEvents"

finally add this to your external device's section:

Option      "SendCoreEvents"    "true"

If all of the above doesn't work for you, please check relevant bug trackers for possible bugs, or go through the forums to see if anyone has found a better solution.

Touchpad synchronization issues

Sometimes the cursor may freeze for several seconds or start acting on its own for no apparent reason. This behavior is accompanied by records in /var/log/messages.log

 psmouse.c: TouchPad at isa0060/serio1/input0 lost synchronization, throwing 3 bytes away

This problem has no general solution, but there are several possible workarounds.

  • If you use CPU frequency scaling, avoid using the "ondemand" governor and use the "performance" governor when possible, as the touchpad may lose sync when the CPU frequency changes.
  • Avoid using an ACPI battery monitor.
  • Attempt to load psmouse with "proto=imps" option. To do that, add this line to your /etc/modprobe.conf:
options psmouse proto=imps
  • Try another desktop environment. Some users report that this problem only occurs when using XFCE or GNOME, for whatever reason

Tapping issues

If you are not using Xorg input hotplugging, you should know that Xorg v7.4 does not enable tapping by default. To enable it, add the following line to the touchpad's InputDevice section in /etc/X11/xorg.conf:

Section "InputDevice"
        ...
        Option "TapButton1" "integer"
        Option "TapButton2" "integer"
        Option "TapButton3" "integer"
        ...
EndSection

The integer of option "TapButton1" means which mouse button is reported on a non-corner one-finger tap. Usually it is 1. The integer of option "TapButton2" means which mouse button is reported on a non-corner two-finger tap. Usually it is 2. The integer of option "TapButton3" means which mouse button is reported on a non-corner three-finger tap. Usually it is 3.

Delay between a button tap and the actual click

If you experience a delay between the tap on the touchpad and the actual click that is registered you need to enable FastTaps:

If you're using input hotplugging(default behavior), change your 11-x11-synaptics.fdi(or 99-x11-synaptics.fdi, in some cases) so that it contains:

<merge key="input.x11_options.FastTaps" type="string">1</merge>

If you're using xorg-server with disabled input hotplugging change xorg.conf so that you have:

Section "InputDevice"
     Identifier "Synaptics Touchpad"
     Driver "synaptics"
     ...
     Option "FastTaps" "1"
     ...
     EndSection

SynPS/2 Synaptics TouchPad can't grab event device, errno=16

If you are using Xorg 7.4, you may get a warning like this from /var/log/Xorg.0.log, thais is because the driver will grab the event device for exclusive use when using the Linux 2.6 event protocol. When it fails, X will return this error message.

Grabbing the event device means that no other user space or kernel space program sees the touchpad events. This is desirable if the X config file includes /dev/input/mice as an input device, but is undesirable if you want to monitor the device from user space.

If you want to control it, add or modify the "GrabEventDevice" option in you touchpad section in xorg.conf:

...
Option "GrabEventDevice" "boolean"
...

This will come into effect when X is restarted, though you can also change it by using synclient. When changing this parameter with the synclient program, the change will not take effect until the Synaptics driver is disabled and re-enabled. This can be achieved by switching to a text console and then switching back to X.

External Resources

Synaptics TouchPad driver: [6]