Colibri-T20 based device: Touchscreen calibration issue


I experience an issue with a Colibri T20 based Embedded Device with a LVDS touchscreen.
I have generated a core-image-x11 with Yocto and i’ve installed xinput_calibrator in order to have the touchscreen correctly setup.

I followed the article touch-screen-(linux) but after reboot, when I launch our application, the mouse pointer does not follow my finger.
My touchscreen is used in a 480x800 resolution as our application is setup for a portrait application.

I launched xinput_calibrator --device 6 and clicked on the corner widgets with the mouse.

Doing dynamic recalibration:
        Setting calibration data: -165, 4539, -211, 4333
        --> Making the calibration permanent <--
  copy the snippet below into '/etc/X11/xorg.conf.d/99-calibration.conf'
Section "InputClass"
        Identifier      "calibration"
        MatchProduct    "wm97xx touchscreen"
        Option  "Calibration"   "-165 4539 -211 4333"
        Option  "SwapAxes"      "0"

I followed the recommandations so I’ve created the file /etc/X11/xorg.conf.d/99-calibration.conf and copy/paste the code snippet above.
Launched our application…but it does not work correctly.

Furthermore, when I move my finger horizontally, the cursor moves vertically and vice-versa.
However, SwapAxes = 0…
But even if I modify with SwapAxes "1" is doesn’t work much better.

It looks like the calibration settings are not used…or mus-used.

Any suggestion ?


Hi Karim

I assume that the way to start X11 in core-image-x11 does not automatically include the config snippets in /etc/X11/xorg.conf.d/99-calibration.conf.

In our images we start the script /usr/bin/ as a service after X11 has started. We do this by having a copy of xinput_calibrator.desktop in /etc/xdg/autostart/.

The shell script tests for a calibration file and sets the xinput accordingly, Without a calibration file it launches the calibration application.

I know that the xinput_calibrator application has issues if the axes are swapped and a certain combination of inverted axes exists. If you’re touch should be connected in that combination the way out would be to swap the axes with calls to xinput before doing the calibration.
Currently I think your issue is simply that the calibration data is not evaluated and does no calibration is applied at all.

BTW, after you calibrated with xinput_calibrator does touch work as expected until your reboot?



Yes. The core-image-x11 image does not come with /etc/X11/xorg.conf.d/99-calibration.conf.
I’ve created it manually.

However, I just realized that xinput listed several “touch” devices:

 Virtual core pointer                          id=2    [master pointer  (3)]
    Virtual core XTEST pointer           id=4    [slave  pointer  (2)]
    wm97xx touchscreen                    id=6    [slave  pointer  (2)]
    **DATA MODUL easyMaxTouch      id=8    [slave  pointer  (2)]**
    USB Optical Mouse                       id=9    [slave  pointer  (2)]

It appears that by default the easyMaxTouch is used by the system.

Now, when I make modifications with xinput I can vertify the result when Iexecute our program again (without rebooting). Tht’s fine for tuning.

Firstly, I’ve entered with xinput the values generated by xinput_calibrator for this device.

If Axes Swap = 0 => 
  when I move my finger left > cursor moves down, 
  finger right > cursor up
  fnger up > cursor right ...

If Axes Swap = 1 =>
  finger left > cursor left
  finger right > cursor right
 finger top > cursor bottom 
 finger bototm> cursor up

With Axes Swap 1, result is better but it seems that the Y coordinate remain inverted.
Finally, I checked the option

 xinput set-int-prop "DATA MODUL easyMaxTouch" "Evdev Axis Inversion" 8 0 1

In order to invert just one Axis and now everything works fine !

Actually, I’ve been mistaken with the different devices.