Calibrating touch using xinput calibrator in Linux

Xinput_calibrator needs no special driver and is ideal for X based graphical interfaces.

Installing the tool

The tool can be installed form the standard repository of Ubuntu, Debian, Suse and RedHat flavours. For Debian based system use the command:

sudo apt-get install xinput-calibrator

The tools can be compiled from the sources, follow the steps described:

1. Clone the repository using the command.

git clone

2. As mentioned in the readme file, configure the build for the GUI library used in the system using the command

./ –with-gui=x11

3. Run the make command. The program will be built in the src folder.

Calibrating with single display

For calibrating the touch using the tool follow the steps described:

1. Run the command xinput_calibarator in the command prompt.

2. Graphics with a cross hair will be shown


3. Touch the cross hair until it turns from red to white.

4. Once the calibration has been completed for the 4 cross hairs, tool will exit automatically and the calibration information will be shown in the terminal. As mentioned copy the section in the file specified. An example of the same is shown below


As explained in the log store the portion marked in brown in the configuration file. This will be picked by the X org automatically.

Calibrating with multiple display

The process of calibrating with multiple displays involves mapping the display and the touch controller. Follow additional steps other than described above is needed:

1. Run xinput in terminal to get the id of input device


2. Run xrand in terminal to get the id of display

test@test-box:~$ xrand
Screen 0: minimum 8 x 8, current 3840 x 1080, maximum 32767 x 32767
eDP1 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 382mm x 215mm
   1920x1080      60.0*+   59.9     40.0
DMI1 connected primary 1920x1080+1920+0 (normal left inverted right x axis y axis) 600mm x 340mm
   1920x1080      60.0*+   50.0     59.9
   1680x1050      59.9

3. In this case the display is eDP1 and the touch id is 12. Map the display to input using the command

xinput map-to-output 12 eDP1

4. Follow the steps in the section Calibrating with single display to complete the calibration


One thought on “Calibrating touch using xinput calibrator in Linux

  1. Pingback: Calibrating touch in Linux | Nibbling the bits

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s