hpandsun
Posts: 15
Joined: Sat Mar 01, 2014 12:15 am

xinput-calibrator

Thu Jun 05, 2014 12:50 am

Hi
Where can I download xinput-calibrator for raspberrypi debian?
I could not find it for a long time.
Thank you all

User avatar
simonmcc
Posts: 181
Joined: Mon Aug 19, 2013 10:07 pm

Re: xinput-calibrator

Thu Jun 05, 2014 1:27 pm

Instructions here:
http://engineering-diy.blogspot.co.uk/2 ... creen.html
Install xinput_calibrator.
Install some dependencies:
sudo apt-get install libx11-dev libxext-dev libxi-dev x11proto-input-dev
Download xinput_calibrator somewhere in the Raspberry PI's folder structure.
wget http://github.com/downloads/tias/xinput ... 7.5.tar.gz
Unpack it and then navigate to the unpacked folder and then install it using:
./configure
make
sudo make install
After this step you should run xinput_calibrator(from Xserver terminal console: first startx then open console and then run it).
xinput_calibrator
Follow the on screen instructions(touching some points on screen) and after calibration is complete you will receive a message like this:
Calibrating EVDEV driver for "eGalax Inc. USB TouchController" id=8
current calibration values (from XInput): min_x=1938, max_x=114 and min_y=1745, max_y=341

Doing dynamic recalibration:
Setting new calibration data: 121, 1917, 317, 1741


--> Making the calibration permanent <--
copy the snippet below into '/etc/X11/xorg.conf.d/99-calibration.conf'
Section "InputClass"
Identifier "calibration"
MatchProduct "eGalax Inc. USB TouchController"
Option "Calibration" "121 1917 317 1741"
Option "SwapAxes" "1"
EndSection

For Raspbian you have to create a file:
sudo nano /usr/share/X11/xorg.conf.d/01-input.conf
Add in this file the content above(starting with Section "InputClass" line) and then save it(ctrl+O).
simonmcc.blogspot.com/search/label/pi

flydr2
Posts: 1
Joined: Sun Feb 22, 2015 9:01 pm

Re: xinput-calibrator

Mon May 18, 2015 12:13 pm

Thanks for the details here all worked perfectly. Except the permanent calibration.
I will have to do some research to get that working.

matthewpjgrant
Posts: 10
Joined: Sun May 03, 2015 8:06 pm

Re: xinput-calibrator

Fri May 22, 2015 4:17 pm

flydr2 wrote:Thanks for the details here all worked perfectly. Except the permanent calibration.
I will have to do some research to get that working.

I've been having trouble with that too! Let me know if you manage to find something that works? For now I've done a work around where the calibrator starts at every boot.

lepmor
Posts: 17
Joined: Mon Mar 16, 2015 7:19 pm

Re: xinput-calibrator

Sun May 24, 2015 3:26 pm

same for me did you find a solution ?

papaulm
Posts: 3
Joined: Sat Jan 04, 2014 8:47 pm

Re: xinput-calibrator

Sun May 24, 2015 6:43 pm

...spent my entire night solving this problem and could' fix it.
Today I found this site: http://www.tutorials-raspberrypi.de/gpi ... passungen/, followed the steps from saving the "99-calibration.conf" File and now it works just fine. Can't explain it, removed the old file and now the settings are save and I don't have to recalibrate after a reboot.

Perhaps this can help you too.
Adrian

User avatar
mwilliams03
Posts: 123
Joined: Mon Oct 29, 2012 2:56 pm
Contact: Website

Re: xinput-calibrator

Tue May 26, 2015 7:30 pm

You can also look here;
http://ozzmaker.com/enable-x-windows-on-piscreen/

It has a script that will lunch X input calibration before X windows starts.
It will run once, when there is no calibration data... every time after that it will load the calibration data before X starts.
Mark -- OzzMaker.com -- Creator of;
+ BerryIMU
+ Berry GPS-IMU
+BerryGPS-GSM
+ PiScreen - A 3.5" TFT for the Rasspberry Pi

