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

Search This thread

loSconosciuto

Senior Member
Nov 21, 2011
765
2,817
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
=== [COLOR="Green"][B]set_touchscreen[/B][/COLOR] - 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,   [COLOR="Red"][B]13[/B][/COLOR][B].movfilter= [/B][COLOR="Blue"][B]46[/B][/COLOR],  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 [COLOR="Red"][B]13[/B][/COLOR][COLOR="Blue"]0[B]46[/B][/COLOR] > /sys/touchscreen/[COLOR="Green"][B]set_touchscreen[/B][/COLOR]
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.
 
Last edited:

alfrix

Senior Member
May 19, 2011
152
435
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.
 
Last edited:

loSconosciuto

Senior Member
Nov 21, 2011
765
2,817
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 :D
 
Last edited:

alfrix

Senior Member
May 19, 2011
152
435
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.
 
  • Like
Reactions: loSconosciuto

loSconosciuto

Senior Member
Nov 21, 2011
765
2,817
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.
 
Last edited:
  • Like
Reactions: loneagl

loSconosciuto

Senior Member
Nov 21, 2011
765
2,817
I added two scripts (read the OP).

@rom cooks:
This is especially for you. Read the note in the first post.
 
Last edited:

vivekkalady

Inactive Recognized Developer
Aug 11, 2009
1,433
1,761
Trivandrum
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

Senior Member
Nov 21, 2011
765
2,817
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.

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.
I don't understand what you mean.
You can change the number of finger tracked by the screen if you want (default 5, numtouch).

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.
 

juanmaper

Senior Member
Feb 25, 2011
220
20
La Plata
I have problems scrolling trough homescreens. Sometimes I have to move my finger across the screen 3 times to scroll. And sometimes I want to scroll and accidentaly open an app. I hate it, I tried every rom and the only one that partially solve this was Cranium. I think this happend because the procesor have other priorities (conect wifi, download data package, send sms, etc) over the touchscreen.
 

shriom_manerker

Senior Member
Mar 23, 2011
1,914
804
Margao,Goa
OnePlus 3
OnePlus 5T
I have problems scrolling trough homescreens. Sometimes I have to move my finger across the screen 3 times to scroll. And sometimes I want to scroll and accidentaly open an app. I hate it, I tried every rom and the only one that partially solve this was Cranium. I think this happend because the procesor have other priorities (conect wifi, download data package, send sms, etc) over the touchscreen.

ur touchscreen is probably DIRTY or has sum oily liquids on it ! clean it with a soft wet cloth several times and it'll go away ! i had that isue before
 

loSconosciuto

Senior Member
Nov 21, 2011
765
2,817
I have problems scrolling trough homescreens. Sometimes I have to move my finger across the screen 3 times to scroll. And sometimes I want to scroll and accidentaly open an app. I hate it, I tried every rom and the only one that partially solve this was Cranium. I think this happend because the procesor have other priorities (conect wifi, download data package, send sms, etc) over the touchscreen.

So this happens while you are doing other things, right?
If it's not because of some dirty on the screen, the only suggestions I could give you are:
try to change CPU governor
try to change I/O scheduler
try to convert your partitions in ext4 (Cranium used it if I'm not wrong)

See if this can help: http://xdaforums.com/showthread.php?t=1137554
 

juanmaper

Senior Member
Feb 25, 2011
220
20
La Plata
So this happens while you are doing other things, right?
If it's not because of some dirty on the screen, the only suggestions I could give you are:
try to change CPU governor
try to change I/O scheduler
try to convert your partitions in ext4 (Cranium used it if I'm not wrong)

See if this can help: http://xdaforums.com/showthread.php?t=1137554


Im using lulzactive, and is a little more smoother, but time to time it happend that cannot scroll well.

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.

+1. When plugged in the phone is really smooth.
 

alexecus

Senior Member
Jan 25, 2011
134
46
I am also having the same problem... Especially in Swype keyboard... I think its a sensitivity problem...btw... Does a screen protector decreases or interfere with the sensitivity of the screen...?
 

loSconosciuto

Senior Member
Nov 21, 2011
765
2,817
Does a screen protector decreases or interfere with the sensitivity of the screen...?
I don't know, I've never used one, but it's not unlikely.
You can increase the sensitivity with:
Code:
echo 7025 > /sys/touchscreen/set_touchscreen
cat /sys/touchscreen/set_write
Try different values.

If you go below ~10 your finger is detect even if you don't touch the screen. I suggest you not to use too low values here. (default=32)

I am also having the same problem... Especially in Swype keyboard... I think its a sensitivity problem...btw...
I had problems with swype too. I had lags especially when the "suggestions bar" appeard/disappeared. Try this:
Swype settings->Word suggestion->tick everything
In this way it's less probable that the "suggestion bar" disappears.

Now, after a clean wipe and some tweaks, this problem seems almost gone and the setting I suggested does nothing in my case, but you can try.
 

juanmaper

Senior Member
Feb 25, 2011
220
20
La Plata
I am also having the same problem... Especially in Swype keyboard... I think its a sensitivity problem...btw... Does a screen protector decreases or interfere with the sensitivity of the screen...?

I have a screen protector and it doesnt interfere with the sensitivity. I think it depends on the protector. I have a cheap one, and its ok.

I don't know, I've never used one, but it's not unlikely.
You can increase the sensitivity with:
Code:
echo 7025 > /sys/touchscreen/set_touchscreen
cat /sys/touchscreen/set_write
Try different values.

If you go below ~10 your finger is detect even if you don't touch the screen. I suggest you not to use too low values here. (default=32)


I had problems with swype too. I had lags especially when the "suggestions bar" appeard/disappeared. Try this:
Swype settings->Word suggestion->tick everything
In this way it's less probable that the "suggestion bar" disappears.

Now, after a clean wipe and some tweaks, this problem seems almost gone and the setting I suggested does nothing in my case, but you can try.

Low values consume more battery, right?
 

juanmaper

Senior Member
Feb 25, 2011
220
20
La Plata
I don't know, I use a value similar to the stock one. I put low values once for testing purpose only.
I suggested not to go below 10 because the touchscreen becomes almost unusable, it does things by itselfs.


I think the problem is not the sensitivity, its the number of times that the screen refresh the position of the finger. Because when I touch the screen just a bit, it work. But when trying to scroll, sometimes it dont.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 12
    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
    === [COLOR="Green"][B]set_touchscreen[/B][/COLOR] - 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,   [COLOR="Red"][B]13[/B][/COLOR][B].movfilter= [/B][COLOR="Blue"][B]46[/B][/COLOR],  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 [COLOR="Red"][B]13[/B][/COLOR][COLOR="Blue"]0[B]46[/B][/COLOR] > /sys/touchscreen/[COLOR="Green"][B]set_touchscreen[/B][/COLOR]
    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.
    3
    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.

    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.
    I don't understand what you mean.
    You can change the number of finger tracked by the screen if you want (default 5, numtouch).

    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.
    2
    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.
    2
    loSconosciuto
    i did this
    su
    echo 7005 > /sys/touchscreen/set_touchscreen
    cat /sys/touchscreen/set_write

    and the phone is literally working without touching the screen haha floating touch on sl ? :p lol


    could u tel me how to make an int.d script out of it ?

    and heres a video of it :D
    https://www.facebook.com/photo.php?v=4245680894201
    1
    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.