Remove All Ads from XDA

[Q] How to troubleshoot kernel wakelock problems?

7 posts
Thanks Meter: 0
By iravanchi, Junior Member on 30th December 2011, 03:32 PM
Post Reply Email Thread
Hi everyone,

I've been optimizing my battery drain issues as suggested in other threads in here and elsewhere, since I'm having unusual battery usage when the phone is off (even in the flight mode, with WiFi,GPS,Autosync off, it uses more than 10% of the battery in 6 hours).

I've used CPU Spy, OSMonitor, BetterBatteryStats, and terminal commands (ps, top, etc.) trying to pinpoint the battery problem, and I got to some results, but I got stock with this issue:

CPU Spy shows that my Galaxy Note never goes to "Deep Sleep". It's always stuck with 200 MHz when it's turned off. So, I figure the issue should be a wakelock.

The BetterBatteryStats everything is (to some extent) natural, except that it shows (in its Kernel Wakelocks page) a huge number under the name "GPS", and I don't seem to be able to find the problem. Actually, the time reported for the "GPS" wakelock is almost equivalent to the uptime of the device minus the time that the device was fully awake (screen on).

For example, I turn off the screen, wait for 10 seconds, turn back on, and the number is increased by 10 seconds. (It doesn't increase when the screen is on)

Here's what I've tried already:
- Turning off the GPS (it was off from the beginning actually)
- Turning off everything (Wifi, Cell)
- Killing most of the apps in Running Services
- Restarting the device

One important observation was that when I restart the device, the "Deep Sleep" is back for some few minutes. When I use my device for one or two minutes (nothing special, turn on Wifi, do a sync) the "GPS" kernel wakelock is back, and doesn't go away no matter what I do.

I searched a lot, and nobody seems to have noticed a high "GPS" wakelock on the kernel.

My ROM is Samsung's stock ROM (Updated to 2.3.6)
Kernel version:

Anyone has any idea what to do to find out what is causing the wake lock?



There's a few experiments that I had:

- When I have WiFi turned off and restart the device (hold the power button, turn off, and turn back on) there is no issue (phone can go to deep sleep, and there's no "GPS" kernel wake lock). After turning on the WiFi and passing a few minutes, the issue is back.

- When I have WiFi turned on and restart the device (so that the WiFi is on from the beginning when the device starts) entering Deep Sleep is impossible. The "GPS" wake lock exists from the very beginning.

- The above issue made me think that it might be a Network Location issue. So I went to Settings > Location and security > and disabled "Use wireless networks" and restarted the device. The issue never happened again no matter how long I waited. I turned on WiFi, auto sync, manual sync, turned on GPS and used Google Maps, ... There was no problem with Deep Sleep. The device can sleep alright.

- When I changed the "Use wireless networks" setting back on, to my surprise, the issue DID NOT COME BACK. I even used it (located myself without GPS in Google Maps) and everything else... But the device can still go to sleep.

So, bottom line is that I have the issue fixed (for now!) but I can't realize what was it and why isn't it there anymore.
Anyone has any ideas?


Another update:

The phone got to sleep well last night. 1 percent battery drain during the whole night. But when I got to work (the location changed), the "GPS" kernel wake lock is back, and causing the phone to stay awake. I had to disable the Network Location again to put my baby to sleep again...

31st December 2011, 11:04 PM |#2  
Junior Member
Flag Jakarta
Thanks Meter: 3
I have the same problem..Huge GPS percetage but the GPS is off.. I will try your methode now..hope it works
1st January 2012, 02:00 AM |#3  
I had the very same issue on KK9/KL3/KL7

I dont have the GPS enabled but the scenario is similar, I used the phone with wifi (but no wifi location services enabled) and it does not go into deep sleep till the phone is restarted and bettery battery stats show a huge uptime caused by the GPS.
4th January 2012, 12:50 PM |#4  
Junior Member
Flag Bangalore
Thanks Meter: 0
I seem to be facing the same issue. My phone used to go into Deep Sleep without any issue earlier, I noticed this issue today. I'm trying OP's suggestions and will report back if it helps.
4th January 2012, 10:43 PM |#5  
Senior Member
Thanks Meter: 42
same issue here since kl7
7th January 2012, 12:53 AM |#6  
Senior Member
Thanks Meter: 42
Making me crazy.. Anyone has a solution?
It happens whenever they phone boots with wifi on... Booting with wifi off then turning it on it will sleep fine
10th January 2012, 07:11 AM |#7  
Junior Member
Thanks Meter: 2
i have exactly the same problem.

galaxy note on rocket rom v14 and v15.
i'll try your method and update if find anything. it's driving me nuts!
17th January 2012, 05:21 AM |#8  
Thanks Meter: 3
Exactly same problem here
Click image for larger version

Name:	SC20120117-084523.jpg
Views:	1611
Size:	26.0 KB
ID:	860393

Click image for larger version

Name:	SC20120117-084719.jpg
Views:	1422
Size:	42.5 KB
ID:	860394

Click image for larger version

Name:	SC20120117-084802.jpg
Views:	1328
Size:	18.2 KB
ID:	860395

I have the same problem. Sometimes on restarting, the problem seems to go away. Have just not been able to find a pattern to see what triggers it off.
I've attached some screen shots.
My phone lost about 20% in 8 hours. At night. Ridiculous.
Attached Thumbnails
Click image for larger version

Name:	SC20120117-084640.jpg
Views:	788
Size:	41.8 KB
ID:	860404  
17th January 2012, 09:34 AM |#9  
Senior Member
Thanks Meter: 42
The only way I found around this is to reboot in airplane mode...
19th January 2012, 05:58 AM |#10  
Thanks Meter: 3
Maybe it's some program keeping it awake. Keeps trying to get a fix on location.
Are any of you using Samsung dive? Or have you enabled the "remote control" feature?

Sent from my GT-N7000 using XDA App
19th January 2012, 11:17 AM |#11  
Thanks Meter: 19
Originally Posted by gaddy888

Maybe it's some program keeping it awake. Keeps trying to get a fix on location.
Are any of you using Samsung dive? Or have you enabled the "remote control" feature?

Sent from my GT-N7000 using XDA App

r u using google latitude ? if so try loging out.
Post Reply Subscribe to Thread

battery, betterbatterystats, gps, kernel, wakelock

Guest Quick Reply (no urls or BBcode)
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes