Difference between revisions of "Touchpad Synaptics"

From ArchWiki
Jump to: navigation, search
(GNOME: Updated documentation for Gnome 3 because it stumped me before I Googled it.)
Line 1: Line 1:
 
{{i18n|Touchpad Synaptics}}
 
{{i18n|Touchpad Synaptics}}
 
[[de:Synaptics Touchpad Treiber]]
 
[[de:Synaptics Touchpad Treiber]]
 +
[[fr:Synaptics Touchpad]]
 
[[Category:Input devices (English)]][[Category:HOWTOs (English)]]
 
[[Category:Input devices (English)]][[Category:HOWTOs (English)]]
 
This article details the installation and configuration process of the '''''Synaptics input driver''''' for Synaptics (and ALPS) touchpads found on most notebooks.
 
This article details the installation and configuration process of the '''''Synaptics input driver''''' for Synaptics (and ALPS) touchpads found on most notebooks.

Revision as of 11:39, 15 April 2011

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

The primary method of configuration for the touchpad is through an xorg server configuration file. After installation of xf86-input-synaptics, a default configuration file is located at /etc/X11/xorg.conf.d/10-synaptics.conf.

Section "InputClass"
       Identifier "touchpad catchall"
       Driver "synaptics"
       MatchIsTouchpad "on"
             Option "TapButton1" "1"
             Option "TapButton2" "2"
             Option "TapButton3" "3"
EndSection

Users can edit this file to configure the various driver options available, for a complete list of all available options users should refer to the synaptics manual page.

Available options

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. Before you proceed to learn about the various configuration methods documented below: read the manpage so that you are aware of the available options.

man synaptics

Frequently used options

The following lists options that many users may wish to configure. Note that all these options can simply be added to the main configuration file in /etc/X11/xorg.conf.d/10-synaptics.conf, as shown in this example configuration file where we have enabled vertical, horizontal and circular scrolling:

Section "InputClass"
      Identifier "touchpad"
      Driver "synaptics"
      MatchIsTouchpad "on"
             Option "TapButton1" "1"
             Option "TapButton2" "2"
             Option "TapButton3" "3"
             Option "VertEdgeScroll" "on"
             Option "VertTwoFingerScroll" "on"
             Option "HorizEdgeScroll" "on"
             Option "HorizTwoFingerScroll" "on"
             Option "CircularScrolling" "on"
             Option "CircScrollTrigger" "2"
             Option "EmulateTwoFingerMinZ" "0"
             ...
EndSection
  • TapButton1: (integer) configures which mouse-button is reported on a non-corner, one finger tap.
  • TapButton2: (integer) configures which mouse-button is reported on a non-corner, two finger tap
  • TapButton3: (integer) configures which mouse-button is reported on a non-corner, three finger tap
  • RBCornerButton: (integer) configures which mouse-button is reported on a right bottom corner, one finger tap (use Option "RBCornerButton" "3" to achieve Ubuntu- style tap behaviour for right mouse button in lower right corner)
  • VertEdgeScroll: (boolean) enables vertical scrolling while dragging across the right edge of the touch pad.
  • HorizEdgeScroll: (boolean) enables horizontal scrolling while dragging across the right edge of the touch pad.

An example with a brief description of all options. As usual settings will vary between machines. It is recommended that you discover your own options using synclient.

Note: If you find that your hand frequently brushes your touchpad, causing the TapButton2 option to be triggered (which will more than likely paste from your clipboard), and you don't mind losing two-finger-tap functionality, set Template:Codeline to 0.

GNOME

Users of GNOME may have to edit its configuration as well, because in default it is set to disable tapping to click, horizontal scrolling and not to allow touchpad disabling while typing.

To change these settings in Gnome 2:

  1. Run gconf-editor
  2. Edit the keys in the /desktop/gnome/peripherals/touchpad/ folder.

To change these settings in Gnome 3:

  1. Open System Settings.
  2. Click Mouse and Touchpad.
  3. Change the settings on the Touchpad tab.

Configuration on the fly

Next to the traditional method of configuration, the Synaptics driver also supports on the fly configuration. This means that users can set certain options through a software application, these options are applied immediately without needing a restart of X. There are four ways to do on the fly configuration:

  • GPointingDeviceSettings (recommended)
  • GSynaptics
  • synclient
  • xinput (recommended) [TODO]

xinput

Use `xinput list` to find your device name.

Use `xinput list-props "SynPS/2 Synaptics TouchPad"` to list props.

Read the xinput and synaptics manuals and such.

GPointingDeviceSettings

GPointingDeviceSettings provides graphical on the fly configuration for several pointing devices connected to the system, including your synaptics touch pad. This application replaces GSynaptics as the preferred tool for graphical touchpad configuration through the synaptics driver. GPointingDeviceSettings is available through the AUR. If this is your first time using the AUR, please refer here.

GPointingDeviceSettings requires xf86-input-synaptics and libsynaptics to be installed for use with synaptics touch pads. These are available in the [extra] and [community] repositories, respectively. Both are installable through pacman.

$ sudo pacman -S xf86-input-synaptics libsynaptics

GSynaptics (deprecated but functional)

Note: Though the GSynaptics website mentions that its development has stopped and it will eventually be outdated, the application functions perfectly with xorg 1.8. Users are suggested to use GPointingDeviceSettings instead, GSynaptics should only be used as a last resort.
Note:
Template error: are you trying to use the = sign? Visit Help:Template#Escape template-breaking characters for workarounds.

