[Android Q&A, Help & Troubleshooting] amw2320:
I am working on a CM 12.1 tree for the Dragontouch X10. I can now boot CM, however the touchscreen is not working. It appears to register a touch as it will keep the screen from sleeping if I continue to tap it, and if the screen dims then a tap will light it back up. However it cannot click or scroll, just get the display response.

In addition if I use getevent and touch the screen, all sorts of input shows up under my touchscreen input (dev/input/event5).

The device is an allwinner sunxi device. I am using the stock kernel as allwinner never released a full kernel source. The dmesg log shows the module loading properly:

<6>[ 24.509611] +++++++++++++++++++++++++++++++++
<6>[ 24.509616] ++++++ GSLX680 new used +++++++++
<6>[ 24.509621] +++++++++++++++++++++++++++++++++
<4>[ 24.534586] GSLX680 Enter gsl_ts_probe
<4>[ 24.539043] [GSLX680] Enter gsl_ts_init_ts
<4>[ 24.900617] read 0xfc = 80 36 0 0
<4>[ 24.904415] =============gsl_load_fw start==============
<4>[ 25.489788] =============gsl_load_fw end==============
<6>[ 25.600178] CPU Budget: Temperature: 60 Limit state:1 item[1608000,4,1608000,4 0]
<6>[ 25.608771] CPU Budget:update CPU 0 cpufreq max to 1608000 min to 480000
<6>[ 25.618860] CPU Budget:update CPU 0 cpufreq max to 1608000 min to 480000
<4>[ 25.640704] #########check mem read 0xb0 = 5a 5a 5a 5a #########
<4>[ 25.647791] [GSLX680] End gsl_ts_probe
<4>[ 25.652195] ****************************************************************

logcat also shows the touchscreen driver being identified and loaded:

I/EventHub( 489): New device: id=1, fd=85, path='/dev/input/event5', name='gslX680', classes=0x15, configuration='/system/usr/idc/gslX680.idc', keyLayout='/system/usr/keylayout/Generic.kl', keyCharacterMap='/system/usr/keychars/Generic.kcm', builtinKeyboard=false, wakeMechanism=EVIOCSSUSPENDBLOCK, usingClockIoctl=true
I/InputReader( 489): Touch device 'gslX680' could not query the properties of its associated display. The device will be inoperable until the display size becomes available.
I/InputReader( 489): Device added: id=1, name='gslX680', sources=0x00001103
I/InputReader( 489): Reconfiguring input devices. changes=0x00000004
I/InputReader( 489): Device reconfigured: id=1, name='gslX680', size 1366x768, orientation 0, mode 1, display id 0
I/ActivityManager( 489): Config changes=8 {1.0 ?mcc?mnc en_US ?layoutDir sw768dp w1366dp h695dp 160dpi xlrg long land ?uimode ?night finger -keyb/v/h -nav/h s.4 themeResource=null}

Note: the line saying it could not query properties shows up in the stock logcat as well. It seems to be finding the right configuration a few lines down when it says Device reconfigured.

It also shows up properly if with dumpsys input

1: gslX680
Classes: 0x00000015
Path: /dev/input/event5
Descriptor: 7d7eeb71ea7765ef9584a43b6c32b201b90835d3
Location:
ControllerNumber: 0
UniqueId:
Identifier: bus=0x0018, vendor=0x0000, product=0x0000, version=0x0000
KeyLayoutFile: /system/usr/keylayout/Generic.kl
KeyCharacterMapFile: /system/usr/keychars/Generic.kcm
ConfigurationFile: /system/usr/idc/gslX680.idc
HaveKeyboardLayoutOverlay: false

