How To: Setting up Touchpad on a Laptop - A Complete Guide

Every laptop comes with a usefull thing when you don't want to carry your mouse around: a Touchpad, most of the time, touchpads do work out of the box but not all the goodies are activated by default.

On a basic setup, you can use the touchpad to move your mouse around as well as the left and right click.

There is much more you can get from it, for instance dragging and dropping items, vertical scrolling, right click by tapping the pad....

This how-to will show you how to get the most of it.

This how-to being quite long, it is going to be divided in 5 parts:

  1. Setting up Touchpad on a Laptop: Introduction
  2. Setting up Touchpad on a Laptop: Installation
  3. Setting up Touchpad on a Laptop: Configuration
  4. Setting up Touchpad on a Laptop: Explanation
  5. Setting up Touchpad on a Laptop: How to use it, conclusion and links

People wanting to get it working quickly might just want to check for parts 2,3 and 5.
1. Introduction:
Since kernel 2.6.x, the synaptics driver is included by default, so you don't need to patch and recompile your kernel in order to make your touchpad work.

Synaptics touchpad, by default, emulate a standard mouse, so you can basically use the touchpad to move your mouse pointer around as well as left and right click by using the dedicated buttons.

However, you can get much more out of it by using a dedicated driver.

This how-to will show you how you get get the following features to run on your laptop:

Table of Content:
Setting up Touchpad on a Laptop: Installation
Setting up Touchpad on a Laptop: Configuration
Setting up Touchpad on a Laptop: Explanation
Setting up Touchpad on a Laptop: How to use it, conclusion and links


How To: Setting up Touchpad on a Laptop - A Complete Guide -- page 2

2. Synaptics installation:

On Ubuntu Dapper and Edgy and Debian Testing and Unstable, you need to install the package xserver-xorg-input-synaptics:
$sudo apt-get install xserver-xorg-input-synaptics
Ubuntu Breezy and Debian Stable require xfree86-driver-synaptics:
$sudo apt-get install xfree86-driver-synaptics
Now, there is one thing to keep in mind: there is 2 types of touchpad out there:

In order to know which one is yours, produce the following command line:
$ cat /proc/bus/input/devices
and check for the line where Name is either synaptics or ALPS. My laptop produce the following result:
I: Bus=0011 Vendor=0002 Product=0008 Version=7322
N: Name="AlpsPS/2 ALPS GlidePoint"
P: Phys=isa0060/serio4/input0
S: Sysfs=/class/input/input3
H: Handlers=mouse2 ts2 event3
B: EV=f
B: KEY=420 0 670000 0 0 0 0 0 0 0 0
B: REL=3
B: ABS=1000003
So basically, It is a Alps touchpad.

Okie, now it is time to edit and configure your xorg configuration file.

Table of Content:
Setting up Touchpad on a Laptop: Introduction
Setting up Touchpad on a Laptop: Configuration
Setting up Touchpad on a Laptop: Explanation
Setting up Touchpad on a Laptop: How to use it, conclusion and links


How To: Setting up Touchpad on a Laptop - A Complete Guide -- page 3

3. Configuring Xorg:

You need to inform Xorg about your touchpad device, there is basically 3 steps:

  1. Load the synaptics module
  2. Create and fill the device section for your synaptics touchpad
  3. Add the newly created Input device to your server layout

First of all, you need to edit xorg.conf. To do so, use your preferred text editor. I personnaly use vi when I'm doing administration tasks.

$sudo vi /etc/X11/xorg.conf

And then tell Xorg to load the synaptics driver, to do so, go to the Section "Module" and add the following line if it is not already present:

Load    "synaptics"

Then create a new Section "InputDevice" where you will put:

For laptop having a ALPS touchpad (this is the one I use, so it is tested and works fine on my box:

Section "InputDevice"
Driver "synaptics"
Identifier "touchpad"
Option "Device" "/dev/psaux"
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.030"
Option "EdgeMotionMinSpeed" "200"
Option "EdgeMotionMaxSpeed" "200"
Option "UpDownScrolling" "1"
Option "CircularScrolling" "1"
Option "CircScrollDelta" "0.1"
Option "CircScrollTrigger" "2"
Option "SHMConfig" "on"

#always usefull
Option "Emulate3Buttons" "on"
EndSection

For laptop using a synaptics touchpad, not the one I own so this should works but I'm waiting for your coments guys ;) :

Section "InputDevice"
Driver "synaptics"
Identifier "touchpad"
Option "Device" "/dev/psaux"
Option "Protocol" "auto-dev"
Option "LeftEdge" "1700"
Option "RightEdge" "5300"
Option "TopEdge" "1700"
Option "BottomEdge" "4200"
Option "FingerLow" "25"
Option "FingerHigh" "30"
Option "MaxTapTime" "180"
Option "MaxTapMove" "220"
Option "VertScrollDelta" "100"
Option "MinSpeed" "0.09"
Option "MaxSpeed" "0.18"
Option "AccelFactor" "0.015"
Option "SHMConfig" "on"
#always usefull
Option "Emulate3Buttons" "on"
EndSection

and then, tell the ServerLayout about your new device, go to the Section "ServerLayout" and add the following like just before EndSection:

InputDevice "touchpad" "AlwaysCore"

Yeah, this should be all good. You need to restart your X server (Ctrl-Alt-Backspace) and all the nice features of your touchpad should be enabled.

On Next page, I'm going to explain what those directives stands for. You might want to go directly to the page after to see how to use the features of your touchpad.

Table of Content:
Setting up Touchpad on a Laptop: Introduction
Setting up Touchpad on a Laptop: Installation
Setting up Touchpad on a Laptop: Explanation
Setting up Touchpad on a Laptop: How to use it, conclusion and links


How To: Setting up Touchpad on a Laptop - A Complete Guide -- page 4

4. Explanation on those directives:

TODO, in the meanwhile, carry onto next page to See How to use the touchpad

Table of Content:
Setting up Touchpad on a Laptop: Introduction
Setting up Touchpad on a Laptop: Installation
Setting up Touchpad on a Laptop: Configuration
Setting up Touchpad on a Laptop: How to use it, conclusion and links


How To: Setting up Touchpad on a Laptop - A Complete Guide -- page 5

5. How to use the advanced feature of your Touchpad:

Zones on a Synaptics touchpadHere is a sketch of a basic touchpad (touchpad + left and right mouse button)

As you can see, there is 9 zones on your touchpad called:

Okie, now let'see what you can do with your touchpad. As before, you can move your mouse pointer around, but in addition, you can:

Basically, you don't need anymore the two buttons from the touchpad as you can do every action a full featured mouse will offer (but still, this is not as confortable to use as a real mouse is.... you definitely won't play games with this :) ).

6. Conclusion:

This tutorial went throught every step to get a fully operating touchpad with all features enable.

You might want to set parameters such as MinSpeed, MaxSpeed, AccelFactor ... to your need and feeling but the default settings given should be fine for most users.

7. Links:

Synaptics Touchpad driver for Xorg/XFree86

Qsynaptics : X11 touch pad driver configuration utility based on QT

Gsynaptics : A GTK utility to configure your touchpad

Table of Content:
Setting up Touchpad on a Laptop: Introduction
Setting up Touchpad on a Laptop: Installation
Setting up Touchpad on a Laptop: Configuration
Setting up Touchpad on a Laptop: Explanation