Linux driver for Synaptics USB devices

home / code / synaptics-usb
Latest: github
Notice: A version of this driver propagated into the main linux kernel tree and is available since kernel version 3.4-rc1. Please test it! (the synaptics-usb rebind script is not needed any more; cPad display support is not yet included)

This is a driver for Synaptics USB devices for kernel 2.6. Synaptics USB devices emulate an USB mouse by default, so you can also use the usbhid driver. But you will be able to use Synaptics TouchPad driver for X.Org in combination with this kernel module, which will improve mouse movement, enable vertical/horizontal scrolling, etc.

Here is a list of known Synaptics USB devices and if they are currently supported by this driver:
	vid:pid    Description from SynPD.inf (Winows)		Supported
	-------------------------------------------------------------------------
	06CB:0001  Synaptics USB TouchPad			? maybe ?
	06CB:0002  Synaptics Integrated USB TouchPad		yes
	06CB:0003  Synaptics cPad				yes
	06CB:0006  Synaptics TouchScreen			no
	06CB:0007  Synaptics USB Styk				? maybe ?
	06CB:0008  Synaptics USB WheelPad			? maybe ?
	06CB:0009  If#= 0: Synaptics Composite USB TouchPad	yes
	           If#= 1: Synaptics Composite USB TouchStyk	yes
	06CB:0010  Synaptics Wireless TouchPad			? maybe ?
	06CB:0013  Synaptics DisplayPad				? maybe ?