Device 1: gslX680
Generation: 12
IsExternal: false
Sources: 0x00001103
KeyboardType: 1
Motion Ranges:
X: source=0x00001002, min=0.000, max=1365.000, flat=0.000, fuzz=0.000, resolution=0.000
Y: source=0x00001002, min=0.000, max=767.000, flat=0.000, fuzz=0.000, resolution=0.000
PRESSURE: source=0x00001002, min=0.000, max=1.000, flat=0.000, fuzz=0.000, resolution=0.000
SIZE: source=0x00001002, min=0.000, max=1.000, flat=0.000, fuzz=0.000, resolution=0.000
TOUCH_MAJOR: source=0x00001002, min=0.000, max=1567.093, flat=0.000, fuzz=0.000, resolution=0.000
TOUCH_MINOR: source=0x00001002, min=0.000, max=1567.093, flat=0.000, fuzz=0.000, resolution=0.000
TOOL_MAJOR: source=0x00001002, min=0.000, max=1567.093, flat=0.000, fuzz=0.000, resolution=0.000
TOOL_MINOR: source=0x00001002, min=0.000, max=1567.093, flat=0.000, fuzz=0.000, resolution=0.000
Keyboard Input Mapper:
Parameters:
HasAssociatedDisplay: true
OrientationAware: true
HandlesKeyRepeat: false
KeyboardType: 1
Orientation: 0
KeyDowns: 0 keys currently down
MetaState: 0x0
DownTime: 0
Touch Input Mapper:
Parameters:
GestureMode: spots
DeviceType: touchScreen
AssociatedDisplay: hasAssociatedDisplay=true, isExternal=false
OrientationAware: true
Raw Touch Axes:
X: min=0, max=1366, flat=0, fuzz=0, resolution=0
Y: min=0, max=768, flat=0, fuzz=0, resolution=0
Pressure: unknown range
TouchMajor: min=0, max=255, flat=0, fuzz=0, resolution=0
TouchMinor: unknown range
ToolMajor: min=0, max=200, flat=0, fuzz=0, resolution=0
ToolMinor: unknown range
Orientation: unknown range
Distance: unknown range
TiltX: unknown range
TiltY: unknown range
TrackingId: min=0, max=11, flat=0, fuzz=0, resolution=0
Slot: unknown range
Calibration:
touch.size.calibration: diameter
touch.size.scale: 10.000
touch.size.bias: 0.000
touch.size.isSummed: false
touch.pressure.calibration: none
touch.pressure.scale: 0.005
touch.orientation.calibration: none
touch.distance.calibration: none
touch.coverage.calibration: none
Affine Transformation:
X scale: 1.000
X ymix: 0.000
X offset: 0.000
Y xmix: 0.000
Y scale: 1.000
Y offset: 0.000
Viewport: displayId=0, orientation=0, logicalFrame=[0, 0, 1366, 768], physicalFrame=[0, 0, 1366, 768], deviceSize=[1366, 768]
SurfaceWidth: 1366px
SurfaceHeight: 768px
SurfaceLeft: 0
SurfaceTop: 0
SurfaceOrientation: 0
Translation and Scaling Factors:
XTranslate: 0.000
YTranslate: 0.000
XScale: 0.999
YScale: 0.999
XPrecision: 1.001
YPrecision: 1.001
GeometricScale: 0.999
PressureScale: 0.000
SizeScale: 0.004
OrientationScale: 0.000
DistanceScale: 0.000
HaveTilt: false
TiltXCenter: 0.000
TiltXScale: 0.000
TiltYCenter: 0.000
TiltYScale: 0.000
Last Button State: 0x00000000
Last Raw Touch: pointerCount=1
[0]: id=0, x=0, y=0, pressure=0, touchMajor=0, touchMinor=0, toolMajor=0, toolMinor=0, orientation=0, tiltX=0, tiltY=0, distance=0, toolType=1, isHovering=true
Last Cooked Touch: pointerCount=1
[0]: id=0, x=0.000, y=0.000, pressure=0.000, touchMajor=0.000, touchMinor=0.000, toolMajor=0.000, toolMinor=0.000, orientation=0.000, tilt=0.000, distance=0.000, toolType=1, isHovering=true

There are only 2 differences I can find:

First within the stock firmware the idc file is named tp.idc and is correctly picked up by the kernel module (gslX680new.ko). In my build if I do not rename the file to gslX680.idc it will not pick it up and load this configuration. Files are identical however so I don't know how this should change anything.

Second the parameters HasAssociatedDisplay and OrientationAware are both true for all devices (including the touchscreen) in dumpsys input under KeyboardMapper. In my stock dump they are false. I do not know where these parameters are set and if they have anything to do with the touchscreen device.

As I am not getting any errors, I am somewhat stuck to figure out where this is all going wrong. It seems the touchscreen may in fact be working, however the builds interpretation of where the touch is happening and delivering a "click" is not working. Any help is appreciated.