Wednesday, April 6, 2016

Theory on Potential Partial Cure for Random Restarts/Freezing (Long Post)

First and foremost, I don't promise this will fix anything as it has only worked for myself, but let me share my experience/journey and see if this can help at least another person in the same boat as I am.

If you do not want to read the entire story, feel free to skip to the break below.

Back story:
I got the phone in Hong Kong back in November. It's a 505 H815TR. (Don't ask me why I ended up with a Turkish phone, I have no idea)
The phone worked fine for about two weeks, then it would one day start to restart randomly. It also started happening more and more frequent, and the phone might fail to boot at all.
Sometimes it would just freeze on a screen and there'll be artifacts like the GPU overheated. When that happens the phone wouldn't even respond to a hard power-off (holding power for 4 seconds+) and I'd have to take out the battery.

Unfortunately for me, I have since went overseas and LG would not honour the motherboard swap. I also didn't want to sell this otherwise great new phone to another unfortunate soul either. So I'm stuck with the few hundred bux worth of not-quite junk. Determined to not let the money go to waste, I still tried to use it as a daily driver but it had gotten so bad at one point that I had to keep taking the battery off and restarting every few minutes during a meeting like an idiot.

So I tried upgrading the firmware, in hopes that it'll at least improve the situation. It was the 20c firmware. I used LGUP to upgrade it and it got better, if only for a while.
I thought, hey it ran better! Maybe I can stick it out, and sucker up the less frequent restarts. It will run okay for a week or so with occasional restarts. Then it suddenly got bad one day I opened up Maps for navigation. It would suddenly go back to a few restarts an hour.

At this point my hypothesis is that apps/sensors that would require a hike in power can trigger the crash. (duh!) So I turned off Bluetooth/GPS/disable every other app that I can think of. While it help a BIT, it certainly did not alleviate the problem. It had only gotten worse as time goes.

A few weeks went by, 20d came around. Hoping situations would improve, I upgraded the phone.
The problem got WORSE. I thought that's weird, the new version should have came with optimizations and gave less work the phone - hence it should freeze less. Puzzled and disappointed, I flashed back to 20c and was prepared to bite the bullet and accept it as lost cause. To my surprise however, when 20c finished generating cache and booted up, things started looking better again. It would run a few DAYS without problems. I got even more confused. If the problem was purely triggered by spikes of load, going back to the old firmware should have little to no effect. Something else must be going on. Before long, the problems came back and I'm plagued by the restarts again.

I came up with 2 possible hypotheses:
1 - It had something to do with cache
2 - It had something to do with Doze optimizations

Number 2 was easy to test. I went to settings and ignored every possible optimization (****ty UI on that screen by the way. It takes forever to scroll to anything and the checkboxes don't save until you exit the menu. When a restart hits before I exit the menu all progress is lost and I had to start from beginning :crying: ). I ran for a few more days and it seemed to have little impact.

So I was fairly confident at one point that it had to do with cache. Unfortunately, the G4 (at least my G4) does not have an easy access to erasing cache (which was incredibly annoying LG!). The so-called stock recovery only has an option to wipe the phone and obviously I didn't want to do that. I also did not want to temper with bootloader for the same reasons aside from the risk of bricking the phone. I had remembered that when I upgraded the firmware the cache gets wiped and it'll be regenerated on first boot. So I thought I'll just flash the same firmware and I'll be done! To my demise, apparently flashing the same kdz does NOT trigger the cache generation process. What I had to do was to flash 20d, boot that, and flash 20c again.

Things started to look better here. It ran fine. It did not crash for about a week or so. I thought it was a fair compromise. I can deal with a quick refresh(flashing 20d and then 20c again) once a week. Whenever I see signs of the restarts, I would quickly refresh when I got home that evening and it will be good for a week or so. Here I was ready to finalize my theory until...

It crashed. Soon after one of my routine refresh. I thought this was interesting? If it had to do with some kind of cache buildup, surely it would not crash right after a refresh? What's weirder still was it stopped doing that after 2-3 times. Something ELSE MUST be contributing to this. What else was related to the process of cache generation that could affect the stability of my system?

Here ladies and gentlemen, is what my little pea brain have came up with, through trial and error, no engineering background, limited tech knowledge, and limited common-sense:

It had to do with the activity of the CPU; or more precisely, it may have to do with the extended heating process that caused some component around the area to change in some kind of state, and thus improving the stability for a duration until it gradually changes back with time.

Engineers are probably laughing at me right now. I know it probably makes no sense, but it's the best that I can come up with. So I come to you guys, maybe some may help shed some light on this issue that plagues those of us who are stuck with the problematic phones that are not eligible for exchanges/repairs.

Anyway, to test my theory out, I downloaded some kind of stress tester from Google Play (I used StabilityTest v2.7)
I would wait until the phone starts restarting again (and it will, and when it does happen the stability dropped SHARPLY, from no restarts to maybe 2-3 an hour).
Then, I would run StabilityTest. I chose the classic stability test, and just let it run.
The first time it ran, it did not survive the first 10-15 mins. The phone would restart, and I would try again.
This time it ran for 2 hours without restarting (double the time needed for generating cache twice on my phone). I manually stopped the test and started using it normally.

Lo and behold! It was rock solid stable! No crashes, no matter what I did! Wifi, bluetooth, GPS, games, maps, youtube,... all of the above?!
And it would stay this way for me for about 2 weeks. When the phone starts restarting again, I would run the stress tester for a couple of hours, and it would be stable again.

I have since tried the 20d firmware, which also ran fine. I also flashed 20e yesterday, and so far it has been very smooth. I have tried various amounts of times like 1hr, 3hrs, 10hrs, but it would seem that going longer than 3hrs have no impact on the interval between restarts. So personally I find 2hrs will last me 2weeks or so and that works best for me.

I may not have completely solved the problem, and I still don't understand why it works, but it is sort of working for me.
And I hope it would work for you as well!

So here you go! And thanks for reading this unnecessarily long post! :D



TL;DR

Summary - I have found that by putting the cpu on load for an extended amount of time will dramatically increase the stability of the problematic phone. Here's something you can try:

Disclaimer: I do not guarantee this will work on your phone. I am no engineer. I take no responsibility if it causes any problem on your phone or if it explodes. That being said, it has worked for me. Please try at your own risk!


1. Make sure the area is well ventilated, the phone has sufficient battery or is charging.

2. Download and run "StabilityTest (ROOT Optional)" from Play Store.

3. Run "CLASSIC STABILITY TEST"

4. Let it run for at least 2 hours. If your phone restarts during the test, try again.
*However I would keep an eye on the temperature. I normal at around 50-60 Celsius.

5. It SHOULD be okay now. Depending on how bad your particular problem is, you may have to repeat this process every week or two. Experiment with different load times and see where your sweet spot is.

Thanks,

cbpneuma


from xda-developers http://ift.tt/1XhTnFn
via IFTTT

No comments:

Post a Comment