[Solved] TS FREEZE FIXED / Orientation offset calibration & G-SENSOR CALIBRATION FIX

Search This thread

Kazz88

Senior Member
Feb 14, 2010
52
0
[AK8973]
HDOE_STATUS_SLIDER_OPEN=1
HDOE_STATUS_SLIDER_CLOSE=0
HDOE_SUCTEMP=114
HDAC_SLIDER_OPEN.x=128
HDAC_SLIDER_OPEN.y=135
HDAC_SLIDER_OPEN.z=4
HOFFSET_SLIDER_OPEN.x=250
HOFFSET_SLIDER_OPEN.y=593
HOFFSET_SLIDER_OPEN.z=175
HDAC_SLIDER_CLOSE.x=0
HDAC_SLIDER_CLOSE.y=0
HDAC_SLIDER_CLOSE.z=0
HOFFSET_SLIDER_CLOSE.x=0
HOFFSET_SLIDER_CLOSE.y=0
HOFFSET_SLIDER_CLOSE.z=0
ASENSE.x=256
ASENSE.y=256
ASENSE.z=256
AOFFSET.x=0
AOFFSET.y=0
AOFFSET.z=0

Copy/paste in text editor

1. save this AK8973Prms.txt
2. Save again AK8973Prms.txt.tmp
3. Change both with in /data/misc folder with rootexplorer

It works for me.

hi, do u restart after this? im trying to calibrate stock gingerbread. why does the HTC g-sensor calibration work? (when upside down) is there an app in market or anywhere that can do this?

Values dint work
 
Last edited:

l1f35ux

Member
Sep 2, 2010
6
0
I wasn't able to get to the data file directory using any file management system. I kept on getting the "Root Access Failed" error message. How do I grant root permission when requested by superuser because that seems to be the problem it's having. for some reason the file management apps installed on my htc leo don't have access to my dir.
 

japookie

Member
Oct 6, 2009
6
0
i have been trying to solve my g sensor issue for a few hours now and installed root explorer. when i navigated to the data directory i was greeted with the message that the directory was empty. How do i find the AK8973Prms.txt text file so i can edit it?
 

x3nophobia

Senior Member
Dec 23, 2010
547
45
Cairo
Hi,

i would to know, does this method apply also to android NAND build? cause i have a ts freeze for a short period of times while playing angry bird.

i did calibrate gsensor. but when i try to recalibrate, the vertical sensor seems doesnt work as it won't stay in the middle of vertical sensor portion. the horizontal one seems fine.

kindly help pls :confused:
 

asidrave

Senior Member
May 16, 2010
151
5
North Jersey
From post #11

Also using the calibration tool with the phone face down gives better results with z axis. (to be able to tap on calibrate, put your phone on the table and make it just go over the edge of the table and tap from underside)

this worked for me....thanks :)
 

Namuh

Senior Member
Nov 6, 2007
261
44
Bakersfield
I have android installed on nand and it use to be that the touch screen would freeze when I pushed the red power button to bring it out of sleep mode. All I had to do was push the back arrow button and then I could slide the lock screen down and everything was fine. Now I can't get the touchscreen to unlock no matter what I try. I have tried to reboot, take the battery out etc but when the lock screen comes up now I cant slide it down to unlock it. I push every button to get the screen to turn on and I cant unlock it because the screen wont respond.What do I do? :confused: :mad:
 

CaCtuZ123

Senior Member
May 18, 2009
92
7
Stockholm
I have android installed on nand and it use to be that the touch screen would freeze when I pushed the red power button to bring it out of sleep mode. All I had to do was push the back arrow button and then I could slide the lock screen down and everything was fine. Now I can't get the touchscreen to unlock no matter what I try. I have tried to reboot, take the battery out etc but when the lock screen comes up now I cant slide it down to unlock it. I push every button to get the screen to turn on and I cant unlock it because the screen wont respond.What do I do? :confused: :mad:

You can get back if you jerk between different buttons...with patience.
In the end your screen is going to die :-(
Mine did after having that problem since august, back button = screen freeze.
If you get back....Download button saviour and use the software buttons to gain longer life in your HD2.
Mine is off to HTC, if this should be a hardware issue which I'm 100% sure of, I don't need pay a penny even thou my warranty expired in january according to the woman I spoke to since they replaced the screen in june. Otherwise 150 € plus :-(
 
Last edited:
  • Like
Reactions: Namuh

Namuh

Senior Member
Nov 6, 2007
261
44
Bakersfield
Ok then looks like its dead and its not under warranty either. Last HTC I buy due to shoddy button design and QC. I mean seriously, we aren't supposed to use the buttons much? LOL. Well,I'm probably going to trash it and get an Atrix or some other phone then. Thanks for the help!
 
Last edited:

m4rc3l1n0

Senior Member
Mar 21, 2008
71
0
You can get back if you jerk between different buttons...with patience.
In the end your screen is going to die :-(
Mine did after having that problem since august, back button = screen freeze.
If you get back....Download button saviour and use the software buttons to gain longer life in your HD2.
Mine is off to HTC, if this should be a hardware issue which I'm 100% sure of, I don't need pay a penny even thou my warranty expired in january according to the woman I spoke to since they replaced the screen in june. Otherwise 150 € plus :-(
Are you sure it is hardware (button) issue? not Android built issue?
It is working fine when I'm using Windows Mobile
 
Last edited:

m4rc3l1n0

Senior Member
Mar 21, 2008
71
0
I have android installed on nand and it use to be that the touch screen would freeze when I pushed the red power button to bring it out of sleep mode. All I had to do was push the back arrow button and then I could slide the lock screen down and everything was fine. Now I can't get the touchscreen to unlock no matter what I try. I have tried to reboot, take the battery out etc but when the lock screen comes up now I cant slide it down to unlock it. I push every button to get the screen to turn on and I cant unlock it because the screen wont respond.What do I do? :confused: :mad:
I have the same problem
but with different build of android (SD)
but it works fine with windows mobile
android build problem? or something else?
 

Bas2ct

Member
Dec 8, 2009
29
1
Weserbergland, Germany
Hello Memin1857,

My phone is giving me trouble since I installed Android (NAND). My tilt sensor / g-sensor / accelerometer does not work at all. I've tried various thing, reinstalled a dozen times and still nothing. So I did a search on the forum and found this thread. Looks like you have got a lot of experience with the g-sensor.

So, I started reading and saw you mentioned "Sensor Debug" from the marketplace to see what settings the g-sensor had. Well, actually when I started the program I did not get any data what so ever. I tried rebooting, but it made no difference.

Maybe you can help me figure out what is wrong? I would be very thankful.

Kind regards,

Bas
 

jams90

Senior Member
Apr 26, 2008
51
3
help

hi i don't know how to apply this patch...

i have a HD2 from Tmobile and i installed this android ROM on it: http://xdaforums.com/showthread.php?t=1199917

it works well but recently i've been having issues with the touchscreen... it Freezes and i try some android from SD and same, i format it with windows mobile and same... but i don't know why if i conect it to a wifi network and Synchronize It the screen works fine again... that's the weird thing... i don't know what to do..


will this patch help me out?

thanks
 

Top Liked Posts

  • There are no posts matching your filters.
  • 5
    [Solved] TS FREEZE FIXED / Orientation offset calibration & G-SENSOR CALIBRATION FIX

    UPDATE: (13/11) A patch has been developed that completely eliminates TS FREEZE for good.
    Thanks to mdebeljuh and jdivic, I tested it and it seems to be working perfectly.
    Check post 140 on page 14:
    http://xdaforums.com/showpost.php?p=9194473&postcount=140
    UPDATE: (20/11)A new patched 8.2 kernel without logging (better for daily use) is available.
    Check post 234 on page 24:
    http://xdaforums.com/showpost.php?p=9304396&postcount=234

    -----

    EDIT: If you did autocalibration and messed your g-sensor, read post 10 & 11 to see a fix for it. (before going through post 1)
    EDIT 2: Freezes of sensors and touch screen seem to be related to offset values. See post 10 & 11

    Post 1 is for orientation offset. Check post 10 & 11 for g-sensor and ts freeze fix.
    ----

    If your orientation is off when you lay your phone on a level surface and can't calibrate it in Android (because many people found it gets corrupted after auto calibration), this is one way to do so. (Winmo g-sensor calibration does not seem to affect android orientation)

    Install an app that displays sensor information along with pitch and roll. (such as SensorDebug from Android market)
    Put your phone on a level surface such as the floor or a table.
    Note your pitch and roll values.
    Use rootexplorer or similar file manager to edit /data/misc/AK8973Prms.txt file. (open in text editor) (For ASTRO CHECK POST 70 in page 7)
    You will see AOFFSET.x and AOFFSET.y at the bottom. (May be on top if you autocalibrated previously)
    y affects pitch and x affects roll, there is about 4 to 1 ratio.
    What you are trying to do is make pitch and roll 0 with minimum flicker.
    Press and hold home button to switch between rootexplorer and sensordebug. Your changes will be reflected in realtime (with most builds). Go back and forth a few times to get perfect result. (You can press and hold home button to go back and forth) If you think changing values don't have an affect, try to temprorarily change AOFFSET.x=90 and return to your app. When phone is on the table, your leveling bubble or pitch/roll must be way off. This way you can see if with your build changes are reflected in realtime or not. If not try restarting, use different sensor app and give feedback please. (After that revert AOFFSET.x to 0 or other value your want to fix back orientation)

    For example:
    If pitch is 3 and roll is -1
    you may start by
    AOFFSET.x=4
    AOFFSET.y=-12
    Then adjust with 1 increments to get rid of flicker.
    It is best to adjust one value at a time.

    EDIT: IF YOU WANT TO CALIBRATE Z AXIS, CHECK POST 61 in page 7

    Calibrated AOFFSET values for my phone are x=2 y=-9 z=12

    You can use gpsstatus or bubble app (to find bubble app search the market for bz.ktk.bubble and enable "show angle" from bubble apps settings.) for visual check of orientation calibration. Because of the protruding camera lens of hd2, there can be 1 degree difference between sideways and normal orientation. (It seems you can adjust in about 0.25 degree increments by each 1 increment of AOFFSET and compansate by lowering AOFFSET=y by 2 that gives 0 degrees in both normal and sideways orientation in bubble app)

    - You don't need to reboot for most builds (if there is no affect check post 11)
    - You don't need to kill/restart akmd
    - You don't even need to close sensor app
    - Because of not perfect kernel/build support for sensors, you may see them freeze when you move the phone (TS will also freeze). With evo kernels, just wait a few seconds and it will resume. (With nexus kernels they may freeze until sleep/wakeup) Interestingly the values of AK8973Prms.txt affect shake/move freezes. I wrote about this in post 10 and 11.

    IT IS A GOOD IDEA TO BACKUP COMPLETE ANDROID FOLDER BEFOREHAND just in case something goes wrong. Chefs say you shouldn't auto calibrate your g-sensor under Android because with many people it gets messed up. Also good idea to backup your /data/misc/AK8973Prms.txt

    You may have trouble accessing data folder with a file manager other than rootexplorer. Your build must be rooted. (most are) It is a good idea to update your su binary inside superuser app settings TWICE. If you change permissions of /data /data/misc folders you may access them even with standart astro file manager. Try chmod 777 /data from terminal emulator.
    This procedure is also possible with adb or droidexplorer. But my way of doing is practical and it is in realtime. If your build has different file name, please tell us.
    This IS a development thread, please don't tell me to post in generic section or clutter.
    This is manual workaround for non-working auto calibration. If auto-calibration works in the future, it may very well fix your freezes.

    Values of AK8973Prms.txt file may solve touch screen/sensor freeze problems with your games. Feedbacks are always welcome. We should find out what the other values do exactly. Also check post 10 & 11
    1
    haha.. funny, this is the RIGHT way to do it: (credit goes to me )
    1) put your phone on the surface and then
    2) Gscript to stop gsen.
    3) Go to callibration tool and press callibrate..
    4) activate Gsensor through Gscript.
    thats it and gsensor is fully callibrated to your way. no need to mess with system files.
    1
    Freezes are fixed now.

    EVEN IF YOU ARE NOT GETTING TOUCH SCREEN / G-SENSOR FREEZES WITH USUAL USAGE OF YOUR PHONE, INSTALL SENSOR DEBUG, BUBBLE, COMPASS APP OR GAMES AND TRY IF THEY FREEZE WHEN YOU SHAKE/MOVE THE PHONE OR WALK WITH THE PHONE IN YOUR HAND. Bubble app is the most freezing app. To find it ssearch the market for bz.ktk.bubble. Enable "show angle" from bubble apps settings. Game example: Teeter
    Make sure it has been at least 2 minutes since Android has booted. (Or it may fool you as it is busy when first home screen appears after boot)
    Freezes have been mostly eliminated with newer builds/kernels, but they are not completely gone.

    I am no longer getting any freezes in any app now. Not in compass apps, not in games, not in sensor displaying apps, not in calibration tool. I am also not getting freezes while I am walking with the phone.
    I am not yet sure how this exactly happened (as I always had freezes in those apps when the phone moved) but currently my android build updates the AK8973Prms.txt file every minute by itself (doesn't change very much, but quite different from the beginning) and the current values have absolutely no freezes.
    These values have no more freezes. (since they keep changing it may not last for days) Please try:

    [AK8973]
    HDOE_STATUS_SLIDER_OPEN=2
    HDOE_STATUS_SLIDER_CLOSE=0
    HDOE_SUCTEMP=111
    HDAC_SLIDER_OPEN.x=4
    HDAC_SLIDER_OPEN.y=135
    HDAC_SLIDER_OPEN.z=8
    HOFFSET_SLIDER_OPEN.x=-849
    HOFFSET_SLIDER_OPEN.y=1179
    HOFFSET_SLIDER_OPEN.z=-653
    HDAC_SLIDER_CLOSE.x=0
    HDAC_SLIDER_CLOSE.y=0
    HDAC_SLIDER_CLOSE.z=0
    HOFFSET_SLIDER_CLOSE.x=0
    HOFFSET_SLIDER_CLOSE.y=0
    HOFFSET_SLIDER_CLOSE.z=0
    ASENSE.x=256
    ASENSE.y=256
    ASENSE.z=256
    AOFFSET.x=0
    AOFFSET.y=0
    AOFFSET.z=0

    Seems
    A low HDAC_SLIDER_OPEN.x value
    A large negative HOFFSET_SLIDER_OPEN.x value
    A high HOFFSET_SLIDER_OPEN.y value
    A large negative HOFFSET_SLIDER_OPEN.z value
    and along with some other thing I did/happened fixed my freeze problems.

    Some nexus based builds don't have slider open/close lines.

    Change the AOFFSET.x y and z values to your device to level it on a table. (check post 1)
    I am not attaching the file itself to this post because of differences between windows and linux with text files, just to be safe. (Paragraphs get messed up)

    Also using the calibration tool with the phone face down gives better results with z axis. (to be able to tap on calibrate, put your phone on the table and make it just go over the edge of the table and tap from underside)
    We need some feedback from other people now. Devs are welcome to use this information to open up ways to fix g-sensor in kernel.
    I am using mdeejay desire hd 3.4 build. These may be different in other builds. If you find out please share.

    Freezes returned after reboot. I am trying to find out how refix again.

    I AM ASKING EVERYBODY TO TELL
    1) If they have the freezes with their default configuration with bubble/sensor app moving/walking etc.
    2) If my values fix the freeezes
    3) If their filenames etc is different
    4) Please also write your build and kernel type/version/base winmo rom and radio

    Example: (copy paste and edit in your post please)
    Default configuration have freezes: YES
    New values fix freezes: YES
    Different files: NO
    Build/Kernel: mdeejay desire hd 3.4 / huanyu #21 evo base miri WM6.5 (21916) v19.1 (3.14 base) 2.15.50 radio

    This is not over yet, with feedback we might find exact long term fix for everyone.

    EDIT: These values work with some people. If they don't work you, experiment with different values. Since the results are reflected in realtime for most builds (no reboot required) it is much easier. Also don't edit the file on windows pc, it may get messed up. Some builds auto update the values when sensor app is reopened/switched to.
    IMPORTANT: Try to temprorarily change AOFFSET.x=90 and return to your app. When phone is on the table, your leveling bubble or pitch/roll must be way off. This way you can see if with your build changes are reflected in realtime or not. If not try restarting and give feedback please. (After that revert AOFFSET.x to 0 or other value your want to fix back orientation)


    EDIT 2: My sensors seem to be working perfectly since I also calibrated the z-axis. (post 61 on page 7) I need confirmation on this.
    1
    Patch for ts/gsensor freezes - sources

    Ok, enough people confirmed that the patch is working so here is the source of the patch.
    1
    I have hastarin r8.2 and I cannot update to hastarin r 8.3 or r8.4 because the camera doesn't work otherwise adding camera fixes. Can i Include this patch in hastarin r8.2? What is the way to make this? Thank's a lot!

    You can use my modified hastarin 8.2 kernel:
    http://www.multiupload.com/AMLA3GQS9U