I'm trying to get a 10,1" 1280x800 eGalax Inc. USB TouchController working on LE 9.0.0. (Kodi 18)
At first via the out of the box method.Functionality is there out of the box. Calibration and Geometrie is left to find out. After installing the touchscreen addon from LE, it starts with a never ending working symbol.
Kodi.log shows values from touch input. There is were I discover that the x and y axis are both swapped and wrong direction, compared to the mouse values on the same spots.
UL: X1200,Y800 UR: X1200, Y0
LL: X0,Y800 LR:X0, Y0
After stopping Kodi (Systemctrl stop kodi) evtest shows the same result (but in a 4096x4096 scale)
Kodi:~ # systemctl stop kodi
Kodi:~ # evtest
No device specified, trying to scan all of /dev/input/event*
Available devices:
/dev/input/event0: eGalax Inc. USB TouchController Pen
/dev/input/event1: eGalax Inc. USB TouchController
/dev/input/event3: USB Optical Mouse
Select the device event number [0-3]: 1
Input driver version is 1.0.1
Input device ID: bus 0x3 vendor 0xeef product 0x1 version 0x100
Input device name: "eGalax Inc. USB TouchController"
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 0
Min 0
Max 4095
Event code 1 (ABS_Y)
Value 0
Min 0
Max 4095
Event code 47 (ABS_MT_SLOT)
Value 0
Min 0
Max 0
Event code 53 (ABS_MT_POSITION_X)
Value 0
Min 0
Max 4095
Event code 54 (ABS_MT_POSITION_Y)
Value 0
Min 0
Max 4095
Event code 57 (ABS_MT_TRACKING_ID)
Value 0
Min 0
Max 65535
Properties:
Property type 1 (INPUT_PROP_DIRECT)
Testing ... (interrupt to exit)
Event: time 1550657855.163853, type 3 (EV_ABS), code 57 (ABS_MT_TRACKING_ID), va lue 0
Event: time 1550657855.163853, type 3 (EV_ABS), code 53 (ABS_MT_POSITION_X), val ue 3874
Event: time 1550657855.163853, type 3 (EV_ABS), code 54 (ABS_MT_POSITION_Y), val ue 4052
Event: time 1550657855.163853, type 1 (EV_KEY), code 330 (BTN_TOUCH), value 1
Event: time 1550657855.163853, type 3 (EV_ABS), code 0 (ABS_X), value 3874
Event: time 1550657855.163853, type 3 (EV_ABS), code 1 (ABS_Y), value 4052
....
Event: time 1550657857.571809, type 1 (EV_KEY), code 330 (BTN_TOUCH), value 1
Event: time 1550657857.571809, type 3 (EV_ABS), code 0 (ABS_X), value 3936
Event: time 1550657857.571809, type 3 (EV_ABS), code 1 (ABS_Y), value 38
.....
Event: time 1550657859.615774, type 1 (EV_KEY), code 330 (BTN_TOUCH), value 1
Event: time 1550657859.615774, type 3 (EV_ABS), code 0 (ABS_X), value 148
Event: time 1550657859.615774, type 3 (EV_ABS), code 1 (ABS_Y), value 64
.....
Event: time 1550657862.527726, type 1 (EV_KEY), code 330 (BTN_TOUCH), value 1
Event: time 1550657862.527726, type 3 (EV_ABS), code 0 (ABS_X), value 148
Event: time 1550657862.527726, type 3 (EV_ABS), code 1 (ABS_Y), value 4000
Display More
When I edit ts_env.sh and ts.conf as proposed in this forum. The calibration addon GUI starts and calibration is possible. Kodi now uses "tslib to uiput deamon" as device. But it just messing up the calibration and NOT changing x y direction or swapping them.
Available devices:
/dev/input/event0: eGalax Inc. USB TouchController Pen
/dev/input/event1: eGalax Inc. USB TouchController
/dev/input/event2: tslib to uinput daemon
/dev/input/event3: USB Optical Mouse
Select the device event number [0-3]: 2
Input driver version is 1.0.1
Input device ID: bus 0x3 vendor 0x34a5 product 0x67b8 version 0x1
Input device name: "tslib to uinput daemon"
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 1024
Min 0
Max 1280
Event code 1 (ABS_Y)
Value 809
Min 0
Max 800
Event code 24 (ABS_PRESSURE)
Value 0
Min 0
Max 255
Properties:
Testing ... (interrupt to exit)
Event: time 1550659479.727938, type 3 (EV_ABS), code 0 (ABS_X), value 1248
Event: time 1550659479.727938, type 3 (EV_ABS), code 1 (ABS_Y), value 813
Event: time 1550659479.727938, type 3 (EV_ABS), code 24 (ABS_PRESSURE), value 255
Event: time 1550659479.727938, type 1 (EV_KEY), code 330 (BTN_TOUCH), value 1
Event: time 1550659479.727938, -------------- SYN_REPORT ------------
Event: time 1550659479.759942, type 3 (EV_ABS), code 0 (ABS_X), value 1249
Event: time 1550659479.759942, -------------- SYN_REPORT ------------
Event: time 1550659479.765940, type 3 (EV_ABS), code 1 (ABS_Y), value 814
Event: time 1550659479.765940, -------------- SYN_REPORT ------------
Event: time 1550659479.777933, type 3 (EV_ABS), code 0 (ABS_X), value 1250
Event: time 1550659479.777933, type 3 (EV_ABS), code 1 (ABS_Y), value 815
Event: time 1550659479.777933, -------------- SYN_REPORT ------------
Event: time 1550659479.897933, type 3 (EV_ABS), code 24 (ABS_PRESSURE), value 0
Event: time 1550659479.897933, type 1 (EV_KEY), code 330 (BTN_TOUCH), value 0
Event: time 1550659479.897933, -------------- SYN_REPORT ------------
Event: time 1550659488.279941, type 3 (EV_ABS), code 0 (ABS_X), value 1251
Event: time 1550659488.279941, type 3 (EV_ABS), code 1 (ABS_Y), value 566
Event: time 1550659488.279941, type 3 (EV_ABS), code 24 (ABS_PRESSURE), value 255
Event: time 1550659488.279941, type 1 (EV_KEY), code 330 (BTN_TOUCH), value 1
Event: time 1550659488.279941, -------------- SYN_REPORT ------------
Event: time 1550659488.291939, type 3 (EV_ABS), code 1 (ABS_Y), value 565
Event: time 1550659488.291939, -------------- SYN_REPORT ------------
Event: time 1550659488.417933, type 3 (EV_ABS), code 24 (ABS_PRESSURE), value 0
Event: time 1550659488.417933, type 1 (EV_KEY), code 330 (BTN_TOUCH), value 0
Event: time 1550659488.417933, -------------- SYN_REPORT ------------
Event: time 1550659492.667927, type 3 (EV_ABS), code 0 (ABS_X), value 1018
Event: time 1550659492.667927, type 3 (EV_ABS), code 1 (ABS_Y), value 566
Event: time 1550659492.667927, type 3 (EV_ABS), code 24 (ABS_PRESSURE), value 255
Event: time 1550659492.667927, type 1 (EV_KEY), code 330 (BTN_TOUCH), value 1
Event: time 1550659492.667927, -------------- SYN_REPORT ------------
Event: time 1550659492.717918, type 3 (EV_ABS), code 0 (ABS_X), value 1019
Event: time 1550659492.717918, -------------- SYN_REPORT ------------
Event: time 1550659492.769918, type 3 (EV_ABS), code 1 (ABS_Y), value 567
Event: time 1550659492.769918, -------------- SYN_REPORT ------------
Event: time 1550659492.809932, type 3 (EV_ABS), code 24 (ABS_PRESSURE), value 0
Event: time 1550659492.809932, type 1 (EV_KEY), code 330 (BTN_TOUCH), value 0
Event: time 1550659492.809932, -------------- SYN_REPORT ------------
Event: time 1550659495.543929, type 3 (EV_ABS), code 0 (ABS_X), value 1022
Event: time 1550659495.543929, type 3 (EV_ABS), code 1 (ABS_Y), value 808
Event: time 1550659495.543929, type 3 (EV_ABS), code 24 (ABS_PRESSURE), value 255
Event: time 1550659495.543929, type 1 (EV_KEY), code 330 (BTN_TOUCH), value 1
Event: time 1550659495.543929, -------------- SYN_REPORT ------------
Event: time 1550659495.551938, type 3 (EV_ABS), code 1 (ABS_Y), value 809
Event: time 1550659495.551938, -------------- SYN_REPORT
Display More
I'm sure the calibration program is confused about the swapped axises.
So i'm trying to get the axises swapped in LE with the "out of the box drivers" but without success.
I tried the "module linear swap_xy=1" in the ts.conf file. but no success.
Also tried without success to ad file "egalax_swap_xy.conf" in /storage/.config/modprobe.d with code
anybody who knows if it possible to configure the default touchscreen driver for the axis swap?
EDIT: Got my eGalax Inc. USB TouchController working now!
I'm not sure what (or what update) did the trick, but gave it another try with a fresh install of LibreELEC 9.1.501 and Kodi 18.4. and somehow the calibration addon is working now, correctly swapping the axises.
After fresh install 'Enable mouse and touch screen support' in Kodi System settings.
Install the Touchscreen addon from kodi. (Version 9.1.901.102)
Copy the two necessary files 'ts.conf' and 'ts_env.sh' in folder '/storage/.kodi/userdata/addon_data/service.touchscreen'
ts.conf is as ts.conf-generic:
module_raw input grab_events=1
module pthres pmin=1
module variance delta=30
module dejitter delta=100
module linear
# or use swap_xy parameter to swap axes
#module linear swap_xy=1
ts_env.sh as some additions/changes necessary to ts_env.sh-sample
#!/bin/sh
# SPDX-License-Identifier: GPL-2.0
# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)
# find touchscreen device by name (substring) using evtest program
# $ evtest
# No device specified, trying to scan all of /dev/input/event*
# Available devices:
# /dev/input/event0: Video Bus
# /dev/input/event1: Goodix Capacitive TouchScreen
# Select the device event number [0-1]:
TOUCHSCREEN_NAME="eGalax Inc. USB TouchController"
TSLIB_TSDEVICE=$(echo 999 | evtest 2>&1 >/dev/null | awk -F':' -v TS_NAME="$TOUCHSCREEN_NAME" '$0 ~ TS_NAME {print $1; exit}')
export TSLIB_TSDEVICE=/dev/input/event1
export TSLIB_PLUGINDIR=$ADDON_DIR/lib
export TSLIB_CONSOLEDEVICE=none
export TSLIB_FBDEVICE=/dev/fb0
export TSLIB_CALIBFILE=/storage/.kodi/userdata/addon_data/service.touchscreen/pointercal
export TSLIB_CONFFILE=/storage/.kodi/userdata/addon_data/service.touchscreen/ts.conf
# sometimes needed
export TSLIB_RES_X=1280
export TSLIB_RES_Y=800
Display More
Find out your event# and /dev/fb# as described in post#11 !
Restart your pi and run de Touchscreen addon. This way it worked for me!