个人工具

“UbuntuHelp:SynapticsTouchpad”的版本间的差异

来自Ubuntu中文

跳转至: 导航, 搜索
第4行: 第4行:
 
On most laptops, a '''[http://en.wikipedia.org/wiki/Touchpad touchpad]''' is the input device used as a substitute for a computer mouse.
 
On most laptops, a '''[http://en.wikipedia.org/wiki/Touchpad touchpad]''' is the input device used as a substitute for a computer mouse.
 
The term "Synaptics Touchpad" should not be confused with "[[UbuntuHelp:SynapticHowto|Synaptic]]", Ubuntu's Package Manager.
 
The term "Synaptics Touchpad" should not be confused with "[[UbuntuHelp:SynapticHowto|Synaptic]]", Ubuntu's Package Manager.
The touchpad will be detected and configured during the Ubuntu installation. However, in Ubuntu 6.06 LTS (Dapper Drake) and Ubuntu 6.10 (Edgy Eft) touchpads may not be detected, in which case scrolling will not work. See the [[UbuntuHelp:[troubleshooting|Troubleshooting]]] section.
+
For '''Ubuntu 8.04 and earlier''', see [[UbuntuHelp:SynapticsTouchpad/Hardy|the older instructions]].
Ubuntu 8.10 (Intrepid Ibex) and later completely rework how touchpads are configured and detected.
+
 
<<Anchor(gui)>>
 
<<Anchor(gui)>>
 
== Basic Configuration with a Graphical Interface ==
 
== Basic Configuration with a Graphical Interface ==
 
Ubuntu provides configuration of the most common touchpad options in '''System > Preferences > Mouse''', under the Touchpad tab.
 
Ubuntu provides configuration of the most common touchpad options in '''System > Preferences > Mouse''', under the Touchpad tab.
 
== Advanced Configuration with a Graphical Interface ==
 
== Advanced Configuration with a Graphical Interface ==
This sections describes how to install a GUI configuration tool for your Synaptics touchpad which integrates into your desktop environment. Other methods of configuring the touchpad include using [[UbuntuHelp:[synclient|synclient]]] on the command line, or by adding [[UbuntuHelp:[xconfig|options]]] directly to the X server configuration file.
+
This sections describes how to install a GUI configuration tool for your Synaptics touchpad which integrates into your desktop environment. Other methods of configuring the touchpad include using [[UbuntuHelp:[synclient|synclient]]] on the command line, or by [[UbuntuHelp:[hal|adding options]]] to HAL fdi files.
 
<<Anchor(gsynaptics)>>
 
<<Anchor(gsynaptics)>>
 
=== Ubuntu ===
 
=== Ubuntu ===
* Enable SHMConfig in the X server configuration file as described in the section [[UbuntuHelp:[shmconfig|Enabling SHMConfig]]].
+
* [[UbuntuHelp:[shmconfig|Enable SHMConfig]]].
 
* For a preference tool which integrates into the GNOME Desktop environment, install the '''gsynaptics''' package from the universe repository. For help with installing packages see [[UbuntuHelp:InstallingSoftware|InstallingSoftware]].
 
* For a preference tool which integrates into the GNOME Desktop environment, install the '''gsynaptics''' package from the universe repository. For help with installing packages see [[UbuntuHelp:InstallingSoftware|InstallingSoftware]].
 
After installation, '''gsynaptics''' can be found under '''System > Preferences > Touchpad'''.
 
After installation, '''gsynaptics''' can be found under '''System > Preferences > Touchpad'''.
 
<<Anchor(ksynaptics)>>
 
<<Anchor(ksynaptics)>>
 
=== Kubuntu ===
 
=== Kubuntu ===
* Enable SHMConfig in the X server configuration file as described in the section [[UbuntuHelp:[shmconfig|Enabling SHMConfig]]].
+
* [[UbuntuHelp:[shmconfig|Enable SHMConfig]]].
 
* For a preference tool which integrates into the KDE desktop environment, install the '''ksynaptics''' package from the universe repository. For help with installing packages see [[UbuntuHelp:InstallingSoftware|InstallingSoftware]].
 
* For a preference tool which integrates into the KDE desktop environment, install the '''ksynaptics''' package from the universe repository. For help with installing packages see [[UbuntuHelp:InstallingSoftware|InstallingSoftware]].
 