lepmor
Posts: 17
Joined: Mon Mar 16, 2015 7:19 pm

Re: xinput-calibrator

Tue Jun 30, 2015 6:11 pm

if i have understood correctly :
considering i have already installed xinput_calibrator i can pass directly to the point 4 .
after that i execute the point 4.2 ( because i have a image of raspberry date february 2015 )
i'm no table to understand the point 5 , in my case startx run already automatically when i boot
anwyay i will try this routine because i'm becoming crazy .

lepmor
Posts: 17
Joined: Mon Mar 16, 2015 7:19 pm

Re: xinput-calibrator

Tue Jun 30, 2015 6:12 pm

this is in german , do you have a copy in english ?

papaulm wrote:...spent my entire night solving this problem and could' fix it.
Today I found this site: http://www.tutorials-raspberrypi.de/gpi ... passungen/, followed the steps from saving the "99-calibration.conf" File and now it works just fine. Can't explain it, removed the old file and now the settings are save and I don't have to recalibrate after a reboot.

Perhaps this can help you too.
Adrian

tclarke5
Posts: 1
Joined: Sat Sep 19, 2015 9:38 pm

Re: xinput-calibrator

Sat Sep 19, 2015 10:11 pm

Hi,

I am a newbie. I have purchased a 7inch Sainsmart LCD touchscreen and I am using raspian-wheezy 3.18. I have followed the steps in this post. I have followed the steps from other posts and sites: http://www.tutorials-raspberrypi.de/gpi ... passungen/ and viewtopic.php?f=41&t=21020. My touchscreen will not calibrate. My calibration process is to delete both usr/share/X11/xorg.conf.d/01-input.conf. and the ​/etc/X11/xorg.conf.d/99-calibration.conf files, reboot the pi and then try to calibrate. I have tried cailbrating with my finger and with a mouse. The results occasionally have SwapAxes = 1, but not all the time. No consistency.

I have viewed the log file looking for any clues. This section seems to be relevant to the touchscreen. Do I need to remove the mouse during power-up? Can anyone help me?

[ 47.411] (**) Option "config_info" "udev:/sys/devices/platform/soc/3f980000. usb/usb1/1-1/1-1.4/1-.4:1.0/input/input3/event3"
[ 47.411] (II) XINPUT: Adding extended input device "eGalax Inc. USB TouchController" (type: TOUCHSCREEN, id 8)
[ 47.411] (II) evdev: eGalax Inc. USB TouchController: initialized for absolute axes.
[ 47.412] (**) eGalax Inc. USB TouchController: (accel) keeping acceleration scheme 1
[ 47.412] (**) eGalax Inc. USB TouchController: (accel) acceleration profile 0
[ 47.412] (**) eGalax Inc. USB TouchController: (accel) acceleration factor: 2.000
[ 47.412] (**) eGalax Inc. USB TouchController: (accel) acceleration threshold: 4
[ 47.413] (II) config/udev: Adding input device eGalax Inc. USB TouchController (/dev/input/mouse2)
[ 47.413] (II) No input driver specified, ignoring this device.
[ 47.413] (II) This device may have been added with another device file.
[ 47.415] (II) config/udev: Adding input device USB Optical Mouse (/dev/input/event2)
[ 47.415] (**) USB Optical Mouse: Applying InputClass "evdev pointer catchall"

My values from the most current calibration attempt:

Section "InputClass"
Identifier "calibration"
MatchProduct "eGalax Inc. USB TouchController"
Option "calibration" "1925 153 379 1719"
EndSection

luipez
Posts: 35
Joined: Fri Feb 06, 2015 6:20 pm

Re: xinput-calibrator

Sat Jan 21, 2017 11:51 am

Ho anche io un display touch eGalax collegato a un Rpi con Pixel, funziona ad esclusione del touch.

Collegato alla sua Touch screen drive board, passando le dita sul diplay non ho nessun movimento del cursore o altra selezione.

Come posso fare per sapere se il driver del monitor è caricato?
------------------------------------------------------------------------------------------------------------------------------------------------------------------------
I also have a touch eGalax display connected to an RPI with Pixel, works with the exception of touch.

