# Sensor Lag under High Load



## kynalvarus (Oct 26, 2011)

I've been noticing odd lags and hangs when my Droid Charge is under high CPU and memory load, particularly during heavyweight games. The odd thing is that I can usually snap it out of the hang by tickling the sensors - changing the light level of the front and back camera by covering them or holding them under a lamp, for instance. Shaking the phone, tapping the screen repeatedly, tapping the back, rapping the bottom on a solid surface... all sorts of things. If I can find the right one(s), the phone unlags and returns to normal for a while, a few seconds to a minute before this happens again. The incidence of the problem seems to have a small correlation to the quality of the network connection, as well - clean network connections seem to avoid it better than weak signal.

I'm running Tweaked 2.2 with PBJ 0524, Siyah, CFS, FuguTweaks, e2fs system/data, and zipalign. I've noticed that the deadline I/O scheduler seems most resistant to this, and sio is most susceptible.

Has anyone else run into this?


----------



## kvswim (Aug 20, 2011)

What happens if you disable auto brightness?

Sent from my SCH-I510 using RootzWiki


----------



## kynalvarus (Oct 26, 2011)

kvswim said:


> What happens if you disable auto brightness?
> 
> Sent from my SCH-I510 using RootzWiki


No noticeable difference.


----------



## Brewer (Dec 29, 2011)

kynalvarus said:


> No noticeable difference.


Under settings display settings there's power saving option at the bottom but there's also auto brightness box in the brightness sub option. Do you have both deselected? If your screen is still auto adjusting the brightness with those two boxes unchecked that's a problem. If that's the case try pulling the battery for ten minutes and give it another go.

Sent from my Nexus 7 using Tapatalk 2


----------



## kynalvarus (Oct 26, 2011)

Brewer said:


> Under settings display settings there's power saving option at the bottom but there's also auto brightness box in the brightness sub option. Do you have both deselected? If your screen is still auto adjusting the brightness with those two boxes unchecked that's a problem. If that's the case try pulling the battery for ten minutes and give it another go.
> 
> Sent from my Nexus 7 using Tapatalk 2


Settings...Display Settings...Power saving mode is off. Settings...Display Settings...Brightness...Automatic Brightness is off.

I honestly don't think that this is just an auto brightness issue, or even just a light sensor issue. Sometimes when the phone hangs I can release it by shaking it, other times by flipping it over and back a few times, or tapping rapidly on the screen, or by rapping it on a surface. Changing the light sensor levels detected by the two cameras is only one possible way to unhang the phone, and not always the one that works. I also find it interesting that the problem correlates to network quality. When the network is clean, it's rarely a problem.

I'm wondering if there isn't something wonky in the kernel interrupt handling. Perhaps poorly written programs are blocking on network activities, and generating I/O calls causes the scheduler to change its behavior? Or maybe the phone is just OOM-thrashing when memory gets tight and generating sensor events triggers intents, causing new activities to start and forcing the flushing of the stuck ones?


----------



## Brewer (Dec 29, 2011)

Sorry, I misunderstood what you were saying. I'm 0 for 2 lol.

Sent from my SCH-I510


----------



## kynalvarus (Oct 26, 2011)

Brewer said:


> Sorry, I misunderstood what you were saying. I'm 0 for 2 lol.
> 
> Sent from my SCH-I510


Hey, I appreciate any and all attempts to help. The thought does count!


----------



## jco23 (Dec 10, 2011)

if the phone can unhang from shaking, could it be the auto-rotation setting? I turned mine off (at least with the launcher). what launcher are you using?


----------



## aaronDroid80 (Aug 18, 2011)

I have two suggestions:
First, you have a lot of tweaks that may be contributing to the problem. It may be time to start fresh and apply them in stages and see when you start experiencing issues. 
Second, what version of the su binary are you using? This might seem odd, but a little while back, I was having SOD problems that could be triggered by specific tasks. I am also running Tweaked 2.2 with pbj 524 with ext4, and I was using the 3.1.2 su binary. If I tried to open YouTube, my phone would freeze and then SOD. if i tried to copy a thread URL from the RootzWiki app, same result. I switched back to the 3.0.7 su binary, and no more SOD. I also run the detailing script once a day, and have my phone set to reboot and wipe data cache every night. I'm underclocked at 800 mhz, and everything is crisp and smooth.

Sent from my Tweaked Charge using RootzWiki.


----------



## kynalvarus (Oct 26, 2011)

jco23 said:


> if the phone can unhang from shaking, could it be the auto-rotation setting? I turned mine off (at least with the launcher). what launcher are you using?


I'll give that a shot. I'm using Go Launcher EX at the moment.


----------



## kynalvarus (Oct 26, 2011)

aaronDroid80 said:


> I have two suggestions:
> First, you have a lot of tweaks that may be contributing to the problem. It may be time to start fresh and apply them in stages and see when you start experiencing issues.
> Second, what version of the su binary are you using? This might seem odd, but a little while back, I was having SOD problems that could be triggered by specific tasks. I am also running Tweaked 2.2 with pbj 524 with ext4, and I was using the 3.1.2 su binary. If I tried to open YouTube, my phone would freeze and then SOD. if i tried to copy a thread URL from the RootzWiki app, same result. I switched back to the 3.0.7 su binary, and no more SOD. I also run the detailing script once a day, and have my phone set to reboot and wipe data cache every night. I'm underclocked at 800 mhz, and everything is crisp and smooth.
> 
> Sent from my Tweaked Charge using RootzWiki.


Looks like I'm on the 3.0.3.2 su binary. Superuser wants to update it to 3.1.1. I don't seem to have an option for 3.0.7. I do detail regularly vi SD Maid, and I recently wiped all cache and dalvik cache, but not daily. I'll try the 3.1.1 binary, but I'd appreciate a link to the 3.0.7 binary so that I can try that as well.


----------



## JihadSquad (Nov 2, 2011)

kynalvarus said:


> Looks like I'm on the 3.0.3.2 su binary. Superuser wants to update it to 3.1.1. I don't seem to have an option for 3.0.7. I do detail regularly vi SD Maid, and I recently wiped all cache and dalvik cache, but not daily. I'll try the 3.1.1 binary, but I'd appreciate a link to the 3.0.7 binary so that I can try that as well.


 http://db.tt/mMeP5ggf

Flash it in cwm.

Sent from my SCH-I510 using Tapatalk 2


----------

