• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!

Question GSAM Battery Monitor - How to find wakelocks? What is preventing me from deep sleep?

Search This thread

Utini

Senior Member
Dec 25, 2010
1,161
210
www.whymacsucks.com
www.whymacsucks.com
Hello everyone,

initially I had great battery life on my P6P. I then later started to root, add a 2nd SIM card and installed more and more apps (the same ones I already had on my P4 XL).
I can't really say when deep sleep stopped working, but it does not work at the moment.
I am at the stock ROM and Kernel atm, but rooted.

Usually I would start BBS and figure out which wakelock is preventing me from going to deep sleep.
However, BBS doesn't seem to work on Android 12. So I tries GSAM Battery Monitor.

Attached are screenshots from 2 days with GSM Battery Monitor.
It can be seen that the device does not go to deep sleep at all.
The only way to get it into deep sleep atm, is to enable battery saver.
This causes a huge battery drain over a whole day.

This post will contain the screenshots from day #1.
The next post will contain the screenshots from day #2.

Can anyone tell me how to figure out which wakelock / which app / feature / whatever is preventing my phone from going into deep sleep?

Thanks in advance!
 

Attachments

  • photo_2021-11-30_18-42-34.jpg
    photo_2021-11-30_18-42-34.jpg
    62.2 KB · Views: 148
  • photo_2021-11-30_18-42-41.jpg
    photo_2021-11-30_18-42-41.jpg
    62.1 KB · Views: 148
  • photo_2021-11-30_18-42-44.jpg
    photo_2021-11-30_18-42-44.jpg
    37.6 KB · Views: 138
  • photo_2021-11-30_18-42-47.jpg
    photo_2021-11-30_18-42-47.jpg
    51 KB · Views: 144
  • Wow
Reactions: roirraW "edor" ehT

Utini

Senior Member
Dec 25, 2010
1,161
210
www.whymacsucks.com
www.whymacsucks.com
And this is day #2 with more detailed screenshots.
 

Attachments

  • Screenshot_20211130-180753.png
    Screenshot_20211130-180753.png
    1.1 MB · Views: 91
  • photo_2021-11-30_18-40-06.jpg
    photo_2021-11-30_18-40-06.jpg
    51.1 KB · Views: 93
  • photo_2021-11-30_18-40-35.jpg
    photo_2021-11-30_18-40-35.jpg
    73.5 KB · Views: 83
  • photo_2021-11-30_18-40-17.jpg
    photo_2021-11-30_18-40-17.jpg
    62.3 KB · Views: 81
  • photo_2021-11-30_18-40-14.jpg
    photo_2021-11-30_18-40-14.jpg
    49.2 KB · Views: 79
  • photo_2021-11-30_18-40-42.jpg
    photo_2021-11-30_18-40-42.jpg
    63.6 KB · Views: 75
  • photo_2021-11-30_18-40-49.jpg
    photo_2021-11-30_18-40-49.jpg
    62.8 KB · Views: 77
  • photo_2021-11-30_18-40-53.jpg
    photo_2021-11-30_18-40-53.jpg
    63.6 KB · Views: 77
  • Screenshot_20211130-180743.png
    Screenshot_20211130-180743.png
    1.1 MB · Views: 89

bobby janow

Senior Member
Jun 15, 2010
6,108
2,148
BBS works.. sometimes. You need to stick with it and get the alarms tab to show stats. That should tell you what is keeping it awake. Kernel wakelocks are useless imo. Partial wakelocks and alarms and even network usage perhaps. I have it working but it's sketchy.
 

Utini

Senior Member
Dec 25, 2010
1,161
210
www.whymacsucks.com
www.whymacsucks.com
BBS works.. sometimes. You need to stick with it and get the alarms tab to show stats. That should tell you what is keeping it awake. Kernel wakelocks are useless imo. Partial wakelocks and alarms and even network usage perhaps. I have it working but it's sketchy.

So you basically install it, grant it root, and then wait until somehow magically starts to show stats?
 

bobby janow

Senior Member
Jun 15, 2010
6,108
2,148
So you basically install it, grant it root, and then wait until somehow magically starts to show stats?
Haha, no I don't have root. I just grant the permissions via adb. But "magically" is the key word actually. Here are a few screenshots from just now. The first 2 are pretty usual for a few of the stats but that changes. The second 2 are what I can sometimes get although that varies as well. Every other stat on the app is like the first two, not stats collected. That's what I mean by you have to stick with it. It will magically show randomly. lol Unfortunately, this round didn't show partial wakelocks which means a bunch to me. Tomorrow morning it will show.
 