Connected to its touch screen drive board, running her fingers on the display have no cursor movement or other selection.

How do I know if the monitor driver is loaded?

luipez
Posts: 35
Joined: Fri Feb 06, 2015 6:20 pm

Re: xinput-calibrator

Mon Feb 13, 2017 9:43 am

Help me!

Ernst
Posts: 1286
Joined: Sat Feb 04, 2017 9:39 am
Location: Germany

Re: xinput-calibrator

Mon Feb 13, 2017 10:03 am

I am going to throw something into the conversation that may help (or may not).

I recommend that "usbhid.mousepoll=0" is appended to /boot/cmdline.txt

I struggled to with a Cintiq 13HD (no touch) to get the stylus to work, the above change solved the problem because the digitizer is handled as if it is a mouse device and needs a higher poll rate.
The road to insanity is paved with static ip addresses

luipez
Posts: 35
Joined: Fri Feb 06, 2015 6:20 pm

Re: xinput-calibrator

Mon Feb 13, 2017 10:12 am

Poichè sono un neofità di linux, potresti essere più preciso su cosa devo fare?

Grazie
----------------------------------------------
As I am a linux newbie, you could be more specific about what should I do?

Thank you

Ernst
Posts: 1286
Joined: Sat Feb 04, 2017 9:39 am
Location: Germany

Re: xinput-calibrator

Mon Feb 13, 2017 3:52 pm

Use nano to open the cmdline.txt in the boot directory and add "usbhid.mousepoll=0" at the end of the line.

Code: Select all

sudo nano /boot/cmdline.txt
This is an example, do not copy the following directly.

Code: Select all

dwc_otg.lpm_enable=0 console=serial0,115200 console=tty1 root=/dev/mmcblk0p7 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait 
change the line by entering "usbhid.mousepoll=0" at the end:

Code: Select all

dwc_otg.lpm_enable=0 console=serial0,115200 console=tty1 root=/dev/mmcblk0p7 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait usbhid.mousepoll=0
Do not forget to do a reboot.
The road to insanity is paved with static ip addresses

John L. Gordon
Posts: 4
Joined: Sun Jul 30, 2017 4:11 pm

Re: xinput-calibrator

Wed Aug 09, 2017 7:20 pm

Sorry if this is duplicated, I have tried to get help with this.
I also am using an eGalax based touch screen with Jessie. This worked perfectly with Wheezy but will not work with Jessie.
The monitor is a Lilliput 10 inch resistive touch screen. Jessie will work with the HDMI Monitor but it won't recognise its 1024x600 display and defaults to 1280x760.
The main problem is the touch screen however. I have tried with and without drivers and the addition suggested to cmdline.txt. evtest finds input from the touch screen but not it seems at a monitored event. xinput_calibrator now downloads directly as xinput-calibrator but is still named xinput_calibrator in use (hyphen is the difference). This works but touch screen input is not recognised.
The problem seems to be the changes introduced when developing Jessie from Wheezy but unfortunately I can't yet locate the problem.
Can anyone help with this please.
John.

n1ks
Posts: 12
Joined: Sat Jan 24, 2015 8:51 pm

Re: xinput-calibrator

Sun Aug 20, 2017 7:49 pm

John L. Gordon wrote: Sorry if this is duplicated, I have tried to get help with this.
I also am using an eGalax based touch screen with Jessie. This worked perfectly with Wheezy but will not work with Jessie.
The monitor is a Lilliput 10 inch resistive touch screen. Jessie will work with the HDMI Monitor but it won't recognise its 1024x600 display and defaults to 1280x760.
The main problem is the touch screen however. I have tried with and without drivers and the addition suggested to cmdline.txt. evtest finds input from the touch screen but not it seems at a monitored event. xinput_calibrator now downloads directly as xinput-calibrator but is still named xinput_calibrator in use (hyphen is the difference). This works but touch screen input is not recognised.
The problem seems to be the changes introduced when developing Jessie from Wheezy but unfortunately I can't yet locate the problem.
Can anyone help with this please.
John.
I've had similar problems with an eGalax 7" touchscreen running on Jessie using Pixel. Calibrating with xinput_calibrator throws up some weird x & y numbers and fails to work correctly.