Please let me know if:
  • This driver works for devices which do not have a "yes" in the column "Supported"
  • Some bottons etc. are not working (I think the wheel of the WheelPad will not work yet)
  • You know something about the TouchScreen device (USB-ID 06CB:0006)
  • You have another Synaptics USB device
    In order to reverse-engineer unsupported features like unusual buttons or the wheel of the WheelPad, one can use the program synaptics-test.

    Installation

    The sources of your kernel must be installed and configured.

    Configuring the kernel

    In most cases the standard configuration of your kernel should already work (maybe you can skip this section).
    At least, you need USB support in the kernel:
    	CONFIG_USB: y/m
    		Device Drivers --->
    		    USB support --->
    			Support for Host-side USB
    USB will only work, if you have the right driver(s) for your USB host controller. My Toshiba Laptop needs both the EHCI and the OHCI driver. If unsure, just select all:
    	CONFIG_USB_EHCI_HCD and/or CONFIG_USB_OHCI_HCD and/or CONFIG_USB_UHCI_HCD: y/m
    		Device Drivers --->
    		    USB support --->
    			EHCI HCD (USB 2.0) support
    			OHCI HCD support
    			UHCI HCD (most Intel and VIA) support
    Synaptics TouchPad driver for X.Org needs an evdev interface:
    	CONFIG_INPUT_EVDEV: y/m
    		Device Drivers --->
    		    Input device support --->
    			Event interface
    Manual suspend and autosuspend support for the device needs:
    	CONFIG_USB_SUSPEND: y/m
    		Device Drivers --->
    		    USB support --->
    			USB selective suspend/resume and wakeup
    For the kernel module to stay loaded during system suspend (e.g. hibernation), one also needs:
    	CONFIG_USB_PERSIST: y/m
    		Device Drivers --->
    		    USB support --->
    			USB device persistence during system suspend
    The experimental driver for TouchStyks/Trackpoints needs uinput support in the kernel:
    	CONFIG_INPUT_UINPUT: y/m
    		Device Drivers --->
    		    Input Device Support --->
    			Miscellaneous devices --->
    			    User level driver support
    

    Installing the kernel module

    To compile the module, run:
    	make clean
    	make
    To install the module, run:
    	make install
    	modprobe synaptics-usb
    make install will also install the synaptics-usb script to /usr/local/sbin.

    Switching between usbhid and synaptics-usb

    This kernel module and usbhid will both try to bind to the touchpad device, but only the one that is loaded first will succeed. You can decide which driver you want by using manual driver binding, which is implemented in sysfs since kernel 2.6.13. The shell script synaptics-usb does this job for Synaptics USB touchpads. You should have a copy of it in /usr/local/sbin after make install. You can switch from usbhid to synaptics-usb driver with:
    	synaptics-usb rebind_to synaptics-usb
    If you use an old version of Synaptics TouchPad driver for X.Org, you should do this before X11 starts. You can switch back to usbhid any time with:
    	synaptics-usb rebind_to usbhid

    Synaptics TouchPad driver for X.Org

    To enable features like tap-to-click, vertical/horizontal scrolling, multifinger taps, etc you need Synaptics TouchPad driver for X.Org version >= 0.14.0 in addition to this kernel module. The example configuration for /etc/X11/xorg.conf that comes with this driver should work fine. Don't forget to check if you have evdev compiled into the kernel or as a module, otherwise it will not work.

    Support for pointing sticks (TouchStyk and some Trackpoints)

    Use the X.Org driver for pointing sticks. You need to rebind the kernel module also to Synaptics pointing sticks:
    	synaptics-usb rebind_stick_to synaptics-usb
    Notice that the pointing stick will behave in a strange way if you only rebind the device, but do not use the X.Org driver.

    Suspend and Hibernation

    The synaptics-usb script, that comes with the source for the kernel module, can be used to easily set up the suspend options provided by sysfs (if support for usb suspend is compiled into the kernel, see above). Currently the suspend support only works for kernel versions >= 2.6.23. In order to manually suspend the touchpad, run:
    	synaptics-usb suspend on
    The touchpad can again be activated by:
    	synaptics-usb suspend off
    An autosuspend of e.g. 5 seconds can be set by (the touchpad automatically resumes if it is touched):
    	synaptics-usb autosuspend 5
    	synaptics-usb suspend auto
    If you do a system suspend, e.g. hibernation, it is convenient to enable device persistence support:
    	synaptics-usb persist on

    Using the cPad display

    The cPad is an USB touchpad with background display (240x160 mono). The Display can be accessed via a character device. A cPad driver for kernel 2.4 is available at Rob Miller's page.

    cPad and Debian

    Ron Lee works on Debian packages for the cPad. The kernel modules are already available, user space programs maybe follow soon :-)

    Programs for the cPad character device

    If you want to flash the backlight and display nice pictures on the cPad, then the program usr_cpad is the best choice. It is included in the tarball of the kernel 2.4 driver, available at Rob Miller's page. There is also a gallery with examples, scripts ... Here is a slightly modified version of usr_cpad, which can send the images a bit faster.
    Ron Lee has updated his cpad-mux debian packages. It is still work in progress, but a calculator already works!
    With cpadfb you can put a frame buffer on the cPad.
    The tool cpadconsole can help developing programs for the character device.

    cPad and udev

    Udev with its standard configuration creates the cPad character device as /dev/cpad0, but it should be /dev/usb/cpad0. If you already use udev, you may want to use these config files:
    cpad.rules
    cpadsymlinks (rename it to cpadsymlinks.sh)
    Copy cpad.rules to /etc/udev/rules.d/ and cpadsymliks.sh to /etc/udev/scripts/. cpadsymlinks.sh must be executable. This config files will also create a directory /dev/cpad/0/ which contains symlinks to all devices that belong to the cpad.

    Behavior of the middle/menu button

    The middle button (menu button of the cPad) sends a BTN_MIDDLE event by default. You can change this to BTN_MISC with:
    	modprobe synaptics-usb btn_middle=0
    This option can also be changes throught sysfs without reloading the module.

    Calibrate abs finger position

    If you want to use the /dev/input/ts? (emulates Compaq Touchscreen protocol) device of the touchpad, you maybe want to adjust the following values:
    	modprobe xmin=<value> xmax=<value> ymin=<value> ymax=<value>
    The default values are:
    	xmin=1472
    	xmax=5472
    	ymin=1408
    	ymax=4448

    Bug

  • With kernel >= 2.6.7 rmmod hangs while the evdev device of the cPad (/dev/input/event?) is in use. usbhid.ko seems to have the same problem. If you are using Synaptics TouchPad driver for X.Org and do rmmod from xterm, it will hang. Switching to console and then back to X helps. This was a bug in the input core, now fixed in kernels >= 2.6.10.