"Time without signal 50%", airplane mode fix, and possible build.prop solution?

mmarz

Well-known member
Mar 9, 2011
1,130
447
0
Visit site
mmarz, how did you test this? did you use setprop or edit your build.prop and reboot? just curious, as i was going to try the latter...

I used setprop. I added to the start up script I already run at boot, but you may be onto something. Maybe setting it to 5 on build.prop, and the switching it back using a start up script.
 

cpshelley2

Well-known member
Apr 12, 2011
128
8
0
Visit site
I used setprop. I added to the start up script I already run at boot, but you may be onto something. Maybe setting it to 5 on build.prop, and the switching it back using a start up script.

i planned to just change it from 4 to 5 and not bother changing it back... just a straight edit to that one option in build.prop, and see if it works. unfortunately i won't be able to test this until i receive a call i'm expecting...
 

obijohn

Well-known member
Mar 31, 2011
169
100
0
Visit site
where were you able to find this information? aside from this setting, i've been searching for a listing of build.prop settings and values.

I'm working on my own rom lately, so I've been researching lots of info. I got curious about the default_network values and spent about an hour scouring the interwebs. I could only find 1 or 2 of each listed when I found anything at all, but luckily they all eventually pieced together. The only one I haven't found yet is 8, but maybe that's because it's reserved for future use.
 

mmarz

Well-known member
Mar 9, 2011
1,130
447
0
Visit site
I used setprop. I added to the start up script I already run at boot, but you may be onto something. Maybe setting it to 5 on build.prop, and the switching it back using a start up script.

Ok, well. I did this and my TWS is no longer stuck at 50%, but it is 70-90%. It keeps changing. That means it not stuck at one value. Not sure what this means.
 
  • Like
Reactions: cpshelley2

cpshelley2

Well-known member
Apr 12, 2011
128
8
0
Visit site
Ok, well. I did this and my TWS is no longer stuck at 50%, but it is 70-90%. It keeps changing. That means it not stuck at one value. Not sure what this means.

hmmm... very odd indeed... thanks for testing this mmarz, you continue to be an invaluable source of information!!
 

mmarz

Well-known member
Mar 9, 2011
1,130
447
0
Visit site
Your answer is below

If this is meant to be a generic patch that can be applied to any android device, then it failed on mine. My phone boots up fine after the mod but TWS bug remains. Multiple reboots still had the TWS bug. I restored a backup to reserve it.

I think there are two elements at a play here. There is the TWS visual bug which shows up in the battery stats. And then I think there is another underlying problem which can trigger it that also causes battery issues. I think you can get the TWS bug without battery issues. I also think you if you fix the visual bug caused by TWS, that doesn't fix the underlying problem that causes the battery issues. I have personally measured the battery drain issue. It is only caused when airplane mode is not toggled, TWS is present, and 3G is on.

In my first round of battery testing, I tried not toggling airplane mode, turned on 3G and saw the battery drain jump from 2mA to 300mA every few seconds like a clockwork even though the phone was supposed to be idle. Toggling airplane mode fixed both TWS and the battery drain. If the fix described in that link is correct, then toggling airplane mode shouldn't even effect TWS. I think toggling airplane mode is effecting what causes the battery drain, and the battery drain issue can trigger the visual bug known as TWS but is not sole cause of it.

And even though the TWS is fixed in its newer releases, I'm not convinced that aospMod has fixed the battery bug. I think it is now hiding it. In one overnight test I did recently, I lost 45% of my battery mysteriously and awoke to a dead phone. I had charged the phone 100% only 20 hours prior and had only used the phone medium to lightly before going to bed. I can't be certain that this same battery bug is the cause, but obviously something wrong is happening.
 

picasticks

Well-known member
Feb 28, 2011
136
58
0
Visit site
If this is meant to be a generic patch that can be applied to any android device, then it failed on mine. My phone boots up fine after the mod but TWS bug remains. Multiple reboots still had the TWS bug. I restored a backup to reserve it.

I think there are two elements at a play here. There is the TWS visual bug which shows up in the battery stats. And then I think there is another underlying problem which can trigger it that also causes battery issues. I think you can get the TWS bug without battery issues. I also think you if you fix the visual bug caused by TWS, that doesn't fix the underlying problem that causes the battery issues. I have personally measured the battery drain issue. It is only caused when airplane mode is not toggled, TWS is present, and 3G is on.

This issue has been worked to death in various CDMA phone threads.

I'm personally convinced that the TWS bug is purely cosmetic (and so I strongly dislike things like the airplane mode "fix" which actually stops me from being able to use my phone). Clearly this patch only affects a bunch of millisecond counts that are used for reporting purposes only, not function.

