Difference between revisions of "Touchpad Synaptics (简体中文)"

From ArchWiki
Jump to: navigation, search
Line 339: Line 339:
  ACTION=="add", SUBSYSTEM=="input", KERNEL=="mouse[1-9]", ENV{DISPLAY}=":0.0",
  ACTION=="add", SUBSYSTEM=="input", KERNEL=="mouse[0-9]", ENV{DISPLAY}=":0.0",
  ENV{XAUTHORITY}="/home/USERNAME/.Xauthority", ENV{ID_CLASS}="mouse", RUN+="/usr/bin/synclient TouchpadOff=1"
  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",
  ACTION=="remove", SUBSYSTEM=="input", KERNEL=="mouse[0-9]", ENV{DISPLAY}=":0.0",
  ENV{XAUTHORITY}="/home/USERNAME/.Xauthority", ENV{ID_CLASS}="mouse", RUN+="/usr/bin/synclient TouchpadOff=0"
  ENV{XAUTHORITY}="/home/USERNAME/.Xauthority", ENV{ID_CLASS}="mouse", RUN+="/usr/bin/synclient TouchpadOff=0"

Revision as of 14:26, 27 October 2013

Template:Article summary start Template:Article summary text Template:Article summary heading Template:Article summary wiki Template:Article summary end


附注: please use the first argument of the template to provide more detailed indications.

本文描述了 Synaptics 输入驱动 的安装和配置过程,适用于大多数笔记本电脑上的Synaptics(或ALPS)触摸板


Synaptics 驱动当前被打包为xf86-input-synaptics,可以从官方软件仓库安装


配置的主要方法是通过修改 xorg Server 配置文件来完成配置。在安装了 xf86-input-synaptics 之后,一个默认的配置文件位于 /etc/X11/xorg.conf.d/10-synaptics.conf

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:

$ 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" "40"
              Option "EmulateTwoFingerMinW" "8"
(integer) configures which mouse-button is reported on a non-corner, one finger tap.
(integer) configures which mouse-button is reported on a non-corner, two finger tap
(integer) configures which mouse-button is reported on a non-corner, three finger tap
(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)
(integer) as above, but for top right corner, one finger tap.
(boolean) enables vertical scrolling while dragging across the right edge of the touch pad.
(boolean) enables horizontal scrolling while dragging across the bottom edge of the touch pad.
(boolean) enables vertical scrolling using two fingers.
(boolean) enables horizontal scrolling using two fingers.
(integer) play with this value to set the precision of two finger scroll.

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 do not mind losing two-finger-tap functionality, set TapButton2 to 0.


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.

Gnome settings daemon may override existing settings (for example ones set in xorg.conf.d) for which there is no equivalent in any of the graphical configuration utilities. It is possible to stop gnome from touching mouse settings at all:

  1. Run dconf-editor
  2. Edit /org/gnome/settings-daemon/plugins/mouse/
  3. Uncheck the active setting

It will now respect your system's existing synaptics configuration.

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. This is useful to test configuration options before you include them in the configuration file. On-the-fly configuration is non-permanent and will not remain active though a reboot, suspend / resume or restart of udev. This should only be used to test, fine-tune or script configuration features.

In order for many of this tools to work you need to have the SHMConfig Option in your 10-synaptic.conf

Option "SHMConfig" "on" # or Option "SHMConfig"  "true"

Console tools

  • Recommended: Synclient — command line utility to configure and query Synaptics driver settings on a live system, the tool is developed by the synaptics driver maintainers and is provided with the synaptics driver
http://xorg.freedesktop.org/ || xf86-input-synaptics
  • xinput — small general-purpose CLI tool to configure devices
http://xorg.freedesktop.org/ || xorg-xinput

Graphical tools

  • GPointing Device Settings — 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
http://live.gnome.org/GPointingDeviceSettings || gpointing-device-settingsAUR
Note: For GPointingDeviceSettings to work with Synaptics touchpads both xf86-input-synaptics and libsynaptics have to be installed!
  • Deprecated! 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. The GSynaptics website mentions that its development has stopped and that it will eventually be outdated, the application functions perfectly with xorg 1.11, through users looking for a graphical tools are suggested to use GPointingDeviceSettings instead, GSynaptics should only be used as a last resort
http://gsynaptics.sourceforge.jp/ || gsynaptics



Depending on your model, synaptic touchpads may or may not these features:

  • left, middle or right hardware buttons
  • two finger detection
  • three finger detection
  • configurable resolution

Use xinput list to find your device name.

First, find the name of your touchpad:

$ xinput -list

You can now use xinput to find your touchpad's capabilities:

$ xinput list-props "SynPS/2 Synaptics TouchPad" | grep Capabilities

      Synaptics Capabillities (309):  1, 0, 1, 0, 0, 1, 1

