location: Touch screen

Institute of Mathematics - PublicMathWiki:

Touch screen

Calibration on Ubuntu

The touch screen is calibrated with the xinput-calibrator tool that can be installed with

> sudo apt install xinput-calibrator

Once the tool is installed, type in the terminal

> xinput_calibrator

and follow the instructions. You should get an output of the form

Warning: multiple calibratable devices found, calibrating last one (...)
        use --device to select another one.
Calibrating EVDEV driver for "..." id=...
        current calibration values (from XInput): min_x=0, max_x=4095 and min_y0, max_y=4095

Doing dynamic recalibration:
        Setting calibration data: 1168, 3516, 1174, 3584
        --> Making the calibration permanent <--
  copy the snippet below into '/etc/X11/xorg.conf.d/99-calibration.conf' (/usr/hare/X11/xorg.conf.d/ in some distro's)
Section "InputClass"
        Identifier      "calibration"
        MatchProduct    "..."
        Option  "Calibration"   "1168 3516 1174 3584"
        Option  "SwapAxes"      "0"
EndSection

and the touch should be already calibrated. If it is not the case, go to the subsequent section.

If the touch is calibrated, in order to save the configuration create the file /etc/X11/xorg.conf.d/99-calibration.conf and save the snippet from the output, updating the device name.

Wacom touch screens

The above approach does not calibrate Wacom touch screens, installed for instance in Leveono ThinkPad X1. This must be done with xsetwacom:

# Check the list of devices
> xsetwacom list devices
Wacom One by Wacom Pen stylus     id: 11 type: STYLUS
Wacom One by Wacom Pen eraser     id: 11 type: ERASER
...

# Get the current touch area on a device in the format <minX> <minY> <maxX> <maxY>
> xsetwacom get "Wacom One by Wacom Pen stylus" Area
0 0 32000 18000

# Set the touch area on a device, for instance the following will calibrate the touch area
# to the screen narrowed from 16:9 to the format 4:3
> xsetwacom set "Wacom One by Wacom Pen stylus" Area 4000 0 28000 18000

The area values can be taken from the output of xinput_calibrator described in the previous section.

PublicMathWiki: Touch screen (last edited 2023-09-21 13:58:08 by kputyr)