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

From ArchWiki
Jump to: navigation, search
(flagged broken section links)
(Tag: wiki-scripts)
 
(66 intermediate revisions by 7 users not shown)
Line 1: Line 1:
[[Category:简体中文]]
 
 
[[Category:Input devices (简体中文)]]
 
[[Category:Input devices (简体中文)]]
 
[[de:Synaptics Touchpad Treiber]]
 
[[de:Synaptics Touchpad Treiber]]
Line 6: Line 5:
 
[[fr:Touchpad Synaptics]]
 
[[fr:Touchpad Synaptics]]
 
[[it:Touchpad Synaptics]]
 
[[it:Touchpad Synaptics]]
 +
[[ja:Touchpad Synaptics]]
 
[[ru:Touchpad Synaptics]]
 
[[ru:Touchpad Synaptics]]
{{Article summary start|摘要}}
+
{{TranslationStatus (简体中文)|Touchpad_Synaptics|2016-08-01|443547}}
{{Article summary text|本文描述了Arch Linux 中 Synaptics 输入驱动的安装和配置过程.}}
+
{{Related articles start (简体中文)}}
{{Article summary heading|相关页面}}
+
{{Related2|Xorg (简体中文)|Xorg}}
{{Article summary wiki|Xorg (简体中文)}}
+
{{Related articles end}}
{{Article summary end}}
+
{{Translateme (简体中文)}}
+
 
本文描述了 '''''Synaptics 输入驱动''''' 的安装和配置过程,适用于大多数笔记本电脑上的Synaptics(或ALPS)触摸板
 
本文描述了 '''''Synaptics 输入驱动''''' 的安装和配置过程,适用于大多数笔记本电脑上的Synaptics(或ALPS)触摸板
 +
 +
