necromundo
Posts: 1
Joined: Sun Apr 02, 2017 2:57 pm

3M Touchscreen calibration not working

Sun Apr 02, 2017 4:26 pm

Hi everyone,

I recently installed a blank new Rasbian Jessie (from march 2017) with Pixel on my Raspberry Pi 2 and now I got a problem with my touchscreen calibration.
Before the upgrade, it was working and I thought it could be multiple configurations because of the upgrade, so I did a clean install, but with the same result.

The touchscreen is working and the desktop is using the whole screen (1024x768, 3M Touchscreen MicroTouch 15" USB), touches are recognized, but the position is not correct.
It does not use the full screen, just a rectangle in the middle (seems to be perhaps 800x600 or less) and the X-Axis is mirrored, the Y-Axis is correct.

I already tried to calibrate like before using xinput_calibrate and pasted the result into /usr/share/X11/xorg.conf.d/99-calibration.conf:

Code: Select all

    Section "InputClass"
        Identifier      "calibration"
        MatchProduct    "3M 3M USB Touchscreen - EX II"
        Option  "MinX"  "57919"
        Option  "MaxX"  "9279"
        Option  "MinY"  "10055"
        Option  "MaxY"  "54882"
    EndSection
I also took a look at the log file /var/log/Xorg.0.log:

Code: Select all

    [    10.735] (II) config/udev: Adding input device 3M 3M USB Touchscreen - EX II (/dev/input/event3)
    [    10.735] (**) 3M 3M USB Touchscreen - EX II: Applying InputClass "calibration"
    [    10.735] (**) 3M 3M USB Touchscreen - EX II: Applying InputClass "libinput touchscreen catchall"
    [    10.735] (II) Using input driver 'libinput' for '3M 3M USB Touchscreen - EX II'
    [    10.735] (**) 3M 3M USB Touchscreen - EX II: always reports core events
    [    10.735] (**) Option "Device" "/dev/input/event3"
    [    10.735] (**) Option "_source" "server/udev"
    [    10.737] (II) input device '3M 3M USB Touchscreen - EX II', /dev/input/event
    3 is tagged by udev as: Touchscreen
    [    10.737] (II) input device '3M 3M USB Touchscreen - EX II', /dev/input/event3 is a touch device
    [    10.760] (**) Option "config_info" "udev:/sys/devices/platform/soc/3f980000.usb/usb1/1-1/1-1.5/1-1.5:1.0/input/input3/event3"
    [    10.760] (II) XINPUT: Adding extended input device "3M 3M USB Touchscreen - EX II" (type: TOUCHSCREEN, id 9)
    [    10.760] (**) Option "AccelerationScheme" "none"
    [    10.761] (**) 3M 3M USB Touchscreen - EX II: (accel) selected scheme none/0
    [    10.761] (**) 3M 3M USB Touchscreen - EX II: (accel) acceleration factor: 2.000
    [    10.761] (**) 3M 3M USB Touchscreen - EX II: (accel) acceleration threshold: 4
    [    10.762] (II) input device '3M 3M USB Touchscreen - EX II', /dev/input/event3 is tagged by udev as: Touchscreen
    [    10.762] (II) input device '3M 3M USB Touchscreen - EX II', /dev/input/event3 is a touch device
    [    10.764] (II) config/udev: Adding input device 3M 3M USB Touchscreen - EX II (/dev/input/mouse1)
    [    10.764] (**) 3M 3M USB Touchscreen - EX II: Applying InputClass "calibration"
    [    10.764] (II) No input driver specified, ignoring this device.
    [    10.764] (II) This device may have been added with another device file.
The InputClass mentionied in line 3 is this one /usr/share/X11/xorg.conf.d/40-libinput.conf:

Code: Select all

    # Match on all types of devices but tablet devices and joysticks
    Section "InputClass"
            Identifier "libinput pointer catchall"
            MatchIsPointer "on"
            MatchDevicePath "/dev/input/event*"
            Driver "libinput"
    EndSection
    
    Section "InputClass"
            Identifier "libinput keyboard catchall"
            MatchIsKeyboard "on"
            MatchDevicePath "/dev/input/event*"
            Driver "libinput"
    EndSection
    
    Section "InputClass"
            Identifier "libinput touchpad catchall"
            MatchIsTouchpad "on"
            MatchDevicePath "/dev/input/event*"
            Driver "libinput"
    EndSection
    
    Section "InputClass"
            Identifier "libinput touchscreen catchall"
            MatchIsTouchscreen "on"
            MatchDevicePath "/dev/input/event*"
            Driver "libinput"
    EndSection
When I run "xinput" I get the device correctly:

Code: Select all

    3M 3M USB Touchscreen - EX II             id=9    [slave  pointer  (2)]
But the properties seem to be not complete compared to other instructions on the web on how to set the calibration manually, these properties do not exist.

Code: Select all

    Device '3M 3M USB Touchscreen - EX II':
            Device Enabled (114):   1
            Coordinate Transformation Matrix (115): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
            libinput Calibration Matrix (269):      1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
            libinput Calibration Matrix Default (270):      1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
            libinput Send Events Modes Available (249):     1, 0
            libinput Send Events Mode Enabled (250):        0, 0
            libinput Send Events Mode Enabled Default (251):        0, 0
            Device Node (261):      "/dev/input/event3"
            Device Product ID (262):        1430, 1
            libinput Horizontal Scroll Enabled (264):       0
Perhaps, anyone has a clue or a similar problem?

Cheers,
Benny

JakeWisniewski
Posts: 48
Joined: Fri Feb 08, 2013 4:58 pm

Re: 3M Touchscreen calibration not working

Tue May 16, 2017 4:49 pm

I'm running into this problem also and it looks like it's related to the change from using evdev module to the new libinput. The log file you posted shows more at the end than at the beginning.

Code: Select all

    [    10.764] (**) 3M 3M USB Touchscreen - EX II: Applying InputClass "calibration"
    [    10.764] (II) No input driver specified, ignoring this device.
    [    10.764] (II) This device may have been added with another device file.
It's trying to apply the calibration but it doesn't have an input driver specified it seems. Adding the driver option to the InputClass doesn't resolve this unfortunately.

I plan on looking into this more. Seems to only be an issue with the latest release of raspbian. Works fine on the older builds.

EDIT:
I believe I found the answer.

First you need to install the evdev driver.

Code: Select all

sudo apt-get install xserver-xorg-input-evdev
Once you do that, you need to modify the /usr/share/X11/xorg.conf.d/40-libinput.conf to change the driver from libinput to evdev.

Code: Select all

Section "InputClass"
        Identifier "libinput touchscreen catchall"
        MatchIsTouchscreen "on"
        MatchDevicePath "/dev/input/event*"
        Driver "evdev"
EndSection
Once you do this, make sure you have your config file as the last loaded (99-calibration.conf is what is normally recommended).

The driver is not needed in here because it is loading the evdev by default now.

Code: Select all

Section "InputClass"
        Identifier      "calibration"
        MatchProduct    "eGalax Inc. USB TouchController"
        Option  "Calibration"   "64 1983 146 1942"
        Option  "SwapAxes"      "1"
EndSection
run your xinput_calibrator (I needed to run it 2 or 3 times before the touch was accurate).

Hope this helps.

More on it in this thread viewtopic.php?t=172025&p=1123456

vladiks
Posts: 1
Joined: Fri Oct 20, 2017 8:29 am

Re: 3M Touchscreen calibration not working

Fri Oct 20, 2017 9:06 am

I had the same problem with raspberry and Adafruit 3.5" resistive touchscreen. No touch calibration worked until I changed the driver using instructions above. Now even the auto calibration using "sudo adafruit-pitft-touch-cal" works fine.

dsquared59
Posts: 3
Joined: Fri Mar 23, 2018 3:04 pm

Re: 3M Touchscreen calibration not working

Sun Apr 01, 2018 4:02 pm

Unfortunately, this fix no longer works with the 2018-03-13-raspbian-stretch.img, because the xserver-xorg-input-evdev package is no longer on the server. It looks like the original problem requires a new solution.

Can ne1 please help?

thanks in advance

User avatar
DougieLawson
Posts: 36098
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: 3M Touchscreen calibration not working

Sun Apr 01, 2018 4:27 pm

It's available on my version of Stretch.

Code: Select all

[email protected]:~ # apt-cache showpkg xserver-xorg-input-evdev
Package: xserver-xorg-input-evdev
Versions:
1:2.10.5-1 (/var/lib/apt/lists/raspbian.raspberrypi.org_raspbian_dists_stretch_main_binary-armhf_Packages)
 Description Language:
                 File: /var/lib/apt/lists/raspbian.raspberrypi.org_raspbian_dists_stretch_main_binary-armhf_Packages
                  MD5: 31de8b9a43f10be01a9c9a8d0805f00a


Reverse Depends:
  xserver-xorg-input-evdev-dbg,xserver-xorg-input-evdev 1:2.10.5-1
  gpointing-device-settings,xserver-xorg-input-evdev
Dependencies:
1:2.10.5-1 - libc6 (2 2.7) libevdev2 (2 0.9.1) libmtdev1 (2 1.1.0) libudev1 (2 183) xorg-input-abi-24 (0 (null)) xserver-xorg-core (2 2:1.18.99.901) xserver-xorg-core (3 2:1.18.0-1) xserver-xorg-core (3 2:1.18.0-1)
Provides:
1:2.10.5-1 - xorg-driver-input (= )
Reverse Provides:
[email protected]:~ #
Try running sudo apt-get update then try again.
Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

gnalbandian
Posts: 4
Joined: Tue Jul 12, 2016 4:43 am

Re: 3M Touchscreen calibration not working

Thu May 17, 2018 6:39 am

dsquared59 wrote:
Sun Apr 01, 2018 4:02 pm
Unfortunately, this fix no longer works with the 2018-03-13-raspbian-stretch.img, because the xserver-xorg-input-evdev package is no longer on the server. It looks like the original problem requires a new solution.

Can ne1 please help?

thanks in advance
I am having the same issue.
Any help to calibrate with libinput?

Return to “Troubleshooting”