This project has moved and is read-only. For the latest updates, please go here.

Application stops phone from entering Deep Sleep

Apr 26, 2013 at 1:49 AM
I have noted that if I run the application, my phone will no longer enter deep sleep resulting in higher than necessary battery drain.

Closing the database is not enough - I need to reboot in order for the problem to disappear.

Motorola Defy
CM7.2 ROM
Apr 27, 2013 at 3:04 AM
Thanks for reporting this here! May I ask how you analyzed this so I can try to reproduce it? The thing why I'm surprised to hear about this is that I am not calling any of the Power Management API functionality, so I don't know what could cause this.

I also just installed Cpu Spy which displays 46% of deep sleep time for the last couple of days (I guess since my last reboot), and I definitely had KP2A running most of the time, even with a database loaded.

Can anybody else check this on their devices?
Apr 27, 2013 at 5:47 AM
Edited Apr 27, 2013 at 11:05 PM
I followed these steps:

Rebooted phone, started CPU spy, checked it was working and left the phone for about an hour. Recorded deep sleep time (to the second).

Started keepass2android, opened database. left phone overnight.

Result - no increase in deep sleep.

Rebooted phone.

Used normally for a day without opening keepass2android - checked deep sleep, recorded time.

Started keepass2android.

Used phone normally for another couple of hours.

No increase in deep sleep time

I saw an article on XDA about tracking down wake locks - if I get a chance I'll see if I can get some more info.

Ran the phone overnight with keepass2android running and it did enter deep sleep - so this may be a false alarm. I will continue to test with the app on or off and see if I can reproduce.
Apr 30, 2013 at 5:40 AM
I really cannot reproduce this so I need to ask you for a bit more help: did you actually do something with kp2a? Maybe you can try to simply stay it but not click any button? This should show whether it's some code executed e. G. when loading or if it's caused by loading the libraries etc.
Apr 30, 2013 at 8:30 AM
Try Wakelock Detector: https://play.google.com/store/apps/details?id=com.uzumapps.wakelockdetector

But I guess wakelocks must be specifically programmed and if Philipp did not do so there won't be a wakelock in kp2a.
May 3, 2013 at 8:19 AM
Hi, I have been experimenting with this all week.

Under most circumstances I do not have a problem, however I have managed to reproduce the behaviour.

The problem only seems to occur when I open the database from dropbox - not if I just point kp2a at the cached file in the drop box folder.

So the problem may be with dropbox - I don't use it for anything else so difficult to tell.