I have now solved it by doing the following:
sudo apt-get install xserver-xorg-input-evdev xinput-calibrator -y
sudo mv /usr/share/X11/xorg.conf.d/10-evdev.conf /usr/share/X11/xorg.conf.d/45-evdev.conf

This is renaming 10-evdev.conf to 45-evdev.conf in order to get it to load after 40-libinput.conf. Xinput_calibrator now calibrates for me and i am able to save the calibration data into /usr/share/X11/xorg.conf.d/99-calibration.conf and i have a woring eGalax screen on Jessie/Pixel.

Hope it helps John

John L. Gordon
Posts: 4
Joined: Sun Jul 30, 2017 4:11 pm

Re: xinput-calibrator

Sat Sep 02, 2017 9:50 pm

Thank you very much for your reply. (n1ks)
I was just about to reply that this did not work but I tried a reboot first and the touch screen is now registering input with stretch and probably Jessie as well.
At first the pointer moves but is not correctly positioned and the axes are swapped (as expected).
However, when I use xinput_calibrator (with stretch) this really messes up the calibration so it is not useable.
However, I now have a touch screen that does something so I will switch back to Jessie and start again.
I had already installed the originally suggested drivers but I am not sure if I still need these.
I will try things out.
Thank you again.
John.

John L. Gordon
Posts: 4
Joined: Sun Jul 30, 2017 4:11 pm

Re: xinput-calibrator

Sun Sep 03, 2017 12:45 pm

Just to finish this off:
Thanks to (n1ks) and installing xserver-xorg-input-evdev on Jessie, my Lilliput touch screen is working correctly at the correct screen resolution of 1024x600 and touch is accurate.
The installation of xserver-xorg-input-evdev got things working but calibration was a problem. I eventually put the calibration information into /etc/X11/xorg.conf.d/52-calibration.conf but removed the data leaving only the swap axes enabled.
I then rebooted and recalibrated with xinput_calibrator and added the new data to the file. This then worked correctly.
I also had a problem with the screen size but edited /boot/config.txt to force the screen size I wanted and I also enabled overscan and trimmed the overscanning with a few trials. I needed to recalibrate the touch screen after this but now my original application is working with Jessie as it should.
John.

samnites
Posts: 2
Joined: Tue Nov 21, 2017 9:51 am

Re: xinput-calibrator

Tue Nov 21, 2017 10:01 am

Hi,
I'm using raspbian stretch lite ,thus no desktop environment .I start the calibration with
startx xinput_calibration and the programs starts normally so I can touch the four points but then I get no output when the program exits.
I've tried with both 2> log and > log but nothing is shown more then the xServer output.Why calibrations info are not displayed?

n1ks
Posts: 12
Joined: Sat Jan 24, 2015 8:51 pm

Re: xinput-calibrator

Tue Nov 21, 2017 11:06 am

@smanites
I have set up xinput_calibrator as an alias that i can use in terminal for when the touch screen calibration is borked as i have no mouse or proper keyboard attached, it may help with your situation to run the command i use.

sudo sh -c "xinput_calibrator | sed -ne 8,13p > /usr/share/X11/xorg.conf.d/99-calibration.conf"

Hope it helps.

samnites
Posts: 2
Joined: Tue Nov 21, 2017 9:51 am

Re: xinput-calibrator

Tue Nov 21, 2017 12:03 pm

Hi thanks but it does not work,anyway I've understood the problem is that xinput_calibration starts in xterm so the output is not shown.
If I start xterm and then I run xinput_calibration inside it all works properly.
I launch xinput_calibration with startx xinput_calibration and after the 4 points have been touched both xinput_calibration and xterm exit and I can't get the output.

nitrofireinc
Posts: 1
Joined: Wed Feb 21, 2018 4:06 pm

Re: xinput-calibrator

