FORUMS
Remove All Ads from XDA

Possible Fix For Touchscreen Issues/Misses (Updated 08/29)

27 posts
Thanks Meter: 64
 
By shbang, Junior Member on 4th August 2015, 04:09 PM
Post Reply Email Thread
SEE UPDATE BELOW

After doing some more digging on surfaceflinger, atd, and their related libs, I found some interesting entries in a "strings" analysis of libinputflinger.so. Loads of stuff on touch calibration. I noticed some repeated strings that looked like they're assigned to different properties. You can see this clearly by entering:
Code:
strings /system/lib/libinputflinger.so | grep -iE '(^touch\.|[ ][ ]touch\.)'| sed -e 's/^[ \t]*//' | sort -n | uniq
The terminal returns
Code:
touch.coverage.calibration
touch.coverage.calibration: box
touch.coverage.calibration: none
touch.deviceType
touch.distance.calibration
touch.distance.calibration: none
touch.distance.calibration: scaled
touch.distance.scale
touch.distance.scale: %0.3f
touch.gestureMode
touch.orientation.calibration
touch.orientation.calibration: interpolated
touch.orientation.calibration: none
touch.orientation.calibration: vector
touch.orientationAware
touch.pressure.calibration
touch.pressure.calibration: amplitude
touch.pressure.calibration: none
touch.pressure.calibration: physical
touch.pressure.scale
touch.pressure.scale: %0.3f
touch.size.bias
touch.size.bias: %0.3f
touch.size.calibration
touch.size.calibration: area
touch.size.calibration: box
touch.size.calibration: diameter
touch.size.calibration: geometric
touch.size.calibration: none
touch.size.isSummed
touch.size.isSummed: %s
touch.size.scale
touch.size.scale: %0.3f
touch.wake
I looked up some of strings on the net, and lo and behold, they're build.prop entries! You can see the props above that have different strings to assign to them. The ones with a "%0.3f" refer to a number value, and the one with "%s" is a boolean 0/1.


I've only done a little testing, but I found a baseline of improvement values to make our touch screens more responsive. Some of the properties I couldn't find info on, so I'm testing some values like touch.distance.scale. I feel like I have definitely noticed improvements though. I'm no longer so pissed off using my phone, and the frequency of misses overall seems significantly lower. It's acceptable now. Here's what I'm using now at the end of my build.prop:

Code:
##### touch ######
touch.deviceType=touchScreen
# (geometric, diameter, box, area)
touch.size.calibration=geometric
touch.size.scale=100
# (amplitude, physical, none)
touch.pressure.calibration=amplitude
touch.pressure.scale=0.1
touch.gestureMode=pointer
# (interpolated, vector, none)
touch.orientation.calibration=interpolated
# (box, none)
touch.coverage.calibration=box
For detailed information on these touch properties, read here(search for the property you're interested in; the page is pretty long). Some are self-explanatory and others we'll just need to test more. Check them out and see if any calibration values make a significant change. Just copy the above code and paste to the bottom of /system/build.prop with a nice file manager like Solid Explorer. Warning: Adding these entries in the build.prop will change the default touch properties. You can always change them back to stock by removing or commenting the entries from build.prop. I assume most values are aafe, but I can't be sure.

Also worth noting. I found some additional build.prop values to make Android snappier. The fling/swipe velocity make a big difference. Not sure what the others correlate to.
Code:
##### touch related #####
view.touch_slop=2
view.scroll_friction=1.5
view.minimum_fling_velocity=25
ro.max.fling_velocity=12000
ro.min.fling_velocity=8000
ro.min_pointer_dur=8
windowsmgr.max_events_per_sec=200
EDIT: For detailed information on these touch properties, read here.

I'm gonna add some "profiles" of touch settings to use down here.

This one is for a Nexus 4 I believe. I'm trying it out now, and it seems pretty good. My goal is to emulate the touch experience I had with that phone.
Code:
##### touch ######
touch.deviceType=touchScreen
touch.orientationAware=1
# (geometric, diameter, box, area)
touch.size.calibration=diameter
touch.size.scale=10
touch.size.bias=0
touch.size.isSummed=0
# (amplitude, physical, none)
touch.pressure.calibration=amplitude
touch.pressure.scale=0.005
touch.gestureMode=pointer
# (interpolated, vector, none)
touch.orientation.calibration=none



UPDATE
Hey guys, so here's an update to what I've found out about the touch screen and its issues. I apologize for my low activity on xda. I've been real busy working on some linux projects.

First, in order for the touch.* settings to work, they need to be put in an .idc (input device configuration) file with the name of the device. For the G4, that is: /system/usr/idc/touch_dev.idc.

If you have another phone or want to check, you can get the name of your touch screen device with the terminal command:
Code:
for i in /dev/input/event*; do j="$(getevent -i $i | grep -i touch)"; j=${j#*name: }; [[ -z $j ]] || echo ${j//\"/}; done
Before you go try out the .idc file, I want to warn you that certain settings will disable the touch screen. If this happens, you'll need to use adb to delete or move /system/usr/idc/touch_dev.idc somewhere else so that it doesn't get loaded when the phone boots. These are some settings you must NOT change in the .idc file:
Code:
touch.deviceType = touchScreen
touch.coverage.calibration = box
These are the settings I'm currently using:
Code:
touch.deviceType = touchScreen
touch.orientationAware = 1
touch.size.calibration = diameter
touch.size.scale = 1
touch.size.bias = 0
touch.size.isSummed = 0
touch.pressure.calibration = physical
touch.pressure.scale = 0.001
touch.orientation.calibration = none
touch.distance.calibration = none
touch.distance.scale = 0
touch.coverage.calibration = box
touch.gestureMode = spots

MultitouchSettleInterval = 1ms
MultitouchMinDistance = 1px
TapInterval = 1ms
TapSlop = 1px
I'm not sure if the Multitouch* and Tap* settings work or if adding more values from libinputflinger will work. There's little documentation on using settings that don't begin with "touch." You might have to do some experimentation and try other entries in the "strings /system/lib/libinputflinger.so" readout. I would also try using the first settings I posted if these don't seem to help.


Another thing I found out is that this phone performs better with low entropy. You can monitor your current entropy level in the terminal:
Code:
watch "cat /proc/sys/kernel/random/entropy_avail"
It's usually around 2000+ and peaks at 4096 with high activity which is where I think lag comes in. I found that lowering it to under 1000 average cut out the lag spikes I was getting:
Code:
echo 16 > /proc/sys/kernel/random/read_wakeup_threshold
echo 16 > /proc/sys/kernel/random/write_wakeup_threshold
I went ahead and added that to an init.d script. This doesn't have any side effects I've noticed besides possible increased battery life, since the "hwrng" process that generates entropy has no work to do. In case you don't have init.d, make sure busybox is installed, run this command in the terminal, and you'll have init.d startup:
Code:
mount -o remount,rw /system; echo "sleep 300 && run-parts /system/etc/init.d" >> /system/etc/init.qcom.post_boot.sh; mount -o remount,ro /system

One last thing to mention. The touch device has a little section in sysfs under: /sys/devices/virtual/input/lge_touch. There's some interesting information you can find there, values you can change, and tests you can run. Any file with a name ending in "test" can be run by opening the file, yes sysfs files are weird like this. All tests pass for me except "abs_test":
Code:
cat /sys/devices/virtual/input/lge_touch/abs_test
> ========RESULT=======
> Absolute Sensing Short Test : RESULT: Fail
> Absolute Sensing Open Test  : RESULT: Fail
I haven't seen other people with or without touch screen issues run this test, so it may or may not be an indicator that something's wrong with the touch screen or its kernel-side drivers. By the way, this doesn't require superuser. You can check this on any device and even use a good text editor like QuickEdit to open the file and generate test results.

At this point, I'm fairly content with the new improvements I've made, but my best bet on a complete fix would be upgraded touch drivers. The "Advanced In-Cell Touch" device this phone uses is pretty new. There's a good chance this technology has drivers that don't have all the bugs worked out. This is something we'll have to wait on. On the other hand, if LGE handed over a bootloader unlock method and some source files, I'd be just fine with that too.
The Following 34 Users Say Thank You to shbang For This Useful Post: [ View ] Gift shbang Ad-Free
 
 
4th August 2015, 05:11 PM |#2  
Member
Thanks Meter: 19
 
More
What "issues" is this attempting to fix
4th August 2015, 05:13 PM |#3  
Member
Thanks Meter: 6
 
More
Quote:
Originally Posted by kyle1867

What "issues" is this attempting to fix

Probably the horrible touch response many users experience.
4th August 2015, 05:32 PM |#4  
Senior Member
Flag Salt Lake City
Thanks Meter: 65
 
More
Is this something that we can copy and paste into the end of the build prop, or is it replacing stuff that is already there?

Sent from my LG-H811 using XDA Free mobile app
4th August 2015, 08:32 PM |#5  
Member
Thanks Meter: 17
 
More
Wow nice job man.

Is it possible to address the swipe registering as taps through this or do you think this will also address it?
4th August 2015, 09:35 PM |#6  
GUGUITOMTG4's Avatar
Senior Member
GuGuPlace
Thanks Meter: 267
 
Donate to Me
More
Quote:
Originally Posted by Harmtan2

Is this something that we can copy and paste into the end of the build prop, or is it replacing stuff that is already there?

Sent from my LG-H811 using XDA Free mobile app

You'll have to add almost all of them.
4th August 2015, 09:45 PM |#7  
Junior Member
Flag Anantapur
Thanks Meter: 1
 
Donate to Me
More
Yes bro am too facing the touch problem in my intex aqua star power. The problem is when we keep the finger the screen shakes and also in 100% of my usage 20% touch mismatches . On first i irritated and now i habituated with this touch.

Sent from my Aqua Star Power using Tapatalk
5th August 2015, 02:26 AM |#8  
Rydah805's Avatar
Recognized Contributor
Flag Ventura County, CA
Thanks Meter: 2,022
 
Donate to Me
More
The build.prop edits seem to be making the difference. 😃

Sent From My LG G4
The Following 2 Users Say Thank You to Rydah805 For This Useful Post: [ View ] Gift Rydah805 Ad-Free
5th August 2015, 02:40 AM |#9  
esmenikmatixx's Avatar
Senior Member
Thanks Meter: 36
 
More
Quote:
Originally Posted by Rydah805

The build.prop edits seem to be making the difference. 😃

Sent From My LG G4

would you say that double tap to wake is improved as well?
5th August 2015, 02:46 AM |#10  
Rydah805's Avatar
Recognized Contributor
Flag Ventura County, CA
Thanks Meter: 2,022
 
Donate to Me
More
Quote:
Originally Posted by esmenikmatixx

would you say that double tap to wake is improved as well?

Hmm, you know what, it is.

Sent From My LG G4
The Following User Says Thank You to Rydah805 For This Useful Post: [ View ] Gift Rydah805 Ad-Free
5th August 2015, 02:48 AM |#11  
Senior Member
Thanks Meter: 107
 
More
Quote:
Originally Posted by esmenikmatixx

would you say that double tap to wake is improved as well?

I would say so I have all these except the new ones he posted an an script from another post an I do see some improvements defiantly double tap to wake
The Following User Says Thank You to donbudafuko For This Useful Post: [ View ] Gift donbudafuko Ad-Free
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes