Linux driver for Synaptics USB devices

home / linux / synaptics-usb
Latest: version 1.5rc8
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.

    Changes

    version 1.5rc8:
  • fixed compilation errors with kernel 2.6.36
    version 1.5rc7:
  • fixed compilation errors with kernel 2.6.35
    version 1.5rc6:
  • minor fixes
  • improved stick support
  • removed old synaptics-usb-rebind script
  • removed enable_screen module options
    version 1.5rc5:
  • made enable_stick and enable_screen sysfs filed writeable
    version 1.5rc4:
  • added enable_stick and enable_screen module options
    version 1.5rc3:
  • added check for non-cPads in cpad_check_setup
    version 1.5rc2:
  • split cPad code into a separate file
  • reviewed cPad suspend code
    version 1.5rc1:
  • fixed serious bug in error handling of the cPad display character device
  • added basic TouchStyk support
    version 1.4:
  • added suspend support
  • fixed bug in synusb_delete()
  • fixed compilation errors with kernel 2.6.25
    version 1.4rc9:
  • fixed compilation errors with kernel 2.6.20
    version 1.4rc8:
  • fixed compilation errors with kernel 2.6.19
    version 1.4rc7:
  • do not use config.h for kernel versions >= 2.6.15
    version 1.4rc6:
  • fixed compilation errors with kernel 2.6.18
    version 1.4rc5:
  • fixed kernel patch for 2.6.16
    version 1.4rc4:
  • fixed compilation errors with kernel 2.6.16
    version 1.4rc3:
  • fixed errors with kernel 2.6.15
  • included rebind shell script
    version 1.4rc2:
  • added support for devices with USB-ID 06CB:0001 and 06CB:0008
  • do not accept If#=1 in synusb_probe for composite devices (06CB:0009)
    version 1.4rc1:
  • switched to manual driver binding
    version 1.3:
  • added support for devices with IBM UltraNav (ID 06cb:0009)
  • renamed to synaptics-usb
    version 1.2:
  • added support for Synaptics USB Touchpads with ID 06cb:0002 (cPad is 06cb:0003)
    version 1.1:
  • fixed compilation errors for kernel versions < 2.6.10
    version 1.0:
  • the driver has now only an input and a character device, and is based on usb_skeleton.c version 2.0
    version 0.9-3:
  • Some changes in the way this driver gets the cPad from usbhid
    version 0.9-2:
  • procfs broke in 0.9. Now it works again.
    version 0.9:
  • Grab the cPad back from any driver that has already claimed it. Leap ahead a couple of versions to sync with the 2.4 driver, so people upgrading see a more or less monotonic increase in version numbers (and because the Debian build of 0.5 already released with DRIVER_VERSION of v0.8). Let's aim for v1.0 to be accepted into the mainstream kernel tree.
    version 0.6:
  • invert screen now possible in 1 bpp mode too
    version 0.5:
  • Replaced deprecated MODULE_PARM and remap_page_range.
  • Merged with the 2.4 package as the cpad-0.8 release. (Debian package)
    version 0.4:
  • replaced del_timer_sync with del_timer in interrupt context (bad bug)
    version 0.3:
  • replaced interruptible_sleep_on_timeout with wait_event_interruptible_timeout
  • removed some inline's
  • show more information in procfs
  • add support for 1 bpp to frame buffer
  • add ioctl's to frame buffer
  • add oneframe, onlychanged and onlyvisible options to frame buffer
    version 0.2:
  • fixed a color to mono conversion bug
  • added a pseudo_palette (needed by virtual terminals)
    version 0.1:
  • first release