On the fly configuration can also be done graphically through GSynaptics, a GTK application available in the [community] repository. GSynaptics allows the user to configure options such as horizontal, vertical and circular scrolling as well as the option to enable or disable the touchpad. GSynaptics requires that the SHMConfig option is enabled.

$ sudo pacman -S gsynaptics
Section "InputClass"
     Identifier "touchpad catchall"
     Driver "synaptics"
     MatchIsTouchpad "on"
     MatchDevicePath "/dev/input/event*"
           Option "TapButton1" "1"
           Option "TapButton2" "2"
           Option "TapButton3" "3"
           Option "SHMConfig"  "true"
EndSection

fine-tuning with synclient

Synclient is a command line utility to configure and query Synaptics driver settings.

Template:Box Note

The synclient monitor can display pressure and placement on the touchpad in real-time, allowing further refinement of the default Synaptics settings.

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. 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 conf file (/etc/X11/xorg.conf.d/10-synaptics.conf) to make them so.

ALPS Touchpads

Warning: TODO needs to be rewritten for udev

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

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.d/10-synaptics.conf:

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

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 as that may be better solution, a matter of choice. The advantage here is you have the control, while the other solution has a daemon 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

The touchpad isn't working, Xorg.0.log shows "Query no Synaptics: 6003C8"

Due to the way synaptics is currently set-up, 2 instances of the synaptics module are loaded. We can recognize this situation by opening the xorg log file (/var/log/Xorg.0.log) and noticing this:

[ 9304.803] (**) SynPS/2 Synaptics TouchPad: Applying InputClass "evdev touchpad catchall"
[ 9304.803] (**) SynPS/2 Synaptics TouchPad: Applying InputClass "touchpad catchall"

Notice how 2 differently named instances of the module are being loaded. In some cases, this causes the touchpad to become nonfunctional.

we can prevent this double loading by editing our /etc/X11/xorg.conf.d/10-synaptics.conf file. We should add MatchDevicePath "/dev/input/event*"

Section "InputClass"
      Identifier "touchpad catchall"
      Driver "synaptics"
      MatchIsTouchpad "on"
      MatchDevicePath "/dev/input/event*"
            Option "TapButton1" "1"
            Option "TapButton2" "2"
            Option "TapButton3" "3"
EndSection 

Restart X and check xorg logs again, the error should be gone and the touchpad should be functional.

related bugreport:

related forum topics:

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.

Non-functional Synaptics Special Abilities (multi-tap, scrolling, etc.)

In some cases Synaptics touchpads only work partially. Features like two-finger scrolling or two-finger middle-click do not work even if properly enabled. This is probably related to the The touchpad isn't working problem mentioned above. Fix is the same, prevent double module loading.

Disable touchpad upon external mouse detection

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

ACTION=="add", SUBSYSTEM=="input", KERNEL=="mouse[1-9]", ENV{DISPLAY}=":0.0", 
ENV{XAUTHORITY}="/home/USERNAME/.Xauthority", ENV{ID_CLASS}="mouse", RUN+="/usr/bin/synclient TouchpadOff=1"
ACTION=="remove", SUBSYSTEM=="input", KERNEL=="mouse[1-9]", ENV{DISPLAY}=":0.0", 
ENV{XAUTHORITY}="/home/USERNAME/.Xauthority", ENV{ID_CLASS}="mouse", RUN+="/usr/bin/synclient TouchpadOff=0"

GDM stores Xauthority files in /var/run/gdm in randomly-name directory. So udev rules will look like this

ACTION=="add", KERNEL=="mouse[0-9]", SUBSYSTEM=="input", PROGRAM="/usr/bin/find /var/run/gdm -name *username*",
ENV{DISPLAY}=":0.0", ENV{XAUTHORITY}="$result/database", RUN+="/usr/bin/synclient TouchpadOff=1"
ACTION=="remove", KERNEL=="mouse[0-9]", SUBSYSTEM=="input", PROGRAM="/usr/bin/find /var/run/gdm -name *username*",
ENV{DISPLAY}=":0.0", ENV{XAUTHORITY}="$result/database", RUN+="/usr/bin/synclient TouchpadOff=0"

Note that udev rules must be a single line each, so format accordingly.

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.

Warning: TODO explain how to apply this in 10-synaptics.conf

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 Template:Filename.

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 -t -k -i 2 -d &
-i 2
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.
-t
tells the daemon not to disable mouse movement when typing and only disable tapping and scrolling.
-k
tells the daemon to ignore modifier keys when monitoring keyboard activity (ie: allows ctrl+left click).
-d
starts as a daemon, in the background.

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 -t -k -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 -t -k -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. Select "Opera Standard" mouse setup and click "Edit". In "Application" section:

  • assign key "Button 6" to command "Scroll left"
  • assign key "Button 7" to command "Scroll right"

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[1] 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[2] .

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

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

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:

To do so, you should add Option "FastTaps" "1" to /etc/X11/xorg.conf.d/10-synaptics.conf so that you have:

Section "InputClass"
     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 /etc/X11/xorg.conf.d/10-synaptics.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.

Synaptics Loses Multitouch Detection After Rebooting From Windows

Many drivers include a firmware that is loaded into flash memory when the computer boots. This firmware is not necessarily cleared upon shutdown, and is not always compatible with Linux drivers. The only way to clear the flash memory is to shutdown completely rather than using reboot. It's generally considered best practice to never use reboot when switching between operating systems.

External Resources

Synaptics TouchPad driver: [4]