From left to right, this shows:

  • (1) device has a physical left button
  • (0) device does not have a physical middle button
  • (1) device has a physical right button
  • (0) device does not support two-finger detection
  • (0) device does not support three-finger detection
  • (1) device can configure vertical resolution
  • (1) device can configure horizontal resolution

Use xinput list-props "SynPS/2 Synaptics TouchPad" to list the device properties.

Read the xinput and synaptics manuals and such.


Synaptics driver提供了有许多有用的参数供您调节,如果需要更多细节,请参考 $ man synaptics 下面命令列出了一个完整的用户设置的清单:

$ synclient -l

Every listed configuration option can be controlled through synclient, for example:

$ synclient PalmDetect=1 (to enable palm detection)
$ synclient TapButton1=1 (configure button events)
$ synclient TouchpadOff=1 (disable the touchpad)

After you have successfully tried and tested your options through synclient, you can make these changes permanent by adding them to /etc/X11/xorg.conf.d/10-synaptics.conf.



$ synclient -m 100




+监视项+ +描述+
time 从开始记录起到当前经过的时间,单位是秒。
x, y 手指放在触摸板上的x/y坐标,原点是左上角。
z 手指放在触摸板上的压力。
f 放在触摸板上的手指数。
w 手指的宽度。
l,r,u,d,m,multi 这些值代表了左,右,上,下,中,多功能这6个按键的状态,0代表没有被按下,1代表被按下。
gl,gm,gr 对于有guest device的触摸板,这些值代表了guest device上按键的状态。
gdx, gdy guest device的x/y坐标。



$ synclient MinSpeed=0.5

这样做出的改变不是永久的。如果您对这些更改满意并希望它们一直保留,就需要把他们放到 /etc/X11/xorg.conf.d/10-synaptics.conf 中。




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


0    所有边缘
1    顶部边缘
2    右上角
3    右边缘
4    右下角
5    底部边缘
6    左下角
7    左边缘
8    左上角

设置非0值对于同时使用水平/垂直滚动和环状滚动的用户是非常有用的。If you do so, the type of scrolling is determined by the edge you start from.






 synclient TouchpadOff=$(synclient -l | grep -c 'TouchpadOff.*=.*0')

最后绑定一个按键来运行这段脚本,如果采用xbindkeys(文件 ~/.xbindkeysrc)那么配置如下:

     m:0x5 + c:65
     Control+Shift + space

现在只需重启 xbindkeysCtrl+Shift+Space 已经能够启用/禁用您的触摸板了吧!

当然您可以使用其它按键绑定软件,比如 Xfce4 或 GNOME 提供的。


ALPS 触摸板

Tango-view-fullscreen.pngThis article or section needs expansion.Tango-view-fullscreen.png

