Take the 2-minute tour ×
Android Enthusiasts Stack Exchange is a question and answer site for enthusiasts and power users of the Android operating system. It's 100% free, no registration required.

I am running a JavaScript compliance test in the Android stock browser which takes quite a long time. How can I prevent the browser from pausing when the screen goes off?

Meanwhile, I am using the "Stay Awake" debugging option, but I would rather avoid this because it may burn my screen.

I am looking for a solution that allows the screen to go off while preventing the device to go into sleep mode and thus allowing the browser to continue doing its computations.

Device: SGS3 running CM9

share|improve this question
    
stay awake (cpu running) is not the same as screen on (cpu+screen running)! You can switch off the screen and the cpu should still be running with this option (not really sure about this though, but give it a try) –  ce4 Aug 15 '12 at 19:41
    
Stay Awake behaves like cpu+screen active. If I turn the screen off using the power button (or after a timeout), the browser stops doing something. Verified it with some Javascript that prints an increasing number each second. When I switch applications (go away from the browser), the code stops executing. –  Lekensteyn Aug 15 '12 at 20:19
    
Ok, thanks for the clarification, it was just an idea. Another try then: lowering brightness lowers screen burn risks. Plus: Your S3 is obviously rooted, you could 'play' around a little with some /sys/.../brightness variables (or so). Search for backlight/brightness/power ('find /sys |grep bright') with root and 'echo $VAR > /sys/.../some-file'. Not getting it to work on my amoled S2 atm, but I know it did work with my Nexus S/HTC Desire. It circumvents the whole Android subsys and prevents an Android state change –  ce4 Aug 15 '12 at 20:27
    
Thanks for the suggestion, but my actual_brightness does not go below 30. –  Lekensteyn Aug 15 '12 at 21:28
    
@ce4 the cpu sleep policy is different on different phones. For example, on my nexus one with cm7.2, the cpu goes to sleep (i.e. slows waay down) when the screen turns off, but on my g1 it fully stays active. –  Andrey Losev Oct 14 '12 at 22:32

2 Answers 2

The issue is with your cpu going to sleep once the screen turns off. This behavior is different on different phones (some do it, some keep it active), but it can be changed with a special app such as these:

Since you're using cyanogenmod, I assume you know what you're doing, but it bears saying: pay attention to the warnings.

https://play.google.com/store/apps/details?id=com.tegrak.overclock

https://play.google.com/store/apps/details?id=it.sineo.android.noFrillsCPU

https://play.google.com/store/apps/details?id=com.mhuang.overclocking

share|improve this answer
1  
CM9 has a built-in ability to change the CPU governor (e.g. performance), I do not think the linked applications are really necessary. –  Lekensteyn Oct 15 '12 at 13:41
    
@Lekensteyn then edit my answer with instructions! –  Andrey Losev Oct 16 '12 at 10:22

I don't believe there is any way to get it to keep running while the display is off, though I could be wrong.

What you could do is turn the screen brightness down all the way, and then use an app like Screen Filter to make the screen even darker. At it's minimum setting, this will almost have the effect of turning the screen off, while letting everything still run.

I'm not sure modern screens even still suffer from burn in though. Some do suffer from ghosting, but that goes away fairly quickly. Burn in like on old CRT monitors was permanent.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.