[[libinput]] 是另外的触摸板驱动选项,这个库使用不同的设备检测和多指触控支持。uch features.如果要通过 GNOME 控制中心配置触摸板,需要使用 [[libinput]] 驱动[https://bugzilla.gnome.org/show_bug.cgi?id=764257#c12]。
  
 
==安装==
 
==安装==
Synaptics 驱动当前被打包为{{pkg|xf86-input-synaptics}},可以从[[官方软件仓库]]中[[安装]]
+
[[安装]] 软件包 {{pkg|xf86-input-synaptics}}。
  
 
==配置==
 
==配置==
配置的主要方法是通过修改 [[xorg]] Server 配置文件来完成配置。在安装了 {{ic|xf86-input-synaptics}} 之后,一个默认的配置文件位于 {{ic|/etc/X11/xorg.conf.d/10-synaptics.conf}}。
+
配置的主要方法是通过修改 [[xorg]] Server 配置文件来完成配置。在安装了 {{ic|xf86-input-synaptics}} 之后,一个默认的配置文件位于 {{ic|/usr/share/X11/xorg.conf.d/70-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:
+
用户可以将此文件复制到 {{ic|/etc/X11/xorg.conf.d/}}然后编辑配置,完整的选项列表请参考synaptics的 {{ic|synaptics(4)}} 手册页。
  
{{bc|$ 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 {{ic|/etc/X11/xorg.conf.d/10-synaptics.conf}}, as shown in this example configuration file where we have enabled vertical, horizontal and circular scrolling:
+
{{hc|/etc/X11/xorg.conf.d/70-synaptics.conf|<nowiki>
{{hc|/etc/X11/xorg.conf.d/10-synaptics.conf|<nowiki>
+
 
  Section "InputClass"
 
  Section "InputClass"
 
       Identifier "touchpad"
 
       Identifier "touchpad"
Line 33: Line 32:
 
       MatchIsTouchpad "on"
 
       MatchIsTouchpad "on"
 
               Option "TapButton1" "1"
 
               Option "TapButton1" "1"
               Option "TapButton2" "2"
+
               Option "TapButton2" "3"
               Option "TapButton3" "3"
+
               Option "TapButton3" "2"
 
               Option "VertEdgeScroll" "on"
 
               Option "VertEdgeScroll" "on"
 
               Option "VertTwoFingerScroll" "on"
 
               Option "VertTwoFingerScroll" "on"
Line 43: Line 42:
 
               Option "EmulateTwoFingerMinZ" "40"
 
               Option "EmulateTwoFingerMinZ" "40"
 
               Option "EmulateTwoFingerMinW" "8"
 
               Option "EmulateTwoFingerMinW" "8"
 +
              Option "FingerLow" "30"
 +
              Option "FingerHigh" "50"
 +
              Option "MaxTapTime" "125"
 
               ...
 
               ...
 
  EndSection
 
  EndSection
 
</nowiki>}}
 
</nowiki>}}
  
; '''TapButton1''': (integer) configures which mouse-button is reported on a non-corner, one finger tap.
+
; '''TapButton1''': (integer) 配置 “当用一根手指在非角落区域触击时,哪个鼠标键点击事件被上报”
; '''TapButton2''': (integer) configures which mouse-button is reported on a non-corner, two finger tap
+
; '''TapButton2''': (integer) 配置 “当用两根手指在非角落区域触击时,哪个鼠标键点击事件被上报”
; '''TapButton3''': (integer) configures which mouse-button is reported on a non-corner, three finger tap
+
; '''TapButton3''': (integer) 配置 “当用三根手指在非角落区域触击时,哪个鼠标键点击事件被上报”
; '''RBCornerButton''': (integer) configures which mouse-button is reported on a right bottom corner, one finger tap (use {{ic|Option "RBCornerButton" "3"}} to achieve Ubuntu style tap behaviour for right mouse button in lower right corner)
+
; '''RBCornerButton''': (integer) 配置 “当在右下角单指触及时,哪个鼠标键点击事件被上报"(使用{{ic|Option "RBCornerButton" "3"}}来完成Ubuntu式的右键点击设定(右下角轻触代表点击右键))
; '''RTCornerButton''': (integer) as above, but for top right corner, one finger tap.
+
; '''RTCornerButton''': (integer) 对右上角轻触进行配置,和RBCornerButton类似
; '''VertEdgeScroll''': (boolean) enables vertical scrolling while dragging across the right edge of the touch pad.
+
; '''VertEdgeScroll''': (boolean) 在触摸板的由边缘滑动时,启用垂直滚动
; '''HorizEdgeScroll''': (boolean) enables horizontal scrolling while dragging across the bottom edge of the touch pad.
+
; '''HorizEdgeScroll''': (boolean) 在触摸板的下边缘滑动时,启用水平滚动
; '''VertTwoFingerScroll''': (boolean) enables vertical scrolling using two fingers.
+
; '''VertTwoFingerScroll''': (boolean) 启用双指垂直滚动
; '''HorizTwoFingerScroll''': (boolean) enables horizontal scrolling using two fingers.
+
; '''HorizTwoFingerScroll''': (boolean) 启用双指水平滚动
; '''EmulateTwoFingerMinZ/W''': (integer) play with this value to set the precision of two finger scroll.
+
; '''EmulateTwoFingerMinZ/W''': (integer) 使用这两个参数来对双指滚动的精度进行调教
 +
; '''FingerLow''': (integer) 手指压力低于此数值时视为手指移开。
 +
; '''FingerHigh''': (integer) 手指压力高于此数值时视为手指按压.
 +
; '''MaxTapTime''': Determines how "crisp" a tap must be to be considered a real tap.  Decrease the value to require a more crisp tap.  Properly adjusting this parameter can reduce false positives when the hands hover over or lightly touch the pad.
 +
; '''VertScrollDelta''' and '''HorizScrollDelta''': (integer) configures the speed of scrolling, it is a bit counter-intuitive because higher values produce greater precision and thus slower scrolling. Negative values cause natural scrolling like in OS X.
  
[[Touchpad_Synaptics/10-synaptics.conf_example|An example]] with a brief description of all optionsAs usual settings will vary between machinesIt is recommended that you discover your own options using [[Touchpad_Synaptics#Fine-tuning_with_synclient|synclient]].
+
这个[[Touchpad_Synaptics/10-synaptics.conf_example|例子]]包含了所有选项的简短介绍因为不同计算机的配置一般也不同我们推荐使用 [[Touchpad_Synaptics#Fine-tuning_with_synclient|synclient]]{{Broken section link}}来对你的计算机进行针对性调教
  
{{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 {{ic|TapButton2}} to 0.}}
+
如果你经常因为手掌扫过触摸板而导致TabButton2属性被触发(大多数时候都是"粘贴”动作),而你又不介意关闭掉双指触击功能,请将{{ic|TapButton2}}设置为0.
  
=== GNOME ===
+
Recent versions include a "Coasting" feature, enabled by default, which may have the undesired effect of continuing almost any scrolling until the next tap or click, even if you are no longer touching the touchpad. This means that to scroll just a bit, you need to scroll (by using the edge, or a multitouch option) and then almost immediately tap the touchpad, otherwise scrolling will continue forever. If wish to avoid this, set {{ic|CoastingSpeed}} 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''':
+
如果触摸板太敏感,可以使用更高的 {{ic|FingerLow}} {{ic|FingerHigh}} 值,{{ic|FingerLow}} 应该比 {{ic|FingerHigh}} 小。
# Run {{ic|gconf-editor}}
+
# Edit the keys in the {{ic|/desktop/gnome/peripherals/touchpad/}} folder.
+
  
To change these settings in '''Gnome 3''':
+
=== 实时配置 ===
# Open ''System Settings''.
+
 
 +
除了提供传统的配置方法,Synaptics驱动现在还支持实时配置。这意味着用户能通过软件来进行实时设置而不需要重启X服务器。在你将配置项添加到主配置文件之前,这个特性可以帮助你进行测试。
 +
{{Warning|实时配置是非永久的,当重启,挂起/恢复,或者重启udev后就会失效。所以这个功能只适合用来对配置进行测试和精校。}}
 +
 
 +
==== 命令行工具 ====
 +
 
 +
{{App|[[Touchpad_Synaptics#Synclient|Synclient]]|cSynclient是一个可以对Synaptics驱动进行查询并进行配置的命令行工具,这个工具是由synaptics维护者开发并和synaptics驱动一起提供给用户|http://xorg.freedesktop.org/|{{Pkg|xf86-input-synaptics}}}}
 +
 
 +
{{App|[[Touchpad_Synaptics#xinput|xinput]]{{Broken section link}}|调试设备的小型通用命令行程序|http://xorg.freedesktop.org/|{{Pkg|xorg-xinput}}}}
 +
 
 +
==== 图形化工具 ====
 +
 
 +
* {{App|GPointing Device Settings|提供对当前系统上的指针设备进行实时配置的图形界面(包括Synaptics触摸板),这个应用替代GSynaptics成为了对Synaptics驱动进行图形化配置的优先程序.|http://live.gnome.org/GPointingDeviceSettings|{{Pkg|gpointing-device-settings}}}}
 +
{{Note|需要安装 {{Pkg|xf86-input-synaptics}} 和 {{Pkg|libsynaptics}} , GPointingDeviceSettings工具才能在Synaptics触摸板上运行!}}
 +
 
 +
* {{App|kcm-touchpad|在[[KDE]]的一个新的触摸板配置工具,提供了一个在“系统设置”中的模块。在2014年2月发布,工作于KDE SC 4.12+。这将被作为一个 {{AUR|synaptiks}}{{Broken package link|{{aur-mirror|synaptiks}}}} 和 {{AUR|kcm_touchpad}}{{Broken package link|{{aur-mirror|kcm_touchpad}}}} 的替代品。|https://projects.kde.org/projects/kde/workspace/kcm-touchpad/repository|{{Pkg|kcm-touchpad}}{{Broken package link|{{aur-mirror|kcm-touchpad}}}}}}
 +
 
 +
=== 其他选项 ===
 +
 
 +
; '''VertScrollDelta''' and '''HorizScrollDelta''': (integer)配置滚动速度, 对它们的配置比较直观,因为值越高滚动精度就越高而速度越低.设置成负值就能实现类似OS X系统的"自然滚动"
 +
 
 +
; SHMConfig: (boolean) 是否开启共享内存以支持实时调试. 现在这个选项已经无效,并且它也只能提供针对事件的实时调试
 +
 
 +
=== Xfce4/Cinnamon ===
 +
 
 +
当在'''XFCE 4'''下想要修改这些设定时:
 +
# 打开 ''System Settings''.
 +
# 点击 ''Mouse and Touchpad''.
 +
# 在 ''Touchpad'' 选项卡里对这些配置进行更改.
 +
 
 +
To change these settings in '''Cinnamon''':
 +
 +
# Open ''Cinnamon System Settings''.
 
# Click ''Mouse and Touchpad''.
 
# Click ''Mouse and Touchpad''.
 
# Change the settings on the ''Touchpad'' tab.
 
# Change the settings on the ''Touchpad'' tab.
  
Gnome settings daemon may override existing settings (for example ones set in {{ic|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:
+
=== MATE ===
# Run {{ic|dconf-editor}}
+
# Edit {{ic|/org/gnome/settings-daemon/plugins/mouse/}}
+
# Uncheck the '''active''' setting
+
It will now respect your system's existing synaptics configuration.
+
  
=== Configuration on the fly ===
+
在MATE上,可以通过下面方法配置触摸板:
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 {{ic|SHMConfig Option}} in your '''10-synaptic.conf'''
+
{{hc|/etc/X11/xorg.conf.d/10-synaptics.conf|
+
+
Option "SHMConfig" "on" # or Option "SHMConfig"  "true"
+
+
}}
+
  
==== Console tools ====
+
# 运行 {{ic|dconf-editor}}
* '''Recommended''': {{App|[[Touchpad_Synaptics#Synclient|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/|{{Pkg|xf86-input-synaptics}}}}
+
# 编辑 {{ic|org.mate.peripherals-touchpad}} 文件夹里面的键
* {{App|[[Touchpad_Synaptics#xinput|xinput]]|small general-purpose CLI tool to configure devices|http://xorg.freedesktop.org/|{{Pkg|xorg-xinput}}}}
+
  
==== Graphical tools ====
+
可以通过下面的方法来阻止Mate配置守护程序改写当前配置:
* {{App|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|{{AUR|gpointing-device-settings}}}}
+
# 运行 {{ic|dconf-editor}
:{{Note|For GPointingDeviceSettings to work with Synaptics touchpads both {{Pkg|xf86-input-synaptics}} and {{Pkg|libsynaptics}} have to be installed!}}
+
# 编辑 {{ic|org.mate.SettingsDaemon.plugins.mouse}}
* '''Deprecated!''' {{App|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 [http://gsynaptics.sourceforge.jp/ 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/|{{Pkg|gsynaptics}}}}
+
# 取消'''active'''勾选 .
  
 
==高级配置==
 
==高级配置==
=== xinput ===
+
=== 使用xinput来检测您的触摸板有什么功能 ===
Depending on your model, synaptic touchpads may or may not these features:
+
根据型号不同,Synaptics可能有以下特性:
* left, middle or right hardware buttons
+
* 拥有物理左键,物理中键,物理右键
* two finger detection
+
* 能够进行两指检测
* three finger detection
+
* 能够进行三指检测
* configurable resolution
+
* 能够配置分辨率
  
Use {{ic|xinput list}} to find your device name.
+
使用 {{ic|xinput list}}来找到您的synaptics设备名
  
First, find the name of your touchpad:
+
首先,找到触摸板的名字
 
{{bc|$ xinput -list}}
 
{{bc|$ xinput -list}}
  
You can now use {{ic|xinput}} to find your touchpad's capabilities:
+
然后,您可以使用{{ic|xipunt}}来查看您的触摸板有什么特性
 
  $ xinput list-props "SynPS/2 Synaptics TouchPad" | grep Capabilities
 
  $ xinput list-props "SynPS/2 Synaptics TouchPad" | grep Capabilities
 
   
 
   
 
       Synaptics Capabillities (309):  1, 0, 1, 0, 0, 1, 1
 
       Synaptics Capabillities (309):  1, 0, 1, 0, 0, 1, 1
  
From left to right, this shows:
+
从左到右,分别代表:
* (1) device has a physical left button
+
* (1) 设备有物理左键
* (0) device does not have a physical middle button
+
* (0) 设备有物理中键
* (1) device has a physical right button
+
* (1) 设备有物理右键
* (0) device does not support two-finger detection
+
* (0) 设备支持两指检测
* (0) device does not support three-finger detection
+
* (0) 设备支持三指检测
* (1) device can configure vertical resolution
+
* (1) 设备可以配置垂直分辨率
* (1) device can configure horizontal resolution
+
* (1) 设备可以配置水平分辨率
  
Use {{ic|xinput list-props "SynPS/2 Synaptics TouchPad"}} to list the device properties.
+
使用{{ic|xinput list-props "SynPS/2 Synaptics TouchPad"}} 来列出设备的所有属性
  
Read the xinput and synaptics manuals and such.
+
详情请阅读xinput和synaptics的帮助文档
  
 
=== Synclient ===
 
=== Synclient ===
  
Synaptics driver提供了有许多有用的参数供您调节,如果需要更多细节,请参考 {{ic|$ man synaptics}}
+
在synaptics manpage里面列出的所有参数都可以通过synclient进行配置.下面命令列出了一个完整的用户设置的清单:
下面命令列出了一个完整的用户设置的清单:
+
 
{{bc|$ synclient -l}}
 
{{bc|$ synclient -l}}
  
Every listed configuration option can be controlled through synclient, for example:
+
所有列出的参数都可以用synclient进行配置, 比如:
 
  $ synclient PalmDetect=1 (to enable palm detection)
 
  $ synclient PalmDetect=1 (to enable palm detection)
 
  $ synclient TapButton1=1 (configure button events)
 
  $ synclient TapButton1=1 (configure button events)
 
  $ synclient TouchpadOff=1 (disable the touchpad)
 
  $ 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 {{ic|/etc/X11/xorg.conf.d/10-synaptics.conf}}.  
+
使用synclient进行成功的设定和测试后,你可以将这些设定添加到{{ic|/etc/X11/xorg.conf.d/10-synaptics.conf}}
 +
{{Out of date |
 +
'''(1.71驱动里,已经取消了SHMConfig设定,随驱动一起发行的synclient工具也不再支持-m参数.所以,下面的描述已经过期.本文的英文版里面已经删除了使用synclient -m进行测试的这一节.考虑到兼容性,我保留了这一段描述)'''
  
 
synclient监视器可以实时地显示触摸板的触摸位置和压力,以提供比默认的Synaptics设置更精细的调整。您需要设置'''SHMConfig'''选项为'''on'''或'''true'''以确保synclient正常工作。
 
synclient监视器可以实时地显示触摸板的触摸位置和压力,以提供比默认的Synaptics设置更精细的调整。您需要设置'''SHMConfig'''选项为'''on'''或'''true'''以确保synclient正常工作。
Line 188: Line 211:
  
 
这样做出的改变不是永久的。如果您对这些更改满意并希望它们一直保留,就需要把他们放到 {{ic|/etc/X11/xorg.conf.d/10-synaptics.conf}} 中。
 
这样做出的改变不是永久的。如果您对这些更改满意并希望它们一直保留,就需要把他们放到 {{ic|/etc/X11/xorg.conf.d/10-synaptics.conf}} 中。
 +
}}
 +
 +
=== Evtest ===
 +
 +
[[evdev|evtest]]工具能够实时的显示触摸板上的压力和位置信息,允许对默认的Synaptics设定进行精校.可以通过如下方式启动evtest
 +
$ evtest /dev/input/event''X''
 +
 +
''X''代表触摸板的ID,可以通过查看{{ic|cat /proc/bus/input/devices}}的输出来获取它.
 +
evtest需要对设备进行排他访问,因此,evtest不能和X Server的实例共存.你可以通过杀死X Server进程或者在虚拟终端上运行evtest来解决这个问题(例如,通过{{ic|CTRL+ALT+2}}来切换到2号虚拟终端)
 +
 +
=== xev ===
 +
 +
工具 {{Pkg|xorg-xev}} 可以实时显示按压、点击、压力、位置和其它检测到的数据,可以更深入的优化 Synaptics 设置。xev 可以通过 "-event" 参数设置报告的事件。
  
 
===环状滚动===
 
===环状滚动===
  
Synaptics提供的环状滚动功能在操作上很像iPod的触摸控制面板。您可以在触摸板上画圈,来代替在边缘上垂直或水平地滑动。这可能会带来更快的滚动速度和精确度。
+
Synaptics提供和ipod触控方式类似的环状滚动功能。您可以在触摸板上画圈,来代替在边缘上垂直或水平地滑动。有些用户发现这样滚动的更快也更精确.
  
添加下面几行到{{ic|/etc/X11/xorg.conf.d/10-synaptics.conf}}中以启用环状滚动:
+
添加下面几行到{{ic|/etc/X11/xorg.conf.d/70-synaptics.conf}}中以启用环状滚动:
{{hc|/etc/X11/xorg.conf.d/10-synaptics.conf|<nowiki>
+
{{hc|/etc/X11/xorg.conf.d/70-synaptics.conf|<nowiki>
 
  Section "InputDevice"
 
  Section "InputDevice"
 
         ...
 
         ...
Line 203: Line 239:
 
</nowiki>}}
 
</nowiki>}}
  
选项'''CircScrollTrigger'''可以设置为下面的值之一,它能够决定环状滚动必须从哪个边缘开始:
+
选项'''CircScrollTrigger'''可以设置为下面的值之一,它能够决定环状滚动应该从哪个边缘开始:
 
  0    所有边缘
 
  0    所有边缘
 
  1    顶部边缘
 
  1    顶部边缘
Line 214: Line 250:
 
  8    左上角
 
  8    左上角
  
设置非0值对于同时使用水平/垂直滚动和环状滚动的用户是非常有用的。If you do so, the type of scrolling is determined by the edge you start from.
+
设置一个非0值对于同时使用水平/垂直滚动和环状滚动的用户非常有用.设定后,会根据你开始的边缘决定到底使用哪种滚动.
  
 
如果您想要快速滚动,请在触摸板中部画小圈,相反,如果您想要慢速地且更精确地滚动,请画大圈。
 
如果您想要快速滚动,请在触摸板中部画小圈,相反,如果您想要慢速地且更精确地滚动,请画大圈。
 +
 +
=== 自然滚动(触摸屏式滚动) ===
 +
 +
可以在synaptics上启用自然滚动(触摸屏那种滚动).只要将{{ic|VertScrollDelta}}和{{ic|HorizScrollDelta}}的值设定为负就行(翻转滚动方向):
 +
{{hc|/etc/X11/xorg.conf.d/70-synaptics.conf|<nowiki>
 +
Section "InputClass"
 +
    ...
 +
    Option      "VertScrollDelta"          "-111"
 +
    Option      "HorizScrollDelta"        "-111"
 +
    ...
 +
EndSection
 +
</nowiki>}}
  
 
===软开关===
 
===软开关===
  
您也许会发现设置一个能够禁用/启用触摸板的软开关会提供很大便利,尤其是在您打字的时候。请参阅[[#在探测到外置鼠标后禁用触摸板]],它也许是更优的方案。这里提供的办法的好处是您可以亲自控制启用/禁用,而前两种方案提供了守护程序来自动地决定合适启用或禁用触摸板。
+
有一个能启用禁用触摸板的软开关会方便许多,可以用 ''xinput'' 脚本绑定到键盘事件,详情参考 [[Extra keyboard keys in Xorg]]
  
您也许想要下载一个[[xbindkeys]],如果您当前没有一个用于绑定按键的软件。
+
{{hc|/usr/local/bin/touchpad_toggle.sh|2=<nowiki>
 +
#!/bin/bash
 +
 
 +
declare -i ID
 +
ID=`xinput list | grep -Eio '(touchpad|glidepoint)\s*id\=[0-9]{1,2}' | grep -Eo '[0-9]{1,2}'`
 +
declare -i STATE
 +
STATE=`xinput list-props $ID|grep 'Device Enabled'|awk '{print $4}'`
 +
if [ $STATE -eq 1 ]
 +
then
 +
    xinput disable $ID
 +
    # echo "Touchpad disabled."
 +
    # notify-send 'Touchpad' 'Disabled' -i /usr/share/icons/Adwaita/48x48/devices/input-touchpad.png
 +
else
 +
    xinput enable $ID
 +
    # echo "Touchpad enabled."
 +
    # notify-send 'Touchpad' 'Enabled' -i /usr/share/icons/Adwaita/48x48/devices/input-touchpad.png
 +
fi
 +
</nowiki>}}
 +
 
 +
{{Tip|使用 [[bumblebee]] 下的外置显示时,可以通过在命令中加入 {{ic|1=DISPLAY=:8}} 设置第二个 X Server.}}
 +
 
 +
此外可以使用 {{ic|synclient}} 切换 touchpad. 这个方式仅能禁用触摸事件,无法禁用物理按键的使用:
  
然后保存下面的脚本到{{ic|/sbin/trackpad-toggle.sh}}:
 
 
{{hc|/sbin/trackpad-toggle.sh|<nowiki>
 
{{hc|/sbin/trackpad-toggle.sh|<nowiki>
 
  #!/bin/bash
 
  #!/bin/bash
Line 232: Line 300:
 
</nowiki>}}
 
</nowiki>}}
  
最后绑定一个按键来运行这段脚本,如果采用xbindkeys(文件 {{ic|~/.xbindkeysrc}})那么配置如下:
+
===在打字时禁用触摸板===
{{hc|~/.xbindkeysrc|<nowiki>
+
 
"/sbin/trackpad-toggle.sh"
+
==== 使用驱动的掌压感应 ====
    m:0x5 + c:65
+
首先,你需要测试您的触摸板是否支持掌压感应,如果支持,需要测试设定是否精确:
    Control+Shift + space
+
$ synclient PalmDetect=1
 +
 
 +
试着打字,通过如下方式调整感应精度,PalmMinWidth 用来设定接触面的最小值
 +
 
 +
$ synclient PalmMinWidth=8
 +
 
 +
PalmMinZ用来设定在什么压力下会启动掌压感应
 +
$ synclient PalmMinZ=100
 +
 
 +
{{Tip|可以使用 {{pkg|evtest}} 查看 touchpad 使用时的宽度和 Z 值.}}
 +
 
 +
当你找到了合适的设定后,将它们加入 {{ic|/etc/X11/xorg.conf.d/70-synaptics.conf}}中.
 +
{{bc|<nowiki>
 +
Option "PalmDetect" "1"
 +
Option "PalmMinWidth" "8"
 +
Option "PalmMinZ" "200"
 
</nowiki>}}
 
</nowiki>}}
 +
 +
{{Warning|1=For some touchpads, an [https://bugzilla.kernel.org/show_bug.cgi?id=77161 issue] with the kernel can cause the palm width to always be reported as 0. This breaks palm detection in a majority of cases. Pending an actual fix, you can [https://gist.github.com/silverhammermba/a231c8156ecaa63c86f1 patch] the synaptics package to use only Z for palm detection.}}
  
现在只需重启 {{ic|xbindkeys}},{{ic|Ctrl}}+{{ic|Shift}}+{{ic|Space}} 已经能够启用/禁用您的触摸板了吧!
+
{{Tip|If you experience problems with consistent palm detection for your hardware, an alternative to try is [[libinput]].}}
  
当然您可以使用其它按键绑定软件,比如 Xfce4 或 GNOME 提供的。
+
==== 使用 syndaemon ====
  
==疑难解答==
+
{{ic|syndaemon}} 可以监控键盘活动并在打字时禁用触摸板,有多个选项可以控制禁用条件。可以通过下面命令查看帮助:
====ALPS 触摸板====
+
{{Expansion}}
+
$ syndaemon -h
{{Box YELLOW|TODO|需要针对 udev 重写。}}
+
  
对于ALPS触摸板,如果采用以上的配置不能正常工作,请尝试下面的配置:
+
例如要在打字 0.5 秒后禁用点击和滚动,忽略 Ctrl 等修饰键,使用
  
   Section "ServerLayout"
+
$ syndaemon -i 0.5 -t -K -R
    ...
+
 
    InputDevice    "USB Mouse" "CorePointer"
+
确定好需要的选项后,在登录管理器或 [[xinitrc]] 中配置为随 X 启动,使用 {{ic|-d}} 选项程序会在后台运行。
     InputDevice    "Touchpad"  "SendCoreEvents"
+
 
   EndSection
+
=== 检测到鼠标后禁用触摸板 ===
 +
 
 +
在[[udev]]的协助下,可以实现当外置鼠标插入后自动禁用触摸板的功能。可以使用下面规则:
 +
 
 +
==== 基本桌面 ====
 +
 
 +
非桌面环境额可以使用下面通用规则:
 +
 
 +
{{hc|/etc/udev/rules.d/01-touchpad.rules|2=
 +
SUBSYSTEM=="input", KERNEL=="mouse[0-9]*", ACTION=="add", ENV{DISPLAY}=":0", ENV{XAUTHORITY}="/home/''username''/.Xauthority", RUN+="/usr/bin/synclient TouchpadOff=1"
 +
SUBSYSTEM=="input", KERNEL=="mouse[0-9]*", ACTION=="remove", ENV{DISPLAY}=":0", ENV{XAUTHORITY}="/home/''username''/.Xauthority", RUN+="/usr/bin/synclient TouchpadOff=0"
 +
}}
 +
 
 +
==== GDM ====
 +
 
 +
{{Accuracy|saying that GDM ''usually'' does something does not make sense}}
 +
 
 +
GDM usually stores the Xauthority files inin a randomly-named directory. You should find your actual path to the Xauthority file which can be done using {{ic|ps ax}}. For some reason multiple authority files may appear for a user, so a rule like will be necessary:
 +
 
 +
GDM 将 Xauthority 文件存放在 {{ic|/var/run/gdm}} 下随机命名的文件夹中. {{ic|ps ax}} 可以查到 Xauthority 文件的位置,udev规则一般是这样的:
 +
 
 +
ACTION=="add", KERNEL=="mouse[0-9]", SUBSYSTEM=="input", PROGRAM="/usr/bin/find /var/run/gdm -name *username* -print -quit", 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* -print -quit", ENV{DISPLAY}=":0.0", ENV{XAUTHORITY}="$result/database", RUN+="/usr/bin/synclient TouchpadOff=0"
 +
 
 +
Furthermore, you should validate that your udev script is running properly! You can check for the conditions using {{ic| udevadm monitor -p}} which must be run as root.
 +
 
 +
===== With syndaemon running =====
 +
 
 +
{{ic|syndaemon}} whether started by the [[#Using syndaemon|user]]{{Broken section link}} or the desktop environment can conflict with synclient and will need to be disabled.  A rule like this will be needed:
 +
 
 +
{{hc|/etc/udev/rules.d/01-touchpad.rules|2=
 +
SUBSYSTEM=="input", KERNEL=="mouse[0-9]", ACTION=="add", PROGRAM="/usr/bin/find /var/run/gdm -name ''username'' -print -quit", ENV{DISPLAY}=":0", ENV{XAUTHORITY}="$result/database", RUN+="/bin/sh -c '/usr/bin/synclient TouchpadOff=1 ; sleep 1; /bin/killall syndaemon; '"
 +
}}
 +
 
 +
===== touchpad-state =====
 +
 
 +
An AUR package {{aur|touchpad-state-git}} has been created around the udev rules above.  It includes a udev rule and script:
 +
 
 +
touchpad-state [--off] [--on]
 +
 
 +
==== GNOME ====
 +
 
 +
GNOME users can install GNOME shell extension [https://extensions.gnome.org/extension/131/touchpad-indicator/ Touchpad Indicator], change "Switch Method" to "Synclient" and enable "Automatically switch Touchpad On/Off" in its preferences.
 +
 
 +
==== KDE ====
 +
 
 +
If using Plasma, the package {{Pkg|plasma-desktop}} can be used to manage the touchpad.
 +
 
 +
==== System with multiple X sessions ====
 +
 
 +
{{Accuracy|Hard-coded {{ic|DISPLAY}} variable does not work with multiple X sessions.}}
 +
 
 +
For an environment where multiple users are present, a slightly different approach is needed to detect the current users X environment. This script will help achieving this:
 +
 
 +
{{hc|/usr/bin/mouse-pnp-event-handler.sh|<nowiki>
 +
#!/bin/sh
 +
## $1 = "add" / "remove"
 +
## $2 = %k from udev
 +
 
 +
## Set TRACKPAD_NAME according to your configuration.
 +
## Check your trackpad name with:
 +
## find /sys/class/input/ -name mouse* -exec udevadm info -a {} \; | grep 'ATTRS{name}'
 +
TRACKPAD_NAME="SynPS/2 Synaptics TouchPad"
 +
 
 +
USERLIST=$(w -h | cut -d' ' -f1 | sort | uniq)
 +
MOUSELIST=$(find /sys/class/input/ -name mouse*)
 +
 
 +
for CUR_USER in ${USERLIST}; do
 +
        CUR_USER_XAUTH="$(sudo -Hiu ${CUR_USER} env | grep -e "^HOME=" | cut -d'=' -f2)/.Xauthority"
 +
 
 +
    
 +
        ## Can't find a way to get another users DISPLAY variable from an isolated root environment. Have to set it manually.
 +
        #CUR_USER_DISPL="$(sudo -Hiu ${CUR_USER} env | grep -e "^DISPLAY=" | cut -d'=' -f2)"
 +
        CUR_USER_DISPL=":0"
 +
 
 +
        export XAUTHORITY="${CUR_USER_XAUTH}"
 +
        export DISPLAY="${CUR_USER_DISPL}"
 +
 
 +
        if [ -f "${CUR_USER_XAUTH}" ]; then
 +
                case "$1" in
 +
                        "add")
 +
                                /usr/bin/synclient TouchpadOff=1
 +
                                /usr/bin/logger "USB mouse plugged. Disabling touchpad for $CUR_USER. ($XAUTHORITY - $DISPLAY)"
 +
                        ;;
 +
                        "remove")
 +
                                ## Only execute synclient if there are no external USB mice connected to the system.
 +
                                EXT_MOUSE_FOUND="0"
 +
                                for CUR_MOUSE in ${MOUSELIST}; do
 +
                                        if [ "$(cat ${CUR_MOUSE}/device/name)" != "${TRACKPAD_NAME}" ]; then
 +
                                                EXT_MOUSE_FOUND="1"
 +
                                        fi
 +
                                done
 +
                                if [ "${EXT_MOUSE_FOUND}" == "0" ]; then
 +
                                        /usr/bin/synclient TouchpadOff=0
 +
                                        /usr/bin/logger "No additional external mice found. Enabling touchpad for $CUR_USER."
 +
                                else
 +
                                        logger "Additional external mice found. Won't enable touchpad yet for $CUR_USER."
 +
                                fi
 +
                        ;;
 +
                esac
 +
        fi
 +
done
 +
</nowiki>}}
 +
 
 +
Update the {{ic|TRACKPAD_NAME}} variable for your system configuration.
 +
Run {{ic|<nowiki>find /sys/class/input/ -name mouse* -exec udevadm info -a {} \; | grep 'ATTRS{name}'</nowiki>}} to get a list of useful mice-names. Choose the one for your trackpad.
 +
 
 +
Then have udev run this script when USB mices are plugged in or out, with these udev rules:
 +
 
 +
{{hc|/etc/udev/rules.d/01-touchpad.rules|2=
 +
SUBSYSTEM=="input", KERNEL=="mouse[0-9]*", ACTION=="add", RUN+="/usr/bin/mouse-pnp-event-handler.sh add %k"
 +
SUBSYSTEM=="input", KERNEL=="mouse[0-9]*", ACTION=="remove", RUN+="/usr/bin/mouse-pnp-event-handler.sh remove %k"
 +
}}
 +
 
 +
=== 一体化触摸板 (也被称为 ClickPads) ===
 +
一些笔记本使用按键与触摸板面一体的触摸板.比如HP 4500系列笔记本,ThinkPad X220,X1 系列笔记本.默认情况下所有按键都被识别为左键,这样就不能使用右键中键,Click-Drag手势等功能. 在synaptics 1.6.0版驱动之前,一般使用第三方补丁来支持此类设备.但从1.6.0开始,Synaptics使用''mtdev''库实现了对多点触控的原生支持.  请注意,尽管支持多点触控,但是Synaptics驱动不会识别是不是不同的手指(至少到1.7.1都是这样),这样的话,当使用物理按键或者拖放手势时会有一些奇怪的现象出现.xf86-input-mtrack驱动对多点触控有更好的支持.
 +
 
 +
可以修改{{ic|/etc/X11/xorg.conf.d/50-synaptics.conf}}来启用其他按键(或者给自定义的synaptics配置文件赋一个更高的优先级(前缀号更高),比如55-synaptics.conf):
 +
 
 +
{{hc|/etc/X11/xorg.conf.d/50-synaptics.conf|<nowiki>
 +
...
 +
Option "ClickPad"        "true"
 +
Option "EmulateMidButtonTime" "0"
 +
Option "SoftButtonAreas"  "50% 0 82% 0 0 0 0 0"
 +
...
 +
</nowiki>}}
 +
 
 +
这三个选项是开启其他按键的关键,第一个启用多点触控,第二个关闭中键模拟(ClickPad不支持),第三个定义软按键区域
 +
 
 +
SoftButtonAreas选项的格式是(请参考{{ic|man 4 synaptics}}):
 +
{{bc|RightButtonAreaLeft RightButtonAreaRight RightButtonAreaTop RightButtonAreaBottom  MiddleButtonAreaLeft MiddleButtonAreaRight MiddleButtonAreaTop MiddleButtonAreaBottom}}
 +
 
 +
上面的例子一般在synaptics驱动包提供的文档中都能找到,它将触摸板的X坐标50%以右,Y坐标82%以下区域定义为右键.这里没有中键的定义,.定义的时候请注意:
 +
'''将边缘设置为0代表将边缘设置到当前方向的无限远处.'''
 +
 
 +
下面的例子将右键定义为X坐标60%以右,Y坐标82%以下;X坐标40%以右,59%以左,Y坐标82%以下被定义为中键
 +
 
 +
...
 +
Option     "SoftButtonAreas"  "60% 0 82% 0 40% 59% 82% 0"
 +
...
 +
 
 +
可以使用{{ic|<nowiki>synclient</nowiki>}}来检查新的软按键区域设置:
 +
 
 +
{{hc|<nowiki>$ synclient -l | grep -i ButtonArea</nowiki>|<nowiki>
 +
        RightButtonAreaLeft    = 3914
 +
        RightButtonAreaRight    = 0
 +
        RightButtonAreaTop      = 3918
 +
        RightButtonAreaBottom   = 0
 +
        MiddleButtonAreaLeft    = 3100
 +
        MiddleButtonAreaRight  = 3873
 +
        MiddleButtonAreaTop    = 3918
 +
        MiddleButtonAreaBottom  = 0
 +
</nowiki>}}
 +
 
 +
如果发现上述设定失效,请确认是否有其他设置覆盖了您的设置(比如,一些AUR包给其配置档赋予了很高的优先级)
 +
 
 +
==== Bottom edge correction ====
 +
 
 +
In some cases, for example Toshiba Satellite P50, everything work out of the box except often your click are seen as mouse movement and the cursor will jump away just before registering the click.
 +
This can be easily solved running
 +
 
 +
$ synclient -l | grep BottomEdge
 +
 
 +
take the BottomEdge value and subtract a the wanted height of your button, then temporary apply with
 +
 
 +
$ synclient AreaBottomEdge=4000
 +
 
 +
when a good value has been found make it a fixed correction with
 +
 
 +
{{hc|/etc/X11/xorg.conf.d/70-synaptics.conf|<nowiki>
 +
...
 +
Option "AreaBottomEdge"        "4000"
 +
...
 +
</nowiki>}}
 +
 
 +
{{Note|The area will not act as touchpad if the touch '''begins''' in that area, but it can still be used if the touch has originated outside.}}
 +
 
 +
==疑难解答==
 +
 
 +
=== Touchpad does not work after resuming from hibernate/suspend ===
 +
Occasionally touchpads will fail to work when the computer resumes from sleep or hibernation. This can often be corrected without rebooting by
 +
* Switching to a console and back again,
 +
* entering sleep mode again, and resuming again, or
 +
* locating the correct kernel module, then removing it and inserting it again.
 +
{{Note|You can use Ctrl-Alt-F1 through F8 to switch to a console without using the mouse.}}
 +
modprobe -r psmouse #psmouse happens to be the kernel module for my touchpad (Alps DualPoint)
 +
modprobe psmouse
 +
Now switch back to the tty that X is running on. If you chose the right module, your touchpad should be working again.
  
  Section "InputDevice"
+
=== xorg.conf.d/70-synaptics.conf在 MATE 上失效 ===
        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
+
  
 +
[[MATE]] 会覆盖您的个性化设定,包括那些没法在 MATE 下进行图形化设定的选项.这会导致{{ic|/etc/X11/xorg.conf.d/70-synaptics.conf}} 里的设置不起作用了.请参考本文MATE 一节来避免这种情况的发生.
  
=== The touchpad is not working, Xorg.0.log shows "Query no Synaptics: 6003C8" ===
+
=== 触摸板无法工作, Xorg.0.log 中显示 "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 ({{ic|/var/log/Xorg.0.log}}) and noticing this:
+
一般这是因为在系统上设置synaptics的方法不对:同时载入了两个synaptics模块.我们可以通过查看xorg log({{ic|/var/log/Xorg.0.log}})来识别这种情况:
 
{{hc|/var/log/Xorg.0.log|<nowiki>
 
{{hc|/var/log/Xorg.0.log|<nowiki>
 
  [ 9304.803] (**) SynPS/2 Synaptics TouchPad: Applying InputClass "evdev touchpad catchall"
 
  [ 9304.803] (**) SynPS/2 Synaptics TouchPad: Applying InputClass "evdev touchpad catchall"
 
  [ 9304.803] (**) SynPS/2 Synaptics TouchPad: Applying InputClass "touchpad catchall"
 
  [ 9304.803] (**) SynPS/2 Synaptics TouchPad: Applying InputClass "touchpad catchall"
 
</nowiki>}}
 
</nowiki>}}
 +
这里可以看到两个不同的模块被载入了.在某些情况下,这会导致触摸板不可用.
  
Notice how 2 differently named instances of the module are being loaded. In some cases, this causes the touchpad to become nonfunctional.
+
我们可以通过将 {{ic|MatchDevicePath "/dev/input/event*"}} 添加到 {{ic|/etc/X11/xorg.conf.d/10-synaptics.conf}} 中来防止这种双重载入:
 
+
We can prevent this double loading by adding {{ic|MatchDevicePath "/dev/input/event*"}} to our {{ic|/etc/X11/xorg.conf.d/10-synaptics.conf}} file:
+
 
{{hc|/etc/X11/xorg.conf.d/10-synaptics.conf|<nowiki>
 
{{hc|/etc/X11/xorg.conf.d/10-synaptics.conf|<nowiki>
 
  Section "InputClass"
 
  Section "InputClass"
Line 308: Line 552:
 
</nowiki>}}
 
</nowiki>}}
  
Restart X and check xorg logs again, the error should be gone and the touchpad should be functional.
+
重启X Server,检查Xorg.0.log,这个错误应该会消失,触摸板也应该可用了
  
related bugreport: {{Bug|20830}}
+
相关bug报告:{{Bug|20830}}
  
related forum topics:
+
相关论坛主题:
 
* https://bbs.archlinux.org/viewtopic.php?id=104769
 
* https://bbs.archlinux.org/viewtopic.php?id=104769
 
* https://bbs.archlinux.org/viewtopic.php?pid=825690
 
* https://bbs.archlinux.org/viewtopic.php?pid=825690
  
=== Touchpad detected as "PS/2 Generic Mouse" or "Logitech PS/2 mouse" ===
+
===触摸板被识别为"PS/2 Generic Mouse" 或者 "Logitech PS/2 mouse" ===
This is caused by a [https://bugzilla.kernel.org/show_bug.cgi?id=27442 kernel bug]. Wrongly detected touchpads cannot be configured with the Synaptic input driver. To fix this, simply install the [[AUR]] package {{AUR|psmouse-elantech}}.
+
  
Among the affected notebooks are the following models:
+
==== Elan Touchpad ====
  
* Acer Aspire 7750G
+
某些设备例如  ASUS x53s 使用 Elan touchpad,可能会出现此问题。.安装[[AUR]]包{{AUR|psmouse-alps-driver}}{{Broken package link|{{aur-mirror|psmouse-alps-driver}}}}即可解决这个问题.
* 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:
+
==== Laptops with touchscreen & touchpad ====
 +
There also seems to be a problem with laptops which have both a touchscreen & a touchpad, such as the Dell XPS 12 or Dell XPS 13. To fix this, you can [[blacklisting|blacklist]] the {{ic|i2c_hid}} driver, this does have the side-effect of disabling the touchscreen though.
  
{{bc|$ xinput list}}
+
This [http://www.spinics.net/lists/linux-input/msg27768.html seems to be a known problem]. Also see [https://bbs.archlinux.org/viewtopic.php?pid=1419078 this thread].
  
More information can be found in [https://bbs.archlinux.org/viewtopic.php?id=117109 this thread].
+
Post kernel 3.15, having the module blacklisted may cause touchpad to stop working completely. Removing the blacklist should allow this to start working with limited functionality, see {{Bug|40921}}.
  
=== Non-functional Synaptics Special Abilities (multi-tap, scrolling, etc.) ===
+
=== Synaptics触摸板某些功能失效 (比如触击,滚动) ===
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.2C_Xorg.0.log_shows_.22Query_no_Synaptics:_6003C8.22|The touchpad is not working]] problem mentioned above. Fix is the same, prevent double module loading.
+
有些时候Synaptics触摸板会失去某些功能.即使正确配置了也不能使用诸如双指滚动,双指触发中键点击等功能.这个问题可能和上面提到的
  
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).
+
如果阻止了重复加载模块后还有问题,可以尝试将"MatchIsTouchPad"配置项注释掉(这个选项synaptics默认开启)
  
===在探测到外置鼠标后禁用触摸板===
+
If clicking with either 2 or 3 fingers is interpreted as a right-click, so you cannot get a middle click either way regardless of configuration, this bug is probably the culprithttps://bugs.freedesktop.org/show_bug.cgi?id=55365
在[[udev]]的协助下,可以实现当外置鼠标插入后自动禁用触摸板的功能。可以添加以下udev规则到{{ic|/etc/udev/rules.d/01-touchpad.rules}}来实现这一点:
+
{{hc|/etc/udev/rules.d/01-touchpad.rules|<nowiki>
+
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"
+
</nowiki>}}
+
 
+
GDM stores Xauthority files in {{ic|/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.}}
+
 
+
需要启用{{ic|SHMConfig}}(详情请参考本文的[[#配置]]一节)
+
 
+
{{Note|{{ic|SHMConfig}} has been deprecated.}}
+
  
 
===指针跳跃===
 
===指针跳跃===
  
某些用户会发现鼠标指针奇怪地在屏幕上“跳跃”,当前没有有效的办法解决这个问题,但是正有开发者关注这个BUG.
+
某些用户会发现鼠标指针奇怪地在屏幕上“跳跃”,当前没有有效的办法来解决这个问题,但是有开发者正在关注这个BUG.
 
+
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.
+
另一个可能是你遇到了和i8042控制器有关的''IRQ losses''问题(很多笔记本用这个i8042来控制键盘,触摸板).你有两个选择:
2. append i8042.nomux=1 to the boot line and reboot your machine.
+
1.重新加载psmouse模组(rmmod&&insmod)
 +
2.将i8042.nomux=1加入到启动行里,然后重启电脑
  
===触摸板设备不在 {{ic|/dev/input/*}} ===
+
==={{ic|/dev/input/*}}中没有触摸板设备} ===
  
 
如果出现这种情况,您可以利用这条命令来显示您的输入设备信息:
 
如果出现这种情况,您可以利用这条命令来显示您的输入设备信息:
 
{{bc|$ cat /proc/bus/input/devices}}
 
{{bc|$ cat /proc/bus/input/devices}}
  
找寻一个名字为"SynPS/2 Synaptics TouchPad"的输入设备。输出中的"Handlers"一节就是触摸板设备的正确位置。
+
找寻一个名字为"SynPS/2 Synaptics TouchPad"的输入设备。"Handlers"一节就是触摸板设备的正确位置。
  
 
'''样例输出'''
 
'''样例输出'''
Line 387: Line 608:
 
在这个例子中 {{ic|Handlers}} 是 {{ic|mouse0}} 和 {{ic|event1}},所以应该使用 {{ic|/dev/input/mouse0}} 作为触摸板设备的位置。
 
在这个例子中 {{ic|Handlers}} 是 {{ic|mouse0}} 和 {{ic|event1}},所以应该使用 {{ic|/dev/input/mouse0}} 作为触摸板设备的位置。
  
{{Expansion}}
+
{{Expansion|TODO: 解释怎么将这点反映到{{ic|/etc/X11/xorg.conf.d/10-synaptics.conf}}}}
{{Box YELLOW|TODO|explain how to apply this in {{ic|/etc/X11/xorg.conf.d/10-synaptics.conf}}}}
+
  
===在打字时禁用触摸板===
+
===Firefox和特殊触摸板事件===
 
+
{{Accuracy|至少在我的FireFox version 23.01上面,没有这些设置而且默认设定工作的很好}}
==== Using automatic palm detection ====
+
默认的,firefox会设置触摸板上特殊区域完成特殊功能。你可以在地址栏输入'''about:config'''设置这些功能。编辑就是双击这些行,让true变成false,如果是数值你就必须手动改变了。
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 {{ic|/etc/X11/xorg.conf.d/10-synaptics.conf}}.
+
 
+
==== 利用 {{ic|.xinitrc}} ====
+
{{Note|You will need to have {{ic|SHMConfig}} enabled in your {{ic|/etc/X11/xorg.conf.d/10-synaptics.conf}}.}}
+
 
+
添加下面一行到您的 {{ic|.xinitrc}} 中(如果您没有使用登录管理器):
+
{{bc|$ syndaemon -t -k -i 2 -d &}}
+
 
+
;'''-i 2'''参数:设定一个等待时间,它决定了在最后一个键盘按键按下后过多少秒以后重新启用触摸板。
+
;'''-t'''参数:仅仅在打字时禁用触击和滚动而不禁用鼠标移动。
+
; '''-k''': tells the daemon to ignore modifier keys when monitoring keyboard activity (e.g.: allows Ctrl+Left Click).
+
; '''-d''': starts as a daemon, in the background.
+
更多的细节请参考manpage:
+
{{bc|$ man syndaemon}}
+
 
+
如果您使用了登录管理器,那么您需要将上面的指令添加到登录管理器允许的地方。当然,还可以使用下面的方法。
+
 
+
====利用登录管理器====
+
{{Note|You will need to have {{ic|SHMConfig}} enabled in your {{ic|/etc/X11/xorg.conf.d/10-synaptics.conf}}.}}
+
 
+
"-d"参数可以在登录前启动syndaemon作为守护进程。
+
  
'''对于Gnome(GDM)用户'''
+
==== Firefox 17.0 and later ====
  
要启用syndaemon,您需要利用Gnome启动程序首选项程序(Gnome's Startup Applications Preferences program)。进入Gnome,到'''系统 > 首选项 > 启动程序'''。在启动程序标签页,单击“添加”按钮,根据您的喜好给这个启动项起一个名字,然后输入注释(或留空)。在“命令”栏中填入:
+
Horizontal scrolling will now by default scroll through pages and not through your history. To reenable Mac-style forward/backward with two-finger swiping, edit:
  
{{bc|$ syndaemon -t -k -i 2 -d &}}
+
mousewheel.default.action.override_x = 2
  
然后,单击“添加” button in the '''Add Startup Program''' dialogue。请确保刚才添加的程序旁边的复选框被选中 in the list of additional startup programs. Close the '''Startup Applications Preferences''' window and you are done.
+
You may encounter accidental forwards/backwards while scrolling vertically. To change Firefox's sensitivity to horizontal swipes, edit:
  
'''对于KDE(KDM)用户'''
+
mousewheel.default.delta_multiplier_x
  
到 '''系统设置 > 高级 > 自动启动''',单击 '''添加程序''',输入:
+
The optimum value will depend on your touchpad and how you use it, try starting with {{ic|10}}. A negative value will reverse the swipe directions.
 
+
{{bc| syndaemon -t -k -i 2 -d &}}
+
 
+
并且选上“在命令行下运行”
+
 
+
===Firefox和特殊触摸板事件===
+
默认的,firefox会设置触摸板上特殊区域完成特殊功能。你可以在地址栏输入'''about:config'''设置这些功能。编辑就是双击这些行,让true变成false,如果是数值你就必须手动改变了。
+
 
+
如果想让firefox不从滚动历史记录,而让它在网页滚动,你可以在about:config里面改变下面两个选项。
+
mousewheel.horizscroll.withnokey.action = 1
+
mousewheel.horizscroll.withnokey.sysnumlines = true
+
 
+
如果不想firefox当你点击触摸板右上(或者鼠标中键)把剪切板里面内容粘贴到地址栏并且打开,你需要设置如下内容为false:
+
middlemouse.contentLoadURL = false
+
  
 
===Opera:水平滚动问题===
 
===Opera:水平滚动问题===
就像上面提到的一样。
+
点击工具 -> 首选项 -> 高级 -> 快捷方式,在这里选择 "Opera Standard" 鼠标属性,点击“编辑”,在“应用程序”部分:
修复这个问题,你需要点击工具 -> 首选项 -> 高级 -> 快捷键。在这里选择 "Opera Standard" 鼠标属性点击“编辑”。在“应用程序”部分:
+
{{Accuracy|这里的描述不是很清晰,请使用Opera的朋友确认以后进行修正}}
* assign key "Button 6" to command "Scroll left"
+
* "Button 6" 键赋值给命令 "Scroll left"
* assign key "Button 7" to command "Scroll right"
+
* "Button 7" 键赋值给命令 "Scroll right"
  
 
===在LG笔记本上的滚动和多功能===
 
===在LG笔记本上的滚动和多功能===
Line 471: Line 643:
 
但是不能为最新版的synaptics驱动打上面的补丁,编译会出错。您可以用GIT包来安装synaptics[http://web.telia.com/~u89404340/touchpad/synaptics/.git] 。
 
但是不能为最新版的synaptics驱动打上面的补丁,编译会出错。您可以用GIT包来安装synaptics[http://web.telia.com/~u89404340/touchpad/synaptics/.git] 。
  
AUR中也提供了一个相应的包:{{AUR|xf86-input-synaptics-lg}}
+
AUR中也提供了一个相应的包:{{AUR|xf86-input-synaptics-lg}}{{Broken package link|{{aur-mirror|xf86-input-synaptics-lg}}}}
  
 
To build the package after downloading the tarball and unpacking it, execute:
 
To build the package after downloading the tarball and unpacking it, execute:
Line 477: Line 649:
 
{{bc|$ makepkg}}
 
{{bc|$ makepkg}}
  
=== Other external mouse issues ===
+
=== 外置鼠标的其他问题 ===
 
首先,你需要确定你的外部鼠标描述设置里面包含(或者类似)这一行:
 
首先,你需要确定你的外部鼠标描述设置里面包含(或者类似)这一行:
  
 
{{hc|/etc/X11/xorg.conf.d/xorg.conf|Option    "Device" "/dev/input/mice"}}
 
{{hc|/etc/X11/xorg.conf.d/xorg.conf|Option    "Device" "/dev/input/mice"}}
  
如果"Device"行不一样,改成如上的,并且重新启动X。如果没有解决,修改"Server Layout"设置,将'''touchpad'''设置成 CorePointer:
+
如果"Device"行不一样,改成如上的,并且重新启动X。如果没有解决,修改"Server Layout"设置,将'''touchpad'''设置为 CorePointer:
  
 
{{hc|/etc/X11/xorg.conf.d/xorg.conf|InputDevice    "Touchpad" "CorePointer"}}
 
{{hc|/etc/X11/xorg.conf.d/xorg.conf|InputDevice    "Touchpad" "CorePointer"}}
  
然后设置你的外接鼠标为"SendCoreEvents":
+
将你的外接鼠标设置为"SendCoreEvents":
  
 
{{hc|/etc/X11/xorg.conf.d/xorg.conf|InputDevice    "USB Mouse" "SendCoreEvents"}}
 
{{hc|/etc/X11/xorg.conf.d/xorg.conf|InputDevice    "USB Mouse" "SendCoreEvents"}}
  
最后,你需要添加这个到你的外接鼠标设置里面去:
+
最后,将这个添加到你的外接鼠标设置里面去:
  
 
{{hc|/etc/X11/xorg.conf.d/xorg.conf|Option      "SendCoreEvents"    "true"}}
 
{{hc|/etc/X11/xorg.conf.d/xorg.conf|Option      "SendCoreEvents"    "true"}}
Line 510: Line 682:
 
*尝试其它桌面环境。据某些用户报告,这个问题仅在使用Xfce,GNOME时才出现,不知道什么原因。
 
*尝试其它桌面环境。据某些用户报告,这个问题仅在使用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:
+
如果出现了这种情况,建议启用FastTaps
 +
{{Out of date|
 +
1.7.1版本的synaptics驱动里,已经移除了FastTaps选项
 +
}}
  
To do so, you should add '''Option "FastTaps" "1"''' to {{ic|/etc/X11/xorg.conf.d/10-synaptics.conf}} so that you have:
+
'''Option "FastTaps" "1"''' 添加到{{ic|/etc/X11/xorg.conf.d/10-synaptics.conf}} :
 
{{hc|/etc/X11/xorg.conf.d/10-synaptics.conf|<nowiki>
 
{{hc|/etc/X11/xorg.conf.d/10-synaptics.conf|<nowiki>
 
  Section "InputClass"
 
  Section "InputClass"
Line 524: Line 699:
 
</nowiki>}}
 
</nowiki>}}
  
===SynPS/2 Synaptics TouchPad can't grab event device, errno=16===
+
===出现错误:SynPS/2 Synaptics TouchPad cannot grab event device, errno=16===
 
如果你使用Xorg 7.4,查看Xorg日志(/var/log/Xorg.0.log)时候可能会发现有这么一条警告信息。这是因为当使用linux2.6事件协议,驱动默认会试图独占此设备。失败就会出现此条提示。也就是说其他无论是内核空间还是用户空间的程序都无法获取此设备上的信号。当你的xorg.conf里面还定义了一个/dev/misc输入设备时候,这点很有用。但是如果你想测试设备的信号,那么就很麻烦了。
 
如果你使用Xorg 7.4,查看Xorg日志(/var/log/Xorg.0.log)时候可能会发现有这么一条警告信息。这是因为当使用linux2.6事件协议,驱动默认会试图独占此设备。失败就会出现此条提示。也就是说其他无论是内核空间还是用户空间的程序都无法获取此设备上的信号。当你的xorg.conf里面还定义了一个/dev/misc输入设备时候,这点很有用。但是如果你想测试设备的信号,那么就很麻烦了。
  
Line 539: Line 714:
 
当然你也可以使用synclient来调整,不过不能马上生效,只有触摸板驱动被禁用然后重新启用才能有效果。你可以通过切换到控制台然后切换回X来实现。
 
当然你也可以使用synclient来调整,不过不能马上生效,只有触摸板驱动被禁用然后重新启用才能有效果。你可以通过切换到控制台然后切换回X来实现。
  
=== Synaptics Loses Multitouch Detection After Rebooting From Windows ===
+
=== 从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.
+
许多驱动都会在电脑启动时将固件载入到内存中.这些固件信息在重启后不一定会被清除,而且有可能和Linux下的驱动不兼容.唯一清除内存中此类信息的方法就是用关机取代重启.在实践中,一般认为不同操作系统的切换最好不要用重启来进行.
 +
 
 +
=== Touchpad not recognized after shutdown from Arch ===
 +
Certain touchpads (elantech in particular) will fail to be recognized as a device of any sort after a standard shutdown from Arch linux. There are multiple possible solutions to this problem:
 +
* Boot into a Windows partition/install disk and shutdown from there.
 +
* Wait approximately 1 minute before turning on the computer after shutdown.
 +
* As discussed in https://bugzilla.kernel.org/show_bug.cgi?id=81331#c186 a patch has been merged into the stable kernel that provides a fix for Elantech touchpads. Gigabyte P34, P35v2 and X3 models are supported by default, for others (especially rebranded Gigabyte laptops, like XMG's) {{ic|1=i8042.kbdreset=1}} can be set as kernel parameter.
 +
 
 +
=== Trackpoint and Clickpad ===
 +
Newer Thinkpads do not have physical buttons for their Trackpoint anymore and instead use the upper area of the Clickpad for buttons (Left, Middle, Right).
 +
Apart from the ergonomic viewpoint this works quite well with current Xorg. Unfortunately mouse wheel emulation using the middle button is not supported yet. Install {{AUR|xf86-input-evdev-trackpoint}} from the AUR for a patched and properly configured version if you intend to use the Trackpoint.
  
=== Buttonless TouchPads (aka ClickPads) ===
+
=== ASUS Touchpads only recognised as PS/2 FocalTech emulated mouse ===
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 {{AUR|xf86-input-synaptics-clickpad}} from the [[AUR]].
+
  
=== Touchpad detected as mouse (elantech touchpads) ===
+
# Install the linux header for your kernel
This can happend on some laptops with elantech touchpad, for example ASUS x53s. In this situation you need {{AUR|psmouse-elantech}} package from [[AUR]].
+
# Install the focaltech-dkms from https://github.com/hanipouspilot/focaltech-dkms
 +
# Restart your computer
 +
# Edit your settings in the "Mouse and Trackpad" settings.
  
==链接==
+
== 参阅 ==
  
 
* [http://cgit.freedesktop.org/xorg/driver/xf86-input-synaptics/ Synaptics 触摸板驱动]
 
* [http://cgit.freedesktop.org/xorg/driver/xf86-input-synaptics/ Synaptics 触摸板驱动]
<!-- vim: set ft=Wikipedia: -->
 

Latest revision as of 10:07, 7 August 2016

翻译状态: 本文是英文页面 Touchpad_Synaptics翻译,最后翻译时间:2016-08-01,点击这里可以查看翻译后英文页面的改动。

相关文章

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

libinput 是另外的触摸板驱动选项,这个库使用不同的设备检测和多指触控支持。uch features.如果要通过 GNOME 控制中心配置触摸板,需要使用 libinput 驱动[1]

Contents

安装

安装 软件包 xf86-input-synaptics

配置

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

用户可以将此文件复制到 /etc/X11/xorg.conf.d/然后编辑配置,完整的选项列表请参考synaptics的 synaptics(4) 手册页。

常用选项

下面列举了大多数用户希望进行配置的选项。比如,下面的例子里,我们启用了水平,垂直和环形滚动:

/etc/X11/xorg.conf.d/70-synaptics.conf
 Section "InputClass"
       Identifier "touchpad"
       Driver "synaptics"
       MatchIsTouchpad "on"
              Option "TapButton1" "1"
              Option "TapButton2" "3"
              Option "TapButton3" "2"
              Option "VertEdgeScroll" "on"
              Option "VertTwoFingerScroll" "on"
              Option "HorizEdgeScroll" "on"
              Option "HorizTwoFingerScroll" "on"
              Option "CircularScrolling" "on"
              Option "CircScrollTrigger" "2"
              Option "EmulateTwoFingerMinZ" "40"
              Option "EmulateTwoFingerMinW" "8"
              Option "FingerLow" "30"
              Option "FingerHigh" "50"
              Option "MaxTapTime" "125"
              ...
 EndSection
TapButton1
(integer) 配置 “当用一根手指在非角落区域触击时,哪个鼠标键点击事件被上报”
TapButton2
(integer) 配置 “当用两根手指在非角落区域触击时,哪个鼠标键点击事件被上报”
TapButton3
(integer) 配置 “当用三根手指在非角落区域触击时,哪个鼠标键点击事件被上报”
RBCornerButton
(integer) 配置 “当在右下角单指触及时,哪个鼠标键点击事件被上报"(使用Option "RBCornerButton" "3"来完成Ubuntu式的右键点击设定(右下角轻触代表点击右键))
RTCornerButton
(integer) 对右上角轻触进行配置,和RBCornerButton类似
VertEdgeScroll
(boolean) 在触摸板的由边缘滑动时,启用垂直滚动
HorizEdgeScroll
(boolean) 在触摸板的下边缘滑动时,启用水平滚动
VertTwoFingerScroll
(boolean) 启用双指垂直滚动
HorizTwoFingerScroll
(boolean) 启用双指水平滚动
EmulateTwoFingerMinZ/W
(integer) 使用这两个参数来对双指滚动的精度进行调教
FingerLow
(integer) 手指压力低于此数值时视为手指移开。
FingerHigh
(integer) 手指压力高于此数值时视为手指按压.
MaxTapTime
Determines how "crisp" a tap must be to be considered a real tap. Decrease the value to require a more crisp tap. Properly adjusting this parameter can reduce false positives when the hands hover over or lightly touch the pad.
VertScrollDelta and HorizScrollDelta
(integer) configures the speed of scrolling, it is a bit counter-intuitive because higher values produce greater precision and thus slower scrolling. Negative values cause natural scrolling like in OS X.

这个例子包含了所有选项的简短介绍. 因为不同计算机的配置一般也不同. 我们推荐使用 synclient[broken link: invalid section]来对你的计算机进行针对性调教

如果你经常因为手掌扫过触摸板而导致TabButton2属性被触发(大多数时候都是"粘贴”动作),而你又不介意关闭掉双指触击功能,请将TapButton2设置为0.

Recent versions include a "Coasting" feature, enabled by default, which may have the undesired effect of continuing almost any scrolling until the next tap or click, even if you are no longer touching the touchpad. This means that to scroll just a bit, you need to scroll (by using the edge, or a multitouch option) and then almost immediately tap the touchpad, otherwise scrolling will continue forever. If wish to avoid this, set CoastingSpeed to 0.

如果触摸板太敏感,可以使用更高的 FingerLowFingerHigh 值,FingerLow 应该比 FingerHigh 小。

实时配置

除了提供传统的配置方法,Synaptics驱动现在还支持实时配置。这意味着用户能通过软件来进行实时设置而不需要重启X服务器。在你将配置项添加到主配置文件之前,这个特性可以帮助你进行测试。

Warning: 实时配置是非永久的,当重启,挂起/恢复,或者重启udev后就会失效。所以这个功能只适合用来对配置进行测试和精校。

命令行工具

Synclient — cSynclient是一个可以对Synaptics驱动进行查询并进行配置的命令行工具,这个工具是由synaptics维护者开发并和synaptics驱动一起提供给用户

http://xorg.freedesktop.org/ || xf86-input-synaptics

xinput[broken link: invalid section] — 调试设备的小型通用命令行程序

http://xorg.freedesktop.org/ || xorg-xinput

图形化工具

  • GPointing Device Settings — 提供对当前系统上的指针设备进行实时配置的图形界面(包括Synaptics触摸板),这个应用替代GSynaptics成为了对Synaptics驱动进行图形化配置的优先程序.
http://live.gnome.org/GPointingDeviceSettings || gpointing-device-settings
Note: 需要安装 xf86-input-synapticslibsynaptics , GPointingDeviceSettings工具才能在Synaptics触摸板上运行!
https://projects.kde.org/projects/kde/workspace/kcm-touchpad/repository || kcm-touchpad[broken link: archived in aur-mirror]

其他选项

VertScrollDelta and HorizScrollDelta
(integer)配置滚动速度, 对它们的配置比较直观,因为值越高滚动精度就越高而速度越低.设置成负值就能实现类似OS X系统的"自然滚动"
SHMConfig
(boolean) 是否开启共享内存以支持实时调试. 现在这个选项已经无效,并且它也只能提供针对事件的实时调试

Xfce4/Cinnamon

当在XFCE 4下想要修改这些设定时:

  1. 打开 System Settings.
  2. 点击 Mouse and Touchpad.
  3. Touchpad 选项卡里对这些配置进行更改.

To change these settings in Cinnamon:

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

MATE

在MATE上,可以通过下面方法配置触摸板:

  1. 运行 dconf-editor
  2. 编辑 org.mate.peripherals-touchpad 文件夹里面的键

可以通过下面的方法来阻止Mate配置守护程序改写当前配置:

  1. 运行 {{ic|dconf-editor}
  2. 编辑 org.mate.SettingsDaemon.plugins.mouse
  3. 取消active勾选 .

高级配置

使用xinput来检测您的触摸板有什么功能

根据型号不同,Synaptics可能有以下特性:

  • 拥有物理左键,物理中键,物理右键
  • 能够进行两指检测
  • 能够进行三指检测
  • 能够配置分辨率

使用 xinput list来找到您的synaptics设备名

首先,找到触摸板的名字

$ xinput -list

然后,您可以使用xipunt来查看您的触摸板有什么特性

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

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

从左到右,分别代表:

  • (1) 设备有物理左键
  • (0) 设备有物理中键
  • (1) 设备有物理右键
  • (0) 设备支持两指检测
  • (0) 设备支持三指检测
  • (1) 设备可以配置垂直分辨率
  • (1) 设备可以配置水平分辨率

使用xinput list-props "SynPS/2 Synaptics TouchPad" 来列出设备的所有属性

详情请阅读xinput和synaptics的帮助文档

Synclient

在synaptics manpage里面列出的所有参数都可以通过synclient进行配置.下面命令列出了一个完整的用户设置的清单:

$ synclient -l

所有列出的参数都可以用synclient进行配置, 比如:

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

使用synclient进行成功的设定和测试后,你可以将这些设定添加到/etc/X11/xorg.conf.d/10-synaptics.conf

Tango-view-refresh-red.pngThis article or section is out of date.Tango-view-refresh-red.png

Reason:

(1.71驱动里,已经取消了SHMConfig设定,随驱动一起发行的synclient工具也不再支持-m参数.所以,下面的描述已经过期.本文的英文版里面已经删除了使用synclient -m进行测试的这一节.考虑到兼容性,我保留了这一段描述)

synclient监视器可以实时地显示触摸板的触摸位置和压力,以提供比默认的Synaptics设置更精细的调整。您需要设置SHMConfig选项为ontrue以确保synclient正常工作。

您可以这样启动synclient:

$ synclient -m 100

-m参数设置了synclient的更新间隔时间,单位为毫秒。

这个监视器提供了有关于触摸板当前状态的信息。比如,如果您利用触摸板移动了鼠标指针,那么监视器中x和y的值就会随之变化。这样您就可以方便地确定各个边界,以便于设定LeftEdge-,RightEdge-,BottomEdge-和TopEdge-选项。

下面列出了所有能够监视的状态以及它们的简要描述:

{ (Discuss in [https://wiki.archlinux.org/index.php/%2B%E6%8F%8F%E8%BF%B0%2B +描述+

])

Evtest

evtest工具能够实时的显示触摸板上的压力和位置信息,允许对默认的Synaptics设定进行精校.可以通过如下方式启动evtest

$ evtest /dev/input/eventX

X代表触摸板的ID,可以通过查看cat /proc/bus/input/devices的输出来获取它. evtest需要对设备进行排他访问,因此,evtest不能和X Server的实例共存.你可以通过杀死X Server进程或者在虚拟终端上运行evtest来解决这个问题(例如,通过CTRL+ALT+2来切换到2号虚拟终端)

xev

工具 xorg-xev 可以实时显示按压、点击、压力、位置和其它检测到的数据,可以更深入的优化 Synaptics 设置。xev 可以通过 "-event" 参数设置报告的事件。

环状滚动

Synaptics提供和ipod触控方式类似的环状滚动功能。您可以在触摸板上画圈,来代替在边缘上垂直或水平地滑动。有些用户发现这样滚动的更快也更精确.

添加下面几行到/etc/X11/xorg.conf.d/70-synaptics.conf中以启用环状滚动:

/etc/X11/xorg.conf.d/70-synaptics.conf
 Section "InputDevice"
         ...
         Option      "CircularScrolling"          "on"
         Option      "CircScrollTrigger"          "0"
         ...
 EndSection

选项CircScrollTrigger可以设置为下面的值之一,它能够决定环状滚动应该从哪个边缘开始:

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

设置一个非0值对于同时使用水平/垂直滚动和环状滚动的用户非常有用.设定后,会根据你开始的边缘决定到底使用哪种滚动.

如果您想要快速滚动,请在触摸板中部画小圈,相反,如果您想要慢速地且更精确地滚动,请画大圈。

自然滚动(触摸屏式滚动)

可以在synaptics上启用自然滚动(触摸屏那种滚动).只要将VertScrollDeltaHorizScrollDelta的值设定为负就行(翻转滚动方向):

/etc/X11/xorg.conf.d/70-synaptics.conf
Section "InputClass"
    ...
    Option      "VertScrollDelta"          "-111"
    Option      "HorizScrollDelta"         "-111"
    ...
EndSection

软开关

有一个能启用禁用触摸板的软开关会方便许多,可以用 xinput 脚本绑定到键盘事件,详情参考 Extra keyboard keys in Xorg

/usr/local/bin/touchpad_toggle.sh
#!/bin/bash

declare -i ID
ID=`xinput list | grep -Eio '(touchpad|glidepoint)\s*id\=[0-9]{1,2}' | grep -Eo '[0-9]{1,2}'`
declare -i STATE
STATE=`xinput list-props $ID|grep 'Device Enabled'|awk '{print $4}'`
if [ $STATE -eq 1 ]
then
    xinput disable $ID
    # echo "Touchpad disabled."
    # notify-send 'Touchpad' 'Disabled' -i /usr/share/icons/Adwaita/48x48/devices/input-touchpad.png
else
    xinput enable $ID
    # echo "Touchpad enabled."
    # notify-send 'Touchpad' 'Enabled' -i /usr/share/icons/Adwaita/48x48/devices/input-touchpad.png
fi
Tip: 使用 bumblebee 下的外置显示时,可以通过在命令中加入 DISPLAY=:8 设置第二个 X Server.

此外可以使用 synclient 切换 touchpad. 这个方式仅能禁用触摸事件,无法禁用物理按键的使用:

/sbin/trackpad-toggle.sh
 #!/bin/bash
 
 synclient TouchpadOff=$(synclient -l | grep -c 'TouchpadOff.*=.*0')

在打字时禁用触摸板

使用驱动的掌压感应

首先,你需要测试您的触摸板是否支持掌压感应,如果支持,需要测试设定是否精确:

$ synclient PalmDetect=1

试着打字,通过如下方式调整感应精度,PalmMinWidth 用来设定接触面的最小值

$ synclient PalmMinWidth=8

PalmMinZ用来设定在什么压力下会启动掌压感应

$ synclient PalmMinZ=100
Tip: 可以使用 evtest 查看 touchpad 使用时的宽度和 Z 值.

当你找到了合适的设定后,将它们加入 /etc/X11/xorg.conf.d/70-synaptics.conf中.

Option "PalmDetect" "1"
Option "PalmMinWidth" "8"
Option "PalmMinZ" "200"
Warning: For some touchpads, an issue with the kernel can cause the palm width to always be reported as 0. This breaks palm detection in a majority of cases. Pending an actual fix, you can patch the synaptics package to use only Z for palm detection.
Tip: If you experience problems with consistent palm detection for your hardware, an alternative to try is libinput.

使用 syndaemon

syndaemon 可以监控键盘活动并在打字时禁用触摸板,有多个选项可以控制禁用条件。可以通过下面命令查看帮助:

$ syndaemon -h

例如要在打字 0.5 秒后禁用点击和滚动,忽略 Ctrl 等修饰键,使用

$ syndaemon -i 0.5 -t -K -R

确定好需要的选项后,在登录管理器或 xinitrc 中配置为随 X 启动,使用 -d 选项程序会在后台运行。

检测到鼠标后禁用触摸板

udev的协助下,可以实现当外置鼠标插入后自动禁用触摸板的功能。可以使用下面规则:

基本桌面

非桌面环境额可以使用下面通用规则:

/etc/udev/rules.d/01-touchpad.rules
SUBSYSTEM=="input", KERNEL=="mouse[0-9]*", ACTION=="add", ENV{DISPLAY}=":0", ENV{XAUTHORITY}="/home/username/.Xauthority", RUN+="/usr/bin/synclient TouchpadOff=1"
SUBSYSTEM=="input", KERNEL=="mouse[0-9]*", ACTION=="remove", ENV{DISPLAY}=":0", ENV{XAUTHORITY}="/home/username/.Xauthority", RUN+="/usr/bin/synclient TouchpadOff=0"

GDM

Tango-inaccurate.pngThe factual accuracy of this article or section is disputed.Tango-inaccurate.png

Reason: saying that GDM usually does something does not make sense (Discuss in Talk:Touchpad Synaptics (简体中文)#)

GDM usually stores the Xauthority files inin a randomly-named directory. You should find your actual path to the Xauthority file which can be done using ps ax. For some reason multiple authority files may appear for a user, so a rule like will be necessary:

GDM 将 Xauthority 文件存放在 /var/run/gdm 下随机命名的文件夹中. ps ax 可以查到 Xauthority 文件的位置,udev规则一般是这样的:

ACTION=="add", KERNEL=="mouse[0-9]", SUBSYSTEM=="input", PROGRAM="/usr/bin/find /var/run/gdm -name *username* -print -quit", 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* -print -quit", ENV{DISPLAY}=":0.0", ENV{XAUTHORITY}="$result/database", RUN+="/usr/bin/synclient TouchpadOff=0"

Furthermore, you should validate that your udev script is running properly! You can check for the conditions using udevadm monitor -p which must be run as root.

With syndaemon running

syndaemon whether started by the user[broken link: invalid section] or the desktop environment can conflict with synclient and will need to be disabled. A rule like this will be needed:

/etc/udev/rules.d/01-touchpad.rules
SUBSYSTEM=="input", KERNEL=="mouse[0-9]", ACTION=="add", PROGRAM="/usr/bin/find /var/run/gdm -name username -print -quit", ENV{DISPLAY}=":0", ENV{XAUTHORITY}="$result/database", RUN+="/bin/sh -c '/usr/bin/synclient TouchpadOff=1 ; sleep 1; /bin/killall syndaemon; '"
touchpad-state

An AUR package touchpad-state-gitAUR has been created around the udev rules above. It includes a udev rule and script:

touchpad-state [--off] [--on]

GNOME

GNOME users can install GNOME shell extension Touchpad Indicator, change "Switch Method" to "Synclient" and enable "Automatically switch Touchpad On/Off" in its preferences.

KDE

If using Plasma, the package plasma-desktop can be used to manage the touchpad.

System with multiple X sessions

Tango-inaccurate.pngThe factual accuracy of this article or section is disputed.Tango-inaccurate.png

Reason: Hard-coded DISPLAY variable does not work with multiple X sessions. (Discuss in Talk:Touchpad Synaptics (简体中文)#)

For an environment where multiple users are present, a slightly different approach is needed to detect the current users X environment. This script will help achieving this:

/usr/bin/mouse-pnp-event-handler.sh
#!/bin/sh
## $1 = "add" / "remove"
## $2 = %k from udev 

## Set TRACKPAD_NAME according to your configuration. 
## Check your trackpad name with: 
## find /sys/class/input/ -name mouse* -exec udevadm info -a {} \; | grep 'ATTRS{name}'
TRACKPAD_NAME="SynPS/2 Synaptics TouchPad"

USERLIST=$(w -h | cut -d' ' -f1 | sort | uniq)
MOUSELIST=$(find /sys/class/input/ -name mouse*)

for CUR_USER in ${USERLIST}; do
         CUR_USER_XAUTH="$(sudo -Hiu ${CUR_USER} env | grep -e "^HOME=" | cut -d'=' -f2)/.Xauthority"

  
        ## Can't find a way to get another users DISPLAY variable from an isolated root environment. Have to set it manually.
        #CUR_USER_DISPL="$(sudo -Hiu ${CUR_USER} env | grep -e "^DISPLAY=" | cut -d'=' -f2)"
        CUR_USER_DISPL=":0"

        export XAUTHORITY="${CUR_USER_XAUTH}"
        export DISPLAY="${CUR_USER_DISPL}"

        if [ -f "${CUR_USER_XAUTH}" ]; then
                case "$1" in
                        "add")
                                /usr/bin/synclient TouchpadOff=1
                                /usr/bin/logger "USB mouse plugged. Disabling touchpad for $CUR_USER. ($XAUTHORITY - $DISPLAY)"
                        ;;
                        "remove")
                                ## Only execute synclient if there are no external USB mice connected to the system.
                                EXT_MOUSE_FOUND="0"
                                for CUR_MOUSE in ${MOUSELIST}; do
                                        if [ "$(cat ${CUR_MOUSE}/device/name)" != "${TRACKPAD_NAME}" ]; then
                                                EXT_MOUSE_FOUND="1"
                                        fi
                                done
                                if [ "${EXT_MOUSE_FOUND}" == "0" ]; then
                                        /usr/bin/synclient TouchpadOff=0
                                        /usr/bin/logger "No additional external mice found. Enabling touchpad for $CUR_USER."
                                else
                                        logger "Additional external mice found. Won't enable touchpad yet for $CUR_USER."
                                fi
                        ;;
                esac
        fi
done

Update the TRACKPAD_NAME variable for your system configuration. Run find /sys/class/input/ -name mouse* -exec udevadm info -a {} \; | grep 'ATTRS{name}' to get a list of useful mice-names. Choose the one for your trackpad.

Then have udev run this script when USB mices are plugged in or out, with these udev rules:

/etc/udev/rules.d/01-touchpad.rules
SUBSYSTEM=="input", KERNEL=="mouse[0-9]*", ACTION=="add", RUN+="/usr/bin/mouse-pnp-event-handler.sh add %k"
SUBSYSTEM=="input", KERNEL=="mouse[0-9]*", ACTION=="remove", RUN+="/usr/bin/mouse-pnp-event-handler.sh remove %k"

一体化触摸板 (也被称为 ClickPads)

一些笔记本使用按键与触摸板面一体的触摸板.比如HP 4500系列笔记本,ThinkPad X220,X1 系列笔记本.默认情况下所有按键都被识别为左键,这样就不能使用右键中键,Click-Drag手势等功能. 在synaptics 1.6.0版驱动之前,一般使用第三方补丁来支持此类设备.但从1.6.0开始,Synaptics使用mtdev库实现了对多点触控的原生支持. 请注意,尽管支持多点触控,但是Synaptics驱动不会识别是不是不同的手指(至少到1.7.1都是这样),这样的话,当使用物理按键或者拖放手势时会有一些奇怪的现象出现.xf86-input-mtrack驱动对多点触控有更好的支持.

可以修改/etc/X11/xorg.conf.d/50-synaptics.conf来启用其他按键(或者给自定义的synaptics配置文件赋一个更高的优先级(前缀号更高),比如55-synaptics.conf):

/etc/X11/xorg.conf.d/50-synaptics.conf
...
Option "ClickPad"         "true"
Option "EmulateMidButtonTime" "0"
Option "SoftButtonAreas"  "50% 0 82% 0 0 0 0 0"
...

这三个选项是开启其他按键的关键,第一个启用多点触控,第二个关闭中键模拟(ClickPad不支持),第三个定义软按键区域

SoftButtonAreas选项的格式是(请参考man 4 synaptics):

RightButtonAreaLeft RightButtonAreaRight RightButtonAreaTop RightButtonAreaBottom  MiddleButtonAreaLeft MiddleButtonAreaRight MiddleButtonAreaTop MiddleButtonAreaBottom

上面的例子一般在synaptics驱动包提供的文档中都能找到,它将触摸板的X坐标50%以右,Y坐标82%以下区域定义为右键.这里没有中键的定义,.定义的时候请注意:

将边缘设置为0代表将边缘设置到当前方向的无限远处.

下面的例子将右键定义为X坐标60%以右,Y坐标82%以下;X坐标40%以右,59%以左,Y坐标82%以下被定义为中键

...
Option     "SoftButtonAreas"  "60% 0 82% 0 40% 59% 82% 0"
...

可以使用synclient来检查新的软按键区域设置:

$ synclient -l | grep -i ButtonArea
        RightButtonAreaLeft     = 3914
        RightButtonAreaRight    = 0
        RightButtonAreaTop      = 3918
        RightButtonAreaBottom   = 0
        MiddleButtonAreaLeft    = 3100
        MiddleButtonAreaRight   = 3873
        MiddleButtonAreaTop     = 3918
        MiddleButtonAreaBottom  = 0

如果发现上述设定失效,请确认是否有其他设置覆盖了您的设置(比如,一些AUR包给其配置档赋予了很高的优先级)

Bottom edge correction

In some cases, for example Toshiba Satellite P50, everything work out of the box except often your click are seen as mouse movement and the cursor will jump away just before registering the click. This can be easily solved running

$ synclient -l | grep BottomEdge

take the BottomEdge value and subtract a the wanted height of your button, then temporary apply with

$ synclient AreaBottomEdge=4000

when a good value has been found make it a fixed correction with

/etc/X11/xorg.conf.d/70-synaptics.conf
...
Option "AreaBottomEdge"         "4000"
...
Note: The area will not act as touchpad if the touch begins in that area, but it can still be used if the touch has originated outside.

疑难解答

Touchpad does not work after resuming from hibernate/suspend

Occasionally touchpads will fail to work when the computer resumes from sleep or hibernation. This can often be corrected without rebooting by

  • Switching to a console and back again,
  • entering sleep mode again, and resuming again, or
  • locating the correct kernel module, then removing it and inserting it again.
Note: You can use Ctrl-Alt-F1 through F8 to switch to a console without using the mouse.
modprobe -r psmouse #psmouse happens to be the kernel module for my touchpad (Alps DualPoint)
modprobe psmouse

Now switch back to the tty that X is running on. If you chose the right module, your touchpad should be working again.

xorg.conf.d/70-synaptics.conf在 MATE 上失效

MATE 会覆盖您的个性化设定,包括那些没法在 MATE 下进行图形化设定的选项.这会导致/etc/X11/xorg.conf.d/70-synaptics.conf 里的设置不起作用了.请参考本文MATE 一节来避免这种情况的发生.

触摸板无法工作, Xorg.0.log 中显示 "Query no Synaptics: 6003C8"

一般这是因为在系统上设置synaptics的方法不对:同时载入了两个synaptics模块.我们可以通过查看xorg log(/var/log/Xorg.0.log)来识别这种情况:

/var/log/Xorg.0.log
 [ 9304.803] (**) SynPS/2 Synaptics TouchPad: Applying InputClass "evdev touchpad catchall"
 [ 9304.803] (**) SynPS/2 Synaptics TouchPad: Applying InputClass "touchpad catchall"

这里可以看到两个不同的模块被载入了.在某些情况下,这会导致触摸板不可用.

我们可以通过将 MatchDevicePath "/dev/input/event*" 添加到 /etc/X11/xorg.conf.d/10-synaptics.conf 中来防止这种双重载入:

/etc/X11/xorg.conf.d/10-synaptics.conf
 Section "InputClass"
       Identifier "touchpad catchall"
       Driver "synaptics"
       MatchIsTouchpad "on"
       MatchDevicePath "/dev/input/event*"
             Option "TapButton1" "1"
             Option "TapButton2" "2"
             Option "TapButton3" "3"
 EndSection 

重启X Server,检查Xorg.0.log,这个错误应该会消失,触摸板也应该可用了

相关bug报告:FS#20830

相关论坛主题:

触摸板被识别为"PS/2 Generic Mouse" 或者 "Logitech PS/2 mouse"

Elan Touchpad

某些设备例如 ASUS x53s 使用 Elan touchpad,可能会出现此问题。.安装AURpsmouse-alps-driverAUR[broken link: archived in aur-mirror]即可解决这个问题.

Laptops with touchscreen & touchpad

There also seems to be a problem with laptops which have both a touchscreen & a touchpad, such as the Dell XPS 12 or Dell XPS 13. To fix this, you can blacklist the i2c_hid driver, this does have the side-effect of disabling the touchscreen though.

This seems to be a known problem. Also see this thread.

Post kernel 3.15, having the module blacklisted may cause touchpad to stop working completely. Removing the blacklist should allow this to start working with limited functionality, see FS#40921.

Synaptics触摸板某些功能失效 (比如触击,滚动)

有些时候Synaptics触摸板会失去某些功能.即使正确配置了也不能使用诸如双指滚动,双指触发中键点击等功能.这个问题可能和上面提到的

如果阻止了重复加载模块后还有问题,可以尝试将"MatchIsTouchPad"配置项注释掉(这个选项synaptics默认开启)

If clicking with either 2 or 3 fingers is interpreted as a right-click, so you cannot get a middle click either way regardless of configuration, this bug is probably the culprit: https://bugs.freedesktop.org/show_bug.cgi?id=55365

指针跳跃

某些用户会发现鼠标指针奇怪地在屏幕上“跳跃”,当前没有有效的办法来解决这个问题,但是有开发者正在关注这个BUG.

另一个可能是你遇到了和i8042控制器有关的IRQ losses问题(很多笔记本用这个i8042来控制键盘,触摸板).你有两个选择: 1.重新加载psmouse模组(rmmod&&insmod) 2.将i8042.nomux=1加入到启动行里,然后重启电脑

/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: TODO: 解释怎么将这点反映到/etc/X11/xorg.conf.d/10-synaptics.conf中 (Discuss in Talk:Touchpad Synaptics (简体中文)#)

Firefox和特殊触摸板事件

Tango-inaccurate.pngThe factual accuracy of this article or section is disputed.Tango-inaccurate.png

Reason: 至少在我的FireFox version 23.01上面,没有这些设置而且默认设定工作的很好 (Discuss in Talk:Touchpad Synaptics (简体中文)#)

默认的,firefox会设置触摸板上特殊区域完成特殊功能。你可以在地址栏输入about:config设置这些功能。编辑就是双击这些行,让true变成false,如果是数值你就必须手动改变了。

Firefox 17.0 and later

Horizontal scrolling will now by default scroll through pages and not through your history. To reenable Mac-style forward/backward with two-finger swiping, edit:

mousewheel.default.action.override_x = 2

You may encounter accidental forwards/backwards while scrolling vertically. To change Firefox's sensitivity to horizontal swipes, edit:

mousewheel.default.delta_multiplier_x

The optimum value will depend on your touchpad and how you use it, try starting with 10. A negative value will reverse the swipe directions.

Opera:水平滚动问题

点击工具 -> 首选项 -> 高级 -> 快捷方式,在这里选择 "Opera Standard" 鼠标属性,点击“编辑”,在“应用程序”部分:

Tango-inaccurate.pngThe factual accuracy of this article or section is disputed.Tango-inaccurate.png

Reason: 这里的描述不是很清晰,请使用Opera的朋友确认以后进行修正 (Discuss in Talk:Touchpad Synaptics (简体中文)#)
  • 将 "Button 6" 键赋值给命令 "Scroll left"
  • 将 "Button 7" 键赋值给命令 "Scroll right"

在LG笔记本上的滚动和多功能

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

滚动问题可以通过添加下面一行到xorg.conf中:

/etc/X11/xorg.conf.d/xorg.conf
Option "UpDownScrolling" "0"

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

但是不能为最新版的synaptics驱动打上面的补丁,编译会出错。您可以用GIT包来安装synaptics[3]

AUR中也提供了一个相应的包:xf86-input-synaptics-lgAUR[broken link: archived in aur-mirror]

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

$ cd synaptics-git
$ makepkg

外置鼠标的其他问题

首先,你需要确定你的外部鼠标描述设置里面包含(或者类似)这一行:

/etc/X11/xorg.conf.d/xorg.conf
Option     "Device" "/dev/input/mice"

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

/etc/X11/xorg.conf.d/xorg.conf
InputDevice    "Touchpad" "CorePointer"

将你的外接鼠标设置为"SendCoreEvents":

/etc/X11/xorg.conf.d/xorg.conf
InputDevice    "USB Mouse" "SendCoreEvents"

最后,将这个添加到你的外接鼠标设置里面去:

/etc/X11/xorg.conf.d/xorg.conf
Option      "SendCoreEvents"    "true"

如果还是不行,说不定是鼠标硬件有问题。请检查是不是bug,或者查看论坛,看是否有人有更好的解决方法。

触摸板的同步问题

有些时候指针会没有原因地“卡住”几秒或随机乱动。可以在/var/log/messages.log中看到出现了如下提示:

/var/log/messages.log
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
/etc/modprobe.d/modprobe.conf
options psmouse proto=imps
  • 尝试其它桌面环境。据某些用户报告,这个问题仅在使用Xfce,GNOME时才出现,不知道什么原因。

触击与按键点击之间出现延迟

如果出现了这种情况,建议启用FastTaps

Tango-view-refresh-red.pngThis article or section is out of date.Tango-view-refresh-red.png

Reason:

1.7.1版本的synaptics驱动里,已经移除了FastTaps选项

(Discuss in Talk:Touchpad Synaptics (简体中文)#)

Option "FastTaps" "1" 添加到/etc/X11/xorg.conf.d/10-synaptics.conf 中:

/etc/X11/xorg.conf.d/10-synaptics.conf
 Section "InputClass"
      Identifier "Synaptics Touchpad"
      Driver "synaptics"
      ...
      Option "FastTaps" "1"
      ...
 EndSection

出现错误:SynPS/2 Synaptics TouchPad cannot grab event device, errno=16

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

开启和关闭这项功能,可以修改你定义的xorg.conf的触摸板部分:

Section "InputDevice"
       ...
       Option "GrabEventDevice" "boolean"
       ...
EndSection

boolean部分可以是yes或者false,分别代表启用和禁止此功能。

当然你也可以使用synclient来调整,不过不能马上生效,只有触摸板驱动被禁用然后重新启用才能有效果。你可以通过切换到控制台然后切换回X来实现。

从Windows系统重启后触摸板失去多点触控的能力

许多驱动都会在电脑启动时将固件载入到内存中.这些固件信息在重启后不一定会被清除,而且有可能和Linux下的驱动不兼容.唯一清除内存中此类信息的方法就是用关机取代重启.在实践中,一般认为不同操作系统的切换最好不要用重启来进行.

Touchpad not recognized after shutdown from Arch

Certain touchpads (elantech in particular) will fail to be recognized as a device of any sort after a standard shutdown from Arch linux. There are multiple possible solutions to this problem:

  • Boot into a Windows partition/install disk and shutdown from there.
  • Wait approximately 1 minute before turning on the computer after shutdown.
  • As discussed in https://bugzilla.kernel.org/show_bug.cgi?id=81331#c186 a patch has been merged into the stable kernel that provides a fix for Elantech touchpads. Gigabyte P34, P35v2 and X3 models are supported by default, for others (especially rebranded Gigabyte laptops, like XMG's) i8042.kbdreset=1 can be set as kernel parameter.

Trackpoint and Clickpad

Newer Thinkpads do not have physical buttons for their Trackpoint anymore and instead use the upper area of the Clickpad for buttons (Left, Middle, Right). Apart from the ergonomic viewpoint this works quite well with current Xorg. Unfortunately mouse wheel emulation using the middle button is not supported yet. Install xf86-input-evdev-trackpointAUR from the AUR for a patched and properly configured version if you intend to use the Trackpoint.

ASUS Touchpads only recognised as PS/2 FocalTech emulated mouse

  1. Install the linux header for your kernel
  2. Install the focaltech-dkms from https://github.com/hanipouspilot/focaltech-dkms
  3. Restart your computer
  4. Edit your settings in the "Mouse and Trackpad" settings.

参阅