Review the current situation of touchscreen handling in ubuntu, take a look at the work done upstream to unify all touchscreen Xorg drivers into evdev. Find the best calibration tool and setup UI to use for touchscreens and make sure it works with the hal-input model.

Release Note

Support for a wide amount of touchscreens devices was added in this realease, this includes a new calibration tool.


Touchscreen are more and more common in all kind of devices from Notebooks over MIDs to all in one PCs. Historically touchscreen devices were hard to configure and set up through opaque calibration tools that had to be run from commandline, partially the values had to be computed manually and then had to be put into the xorg configuration file with an editor. This situation is not bearable for our users, an easy way to calibrate a touchscreen and change the setup is required.

Use Cases

  1. A touchscreen on a single monitor
  2. A touchscreen on one of multiple monitors (not currently supported)
  3. A few touchscreens on few of the monitors (not currently supported)
  4. Rotation of monitor with touchscreen and/or change of resolution on one of the monitors


Upstream switches touchscreen input support to evdev with hal integration, evdev has recieved basic support for touchscreen devices in the latest iteration but is lacking support for calibration. HAL uses evdev for touchscreen devices already but is lacking support for handling calibration data to properly adjust the devices to the used screen.


We will make HAL understand the calibration data. see the evtouch implementation used in intrepid as a design base. Data is read from a calibration file and attached to the HAL device with the hal-set-property command. We will add a cairo based calibration tool to generate a touchscreen calibration file the hal-input layer can read to apply it to the device in Xorg.


The evdev driver in its 2.1 release is capable of handling touchscreen devices, hal recognizes these devices as mice and automatically assigns the evdev driver to them. An implementation similar to the handling of evtouch in intrepid will be written that applies to evdev devices if they are recognized as touchscreens by an .fdi file. In the intrepid cycle a lot of lshal output was collected from the community to easily assemble a .fdi file to match against a large amount of touchscreens. Based on this .fdi data a hal handler will apply the calibration data stored in a textfile to the device. In case no calibration data is found an opportunity of calibration will be offered to the user.

A calibration tool based on the cairo lib was written by Søren Hauberg and its code was sent to the xorg development mailing list. Based of this code a tool for collecting and writing the calibration data to a file will be written.

A menu entry in the System->Administration submenu will be established to run the calibration tool at any given time.

Usually calibration requires more than just the screen coordinates, there are values like touch duration or screen rotation that need to be taken into account. These values need to be adjustable through a GUI, a mockup of this gui can be seen in the UI changes section. The values of the different calibration options will be attached to the calibration file and will be applied to the evdev driver as X properties through hal.

UI Changes

Mockup of a touchscreen settings tool:

Mockup of the advanced options of a touchscreen settings tool:

Code Changes


An existing evtouch calibration should be automatically converted to an evdev calibration, if this is not possible, make sure the user gets pointed to the new calibration tool to recalibrate his screen.

Test/Demo Plan

Unresolved issues

It is possible that not all existing drivers are covered by evdev. Drivers that dont work need to be identified and support for these devices needs to be added to evdev during the next development cycle. is supposed to be a meta collection bug for lshal output to add more hardware to the .fdi file and make sure evdev will support these devices in future releases.

KArmic BOF Notes


* Most touchscreens don't work * evtouch is the only working Xorg touchscreen driver

* Bug that collected hardware information during jaunty:

Calibration Tool

* move to daemon that uses xinput to collect xevents written by alberto milone

* upstream UI attempt written


* Ignore non-usb touchscreen currently * Priority - get frame work and as many usb touch screens working as possible * Recalibrate on screen rotation as secondary priority * 'lsinput' to list all the input devices on the system

* some driver provides tools to do calibration, and users have to manually write the values into Xorg.conf


* add all possible device IDs that were collected in the metabug to usbtouchscreen

* alberto will finish his xinput daemon that will act as a backend for the evdev

* ogra will port the calibration tool based on the upstream code that was


JauntyTouchscreenHandling (last edited 2009-08-07 10:24:19 by 89)