Reason: please use the first argument of the template to provide a brief explanation. (Discuss in Talk:Touchpad Synaptics (简体中文)#)
Template:Box YELLOW


 Section "ServerLayout"
   InputDevice    "USB Mouse" "CorePointer"
   InputDevice    "Touchpad"  "SendCoreEvents"
 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"

The touchpad is not 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 adding MatchDevicePath "/dev/input/event*" to our /etc/X11/xorg.conf.d/10-synaptics.conf file:

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

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

related bugreport: FS#20830

related forum topics:

Touchpad detected as "PS/2 Generic Mouse" or "Logitech PS/2 mouse"

This is caused by a kernel bug. Wrongly detected touchpads cannot be configured with the Synaptic input driver. To fix this, simply install the AUR package psmouse-elantechAUR.

Among the affected notebooks are the following models:

  • Acer Aspire 7750G
  • Dell Latitude e6520 (ALPS touchpad)
  • Samsung NC110/NF210/QX310/QX410/QX510/SF310/SF410/SF510/RF410/RF510/RF710/RV515

You can check whether your touchpad is correctly detected by running:

$ xinput list

More information can be found in this thread.

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 is not working problem mentioned above. Fix is the same, prevent double module loading.

If preventing the module from loading twice does not solve your issue, try commenting out the toggle "MatchIsTouchpad" (which is now included by default in the synaptics config).



 ACTION=="add", SUBSYSTEM=="input", KERNEL=="mouse[0-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[0-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 a randomly-named 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: udev rules must be a single line each, so format accordingly.


Note: SHMConfig has been deprecated.



Another posibility is that you're experiencing IRQ losses related to the i8042 controller (this device handles the keyboard and the touchpad of many laptops), so you have two posibilities here:

1. rmmod && insmod the psmouse module. 2. append i8042.nomux=1 to the boot line and reboot your machine.

触摸板设备不在 /dev/input/*


$ cat /proc/bus/input/devices

找寻一个名字为"SynPS/2 Synaptics TouchPad"的输入设备。输出中的"Handlers"一节就是触摸板设备的正确位置。


$ cat /proc/bus/input/devices
 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

在这个例子中 Handlersmouse0event1,所以应该使用 /dev/input/mouse0 作为触摸板设备的位置。

Tango-view-fullscreen.pngThis article or section needs expansion.Tango-view-fullscreen.png

Reason: please use the first argument of the template to provide a brief explanation. (Discuss in Talk:Touchpad Synaptics (简体中文)#)
Template:Box YELLOW


Using automatic palm detection

First of all you should test if it works properly for your trackpad and if the settings are accurate:

$ synclient PalmDetect=1

Then test the typing. You can tweak the detection with:

$ synclient PalmMinWidth=

which is the width of the area your hand touches, and

$ synclient PalmMinZ=

which is the minimum Z distance at which the detection is performed.

Once you have found the correct settings, save them into /etc/X11/xorg.conf.d/10-synaptics.conf.

利用 .xinitrc

Note: You will need to have SHMConfig enabled in your /etc/X11/xorg.conf.d/10-synaptics.conf.

添加下面一行到您的 .xinitrc 中(如果您没有使用登录管理器):

$ syndaemon -t -k -i 2 -d &
-i 2参数
tells the daemon to ignore modifier keys when monitoring keyboard activity (e.g.: allows Ctrl+Left Click).
starts as a daemon, in the background.


$ man syndaemon



Note: You will need to have SHMConfig enabled in your /etc/X11/xorg.conf.d/10-synaptics.conf.



要启用syndaemon,您需要利用Gnome启动程序首选项程序(Gnome's Startup Applications Preferences program)。进入Gnome,到系统 > 首选项 > 启动程序。在启动程序标签页,单击“添加”按钮,根据您的喜好给这个启动项起一个名字,然后输入注释(或留空)。在“命令”栏中填入:

$ syndaemon -t -k -i 2 -d &

然后,单击“添加” button in the Add Startup Program dialogue。请确保刚才添加的程序旁边的复选框被选中 in the list of additional startup programs. Close the Startup Applications Preferences window and you are done.


系统设置 > 高级 > 自动启动,单击 添加程序,输入:

 syndaemon -t -k -i 2 -d &





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


middlemouse.contentLoadURL = false


就像上面提到的一样。 修复这个问题,你需要点击工具 -> 首选项 -> 高级 -> 快捷键。在这里选择 "Opera Standard" 鼠标属性点击“编辑”。在“应用程序”部分:

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


这些问题可能出现在多种型号的LG笔记本上。 症状包括:当按下鼠标键1时snaptics误认为同时有ScrollUP操作和一个鼠标键1按下;鼠标键2的情况类似.


Option "UpDownScrolling" "0"

注意这会让synaptics对其它键的响应出错。有一个Oskar Sandberg写的补丁[1] 能够解决这个问题。



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

$ cd synaptics-git
$ makepkg

Other external mouse issues


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

如果"Device"行不一样,改成如上的,并且重新启动X。如果没有解决,修改"Server Layout"设置,将touchpad设置成 CorePointer:

InputDevice    "Touchpad" "CorePointer"


InputDevice    "USB Mouse" "SendCoreEvents"


Option      "SendCoreEvents"    "true"




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


  • 如果您使用CPU频率调节,不要使用"ondemand"模式而是"performance"模式 ,因为触摸板可能会在cpu频率变化时失去同步。
  • 尝试不要使用ACPI电池监视器。
  • 尝试用"proto=imps"选项载入pmouse模块,添加下面一行到/etc/modprobe.d/modprobe.conf
options psmouse proto=imps
  • 尝试其它桌面环境。据某些用户报告,这个问题仅在使用Xfce,GNOME时才出现,不知道什么原因。

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"

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

如果你使用Xorg 7.4,查看Xorg日志(/var/log/Xorg.0.log)时候可能会发现有这么一条警告信息。这是因为当使用linux2.6事件协议,驱动默认会试图独占此设备。失败就会出现此条提示。也就是说其他无论是内核空间还是用户空间的程序都无法获取此设备上的信号。当你的xorg.conf里面还定义了一个/dev/misc输入设备时候,这点很有用。但是如果你想测试设备的信号,那么就很麻烦了。


Section "InputDevice"
       Option "GrabEventDevice" "boolean"



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 is generally considered best practice to never use reboot when switching between operating systems.

Buttonless TouchPads (aka ClickPads)

Some laptops have a special kind of touchpad which has the mouse buttons as part of the tracking plate, instead of being external buttons. HP series 4500 Probooks and X220 and X1 Thinkpads have this kind of a touchpad. Both of the mouse buttons are detected as one, resulting in the second mouse button being unusable and click + drag will not work. To enable the second mouse button you need to install a patched version of the synaptics driver. Install xf86-input-synaptics-clickpadAUR from the AUR.

Touchpad detected as mouse (elantech touchpads)

This can happend on some laptops with elantech touchpad, for example ASUS x53s. In this situation you need psmouse-elantechAUR package from AUR.