Battery drain reports are going to be very anecdotal and depend so much on individual phones' ROMs and app installs. For instance, I have found that when memory usage is near max (i.e. within 8M of max in use as reported by "free" on the CLI) the CPU clock will peg at the high end of the freq scale and stay there. This is the case even when cpu usage is at 0%. Now, this doesn't happen on boot with my phone, but only if I have a couple of pretty large apps in bg. Now, I could blame this bug on the apps (because they are games that should have quit rather than putting a large resident process into bg) or the froyo os (shouldn't it be auto-killing apps in bg at this point?) but clearly the overall system isn't working.

I lean toward blaming the OS, because it is part of the Android app development model that you keep state saved and have minimal shutdown methods, because your app can be killed by the OS for resource reasons at any time.

Which is all just to say, if you suspect battery drain, there's potentially a lot to look at (use adb and top and make a log of the process table over time) and you may have an issue like I found, that has nothing to do with the radio and even occurs with 0% cpu use, in idle, only occurring on boot. Could be a ROM or app issue.

In my first round of battery testing, I tried not toggling airplane mode, turned on 3G and saw the battery drain jump from 2mA to 300mA every few seconds like a clockwork even though the phone was supposed to be idle. Toggling airplane mode fixed both TWS and the battery drain. If the fix described in that link is correct, then toggling airplane mode shouldn't even effect TWS. I think toggling airplane mode is effecting what causes the battery drain, and the battery drain issue can trigger the visual bug known as TWS but is not sole cause of it.

And even though the TWS is fixed in its newer releases, I'm not convinced that aospMod has fixed the battery bug. I think it is now hiding it. In one overnight test I did recently, I lost 45% of my battery mysteriously and awoke to a dead phone. I had charged the phone 100% only 20 hours prior and had only used the phone medium to lightly before going to bed. I can't be certain that this same battery bug is the cause, but obviously something wrong is happening.

If I were running something like aospMod I'd almost *expect* to have battery issues ... that is just an experimental project (esp. for our chipset which is unsupported) and nowhere near the level of refinement of stock froyo engineered by LG.

You would expect when you have the radio on, that the phone has to ping the nearest tower every couple seconds, that is totally normal for any cellular device. I haven't monitored my phone's battery's current but what you describe the radio doing sounds normal to me.
 
Last edited:

mmarz

Well-known member
Mar 9, 2011
1,130
447
0
Visit site
This issue has been worked to death in various CDMA phone threads.

I'm personally convinced that the TWS bug is purely cosmetic (and so I strongly dislike things like the airplane mode "fix" which actually stops me from being able to use my phone). Clearly this patch only affects a bunch of millisecond counts that are used for reporting purposes only, not function.
...
You would expect when you have the radio on, that the phone has to ping the nearest tower every couple seconds, that is totally normal for any cellular device. I haven't monitored my phone's battery's current but what you describe the radio doing sounds normal to me.

No, it is not normal. I have extensively tested all of the roms available for this phone. I only tested the TWS bug on 2.2, but this is what I saw:

Brand new flash of a 2.2 rom.
Boot up the phone.
Setup wifi.
Check that TWS bug was present (it is present on EVERY boot for my phone)
Put the phone in idle with 3G on and wifi not connected.
Check current drain after a few mins: 2mA to 300 mA every second to two seconds.
Turn on phone.
Toggle Airplane Mode.
TWS no longer stuck at 50%.
Put the phone in idle with 3G on and wifi not connected.
Check current drain after a few mins: 2mA solid with occasional jumps to 20-30mA at irregular intervals.

Like I said, I don't think the TWS is the battery bug, but I do think there is a battery bug that causes TWS. Toggling airplane mode fixes the battery bug which some how fixes the TWS.

I'm glad that your phone doesn't suffer from the battery bug, but it is not in my imagination. I have measured it directly. I have also felt it burning my leg when I pulled my phone out of my pocket. It was supper hot for no apparent reason, and I had lost 30% of my battery in the course of an hour. I don't know what causes it, but effect is repeatable. Airplane mode disables the bug on my phone.
 
  • Like
Reactions: jmel

tony5593

Well-known member
Mar 1, 2011
201
15
0
Visit site
No, it is not normal. I have extensively tested all of the roms available for this phone. I only tested the TWS bug on 2.2, but this is what I saw:

Brand new flash of a 2.2 rom.
Boot up the phone.
Setup wifi.
Check that TWS bug was present (it is present on EVERY boot for my phone)
Put the phone in idle with 3G on and wifi not connected.
Check current drain after a few mins: 2mA to 300 mA every second to two seconds.
Turn on phone.
Toggle Airplane Mode.
TWS no longer stuck at 50%.
Put the phone in idle with 3G on and wifi not connected.
Check current drain after a few mins: 2mA solid with occasional jumps to 20-30mA at irregular intervals.

Like I said, I don't think the TWS is the battery bug, but I do think there is a battery bug that causes TWS. Toggling airplane mode fixes the battery bug which some how fixes the TWS.

I'm glad that your phone doesn't suffer from the battery bug, but it is not in my imagination. I have measured it directly. I have also felt it burning my leg when I pulled my phone out of my pocket. It was supper hot for no apparent reason, and I had lost 30% of my battery in the course of an hour. I don't know what causes it, but effect is repeatable. Airplane mode disables the bug on my phone.

I agree with you on this, because my Optimus does the exact same thing! :/
 

picasticks

Well-known member
Feb 28, 2011
136
58
0
Visit site
No, it is not normal. I have extensively tested all of the roms available for this phone.

You are right, sorry if I sounded like I was saying there wasn't a battery problem or that you were imagining things. I think we agree that TWS and battery drain are 2 different things. Mostly I was trying to say just that, and that tracing the battery problem to a specific piece of code will be hard.

I only tested the TWS bug on 2.2, but this is what I saw:

Brand new flash of a 2.2 rom.
Boot up the phone.
Setup wifi.
Check that TWS bug was present (it is present on EVERY boot for my phone)
Put the phone in idle with 3G on and wifi not connected.
Check current drain after a few mins: 2mA to 300 mA every second to two seconds.
Turn on phone.
Toggle Airplane Mode.
TWS no longer stuck at 50%.
Put the phone in idle with 3G on and wifi not connected.
Check current drain after a few mins: 2mA solid with occasional jumps to 20-30mA at irregular intervals.

Like I said, I don't think the TWS is the battery bug, but I do think there is a battery bug that causes TWS. Toggling airplane mode fixes the battery bug which some how fixes the TWS.

This is very helpful info. I agree I was 100% wrong in saying that 300mA draw is normal, I was just talking about the polling frequency but not paying attention to the magnitude of the current draw. I also thought you were saying that the problem went away with airplane mode on (i.e. with the radio off) and not after toggling it off and back on again.

Anyways, I am lucky not to have this problem and will therefore also be of little help debugging it.

I will say that if I had it, I would go back to totally stock kernel and OS and then try big customizations like kernel and ROM separately to try to isolate. As far as the kernel goes, the Broadcom code has changed so that is my reason to say test using a stock kernel or something built from VM source. Any sort of bug anywhere on the radio stack or an interaction between layers could be a cause. It could even be an issue with hardware or hardware/software interface.

Clearly something is happening on boot that doesn't happen when the network interface is brought up on a running system (when you turn airplane mode back off). So a possible workaround would be to change the init system to have the interface brought up later. Or, just install the airplane mode hack apk and live with the extra 20 seconds on top of your boot time.

I am just spitballing and don't have the problem so these ideas may be worthless, especially if you are trying to really trace this and not just hack around it. Sorry.
 

obijohn

Well-known member
Mar 31, 2011
169
100
0
Visit site
This is all great info. However, I'm starting to think there may be 2 separate bugs here. One may indeed be a software battery bug that affects TWS for some. I believe that other may be an actual hardware bug in some (many) radios. I will often see the 3G indicator in the status bar with the up-arrow flashing but no down arrow. Indeed, there is no data connection (Phone info->ping fails immediately). Toggling airplane mode doesn't fix it. Rebooting doesn't fix it. Changing to different PRL states doesn't fix it. Rebooting with a combination of the above doesn't fix it. The only thing I've found that fixes it is running the Activate app and letting it go through until it displays an error. That somehow resets the data connection when nothing else will. I'm fairly convinced this is a hardware bug, but I'd like to know exactly what is happening with the Activate app that resets the data connection when nothing else will. If we can figure that out, perhaps that can be incorporated into an init script or even a separate app.
 

mmarz

Well-known member
Mar 9, 2011
1,130
447
0
Visit site
I am just spitballing and don't have the problem so these ideas may be worthless, especially if you are trying to really trace this and not just hack around it. Sorry.

:) No reason to be sorry. I wasn't taking it personally. Sometimes I turn into this guy: xkcd: Duty Calls

I have a crazy idea as to what might be causing this. You have the exact same hardware and software as me. If one of us experiences a problem the other can't replicate, we could assume two things:

1. One of our phones has become sentient and will soon launch a global attack on humanity.
2. The problem is not caused solely by the phone. It is a combination of our phone with something VM/Sprint is doing.

People (like obijohn) report having to activate their phones sometimes to get 3G working, but not everyone has to do this. Maybe VM is managing some accounts differently than others.

Hardware/software bug + "Good" VM account = no battery drain problem

Hardware/software bug + "Bad" VM account = battery drain problem

"Good" and "Bad" being what differentiates the way VM handles our accounts. Or maybe it is how the phones interact with certain Sprint towers that are around home and workplaces.

If the tower keeps requesting the phone's ID in some sort of looping bug, that might explain it. The phone is meant to ignore it, but the bug makes it reply. Airplane mode stops the looping.

Sometimes I feel like a Skinner pigeon dancing for a treat :(
 

Forum statistics

Threads
943,007
Messages
6,916,863
Members
3,158,772
Latest member
Laila Nance