After installation, '''ksynaptics''' can be found in the '''KDE Control Center'''.
 
After installation, '''ksynaptics''' can be found in the '''KDE Control Center'''.
 
<<Anchor(qsynaptics)>>
 
<<Anchor(qsynaptics)>>
 
=== Xubuntu and others ===
 
=== Xubuntu and others ===
* Enable SHMConfig in the X server configuration file as described in the section [[UbuntuHelp:[shmconfig|Enabling SHMConfig]]].
+
* [[UbuntuHelp:[shmconfig|Enable SHMConfig]]].
 
* For users of Xfce or anything else besides GNOME or KDE, install the '''qsynaptics''' package from the universe repository. For help with installing packages see [[UbuntuHelp:InstallingSoftware|InstallingSoftware]].
 
* For users of Xfce or anything else besides GNOME or KDE, install the '''qsynaptics''' package from the universe repository. For help with installing packages see [[UbuntuHelp:InstallingSoftware|InstallingSoftware]].
 
<<Anchor(syndaemon)>>
 
<<Anchor(syndaemon)>>
 
== Disabling the Touchpad Temporarily While Typing ==
 
== Disabling the Touchpad Temporarily While Typing ==
 
To avoid accidental mouse movement while typing, '''syndaemon''' can be used to monitor the keyboard activity and disable the touchpad for a period of time after the last keystroke.
 
To avoid accidental mouse movement while typing, '''syndaemon''' can be used to monitor the keyboard activity and disable the touchpad for a period of time after the last keystroke.
First enable SHMConfig in the X server configuration file as described in the section [[UbuntuHelp:[shmconfig|Enabling SHMConfig]]].
+
If syndaemon doesn't work properly out of the box, try [[UbuntuHelp:[shmconfig|enabling SHMConfig]]], and force syndaemon to use it by passing the -S option.
 
The following commands should be typed in a [[UbuntuHelp:UsingTheTerminal|terminal]].
 
The following commands should be typed in a [[UbuntuHelp:UsingTheTerminal|terminal]].
 
The '''-d''' option causes '''syndaemon''' to run in the background, so the terminal can be closed after executing the command.  
 
The '''-d''' option causes '''syndaemon''' to run in the background, so the terminal can be closed after executing the command.  
第45行: 第44行:
 
<<Anchor(shmconfig)>>
 
<<Anchor(shmconfig)>>
 
== Enabling SHMConfig ==
 
== Enabling SHMConfig ==
'''Note:''' In Ubuntu 8.10 (Intrepid Ibex) and later, tools such as '''xinput''' can alter touchpad settings without needing '''SHMConfig''' to be enabled. However, SHMConfig is still required for some features, and it is now easier to enable.
+
'''Note:''' Tools such as '''xinput''' and '''syndaemon''' can now alter touchpad settings without needing '''SHMConfig''' to be enabled. However, SHMConfig is still required for some functionality.
In order for tools such as '''[[UbuntuHelp:[synclient|synclient]]]''', '''[[UbuntuHelp:[syndaemon|syndaemon]]]''', '''[[UbuntuHelp:[gsynaptics|gsynaptics]]]''', '''[[UbuntuHelp:[ksynaptics|ksynaptics]]]''', and '''[[UbuntuHelp:[qsynaptics|qsynaptics]]]''' to work, they need access to the synaptics touchpad driver shared memory. This is done by enabling '''SHMConfig''' "on" in the X server Synaptics Touchpad configuration. With this enabled, these tools can modify the run-time configuration of the touchpad input driver without restarting the X server.
+
In order for tools such as '''[[UbuntuHelp:[synclient|synclient]]]''', '''[[UbuntuHelp:[syndaemon|syndaemon]]]''', '''[[UbuntuHelp:[gsynaptics|gsynaptics]]]''', '''[[UbuntuHelp:[ksynaptics|ksynaptics]]]''', and '''[[UbuntuHelp:[qsynaptics|qsynaptics]]]''' to work, they need access to the synaptics touchpad driver shared memory. This is done by enabling '''SHMConfig''' "on" in the X server Synaptics touchpad configuration. With this enabled, these tools can modify the run-time configuration of the touchpad input driver without restarting the X server.
 
/!\ Note the warning from the man page for synclient:
 
