Chainfire Turns Your Bootanimation into a Logging Center

Having a nice boot animation certainly adds a little bit of aesthetic polish to your … more

Android TV Launcher Pushed to Google Play

Over the past decade, the tech universe has seen two drastic and widely contrasting changes with … more

Cyngn, OnePlus, Micromax – The Legal Battle

Recently, a battle has been waging in India over the rights to distribute the commercial … more

Lean Mean Battery Power Saving App Review

We talk a lot about battery topics here at XDA TV. We talk about everything from Power Banks to USB … more

Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Post Reply

[Q] How to troubleshoot kernel wakelock problems?

OP iravanchi

30th December 2011, 03:32 PM   |  #1  
OP Junior Member
Thanks Meter: 0
 
7 posts
Join Date:Joined: Apr 2009
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: 2.6.35.7-N7000XXKK9-CL725676

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


------------


Update:

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...


-Hamed
Last edited by iravanchi; 31st December 2011 at 07:35 AM. Reason: Added the "update" part
31st December 2011, 11:04 PM   |  #2  
Junior Member
Flag Jakarta
Thanks Meter: 3
 
23 posts
Join Date:Joined: May 2011
More
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  
Senior Member
Thanks Meter: 272
 
5,715 posts
Join Date:Joined: Jun 2010
More
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.
Last edited by EarlZ; 1st January 2012 at 02:28 AM.
4th January 2012, 12:50 PM   |  #4  
Junior Member
Flag Bangalore
Thanks Meter: 0
 
6 posts
Join Date:Joined: Nov 2008
More
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: 41
 
381 posts
Join Date:Joined: Feb 2003
More
same issue here since kl7
7th January 2012, 12:53 AM   |  #6  
Senior Member
Thanks Meter: 41
 
381 posts
Join Date:Joined: Feb 2003
More
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
Last edited by ArcticCat; 7th January 2012 at 01:02 AM.
10th January 2012, 07:11 AM   |  #7  
Junior Member
Thanks Meter: 2
 
25 posts
Join Date:Joined: Jan 2012
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  
Member
Thanks Meter: 3
 
57 posts
Join Date:Joined: Dec 2011
Exactly same problem here
Click image for larger version

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

Click image for larger version

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

Click image for larger version

Name:	SC20120117-084802.jpg
Views:	956
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:	678
Size:	41.8 KB
ID:	860404  
Last edited by gaddy888; 17th January 2012 at 05:28 AM.
17th January 2012, 09:34 AM   |  #9  
Senior Member
Thanks Meter: 41
 
381 posts
Join Date:Joined: Feb 2003
More
The only way I found around this is to reboot in airplane mode...
19th January 2012, 05:58 AM   |  #10  
Member
Thanks Meter: 3
 
57 posts
Join Date:Joined: Dec 2011
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

Post Reply Subscribe to Thread

Tags
battery, betterbatterystats, gps, kernel, wakelock
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes