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

  • 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, 2012 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, 2012 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, 2012 at 20:27
  • Thanks for the suggestion, but my actual_brightness does not go below 30.
    – Lekensteyn
    Aug 15, 2012 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. Oct 14, 2012 at 22:32

2 Answers 2


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.


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.




  • 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, 2012 at 13:41
  • @Lekensteyn then edit my answer with instructions! Oct 16, 2012 at 10:22

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .