Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,807,866 Members 50,981 Now Online
XDA Developers Android and Mobile Development Forum

[HOW TO] Tweak your touchscreen [update: 11/04/12]

Tip us?
 
loSconosciuto
Old
(Last edited by loSconosciuto; 11th October 2012 at 11:18 PM.)
#1  
Senior Member - OP
Thanks Meter 2,813
Posts: 765
Join Date: Nov 2011
Default [HOW TO] Tweak your touchscreen [update: 11/04/12]

Quote:
NOTE: The first six posts are a reply to the old post that I removed long ago.
I shouldn't have removed it completely.
This is the current configuration of the touchscreen:
Code:
=========== [TSP] Configure SET for normal ============
=== set_power - GEN_POWERCONFIG_T7 ===
0. idleacqint= 64, 1. actvacqint=255, 2. actv2idleto= 50
=== set_acquisition - GEN_ACQUIRECONFIG_T8 ===
0. chrgtime= 10,   1. reserved=  0,   2. tchdrift=  5
3. driftst=  1,    4. tchautocal=  0, 5. sync=  0
6. atchcalst=  9,  7. atchcalsthr= 27
=== set_touchscreen - TOUCH_MULTITOUCHSCREEN_T9 ===
0. ctrl=143,       1. xorigin=  0,    2. yorigin=  0
3. xsize= 18,      4. ysize= 11,      5. akscfg=  1
6. blen= 16,       7. tchthr= 32,     8. tchdi=  2
9. orientate=  1,  10.mrgtimeout=  0, 11.movhysti=  3
12.movhystn=  1,   13.movfilter= 46,  14.numtouch=  5
15.mrghyst=  5,    16.mrgthr= 40,     17.tchamphyst= 10
18.xrange=799,       19.yrange=479,       20.xloclip=  0
21.xhiclip=  0,    22.yloclip=  0,    23.yhiclip=  0
24.xedgectrl=  0,  25.xedgedist=  0,  26.yedgectrl=  0
27.yedgedist=  0,  28.jumplimit= 18
=== set_keyarray - TOUCH_KEYARRAY_T15 ===
0. ctrl=131,       1. xorigin= 16,    2. yorigin= 11
3. xsize=  2,      4. ysize=  1,      5. akscfg=  1
6. blen=  0,       7. tchthr= 45,     8. tchdi=  4
=== set_grip - PROCI_GRIPFACESUPRESSION_T20 ===
0. ctrl= 19,       1. xlogrip=  0,    2. xhigrip=  0
3. ylogrip=  5     4. yhigrip=  5,    5. maxtchs=  0
6. reserved=  0,  7. szthr1= 30,     8. szthr2= 20
9. shpthr1=  4     10.shpthr2= 15,    11.supextto= 10
=== set_noise ===
0. ctrl = 135,         1. gcaful(2bts)=0
2. gcafll(2bts)=    0, 3. actvgcafvalid =3
4. noisethr= 27,   5.freqhopscale=  0,6. freq[0]= 29
7. freq[1]= 34,    8. freq[2]= 39,    9. freq[3]= 49
10.freq[4]= 58,    11.idlegcafvalid=  3
=== set_total ===
0 , linearization_config.ctrl = 0
1 , twotouch_gesture_config.ctrl = 0
2 , onetouch_gesture_config.ctrl = 0
3 , selftest_config.ctrl = 0
4. cte_config.ctrl=  0,  5. cte_config.cmd=  0
6. cte_config.mode=  2,  7. cte_config.idlegcafdepth= 16
8. cte_config.actvgcafdepth= 63,  9.cte_config.voltage= 60
================= end ======================
To change it you simply need to run few commands:
Code:
echo 13046 > /sys/touchscreen/set_touchscreen
XX is the number of the option. In this example 13=movfilter.
YYY is the value you want to set. In this case 46. You must use 3 digits.
set_touchscreen is the file where you store this information. It's not always set_touchscreen, it could also be set_noise, set_acquisition etc...
To apply the changes you have to run this:
Code:
cat /sys/touchscreen/set_write
To get the new configuration run
Code:
dmesg
This will output a lot of kernel messages, not only the touchscreen configuration.
If you want to get the default configuration: reboot, 'cat /sys/touchscreen/set_write' and then 'dmesg'.

That's it.

Here some values explained: http://pastebin.com/raw.php?i=WSqjYT2t

Here a script with the default values, you can use it as base: http://pastebin.com/CejX00v5

The changes are not permanent, they are resetted on every boot. If you do something wrong, you can always reboot.

Don't put anything untested in /etc/init.d/

====

Here a i9000 script adapted for our phone.
Code:
#!/system/bin/sh
#Touchscreen
#Configure touchscreen sensitivity
#Sensitive(Chainfire)

echo 7035 > /sys/touchscreen/set_touchscreen;
echo 8002 > /sys/touchscreen/set_touchscreen; #default setting
echo 11000 > /sys/touchscreen/set_touchscreen;
echo 13060 > /sys/touchscreen/set_touchscreen;
echo 14005 > /sys/touchscreen/set_touchscreen; #default setting
cat /sys/touchscreen/set_write;
Default values (you can also reboot the phone):
Code:
#!/system/bin/sh
#Touchscreen
#Configure touchscreen sensitivity
#Sensitive - default settings

echo 7032 > /sys/touchscreen/set_touchscreen;
echo 8002 > /sys/touchscreen/set_touchscreen;
echo 11003 > /sys/touchscreen/set_touchscreen;
echo 13046 > /sys/touchscreen/set_touchscreen;
echo 14005 > /sys/touchscreen/set_touchscreen;
cat /sys/touchscreen/set_write;
___________
Note
In different custom roms I saw this:
Code:
#!/system/bin/sh
#Touchscreen
#Configure touchscreen sensitivity
#Sensitive(Chainfire)

echo 7035 > /sys/class/touch/switch/set_touchscreen;
echo 8002 > /sys/class/touch/switch/set_touchscreen;
echo 11000 > /sys/class/touch/switch/set_touchscreen;
echo 13060 > /sys/class/touch/switch/set_touchscreen;
echo 14005 > /sys/class/touch/switch/set_touchscreen;
This script obviously is not for our phone, it doesn't work.
The Following 12 Users Say Thank You to loSconosciuto For This Useful Post: [ Click to Expand ]
 
alfrix
Old
(Last edited by alfrix; 7th April 2012 at 09:44 PM.)
#2  
alfrix's Avatar
Senior Member
Thanks Meter 435
Posts: 147
Join Date: May 2011
Location: Rosario
The touchscreen maximum scan speed of the AT42QT602240 it's 250Hz for 1 finger (one scan every 1/250 s --> 4ms per scan)
so it will always have delay while moving, maybe you can improve it to some extent but it's slow compared to rapid movements that can be made while drawing, but for normal use, it isn't noticeable.

More info about scanning speed results:

http://www.youtube.com/watch?v=vOvQCPLkPt4

i think MOVHYSTI it's there on purpose to prevent some unintentional rubbing.
The Following 2 Users Say Thank You to alfrix For This Useful Post: [ Click to Expand ]
 
loSconosciuto
Old
(Last edited by loSconosciuto; 7th April 2012 at 11:29 PM.)
#3  
Senior Member - OP
Thanks Meter 2,813
Posts: 765
Join Date: Nov 2011
You are right, thanks for the explanation.

I knew it was there for a reason, but I still prefer as it is now. As you said, it's ok for normal use, playing games it's harder now.

Edit: with the original movfilter value, games are not that bad (I only tried Angry Birds), not that I care that much
 
alfrix
Old
#4  
alfrix's Avatar
Senior Member
Thanks Meter 435
Posts: 147
Join Date: May 2011
Location: Rosario
I also want to add that the controller chip 4ms isn't final, the response that the microsoft research team it's showing it's for the whole loop (finger detected > drawed point on screen) and for that a lot of other times are need to take in account, for example screen refresh rate of our device (and most) takes about 17ms (60hz), so there is a need to improve hardware on the forthcoming devices.
The Following User Says Thank You to alfrix For This Useful Post: [ Click to Expand ]
 
