(TUT)How to fix Proximity sensor Lag

Search This thread

M66B

Recognized Developer
Aug 1, 2010
26,751
57,998
I am wondering where the numbers of the fix are coming from, since one of the parameters seems to be out of range:

Code:
echo $val_cycle > $dev/cycle    # Duration Cycle. Valid range is 0 - 3.
echo $val_nburst > $dev/nburst  # Number of pulses in burst. Valid range is 0 - 15.
echo $val_freq > $dev/freq      # Burst frequency. Valid range is 0 - 3.
echo $val_threshold > $dev/threshold # sensor threshold. Valid range is 0 - 15 (0.12V - 0.87V)
echo $val_filter > $dev/filter  # RFilter. Valid range is 0 - 3.

Taken from the source code for mango (Xperia mini pro).

Edit: interesting: "16 - 31 is a special range for smultron only (SP)" (see here)

Conclusion: this fix might only be for smultron (Xperia mini).

Edit #2: that seems to be correct, since the bug report is for smultron.
 
Last edited:
  • Like
Reactions: PeppeBove

scorpion 13

Senior Member
Aug 17, 2012
423
153
Tehran
I am wondering where the numbers of the fix are coming from, since one of the parameters seems to be out of range:

Code:
echo $val_cycle > $dev/cycle    # Duration Cycle. Valid range is 0 - 3.
echo $val_nburst > $dev/nburst  # Number of pulses in burst. Valid range is 0 - 15.
echo $val_freq > $dev/freq      # Burst frequency. Valid range is 0 - 3.
echo $val_threshold > $dev/threshold # sensor threshold. Valid range is 0 - 15 (0.12V - 0.87V)
echo $val_filter > $dev/filter  # RFilter. Valid range is 0 - 3.

Taken from the source code for mango (Xperia mini pro).

Edit: interesting: "16 - 31 is a special range for smultron only (SP)" (see here)

Conclusion: this fix might only be for smultron (Xperia mini).

Edit #2: that seems to be correct, since the bug report is for smultron.
do you mean this values will not work with other devices??
 

M66B

Recognized Developer
Aug 1, 2010
26,751
57,998
do you mean this values will not work with other devices??
I don't know, but according to the documentation one of the values is out of range, except for smultron.

Code:
val_nburst=26

"Number of pulses in burst. Valid range is 0 - 15"
"16 - 31 is a special range for smultron only (SP)"
 

gerv.markham

Member
Nov 22, 2011
10
0
Sheffield
www.gerv.net
Try both sets of numbers if you are having problems

My wife's Xperia Mini is running CM9. The CM9 numbers from the initial post didn't work at all, but the CM10 numbers worked fine. So if you have this problem, do try both. (Back up the file before changing it!)

Gerv
 

o0KeXamLang0o

New member
Jan 19, 2013
1
0
Some Ics and jb roms( like cm 9,10 )has "proximity sensor lag". it means when you are calling,proximity sensor wont be work and screen in on.
i have a method to fix this bug on cm9

things we need:
Root explorer

what should we do:

1: open Root explorer and go to the system/etc
2:find hw_config.sh and open it with texteditor
3:in hw_config.sh,find this line:
#proximity sesnor configuration
4:replace next lines with this values...

val_cycle=2
val_nburst=0
val_freq=2
val_threshold=5
val_filter=0


for cm10: (thanks to Steph310)

val_cycle=0
val_nburst=26
val_freq=0
val_threshold=2
val_filter=0


5:save file and reboot

Tested on Xperia mini with Cm9.1 and fully worked
:D
WORKING ON LASTEST CM 9.x and CM10
Press thanks if worked

I don't find file : hw_config.sh in the Rom Cm10 - RC2
I use Sky Vega 810S, from Korea
 
Last edited:

solairajesh

Member
Jun 29, 2013
44
6
Can anybody fwd this fix to FXP CM 10?

This fix working great for FXP CM10 builds for my Coconut. Can somebody add this to the FXP build itself because everytime you do a Flash you need to again add this fix. It would be good if this comes with core build itself. :laugh:
 

Aashirg

Senior Member
Aug 1, 2012
107
6
not working on my ST15i

i have tested these values on my Xperia mini st15i with ICS custom rom but my proximity sensor is not working.... i have tested CM 10 values also but those didn't worked also.. what to do now???????????
 

nizamgates

Member
Jun 27, 2012
36
2
Works!

Confirm working on xperia Z.
I use a thick tempered glass screen protector and changing the threshold solved the proximity sensor problem!
Thank you very much :)
 

steakhutzeee

Senior Member
Apr 13, 2013
390
27
I used it on my Xperia Mini CM 9.1 with MesaHybridKernel 4.4 and doesn't work. I must use particular permission for the file?
I tried to execute it but the problem persist :confused:
 

Top Liked Posts

  • There are no posts matching your filters.
  • 18
    Some Ics and jb roms( like cm 9,10 )has "proximity sensor lag". it means when you are calling,proximity sensor wont be work and screen in on.
    i have a method to fix this bug on cm9

    things we need:
    Root explorer

    what should we do:

    1: open Root explorer and go to the system/etc
    2:find hw_config.sh and open it with texteditor
    3:in hw_config.sh,find this line:
    #proximity sesnor configuration
    4:replace next lines with this values...

    val_cycle=2
    val_nburst=0
    val_freq=2
    val_threshold=5
    val_filter=0


    for cm10: (thanks to Steph310)

    val_cycle=0
    val_nburst=26
    val_freq=0
    val_threshold=2
    val_filter=0


    5:save file and reboot

    Tested on Xperia mini with Cm9.1 and fully worked
    :D
    WORKING ON LASTEST CM 9.x and CM10
    Press thanks if worked
    3
    Works fine on cm9.1 but not working in cm10.
    May be fxp142 come with some fix :D

    Sent from my WT19i using Tapatalk 2

    For CM10, on my St15i I use this:
    /system/etc/hw_config.sh

    *)
    val_cycle=2
    val_nburst=8
    val_freq=2
    val_threshold=15
    val_filter=0
    ;;

    replace with:
    *)
    val_cycle=0
    val_nburst=26
    val_freq=0
    val_threshold=2
    val_filter=0
    ;;
    1
    Hi:D tnx so much ...
    Do u have any fix or sth for usbotg?? Plzzz i am in need:(
    sorry:(
    i am not using usbotg and i donr know anything about this
    1
    yes
    i tested it on your jb miui and didnt work!
    but i tested and worked on cm10 fxp 140
    st15i

    Got it work by changing a lib file

    sent straight from hell