I have a 7 inch display (1920x1200) with a touch panel (link of product).
I succeed to edit the resolution and fit the image to the whole screen. But I find difficulties to calibrate the touch panel. The Y axis is inverted, and the cursor can move only half-width and half-height of the screen. (video : behavior of touch)
For now, I succeed to install and run “DISPLAY=:0.0 xinput_calibrator”. After I got the results, I copied it to “/etc/X11/xorg.conf.d/99-calibration.conf”, reboot the RPi, but has no effects.
Here my config.txt file :
initramfs volumio.initrd
gpu_mem=32
max_usb_current=1
dtparam=audio=on
audio_pwm_mode=2
dtparam=i2c_arm=on
disable_splash=1
hdmi_force_hotplug=1
hdmi_group=2
hdmi_mode=87
hdmi_drive=2
hdmi_cvt 1920 1200 60 5 0 0 0
overscan_left=-46
overscan_right=-46
overscan_top=-47
overscan_bottom=-47
force_eeprom_read=0
include userconfig.txt
#### Volumio i2s setting below: do not alter ####
dtoverlay=hifiberry-amp100
In etc/X11/xorg.conf.d/ folder, I have two files :
· 99-calibration.conf
· 95-touch_display-plugin.conf
# This file is managed by the Touch Display plugin: Do not alter!
# It will be deleted when the Touch Display plugin gets uninstalled.
Section "InputClass"
Identifier "Touch rotation"
MatchIsTouchscreen "on"
MatchDevicePath "/dev/input/event*"
MatchDriver "libinput|evdev"
EndSection
P.S. According to the specs on the vendor site the display has a resolution of 2560 x 1600 pixels. Is there a reason for using hdmi_cvt with 1920 1200?
What calibration values do yo want to use: The ones in “/usr/share/X11/xorg.conf.d/99-calibration.conf” or in “/etc/X11/xorg.conf.d/99-calibration.conf”?
I suggest to remove “/etc/X11/xorg.conf.d/99-calibration.conf” (or change its file extension to something other than “conf”) and remove the line Option "Calibration" "-38 7949 4600 9656" from “/usr/share/X11/xorg.conf.d/99-calibration.conf”. Stop and start the Touch Display plugin in order to restart the xserver applying the new configuration. Probably the issue is not solved, but please describe the effect.
As there seem to be two input devices (“ILITEK ILITEK-TP” and “ILITEK ILITEK-TP Mouse”) you might try removing “/usr/share/X11/xorg.conf.d/99-calibration.conf” and in “/etc/X11/xorg.conf.d/99-calibration.conf” change the line
MatchProduct "ILITEK ILITEK-TP Mouse"
to
MatchProduct "ILITEK ILITEK-TP"
Also revert
Option "CalibrationMatrix" "-2 0 1 0 -2 1 0 0 1"
to
Option "CalibrationMatrix" "-1 0 1 0 -1 1 0 0 1"
in “/etc/X11/xorg.conf.d/40-libinput.conf”.
P.S. The new calibration data (62, 15587, -690, 9850) deviates a lot from your earlier settings in post #8. Is this also the case if you run again DISPLAY=:0.0 xinput_calibrator -v with the CalibrationMatrix set to “-1 0 1 0 -1 1 0 0 1”?
Ok @gvolt, I removed the file and change the device name as you suggested
with Option "CalibrationMatrix" "1 0 0 0 -1 1 0 0 1"
in “/etc/X11/xorg.conf.d/40-libinput.conf”
The axes work fine, but the pointer still moves only half of the screen in the bottom-left corner. Here are my results of DISPLAY=:0.0 xinput_calibrator -v
DEBUG: XInputExtension version is 2.3
DEBUG: Skipping virtual master devices and devices without axis valuators.
DEBUG: Skipping device 'Virtual core XTEST pointer' id=4, does not report Absolute events.
Warning: multiple calibratable devices found, calibrating last one (ILITEK ILITEK-TP Mouse)
use --device to select another one.
DEBUG: Selected device: ILITEK ILITEK-TP Mouse
DEBUG: Not usbtouchscreen calibrator: Not a usbtouchscreen device
DEBUG: Read axes swap value of 0.
DEBUG: Read InvertX=0, InvertY=0.
Calibrating EVDEV driver for "ILITEK ILITEK-TP Mouse" id=7
current calibration values (from XInput): min_x=76, max_x=15988 and min_y=-367, max_y=9703
DEBUG: Found that 'ILITEK ILITEK-TP Mouse' is a sysfs name.
DEBUG: Adding click 0 (X=113, Y=655)
DEBUG: Adding click 1 (X=820, Y=655)
DEBUG: Adding click 2 (X=118, Y=1120)
DEBUG: Adding click 3 (X=819, Y=1129)
Doing dynamic recalibration:
Setting calibration data: 61, 7840, 4473, 9726
DEBUG: Successfully applied axis calibration.
--> Making the calibration permanent <--
DEBUG: Found that 'ILITEK ILITEK-TP Mouse' is a sysfs name.
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 "ILITEK ILITEK-TP Mouse"
Option "Calibration" "61 7840 4473 9726"
Option "SwapAxes" "0"
EndSection
with Option "CalibrationMatrix" "-1 0 1 0 -1 1 0 0 1"
as you asked in “/etc/X11/xorg.conf.d/40-libinput.conf”
The horizontal axe is inverted, here are the results of DISPLAY=:0.0 xinput_calibrator -v
DEBUG: XInputExtension version is 2.3
DEBUG: Skipping virtual master devices and devices without axis valuators.
DEBUG: Skipping device 'Virtual core XTEST pointer' id=4, does not report Absolute events.
Warning: multiple calibratable devices found, calibrating last one (ILITEK ILITEK-TP Mouse)
use --device to select another one.
DEBUG: Selected device: ILITEK ILITEK-TP Mouse
DEBUG: Not usbtouchscreen calibrator: Not a usbtouchscreen device
DEBUG: Read axes swap value of 0.
DEBUG: Read InvertX=0, InvertY=0.
Calibrating EVDEV driver for "ILITEK ILITEK-TP Mouse" id=7
current calibration values (from XInput): min_x=76, max_x=15988 and min_y=-367, max_y=9703
DEBUG: Found that 'ILITEK ILITEK-TP Mouse' is a sysfs name.
DEBUG: Adding click 0 (X=1800, Y=655)
DEBUG: Adding click 1 (X=1097, Y=662)
DEBUG: Adding click 2 (X=1801, Y=1128)
DEBUG: Adding click 3 (X=1098, Y=1127)
Doing dynamic recalibration:
Setting calibration data: 15969, 8201, 4503, 9751
DEBUG: Successfully applied axis calibration.
--> Making the calibration permanent <--
DEBUG: Found that 'ILITEK ILITEK-TP Mouse' is a sysfs name.
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 "ILITEK ILITEK-TP Mouse"
Option "Calibration" "15969 8201 4503 9751"
Option "SwapAxes" "0"
EndSection
I changed the device to calibrate with DISPLAY=:0.0 xinput_calibrator --device 6 and got these results:
Calibrating standard Xorg driver "ILITEK ILITEK-TP"
current calibration values: min_x=0, max_x=65535 and min_y=0, max_y=65535
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 "ILITEK ILITEK-TP"
Option "MinX" "65589"
Option "MaxX" "33481"
Option "MinY" "31498"
Option "MaxY" "65904"
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
EndSection
I changed /etc/X11/xorg.conf.d/99-calibration.conf file with these results but no change.