shriom_manerker
Old
#5  
shriom_manerker's Avatar
Senior Member
Thanks Meter 707
Posts: 1,698
Join Date: Mar 2011
Location: Margao,Goa
this problem has been solved in ddkp3 version of indian firmware ! cus when i try doin this it moves instantly ! or is it cus of vurrut kernel ? i dono but the touchscreen is working great for me
 
rockyddroid
Old
#6  
Senior Member
Thanks Meter 47
Posts: 297
Join Date: Oct 2011
Location: Kharagpur
Default Negative

I am on MIUI.
I tried your test.
But my screen moved instantaneously.
RemICS v1.5.3
Eat. Sleep. Andriod.

Press Thanks if helped.
 
loSconosciuto
Old
(Last edited by loSconosciuto; 8th April 2012 at 10:46 AM.)
#7  
Senior Member - OP
Thanks Meter 2,813
Posts: 765
Join Date: Nov 2011
Probably I didn't explain what I mean well enough. Let's try this:
Put your finger on the screen and try to move it changing the coordinates of a single digit, not three, not five, just one. It's better if you do this in a single direction, try to keep still the X or the Y.
I doubt you can do this. And do this right after you put the finger on the screen, not after the coordinates already changed, becase after that the hysteresis automatically changes.

I know the change is instant even without this patch, I'm not talking about centimeters, inches (or whatever you use) and it's not to be intended in terms of time. I'm talking about pixels. This change is nothing revolutionary, we can't improve our hardware. Moreover the value that make me feel the change was movfilter, but in some situations the screen was hard to use, so I put back the original value.
I'm suggesting to remove the hysteresis because I think that every app applies a sort of movement filter that is coupled with it. With the updated values I can easly keep the screen still with my finger on it (with the first ones there were some microscillations).


Does anyone know why the screen sensitivity changes while plugged in?
The TSP thresold is intentionally increased, I don't want to change this, it's just a curiosity, because I couldn't find any exhaustive explanation.
The Following User Says Thank You to loSconosciuto For This Useful Post: [ Click to Expand ]
 
loSconosciuto
Old
(Last edited by loSconosciuto; 16th April 2012 at 05:37 PM.)
#8  
Senior Member - OP
Thanks Meter 2,813
Posts: 765
Join Date: Nov 2011
I added two scripts (read the OP).

@rom cooks:
This is especially for you. Read the note in the first post.
 
vivekkalady
Old
#9  
vivekkalady's Avatar
Recognized Developer
Thanks Meter 1,387
Posts: 1,289
Join Date: Aug 2009
Location: Trivandrum

 
DONATE TO ME
How did you get the first configuration file ??
how can I view the current configuration ??
what do this improvement does ?
is it multitouch?
what is movfilter ???
 
loSconosciuto
Old
#10  
Senior Member - OP
Thanks Meter 2,813
Posts: 765
Join Date: Nov 2011
Quote:
Originally Posted by vivekkalady View Post
How did you get the first configuration file ??
how can I view the current configuration ??
Oh, I forgot to add this info.
Code:
cat /sys/touchscreen/set_write
dmesg
The first command set the current configuration and then use printk() to show it. To see "printk()" messages, you have to use the second command (dmesg). This will print a lot of kernel messages, not only the touchscreen configuration.

Quote:
Originally Posted by vivekkalady View Post
what do this improvement does ?
It's like changing brightness/colours of your screen. There's no real improvement, it's up to you. I showed you a way to configure your touchscreen.
Quote:
is it multitouch?
I don't understand what you mean.
You can change the number of finger tracked by the screen if you want (default 5, numtouch).

Quote:
Originally Posted by vivekkalady View Post
what is movfilter ???
A parameter I used in the example above.
If you want to know what's its effect, well, try to change it.
Basically it changes how the screen reacts to movements. If you set it to a very low value, scrolling becomes very hard, the screen is like immovable.

The Following 3 Users Say Thank You to loSconosciuto For This Useful Post: [ Click to Expand ]
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes