Search:  
Gentoo Wiki

Synaptics_Touchpad/Xorg_7.3


 XOrg IndexConfigurationHIDevices
FontsVideo CardsMonitors  


Contents

This guide describes setting up Synaptics and ALPS touchpads under Linux for Xorg 7.3 and newer.

This is not strictly necessary for normal mouse functionality, which can be achieved with the standard X11 mouse configuration. The synaptics driver enables the following functionality:

  1. Movement with adjustable, non-linear acceleration and speed.
  2. Button events through tapping (Click and Double-Click).
  3. Dragging.
  4. Middle and right button events on the upper and lower corners.
  5. Vertical scrolling (button four and five events) through moving the finger on the right side.
  6. The up/down button sends0button four/five events.
  7. Horizontal scrolling (button six and seven events) through moving the finger on the lower side.
  8. The multi-buttons send button four/five events, and six/seven events for horizontal scrolling.
  9. Adjustable finger detection.
  10. Multifinger taps: two finger for middle button and three finger for right button (Requires hardware support).
  11. Run-time configuration. This means you can change parameter settings without restarting the X server.

Basic Setup

Kernel Setup

Linux Kernel Configuration:
 Device Drivers --->
   Input Device Support --->
       <*> Event Interface
       [*] Mice --->
           <*> PS/2 mouse
           Apple users may also need the following option:
           <*> Apple USB Touchpad support

Xorg Setup

First add this line to your /etc/make.conf:

File: /etc/make.conf
INPUT_DEVICES="... synaptics ...."

Also check with emerge --info | grep hal, that the hal USE flag is enabled. Then install Xorg:

# emerge --ask --verbose xorg-x11

or update your existing system:

# emerge -uDNva world

Now follow the Xorg guide to complete the setup and to start the X server.

Advanced Topics

Available Options

Today the input devices get configurated by HAL. The use of the xorg.conf for input configuration is deprecated. To add an option, you have to create a .fdi file. Here an example how to activate the shared memory option to enable real time tweaking:

File: /etc/hal/fdi/policy/99-x11-synaptics.fdi
<?xml version="1.0" encoding="ISO-8859-1"?>
<deviceinfo version="0.2">
  <device>
    <match key="info.capabilities" contains="input.touchpad">
      <merge key="input.x11_options.SHMConfig" type="string">On</merge>
    </match>
  </device>
</deviceinfo>

You can set all other options like this. Just add another <merge key="input.x11_options.Your Option" type="string">Your Value</merge> line. For more informations about HAL and .fdi files, see the HAL article.

For more options and their meanings, see the installed man page:

man synaptics

Real-Time Tweaking

Changes to the touchpad configuration can be made without restarting X using synclient. These changes are not permanent and must be explicitly set via the HAL .fdi file or in a startup script.

To activate the tweaking you have to add the SHMConfig option to your .fdi file, see above.

Usage examples:

Prevent Accidental Mouse Movement

Note: Starting syndaemon using the init script doesn't work. It will be removed in the near future.

If your laptop has a compact physical layout, you may often have accidental mouse clicks while typing. syndaemon (part of the synaptics package) can be used to disable the touchpad while keyboard keys are pressed.

You can start the daemon automatically using the .xinitrc file in your $HOME directory or using your desktop's autostart feature (if available). For KDE, add this script to the ~/.kde/Autostart/ folder:

File: ~/.kde/Autostart/syndaemon
#!/bin/bash
syndaemon

If you wish to use modifier keys (e.g.: Ctrl, Alt) while moving the mouse, you can add -k to the command.

Please read syndaemon's man page for more options to control disabling the touchpad while typing.

Troubleshooting

Bear in mind that if you are upgrading from an existing xorg.conf style configuration to HAL style configuration, you should remove the InputDevice section corresponding to the mouse from /etc/X11/xorg.conf; otherwise this may conflict with HAL settings.

After I updated my system I've now x11-drivers/xf86-input-synaptics-0.15.2-r2 installed on it (I had x11-drivers/synaptics-0.14.6_p20070706-r1 before) and the tapping became almost unusable. I could restore the previous behavior just changing this:

synclient MaxTapMove=2000

In order to make this change permanent I also updated the /usr/share/hal/fdi/policy/10osvendor/11-x11-synaptics.fdi file modifying synaptics' section to be like this:

<match key="info.product" contains="Synaptics TouchPad">
 <merge key="input.x11_driver" type="string">synaptics</merge>
 <merge key="input.x11_options.SHMConfig" type="string">true</merge>
 <merge key="input.x11_options.MaxTapMove" type="string">2000</merge>
</match>

Just for reference, it's the touchpad of a Lenovo/IBM T60 latptop.

Rolando Zappacosta, 21/sep/08

Browsers may misinterpret the horizontal scroll as 'back' and 'forward'.

For Firefox there are these solutions:

  • Disable horizontal scroll. Add this to the touchpad's input section of your xorg.conf:
File: /etc/hal/fdi/policy/99-x11-synaptics.fdi
<?xml version="1.0" encoding="ISO-8859-1"?>
<deviceinfo version="0.2">
  <device>
    <match key="info.capabilities" contains="input.touchpad">
      ...
      <merge key="input.x11_options.HorizScrollDelta" type="string">0</merge>
      ...
    </match>
  </device>
</deviceinfo>
  • Another options is to configure Firefox so that it doesn't misinterpret the horizontal scroll. In firefox type in the address about:config. Double-click the line mousewheel.horizscroll.withnokey.action. Set it to 0 (2 is forward and back pages. 1 enables Horizontal scrolling). Set mousewheel.horizscroll.withnokey.sysnumlines to true.
  • If you actually want this feature (left scrolling takes you back, and right scrolling makes firefox go forward), set these values:
mousewheel.horizscroll.withnokey.action 2
mousewheel.horizscroll.withnokey.numlines -1 (Setting it to -1 or 1 is used to change directions of a back/forward gesture)
mousewheel.horizscroll.withnokey.sysnumlines false

For Opera to recognize horizontal scrolling, go to Preferences > Advanced > Shortcuts and click the Edit button next to Mouse setup. Expand the Application section and delete the two entries (Button6, Back) and (Button7, Forward).

Links

Retrieved from "http://www.gentoo-wiki.info/Synaptics_Touchpad/Xorg_7.3"

Last modified: Tue, 23 Sep 2008 08:28:00 +0000 Hits: 1,521