What is preventing my Android phone from going to sleep? It is eating through the battery quickly My phone is the Motorola Droid 1, rooted and modded with CyanogenMod 7. This problem did not occur before I modded it. When I check the battery stats, the awake bar is always solid, so something is preventing it from going to sleep. On some advice, I ran dumpsys power through adb. Here is the output:

dumpsys power
Power Manager State:
  mIsPowered=true mPowerState=0 mScreenOffTime=3537164 ms
  mPartialCount=1
  mWakeLockState=
  mUserState=
  mPowerState=
  mLocks.gather=
  mNextTimeout=198995292 now=202518891 -3523s from now
  mDimScreen=true mStayOnConditions=0
  mScreenOffReason=3 mUserState=0
  mBroadcastQueue={-1,-1,-1}
  mBroadcastWhy={0,0,0}
  mPokey=1 mPokeAwakeonSet=false
  mKeyboardVisible=false mUserActivityAllowed=false
  mKeylightDelay=6000 mDimDelay=47000 mScreenOffDelay=7000
  mPreventScreenOn=false  mScreenBrightnessOverride=-1  mButtonBrightnessOverrid
e=-1
  mScreenOffTimeoutSetting=60000 mMaximumScreenOffTimeout=2147483647
  mLastScreenOnTime=0
  mBroadcastWakeLock=UnsynchronizedWakeLock(mFlags=0x1 mCount=0 mHeld=false)
  mStayOnWhilePluggedInScreenDimLock=UnsynchronizedWakeLock(mFlags=0x6 mCount=0
mHeld=false)
  mStayOnWhilePluggedInPartialLock=UnsynchronizedWakeLock(mFlags=0x1 mCount=0 mH
eld=false)
  mPreventScreenOnPartialLock=UnsynchronizedWakeLock(mFlags=0x1 mCount=0 mHeld=f
alse)
  mProximityPartialLock=UnsynchronizedWakeLock(mFlags=0x1 mCount=0 mHeld=false)
  mProximityWakeLockCount=0
  mProximitySensorEnabled=false
  mProximitySensorActive=false
  mProximityPendingValue=-1
  mLastProximityEventTime=230765884
  mLightSensorEnabled=false
  mLightSensorValue=-1.0 mLightSensorPendingValue=-1.0
  mLightSensorScreenBrightness=70 mLightSensorButtonBrightness=0 mLightSensorKey
boardBrightness=0
  mUseSoftwareAutoBrightness=true
  mAutoBrightessEnabled=false
  mScreenBrightness: animating=false targetValue=-1 curValue=0.0 delta=-5.0

mLocks.size=1:
  PARTIAL_WAKE_LOCK              'com.commonsware.cwac.locpoll.LocationPoller' a
ctivated (minState=0, uid=10069, pid=14026)

mPokeLocks.size=1:
    poke lock 'PhoneApp': POKE_LOCK_IGNORE_CHEEK_EVENTS


Is a particular app locking my phone awake?
I got an answer on another forum. The part keeping the phone awake was shown here:

mLocks.size=1:
  PARTIAL_WAKE_LOCK              'com.commonsware.cwac.locpoll.LocationPoller' a
ctivated (minState=0, uid=10069, pid=14026)


and by grepping the process id like so:

ps | grep 14026


I found the name of the app that was causing the problem.