When I connect the USB power source, it makes CPU to stay on (even though "Development->Stay awake" is off).

When charging from a weak power source if makes battery to drain even faster than is case of USB power is not connected at all (because of CPU stays on instead of sleeping).

How do I stop external power connectedness affecting CPU sleeping policy?

I'm not talking about screen being on, it's about CPU being awake (unfortunately it is not easy to see if CPU is on or off).

  • What do you mean by "CPU stays on"? Are you talking about the screen being on? Or are you using an app to constantly monitor the frequency at which the CPU is running?
    – fernio
    Commented Feb 12, 2013 at 23:49
  • I keep a program that constantly blinks LED when screen is off, so I clearly see when (CPU is on while screen is off). Usually after I press power button to turn off screen, it blinks several times and stops. But when charger is connected it keeps blinking.
    – Vi0
    Commented Feb 13, 2013 at 0:01
  • The program: brightact (source); usage: brightact /sys/...led.../brightness 20 100000 400000 /sys/power/wait_for_fb_sleep
    – Vi0
    Commented Feb 13, 2013 at 0:14
  • I'm looking at the source you provided, and it's written in plain C. I'm not sure it's possible to run such a program in Android. Which device are we talking about (maker, model)? Which OS is it running?
    – fernio
    Commented Feb 13, 2013 at 13:04
  • Most of my programs for Android are currently in C, require root access and interfaces the Linux kernel directly (I'm currently more Linux hacker than Android hacker). I'm running Android 2.3 on Sony-Ericcson Xperia X10.
    – Vi0
    Commented Feb 13, 2013 at 13:32

2 Answers 2


Long press on the power off switch while plugged in, next tap on the power off prompt. When it powers off make sure the charging light remains on. If light is not on press power on quickly just so that the battery percentage shows in the center, it should blank screen again and the charging light come on and remain on. You can retest battery charge percent again anytime. When ready to use long press on power on/off to on and watch or wait for rebooting to take place.

  • 1
    If I power off the device while charging, I think it reboots into a charging mode (with CPU on) instead, just not starting usual Android UI.
    – Vi0
    Commented Aug 5, 2014 at 18:39
  • I want Android to be in usual sleep mode (as with not plugged in without any wakelocks), but also charging. For example, if I connect very weak (less than 1 watt) charger, it starts draining battery instead of charging, because of charging keeps CPU on and the weak power input is not enough to keep CPU on, so battery is used more (compared to just standby mode).
    – Vi0
    Commented Aug 5, 2014 at 18:42
  • I've only seen charging with CPU off when the battery is really low. In this mode it does not even try to power on, does not react to any buttons and does not light up any LEDS (unless there is already some charge in the battery).
    – Vi0
    Commented Aug 5, 2014 at 18:44
  • Battery percentage cannot be shown if CPU is really off. And booting from really off to "can show the battery percentage" is rather long (it requires Linux kernel to boot up). Long pressing the power button to boot Android from scratch (turned off) is different from continuing the boot from charging mode; the latter is even faster.
    – Vi0
    Commented Aug 5, 2014 at 18:48

I found out that some CPU optimisation disables when phone connected to devices that support data transfer (notebook for example (even sleeping), or some solar cells), so i use USB cable that not support data transfer.

You must log in to answer this question.

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