I cannot successfully calibrate the geometry of my touchscreen, running Ubuntu 20.04 on a PixelBook. The touchscreen with stylus works OK (especially near the center of the screen) but gets progressively worse toward the display corners -- just how well-calibrated it is depends on my display resolution. It's bad enough that it's currently quite poorly-adapted for e.g. handwriting mark-up of documents (my main use case).

The result I get from xinput_calibrator (after touching the four crosshairs with the stylus tip) is

Warning: multiple calibratable devices found, calibrating last one (WCOM50C1:00 2D1F:5143 Pen (0))
    use --device to select another one.
Calibrating standard Xorg driver "WCOM50C1:00 2D1F:5143 Pen (0)"
    current calibration values: min_x=0, max_x=16777215 and min_y=0, max_y=16777215
    If these values are estimated wrong, either supply it manually with the --precalib option, or run the 'get_precalib.sh' script to automatically get it (through HAL).
    --> Making the calibration permanent <--
  copy the snippet below into '/etc/X11/xorg.conf.d/99-calibration.conf' (/usr/share/X11/xorg.conf.d/ in some distro's)
Section "InputClass"
    Identifier  "calibration"
    MatchProduct    "!!Name_Of_TouchScreen!!"
    Option  "MinX"  "-10194"
    Option  "MaxX"  "16778670"
    Option  "MinY"  "530113"
    Option  "MaxY"  "16310016"
    Option  "SwapXY"    "0" # unless it was already set to 1
    Option  "InvertX"   "0"  # unless it was already set
    Option  "InvertY"   "0"  # unless it was already set

Change '!!Name_Of_TouchScreen!!' to your device's name in the config above.

I put the suggested code snippet into the new (previously non-existent) file /usr/share/X11/xorg.conf.d/99-calibration.conf, using Wacom|WACOM|PTK-540WL|ISD-V4 for the device name (perhaps this should be something else?). Anyway, restarting left my touchscreen calibration just as poor as before.

The output ofxinput_calibrator --list is

Device "WCOM50C1:00 2D1F:5143" id=9
Device "WCOM50C1:00 2D1F:5143 UNKNOWN" id=11
Device "WCOM50C1:00 2D1F:5143 Mouse" id=12
Device "WCOM50C1:00 2D1F:5143 Pen (0)" id=16

and for what it's worth, the output of xinput --list is

⎡ Virtual core pointer                      id=2    [master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]
⎜   ↳ WCOM50C1:00 2D1F:5143                     id=9    [slave  pointer  (2)]
⎜   ↳ WCOM50C1:00 2D1F:5143 UNKNOWN             id=11   [slave  pointer  (2)]
⎜   ↳ WCOM50C1:00 2D1F:5143 Mouse               id=12   [slave  pointer  (2)]
⎜   ↳ ACPI0C50:00 18D1:5028                     id=13   [slave  pointer  (2)]
⎜   ↳ WCOM50C1:00 2D1F:5143 Pen (0)             id=16   [slave  pointer  (2)]
⎣ Virtual core keyboard                     id=3    [master keyboard (2)]
    ↳ Virtual core XTEST keyboard               id=5    [slave  keyboard (3)]
    ↳ Power Button                              id=6    [slave  keyboard (3)]
    ↳ Video Bus                                 id=7    [slave  keyboard (3)]
    ↳ WebCamera: WebCamera                      id=8    [slave  keyboard (3)]
    ↳ WCOM50C1:00 2D1F:5143                     id=10   [slave  keyboard (3)]
    ↳ Intel Virtual Button driver               id=14   [slave  keyboard (3)]
    ↳ AT Translated Set 2 keyboard              id=15   [slave  keyboard (3)]

Any advice on how to get this touchscreen calibrated would be welcome. Many thanks!

  • this is how I invert the screen and calibrate the pen setting a shortcut key to the script as bash /home/wherever/RotateInverted sh --output eDP and xinput map-to-output 'ELAN0732:00 04F3:2536 Pen (0)' are for you to discover. I am not sure if the 14 edp matters. #!/bin/sh xrandr --output eDP --rotate inverted && xinput set-prop 'ELAN0732:00 04F3:2536 Pen (0)' --type=float "Coordinate Transformation Matrix" -1 0 1 0 -1 1 0 0 1 && xinput map-to-output 'ELAN0732:00 04F3:2536 Pen (0)' eDP && xinput map-to-output 14 eDP
    – pierrely
    Jan 26, 2021 at 4:57
  • and for normal rotation #!/bin/sh xrandr --output eDP --rotate normal && xinput set-prop 'ELAN0732:00 04F3:2536 Pen (0)' --type=float "Coordinate Transformation Matrix" 0 0 0 0 0 0 0 0 0 && xinput map-to-output 'ELAN0732:00 04F3:2536 Pen (0)' eDP && xinput map-to-output 14 eDP
    – pierrely
    Jan 26, 2021 at 4:57

1 Answer 1


I implemented two changes, either or both of which did the trick.

First, I followed the advice in the solution to Trouble with xinput_calibrator on a Toughbook CF-19 and did

sudo apt install xserver-xorg-input-evdev
sudo apt remove xserver-xorg-input-libinput

Second, I tried xinput_calibrator --device X for each of the device ID numbers 'X' listed in my original question, above, until the calibration seemed better. I finally found a value that worked, and by that point (perhaps because of the evdev/libindput changes above?) the identification of the device seemed more secure, and the text recommended for 99-calibration.conf was different. I replaced my initial contents of that file with the lines below, and now the touchscreen seems well-calibrated:

Section "InputClass"
    Identifier  "calibration"
    MatchProduct    "WCOM50C1:00 2D1F:5143"
    Option  "Calibration"   "41 25961 496 16806"
    Option  "SwapAxes"  "0"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.