I have a TFT 3.5" display (this one), and I can only get one axis to work - that is, touching the screen moves the mouse along the bottom of the screen on the X axis only, regardless of where I touch on the Y axis.
- I've looked through the raw data coming from /dev/event0 (the touchscreen), and touching the screen at various points seems to work perfectly fine.
- Plugging in a regular USB mouse works as expected.
- I attempted to run xinput-calibrator, but it gave me an
Error: no calibratable devices found
. - I've tried various configurations in /etc/X11/xorg.conf.d/99-calibration. These options have a visible and expected effect on the X axis (inverting, limiting etc), but none of them have any effect on the Y axis.
Option "Calibration" "300 3932 294 3801"
Option "MinX" "300"
Option "MaxX" "3932"
Option "MinY" "294"
Option "MaxY" "3801"
Option "TransformationMatrix" "[tried lots of stuff here]"
I'm on Raspbian Buster, with i3 and LightDM.
The setup scripts for the screen + touchscreen are here.
Uncommented parts of /boot/config.txt
:
overscan_right=5
dtparam=audio=on
[all]
hdmi_force_hotplug=1
dtparam=spi=on
dtoverlay=ucts_0
hdmi_group=2
hdmi_mode=1
hdmi_mode=87
hdmi_cvt 480 320 60 6 0 0 0
hdmi_drive=2
And /boot/cmdline.txt
:
dwc_otg.lpm_enable=0 console=ttyAMA0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait fbcon=map:10 fbcon=font:ProFont6x11 logo.nologo
And here is the relevant section of /var/log/Xorg.0.log
:
[ 14.545] (II) config/udev: Adding input device ADS7846 Touchscreen (/dev/input/event0)
[ 14.545] (**) ADS7846 Touchscreen: Applying InputClass "evdev touchscreen catchall"
[ 14.545] (**) ADS7846 Touchscreen: Applying InputClass "libinput touchscreen catchall"
[ 14.545] (**) ADS7846 Touchscreen: Applying InputClass "evdev touchscreen catchall"
[ 14.545] (**) ADS7846 Touchscreen: Applying InputClass "calibration"
[ 14.545] (**) ADS7846 Touchscreen: Applying InputClass "calibration"
[ 14.545] (II) LoadModule: "evdev"
[ 14.545] (II) Loading /usr/lib/xorg/modules/input/evdev_drv.so
[ 14.554] (II) Module evdev: vendor="X.Org Foundation"
[ 14.555] compiled for 1.20.3, module version = 2.10.6
[ 14.555] Module class: X.Org XInput Driver
[ 14.555] ABI class: X.Org XInput driver, version 24.1
[ 14.555] (II) Using input driver 'evdev' for 'ADS7846 Touchscreen'
[ 14.555] (**) ADS7846 Touchscreen: always reports core events
[ 14.555] (**) evdev: ADS7846 Touchscreen: Device: "/dev/input/event0"
[ 14.555] (--) evdev: ADS7846 Touchscreen: Vendor 0 Product 0
[ 14.555] (--) evdev: ADS7846 Touchscreen: Found absolute axes
[ 14.555] (--) evdev: ADS7846 Touchscreen: Found x and y absolute axes
[ 14.555] (--) evdev: ADS7846 Touchscreen: Found absolute touchscreen
[ 14.555] (**) Option "SwapAxes" "0"
[ 14.555] (II) evdev: ADS7846 Touchscreen: Configuring as touchscreen
[ 14.555] (**) Option "EmulateThirdButton" "1"
[ 14.555] (**) Option "EmulateThirdButtonTimeout" "1000"
[ 14.555] (**) Option "EmulateThirdButtonMoveThreshold" "300"
[ 14.555] (**) evdev: ADS7846 Touchscreen: YAxisMapping: buttons 4 and 5
[ 14.555] (**) evdev: ADS7846 Touchscreen: EmulateWheelButton: 4, EmulateWheelInertia: 10, EmulateWheelTimeout: 200
[ 14.555] (**) Option "config_info" "udev:/sys/devices/platform/soc/3f204000.spi/spi_master/spi0/spi0.0/input/input0/event0"
[ 14.555] (II) XINPUT: Adding extended input device "ADS7846 Touchscreen" (type: TOUCHSCREEN, id 6)
[ 14.556] (EE) BUG: triggered 'if (minval > maxval && mode == 1)'
[ 14.556] (EE) BUG: ../../../../Xi/exevents.c:2112 in InitValuatorAxisStruct()
[ 14.556] (EE)
[ 14.556] (EE) Backtrace:
[ 14.556] (EE)
[ 14.556] (II) evdev: ADS7846 Touchscreen: initialized for absolute axes.
[ 14.557] (**) ADS7846 Touchscreen: (accel) keeping acceleration scheme 1
[ 14.557] (**) ADS7846 Touchscreen: (accel) acceleration profile 0
[ 14.557] (**) ADS7846 Touchscreen: (accel) acceleration factor: 2.000
[ 14.557] (**) ADS7846 Touchscreen: (accel) acceleration threshold: 4
[ 14.559] (II) config/udev: Adding input device ADS7846 Touchscreen (/dev/input/mouse0)
[ 14.559] (**) ADS7846 Touchscreen: Applying InputClass "calibration"
[ 14.559] (**) ADS7846 Touchscreen: Applying InputClass "calibration"
[ 14.559] (II) No input driver specified, ignoring this device.
[ 14.559] (II) This device may have been added with another device file.
Any help or ideas would be appreciated :)