/!\ Note the warning from the man page for synclient:
 
<pre><nowiki>
 
<pre><nowiki>
 
WARNING: This is not secure if you are in an untrusted multiuser
 
WARNING: This is not secure if you are in an untrusted multiuser
    environment. All local users can change the parameters at any time.
+
        environment. All local users can change the parameters at any time.
 
  </nowiki></pre>
 
  </nowiki></pre>
If this is an issue for you, the touchpad can be configured without enabling SHMConfig by placing the desired options in the X server configuration file or a HAL fdi file and restarting the X server. See [[UbuntuHelp:[xconfig|Configuration with the X Server Configuration file]]].
+
If this is an issue for you, the touchpad can be configured without enabling SHMConfig by placing the desired options in [[UbuntuHelp:[hal|a HAL fdi file]]] and rebooting.
=== Ubuntu 8.10 and later ===
+
'''Note:''' For most touchpad options in Ubuntu 8.10 and later, this is unnecessary.
+
 
In a [[UbuntuHelp:UsingTheTerminal|terminal]] type:
 
In a [[UbuntuHelp:UsingTheTerminal|terminal]] type:
 
<pre><nowiki>
 
<pre><nowiki>
gksudo gedit /usr/share/hal/fdi/policy/20thirdparty/11-x11-synaptics.fdi
+
gksudo gedit /etc/hal/fdi/policy/shmconfig.fdi
 
</nowiki></pre>
 
</nowiki></pre>
Find the section in that file that looks like this:
+
Put this into the file:
 
<pre><nowiki>
 
<pre><nowiki>
      <match key="info.product" contains="Synaptics TouchPad">
+
<?xml version="1.0" encoding="ISO-8859-1"?>
        <merge key="input.x11_driver" type="string">synaptics</merge>
+
<deviceinfo version="0.2">
        <!-- Arbitrary options can be passed to the driver using
+
<device>
            the input.x11_options property since xorg-server-1.5. -->
+
  <match key="input.x11_driver" string="synaptics">
        <!-- EXAMPLE:
+
  <merge key="input.x11_options.SHMConfig" type="string">True</merge>
        <merge key="input.x11_options.LeftEdge" type="string">120</merge>
+
  </match>
        -->
+
</device>
      </match>
+
</deviceinfo>
 
</nowiki></pre>
 
</nowiki></pre>
That example shows us how to set options for the device. In this case, we need to set SHMConfig to true, so we look at the example and add a line to make that part of the file look like this:
+
Save and close that file, reboot, and SHMConfig should be enabled.
<pre><nowiki>
+
      <match key="info.product" contains="Synaptics TouchPad">
+
        <merge key="input.x11_driver" type="string">synaptics</merge>
+
        <!-- Arbitrary options can be passed to the driver using
+
            the input.x11_options property since xorg-server-1.5. -->
+
        <!-- EXAMPLE:
+
        <merge key="input.x11_options.LeftEdge" type="string">120</merge>
+
        -->
+
        <merge key="input.x11_options.SHMConfig" type="string">true</merge>
+
      </match>
+
</nowiki></pre>
+
Save and close that file, log out and back in again, and SHMConfig should be enabled.
+
=== Ubuntu 8.04 and earlier ===
+
In a [[UbuntuHelp:UsingTheTerminal|terminal]] type:
+
<pre><nowiki>
+
gksudo gedit /etc/X11/xorg.conf
+
</nowiki></pre>
+
Find the "Input``Device" section for the touchpad:
+
<pre><nowiki>
+
Section "InputDevice"
+
Identifier "Synaptics Touchpad"
+
Driver "synaptics"
+
Option "SendCoreEvents" "true"
+
Option "Device" "/dev/psaux"
+
Option "Protocol" "auto-dev"
+
Option "HorizScrollDelta" "0"
+
EndSection
+
</nowiki></pre>
+
If this section is not present, see [[UbuntuHelp:[xinputdevice|Adding a Synaptics Touchpad to the X Server Configuration]]].
+
Add the following line to this section:
+
<pre><nowiki>
+
Option "SHMConfig" "on"
+
</nowiki></pre>
+
The result should look like this:
+
<pre><nowiki>
+
Section "InputDevice"
+
Identifier "Synaptics Touchpad"
+
Driver "synaptics"
+
Option "SendCoreEvents" "true"
+
Option "Device" "/dev/psaux"
+
Option "Protocol" "auto-dev"
+
Option "HorizScrollDelta" "0"
+
Option "SHMConfig" "on"
+
EndSection
+
</nowiki></pre>
+
To enable the changes log out of your desktop environment, and restart the X server by typing '''Ctrl + Alt + Backspace'''.
+
 