Attachments

  • Screenshot_20211130-122338.png
    Screenshot_20211130-122338.png
    66.6 KB · Views: 96
  • Screenshot_20211130-122347.png
    Screenshot_20211130-122347.png
    68.7 KB · Views: 103
  • Screenshot_20211130-122357.png
    Screenshot_20211130-122357.png
    408.2 KB · Views: 98
  • Screenshot_20211130-122416.png
    Screenshot_20211130-122416.png
    201.5 KB · Views: 105
  • Like
Reactions: roirraW "edor" ehT

Freak07

Recognized Developer / Recognized Contributor
Jan 2, 2011
5,273
17,059
Thanks.. I just flashed kirisakura kernel from @Freak07 since I believe that it also block some wakelocks which are enabled on stock kernel. Will try that tomorrow together with AccuBattery.

If that doesn't work, then I will try to get magic by BBS.
If your issue is caused by an app or service (which it sounds like it probably is) constantly running in the background flashing the kernel won't help at all.

Your best bet might be BBS, battery historian (you can take a bug report and then view it there, just google it) or maybe top command.
 
  • Like
Reactions: roirraW "edor" ehT

Utini

Senior Member
Dec 25, 2010
1,161
210
www.whymacsucks.com
www.whymacsucks.com
If your issue is caused by an app or service (which it sounds like it probably is) constantly running in the background flashing the kernel won't help at all.

Your best bet might be BBS, battery historian (you can take a bug report and then view it there, just google it) or maybe top command.

Well, for now it seems like your kernel fixed the issue though.

I am on 70% deep sleep while screen is off according to accubattery. So I will monitor this through the rest of this day and report back.
 
  • Like
Reactions: roirraW "edor" ehT

Freak07

Recognized Developer / Recognized Contributor
Jan 2, 2011
5,273
17,059
Well, for now it seems like your kernel fixed the issue though.

I am on 70% deep sleep while screen is off according to accubattery. So I will monitor this through the rest of this day and report back.
Flashing a kernel can't fix issues with apps or services getting stuck in the background.

I guess it was the reboot that helped in the end or whatever was stuck got updated or unstuck some other way.
 

Utini

Senior Member
Dec 25, 2010
1,161
210
www.whymacsucks.com
www.whymacsucks.com
Flashing a kernel can't fix issues with apps or services getting stuck in the background.

I guess it was the reboot that helped in the end or whatever was stuck got updated or unstuck some other way.

Hmm really weird. My deep sleep is now also slowly dropping (only at 50% now).
But will see how it ends up after a working day.

I did try reboots before already. It didn't help.
But maybe so far I was working with a mix of several wakelocks which I can now narrow down.
Will try battery historian as recommend by you. Just need to find a decent guide for it first :p
 
  • Like
Reactions: roirraW "edor" ehT

cultofluna

Senior Member
Nov 25, 2015
3,928
1,976
OnePlus 9 Pro
Google Pixel 6 Pro
Hmm really weird. My deep sleep is now also slowly dropping (only at 50% now).
But will see how it ends up after a working day.

I did try reboots before already. It didn't help.
But maybe so far I was working with a mix of several wakelocks which I can now narrow down.
Will try battery historian as recommend by you. Just need to find a decent guide for it first :p
Install better battery stats ( only kernel wakelocks tab is not working)...to check wakelocks and alarms
 
  • Like
Reactions: roirraW "edor" ehT

Utini

Senior Member
Dec 25, 2010
1,161
210
www.whymacsucks.com
www.whymacsucks.com
Install better battery stats ( only kernel wakelocks tab is not working)...to check wakelocks and alarms

It didn't work for me at all and I just installed it and it still isn't working for me at all.
It has root and according to the permissions tab in the app everything seems to be granted.
I downloaded the RC 2.6-382 from here: https://install.appcenter.ms/users/...stats-xda-edition/distribution_groups/testers

I will let it run for a few hours and check again.

Edit: Oh I just noticed under the permissions tab:
STATUS: Failed: Transaction failed on small parcel; remote process probably died

Any ideas?
 
Last edited:

cultofluna

Senior Member
Nov 25, 2015
3,928
1,976
OnePlus 9 Pro
Google Pixel 6 Pro
It didn't work for me at all and I just installed it and it still isn't working for me at all.
It has root and according to the permissions tab in the app everything seems to be granted.
I downloaded the RC 2.6-382 from here: https://install.appcenter.ms/users/...stats-xda-edition/distribution_groups/testers

I will let it run for a few hours and check again.

Edit: Oh I just noticed under the permissions tab:
STATUS: Failed: Transaction failed on small parcel; remote process probably died

Any ideas?
Working for me properly... besides kernel wakelocks
 

Top Liked Posts