Thanks for the detailed walkthrough!
I can’t find any configs in /etc/X11:
dietpi@OctoPine:/etc/X11$ ls
app-defaults fonts rgb.txt xinit Xreset Xresources Xsession.d Xwrapper.config
default-display-manager ratpoison xcalibrate xkb Xreset.d Xsession Xsession.options
But it seem they are stored in /usr/share/X11:
dietpi@OctoPine:/usr/share/X11$ ls
locale rgb.txt XErrorDB xkb xorg.conf.d
dietpi@OctoPine:/usr/share/X11/xorg.conf.d$ ls
10-amdgpu.conf 10-quirks.conf 10-radeon.conf 40-libinput.conf
I can’t use xinput_calbrator, because it won’t accept any of my input after the first touch, as they’re too close to each other. Strange enough, I can’t deactivate the threshold (–misclick 0).
dietpi@OctoPine:/usr/share/X11/xorg.conf.d$ DISPLAY=:0 xinput_calibrator -v
DEBUG: XInputExtension version is 2.4
DEBUG: Skipping virtual master devices and devices without axis valuators.
DEBUG: Skipping device 'Virtual core XTEST pointer' id=4, does not report Absolute events.
DEBUG: Skipping device 'dw_hdmi' id=7, does not report Absolute events.
DEBUG: Selected device: QDtech MPI1001 Touchscreen
DEBUG: Not usbtouchscreen calibrator: Not a usbtouchscreen device
DEBUG: Not evdev calibrator: Evdev: invalid "Evdev Axis Calibration" property format
Calibrating standard Xorg driver "QDtech MPI1001 Touchscreen"
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).
DEBUG: Found that 'QDtech MPI1001 Touchscreen' is a sysfs name.
INFO: width=1280, height=800
DEBUG: Adding click 0 (X=640, Y=400)
DEBUG: Not adding click 1 (X=640, Y=400): within 7 pixels of previous click
DEBUG: Not adding click 1 (X=640, Y=400): within 7 pixels of previous click
DEBUG: Not adding click 1 (X=640, Y=400): within 7 pixels of previous click
DEBUG: Not adding click 1 (X=640, Y=400): within 7 pixels of previous click
(I did the test after I used xcalibrate, which generated a matrix that maps all input to the middle of the screen)
I do wonder about that line:
DEBUG: Not usbtouchscreen calibrator: Not a usbtouchscreen device
Does that indicate something?
I used xcalibrate (GitHub - reinderien/xcalibrate: X.org touchscreen calibrator · GitHub) instead:
dietpi@OctoPine:~/xcalibrate$ DISPLAY=:0 ./xcalibrate
Pointer devices:
ID Name
4 Virtual core XTEST pointer
6 QDtech MPI1001 Touchscreen
7 dw_hdmi
Device to calibrate [6]:
Old calibration (Coordinate Transformation Matrix):
[[1. 0. 0.]
[0. 1. 0.]
[0. 0. 1.]]
Calibrate? [y]:
Point count (min 3) [4]:
Disable rotation and skew? [y]:
Warning: deficient transformation of rank 1. Please try calibrating again.
/home/dietpi/xcalibrate/./xcalibrate:258: RuntimeWarning: Mean of empty slice.
quality = -np.log10(residuals.mean())
/usr/lib/python3/dist-packages/numpy/_core/_methods.py:145: RuntimeWarning: invalid value encountered in scalar divide
ret = ret.dtype.type(ret / rcount)
Warning: deficient transformation of rank 1. Please try calibrating again.
New calibration:
[[0.24999969 0. 0.25039093]
[0. 0.24999922 0.25062578]
[0. 0. 1. ]]
Quality (should be at least 3): nan
Test? [y]: y
Point count (min 3) [4]:
Use calibration? [y]: y
The new calibration has been activated.
Write example xorg conf for persistence? [y]: y
To persist this calibration,
sudo mv 99-libinput-ts-calib.conf /usr/share/X11/xorg.conf.d/
dietpi@OctoPine:~/xcalibrate$ ls
99-libinput-ts-calib.conf funding.md license readme.md requirements.txt xcalibrate
Contents of 99-libinput-ts-calib.conf:
# Generated by xcalibrate on 22/06/26 21:52:28
# https://www.x.org/releases/current/doc/man/man5/xorg.conf.5.xhtml#heading9
Section "InputClass"
Identifier "QDtech MPI1001 Touchscreen touchscreen calibration"
# For xinput device 6
MatchDevicePath "/dev/input/event1"
MatchProduct "QDtech MPI1001 Touchscreen"
# For xinput property "Coordinate Transformation Matrix"
Option "TransformationMatrix" "0.249999694347009 0 0.250390930175408 0 0.249999216794434 0.250625781247553 0 0 1"
EndSection
When testing with xcalibrate and the new matrix it seems like all touches are now mapped to the screen’s middle.
Then tested it with evtest:
dietpi@OctoPine:~/xcalibrate$ sudo DISPLAY=:0 evtest
No device specified, trying to scan all of /dev/input/event*
Available devices:
/dev/input/event0: axp20x-pek
/dev/input/event1: QDtech MPI1001 Touchscreen
/dev/input/event2: dw_hdmi
Select the device event number [0-2]: 1
Input driver version is 1.0.1
Input device ID: bus 0x3 vendor 0x484 product 0x5750 version 0x101
Input device name: "QDtech MPI1001 Touchscreen"
Supported events:
Event type 0 (EV_SYN)
Event type 1 (EV_KEY)
Event code 330 (BTN_TOUCH)
Event type 3 (EV_ABS)
Event code 0 (ABS_X)
Value 1280
Min 0
Max 1280
Event code 1 (ABS_Y)
Value 800
Min 0
Max 800
Event code 40 (ABS_MISC)
Value 0
Min 0
Max 1
Event type 4 (EV_MSC)
Event code 4 (MSC_SCAN)
Properties:
Testing ... (interrupt to exit)
Event: time 1782158778.789760, type 4 (EV_MSC), code 4 (MSC_SCAN), value d0042
Event: time 1782158778.789760, type 1 (EV_KEY), code 330 (BTN_TOUCH), value 1
Event: time 1782158778.789760, type 3 (EV_ABS), code 0 (ABS_X), value 115
Event: time 1782158778.789760, type 3 (EV_ABS), code 1 (ABS_Y), value 110
Event: time 1782158778.789760, type 3 (EV_ABS), code 0 (ABS_X), value 1280
Event: time 1782158778.789760, type 3 (EV_ABS), code 1 (ABS_Y), value 800
Event: time 1782158778.789760, -------------- SYN_REPORT ------------
Event: time 1782158778.934706, type 4 (EV_MSC), code 4 (MSC_SCAN), value d0042
Event: time 1782158778.934706, type 1 (EV_KEY), code 330 (BTN_TOUCH), value 0
Event: time 1782158778.934706, -------------- SYN_REPORT ------------
Event: time 1782158779.189757, type 4 (EV_MSC), code 4 (MSC_SCAN), value d0042
Event: time 1782158779.189757, type 1 (EV_KEY), code 330 (BTN_TOUCH), value 1
Event: time 1782158779.189757, type 3 (EV_ABS), code 0 (ABS_X), value 604
Event: time 1782158779.189757, type 3 (EV_ABS), code 1 (ABS_Y), value 126
Event: time 1782158779.189757, type 3 (EV_ABS), code 0 (ABS_X), value 1280
Event: time 1782158779.189757, type 3 (EV_ABS), code 1 (ABS_Y), value 800
Event: time 1782158779.189757, -------------- SYN_REPORT ------------
Event: time 1782158779.324706, type 4 (EV_MSC), code 4 (MSC_SCAN), value d0042
Event: time 1782158779.324706, type 1 (EV_KEY), code 330 (BTN_TOUCH), value 0
Event: time 1782158779.324706, -------------- SYN_REPORT ------------
Event: time 1782158780.298760, type 4 (EV_MSC), code 4 (MSC_SCAN), value d0042
Event: time 1782158780.298760, type 1 (EV_KEY), code 330 (BTN_TOUCH), value 1
Event: time 1782158780.298760, type 3 (EV_ABS), code 0 (ABS_X), value 1048
Event: time 1782158780.298760, type 3 (EV_ABS), code 1 (ABS_Y), value 360
Event: time 1782158780.298760, type 3 (EV_ABS), code 0 (ABS_X), value 1280
Event: time 1782158780.298760, type 3 (EV_ABS), code 1 (ABS_Y), value 800
Event: time 1782158780.298760, -------------- SYN_REPORT ------------
Event: time 1782158780.463705, type 4 (EV_MSC), code 4 (MSC_SCAN), value d0042
Event: time 1782158780.463705, type 1 (EV_KEY), code 330 (BTN_TOUCH), value 0
Event: time 1782158780.463705, -------------- SYN_REPORT ------------
Event: time 1782158780.636756, type 4 (EV_MSC), code 4 (MSC_SCAN), value d0042
Event: time 1782158780.636756, type 1 (EV_KEY), code 330 (BTN_TOUCH), value 1
Event: time 1782158780.636756, type 3 (EV_ABS), code 0 (ABS_X), value 943
Event: time 1782158780.636756, type 3 (EV_ABS), code 1 (ABS_Y), value 146
Event: time 1782158780.636756, type 3 (EV_ABS), code 0 (ABS_X), value 1280
Event: time 1782158780.636756, type 3 (EV_ABS), code 1 (ABS_Y), value 800
Event: time 1782158780.636756, -------------- SYN_REPORT ------------
Event: time 1782158780.761705, type 4 (EV_MSC), code 4 (MSC_SCAN), value d0042
Event: time 1782158780.761705, type 1 (EV_KEY), code 330 (BTN_TOUCH), value 0
Event: time 1782158780.761705, -------------- SYN_REPORT ------------
Btw: How can I change my code to be highlighted like your’s? Sometimes it’s done automatically, sometimes not…
Also: Sorry for those long lines of code. Is there a way to collapse that so my post isn’t so bloated?