<<Anchor(synclient)>>
 
<<Anchor(synclient)>>
 
== Configuration with synclient ==
 
== Configuration with synclient ==
 
'''synclient''' can be used to adjust touchpad settings from the command line. This will work even if a [[UbuntuHelp:[gui|GUI Preference tool]]] is installed.
 
'''synclient''' can be used to adjust touchpad settings from the command line. This will work even if a [[UbuntuHelp:[gui|GUI Preference tool]]] is installed.
Enable SHMConfig in the X server configuration file as described in the section [[UbuntuHelp:[shmconfig|Enabling SHMConfig]]].
+
Enable SHMConfig as described in the section [[UbuntuHelp:[shmconfig|Enabling SHMConfig]]].
 
List all settings:
 
List all settings:
 
<pre><nowiki>
 
<pre><nowiki>
第136行: 第87行:
 
<<Anchor(hal)>>
 
<<Anchor(hal)>>
 
== Configuration with HAL fdi files ==
 
== Configuration with HAL fdi files ==
Ubuntu 8.10 and later provide multiple new means of configuring touchpads. See [[UbuntuWiki:X/Config#hal|the|HAL input section of the X config documentation]] for details.
+
Touchpad options can be set permanently through HAL. See [[UbuntuWiki:X/Config#hal|the|HAL input section of the X config documentation]] for details.
<<Anchor(xconfig)>>
+
== Configuration with the X Server Configuration file ==
+
The options that are shown by the command <code><nowiki>synclient -l</nowiki></code> ([[UbuntuHelp:[synclient|see above]]]) may also be added directly to the touchpad "Input``Device" section in <code><nowiki>/etc/X11/xorg.conf</nowiki></code>. In this case [[UbuntuHelp:[shmconfig|SHMConfig]]] does not need to be enabled.
+
For example, to turn the touchpad off, add the line:
+
<pre><nowiki>
+
Option "TouchpadOff" "1"
+
</nowiki></pre>
+
The result will look like this:
+
<pre><nowiki>
+
Section "InputDevice"
+
Identifier "Synaptics Touchpad"
+
Driver "synaptics"
+
Option "SendCoreEvents" "true"
+
Option "Device" "/dev/psaux"
+
Option "Protocol" "auto-dev"
+
Option "HorizScrollDelta" "0"
+
Option "SHMConfig" "off"
+
Option "TouchpadOff" "1"
+
EndSection
+
</nowiki></pre>
+
 
<<Anchor(troubleshooting)>>
 
<<Anchor(troubleshooting)>>
 
== Troubleshooting ==
 
== Troubleshooting ==
'''Note:''' This is largely irrelevant for Ubuntu 8.10 and later.
+
=== Determine whether a touchpad has been detected ===
=== Determine Whether a Touchpad Is Configured ===
+
To check if a touchpad has been detected open a [[UbuntuHelp:UsingTheTerminal|terminal]] and check the input device list given by this command:
To check if a touchpad is configured, open a [[UbuntuHelp:UsingTheTerminal|terminal]] and check your <code><nowiki>/etc/X11/xorg.conf</nowiki></code> file by typing the following:
+
<pre><nowiki>
+
grep Iden /etc/X11/xorg.conf
+
</nowiki></pre>
+
If one of the lines is:
+
<pre><nowiki>
+
Identifier "Synaptics Touchpad"
+
</nowiki></pre>
+
then you have a Synaptics Touchpad configured. If not, see [[UbuntuHelp:[xinputdevice|Adding a Synaptics Touchpad to the X Server Configuration]]].
+
<<Anchor(xinputdevice)>>
+
=== Adding a Synaptics Touchpad to the X Server Configuration ===
+
To add support for a touchpad which was not detected the xorg.conf file will need to be edited. In a [[UbuntuHelp:UsingTheTerminal|terminal]] type:
+
<pre><nowiki>
+
gksudo gedit /etc/X11/xorg.conf
+
</nowiki></pre>
+
After the lines:
+
<pre><nowiki>
+
Section "InputDevice"
+
Identifier "Configured Mouse"
+
Driver "mouse"
+
Option "CorePointer"
+
Option "Device" "/dev/input/mice"
+
Option "Protocol" "ExplorerPS/2"
+
Option "ZAxisMapping" "4 5"
+
Option "Emulate3Buttons" "true"
+
EndSection
+
</nowiki></pre>
+
add the following:
+
<pre><nowiki>
+
Section "InputDevice"
+
Identifier "Synaptics Touchpad"
+
Driver "synaptics"
+
Option "SendCoreEvents" "true"
+
Option "Device" "/dev/psaux"
+
Option "Protocol" "auto-dev"
+
Option "HorizScrollDelta" "0"
+
EndSection
+
</nowiki></pre>
+
Next, find the "Server``Layout" section near the bottom:
+
<pre><nowiki>
+
Section "ServerLayout"
+
Identifier "Default Layout"
+
Screen "Default Screen"
+
InputDevice "Generic Keyboard"
+
InputDevice "Configured Mouse"
+
InputDevice    "stylus" "SendCoreEvents"
+
InputDevice    "cursor" "SendCoreEvents"
+
InputDevice    "eraser" "SendCoreEvents"
+
EndSection
+
</nowiki></pre>
+
Add the following line:
+
<pre><nowiki>
+
InputDevice "Synaptics Touchpad"
+
</nowiki></pre>
+
The result should look like this:
+
 
<pre><nowiki>
 
<pre><nowiki>
Section "ServerLayout"
+
xinput list
Identifier "Default Layout"
+
Screen "Default Screen"
+
InputDevice "Generic Keyboard"
+
InputDevice "Configured Mouse"
+
InputDevice "stylus" "SendCoreEvents"
+
InputDevice "cursor" "SendCoreEvents"
+
InputDevice "eraser" "SendCoreEvents"
+
InputDevice "Synaptics Touchpad"
+
EndSection
+
 
</nowiki></pre>
 
</nowiki></pre>
To enable the changes log out of your desktop environment, and restart the X server by typing '''Ctrl + Alt + Backspace'''.
+
If one of the lines mentions a touchpad (perhaps also "Synaptics" or "ALPS"), your touchpad has been detected. If not, see [[UbuntuWiki:DebuggingTouchpadDetection|the|other touchpad debugging pages]].
 
=== Specific Hardware ===
 
=== Specific Hardware ===
 
==== Apple iBook G4 ====
 
==== Apple iBook G4 ====
第235行: 第102行:
 
* [[UbuntuHelp:SynapticsTouchpad/ShortcutKey|Turning Synaptics Touchpads On/Off with a Shortcut Key]]
 
* [[UbuntuHelp:SynapticsTouchpad/ShortcutKey|Turning Synaptics Touchpads On/Off with a Shortcut Key]]
 
----
 
----
[[category:CategoryDocumentation]]
+
[[category:CategoryDocumentation]] [[category:CategoryX]]
  
 
[[category:UbuntuHelp]]
 
[[category:UbuntuHelp]]

2008年12月16日 (二) 20:14的版本


  1. title Synaptics Touchpad

On most laptops, a touchpad is the input device used as a substitute for a computer mouse. The term "Synaptics Touchpad" should not be confused with "Synaptic", Ubuntu's Package Manager. For Ubuntu 8.04 and earlier, see the older instructions. <<Anchor(gui)>>

Basic Configuration with a Graphical Interface

Ubuntu provides configuration of the most common touchpad options in System > Preferences > Mouse, under the Touchpad tab.

Advanced Configuration with a Graphical Interface

This sections describes how to install a GUI configuration tool for your Synaptics touchpad which integrates into your desktop environment. Other methods of configuring the touchpad include using [[UbuntuHelp:[synclient|synclient]]] on the command line, or by [[UbuntuHelp:[hal|adding options]]] to HAL fdi files. <<Anchor(gsynaptics)>>

Ubuntu

  • [[UbuntuHelp:[shmconfig|Enable SHMConfig]]].
  • For a preference tool which integrates into the GNOME Desktop environment, install the gsynaptics package from the universe repository. For help with installing packages see InstallingSoftware.

After installation, gsynaptics can be found under System > Preferences > Touchpad. <<Anchor(ksynaptics)>>

Kubuntu

  • [[UbuntuHelp:[shmconfig|Enable SHMConfig]]].
  • For a preference tool which integrates into the KDE desktop environment, install the ksynaptics package from the universe repository. For help with installing packages see InstallingSoftware.

After installation, ksynaptics can be found in the KDE Control Center. <<Anchor(qsynaptics)>>

Xubuntu and others

  • [[UbuntuHelp:[shmconfig|Enable SHMConfig]]].
  • For users of Xfce or anything else besides GNOME or KDE, install the qsynaptics package from the universe repository. For help with installing packages see InstallingSoftware.

<<Anchor(syndaemon)>>

Disabling the Touchpad Temporarily While Typing

To avoid accidental mouse movement while typing, syndaemon can be used to monitor the keyboard activity and disable the touchpad for a period of time after the last keystroke. If syndaemon doesn't work properly out of the box, try [[UbuntuHelp:[shmconfig|enabling SHMConfig]]], and force syndaemon to use it by passing the -S option. The following commands should be typed in a terminal. The -d option causes syndaemon to run in the background, so the terminal can be closed after executing the command.

syndaemon -d

The -t option causes syndaemon to only disable tapping and scrolling, not mouse movements:

syndaemon -d -t

By default syndaemon disables the touchpad for 2 seconds after the last keyboard activity. To specify a different timeout, use the -i option. For example, a timeout of 1 second:

syndaemon -d -i 1

To make syndaemon start up each time you login, add the desired command to the list of Startup Programs in System > Preferences > Sessions. See AddingProgramToSessionStartup. <<Anchor(shmconfig)>>

Enabling SHMConfig

Note: Tools such as xinput and syndaemon can now alter touchpad settings without needing SHMConfig to be enabled. However, SHMConfig is still required for some functionality. In order for tools such as [[UbuntuHelp:[synclient|synclient]]], [[UbuntuHelp:[syndaemon|syndaemon]]], [[UbuntuHelp:[gsynaptics|gsynaptics]]], [[UbuntuHelp:[ksynaptics|ksynaptics]]], and [[UbuntuHelp:[qsynaptics|qsynaptics]]] to work, they need access to the synaptics touchpad driver shared memory. This is done by enabling SHMConfig "on" in the X server Synaptics touchpad configuration. With this enabled, these tools can modify the run-time configuration of the touchpad input driver without restarting the X server. /!\ Note the warning from the man page for synclient:

WARNING: This is not secure if you are in an untrusted multiuser
         environment. All local users can change the parameters at any time.
 

If this is an issue for you, the touchpad can be configured without enabling SHMConfig by placing the desired options in [[UbuntuHelp:[hal|a HAL fdi file]]] and rebooting. In a terminal type:

gksudo gedit /etc/hal/fdi/policy/shmconfig.fdi

Put this into the file:

<?xml version="1.0" encoding="ISO-8859-1"?>
<deviceinfo version="0.2">
 <device>
  <match key="input.x11_driver" string="synaptics">
   <merge key="input.x11_options.SHMConfig" type="string">True</merge>
  </match>
 </device>
</deviceinfo>

Save and close that file, reboot, and SHMConfig should be enabled. <<Anchor(synclient)>>

Configuration with synclient

synclient can be used to adjust touchpad settings from the command line. This will work even if a [[UbuntuHelp:[gui|GUI Preference tool]]] is installed. Enable SHMConfig as described in the section [[UbuntuHelp:[shmconfig|Enabling SHMConfig]]]. List all settings:

synclient -l

Examples

Turn touchpad off:

synclient TouchpadOff=1

Turn touchpad on:

synclient TouchpadOff=0

<<Anchor(hal)>>

Configuration with HAL fdi files

Touchpad options can be set permanently through HAL. See the|HAL input section of the X config documentation for details. <<Anchor(troubleshooting)>>

Troubleshooting

Determine whether a touchpad has been detected

To check if a touchpad has been detected open a terminal and check the input device list given by this command:

xinput list

If one of the lines mentions a touchpad (perhaps also "Synaptics" or "ALPS"), your touchpad has been detected. If not, see the|other touchpad debugging pages.

Specific Hardware

Apple iBook G4

See also