Wed Feb 21, 2018 4:19 pm

I had same issue and [SOLVED] My problem. touchscreen was using xinput as default so be setting the Coordinate Transformation Matrix (115) i was able to have accurate moments with touchscreen. I use this command "xinput set-prop 9 115 1.060 0 -.035 0 -1.25 1.105 0 0 1" without the quotes. and bam my Y axis was inverted by negating the 3rd set of numbers eg.(-.035) but to make is stay on reboot i had to write a script to run to set this property again. also added Option "TransformationMatrix" "1.060 0 -.035 0 -1.25 1.105 0 0 " to the 40-libinput.conf file in the libinput touchscreen catchall section. file is located in /usr/share/X11/xorg.conf.d folder. This was necessary because if you unplugged usb and plugged it back in it would default. So by adding this line to the file it is read and reapplied.

Scipt used
#################################
#!bin/bash
DISPLAY=:0
xinput set-prop 9 115 1.060 0 -.035 0 -1.25 1.105 0 0 1
################################

40-libinput.conf
#########################################
Section "InputClass"
Identifier "libinput touchscreen catchall"
MatchIsTouchscreen "on"
MatchDevicePath "/dev/input/event*"
Driver "libinput"
Option "MinX" "1441"
Option "MaxX" "63092"
Option "MinY" "1928"
Option "MaxY" "65176"
Option "TransformationMatrix" "1.060 0 -.035 0 -1.25 1.105 0 0 1" #THIS SECTION WAS ADDED
EndSection
##################################################

tony1812
Posts: 354
Joined: Sat Jul 15, 2017 12:40 pm
Location: Boston MA.

Re: xinput-calibrator

Wed Feb 21, 2018 5:42 pm

I know this post is about two years old.
But I have the same issue with my 3.5" touch LCD. I posted the one the forum but no one answer, hope you can help.

On and off, for the past few days, I unsuccessfully try to get the 3.5 LCD display working on my pi3 with the latest stretch. The LCD is this:
Keyestudio TFT LCD Display 3.5 Inch 480x320 16-bit TFT Touch Screen LCD Shield for Raspberry Pi Model B B+ A+ A Module
a wareshare35a lcd

I followed this instruction to install the driver:
https://www.elecrow.com/wiki/index.php? ... spberry_Pi

After reboot, the LCD works. But the touches are all off, when I use the mouse to click on an icon, the correct icon opens the correct app, no a problem. However, this doesn't hold true for finger tap or for stylus. when I tap on an icon with my finger or use the stylus. the mouse curser does not response to the correct location on the LCD. For example, when I click on and icon on the lower left side of the LCD, the mouse cursor stays on the upper right side time pi menu bar icon. It opens a calendar instead. I tried to calibrate it with the xinput-calibrator, pasted the data to the /etc/X11/xorg.conf.d/99-calibration.conf, reboot. Nothing changes. Have I missed some steps? Thanks.
btw, the link http://www.tutorials-raspberrypi.de/gpi ... passungen/ is in German, is there one inEnglish?

User avatar
ab1jx
Posts: 868
Joined: Thu Sep 26, 2013 1:54 pm
Location: Heath, MA USA
Contact: Website

Re: xinput-calibrator

Sun Feb 25, 2018 6:12 pm

n1ks wrote:
Sun Aug 20, 2017 7:49 pm
I have now solved it by doing the following:
sudo apt-get install xserver-xorg-input-evdev xinput-calibrator -y
sudo mv /usr/share/X11/xorg.conf.d/10-evdev.conf /usr/share/X11/xorg.conf.d/45-evdev.conf

This is renaming 10-evdev.conf to 45-evdev.conf in order to get it to load after 40-libinput.conf. Xinput_calibrator now calibrates for me and i am able to save the calibration data into /usr/share/X11/xorg.conf.d/99-calibration.conf and i have a woring eGalax screen on Jessie/Pixel.

Hope it helps John
It doesn't help in all cases. I just tried swapping them and my pointer was stuck at the upper left corner. Changing the file name back got it unstuck.

Return to “Beginners”