Standby drain

Unundra

Member
Jun 27, 2017
16
5
0
It would be awesome if you could link the page where you found the solution!
Yeah, sure! No problem.

Regarding the WifiOffDelayIfNotUsed wakelock, I first read about a fix for it when @metalboy94 mentioned it here. At the time it was regarding the G2 if I'm not mistaken. In the G6 though, the com.lge.wifiext.odex file does not exist. However, @shbang described here how he successfully ported the fix to the G4, this time by patching a file named wifi-service.jar. I basically just ported it further to the G6 by deodexing the /system/framework/oat/arm64/wifi-service.odex to /system/framework/wifi-service.jar and commenting out
Code:
#invoke-virtual {v0}, Landroid/os/PowerManager$WakeLock;->acquire()V
You can find my patched wifi-service.jar here.
This got rid of my WifiOffDelayIfNotUsed wakelock (at least it no longer shows up in BBS).

Regarding the wlan_rx_wakelock, I just edited the drivers/base/power/wakup.c in the stock kernel source with some of the mods @franciscofranco had introduced to the Nexus 5' FrancoKernel. You can find said mods here. Since my last post I have further modded my kernel with some other mods, this time from the Pixel' FrancoKernel, which can be found here, in order to also block the NETLINK and [timerfd] wakelocks. You can find the source to my kernel here.

After this BBS showed no significant wakelocks anymore, but my phone would still only deep sleep about 50% off the time when connected to my work network (which was still an improvement). Since I can no longer pinpoint what's waking up my phone I have half given up on it. I have captured some packets with tPacketCapture that I intend to look at with WireShark in the future, but I haven't gotten around to yet. If someone manages to further fix this problem please do share!

Cheers!
 
  • Like
Reactions: h3xx3r and Astrako

johanruda

Member
Jul 8, 2017
42
20
0
34
Sundsvall
Yeah, sure! No problem.

Regarding the WifiOffDelayIfNotUsed wakelock, I first read about a fix for it when @metalboy94 mentioned it here. At the time it was regarding the G2 if I'm not mistaken. In the G6 though, the com.lge.wifiext.odex file does not exist. However, @shbang described here how he successfully ported the fix to the G4, this time by patching a file named wifi-service.jar. I basically just ported it further to the G6 by deodexing the /system/framework/oat/arm64/wifi-service.odex to /system/framework/wifi-service.jar and commenting out
Code:
#invoke-virtual {v0}, Landroid/os/PowerManager$WakeLock;->acquire()V
You can find my patched wifi-service.jar here.
This got rid of my WifiOffDelayIfNotUsed wakelock (at least it no longer shows up in BBS).

Regarding the wlan_rx_wakelock, I just edited the drivers/base/power/wakup.c in the stock kernel source with some of the mods @franciscofranco had introduced to the Nexus 5' FrancoKernel. You can find said mods here. Since my last post I have further modded my kernel with some other mods, this time from the Pixel' FrancoKernel, which can be found here, in order to also block the NETLINK and [timerfd] wakelocks. You can find the source to my kernel here.

After this BBS showed no significant wakelocks anymore, but my phone would still only deep sleep about 50% off the time when connected to my work network (which was still an improvement). Since I can no longer pinpoint what's waking up my phone I have half given up on it. I have captured some packets with tPacketCapture that I intend to look at with WireShark in the future, but I haven't gotten around to yet. If someone manages to further fix this problem please do share!

Cheers!
Thank you so much for taking your time! I will try this for sure! :)
 

h3xx3r

New member
Sep 3, 2017
2
0
0
Yeah, sure! No problem.

Regarding the WifiOffDelayIfNotUsed wakelock, I first read about a fix for it when @metalboy94 mentioned it here. At the time it was regarding the G2 if I'm not mistaken. In the G6 though, the com.lge.wifiext.odex file does not exist. However, @shbang described here how he successfully ported the fix to the G4, this time by patching a file named wifi-service.jar. I basically just ported it further to the G6 by deodexing the /system/framework/oat/arm64/wifi-service.odex to /system/framework/wifi-service.jar and commenting out
Code:
#invoke-virtual {v0}, Landroid/os/PowerManager$WakeLock;->acquire()V
You can find my patched wifi-service.jar here.
This got rid of my WifiOffDelayIfNotUsed wakelock (at least it no longer shows up in BBS).

Regarding the wlan_rx_wakelock, I just edited the drivers/base/power/wakup.c in the stock kernel source with some of the mods @franciscofranco had introduced to the Nexus 5' FrancoKernel. You can find said mods here. Since my last post I have further modded my kernel with some other mods, this time from the Pixel' FrancoKernel, which can be found here, in order to also block the NETLINK and [timerfd] wakelocks. You can find the source to my kernel here.

After this BBS showed no significant wakelocks anymore, but my phone would still only deep sleep about 50% off the time when connected to my work network (which was still an improvement). Since I can no longer pinpoint what's waking up my phone I have half given up on it. I have captured some packets with tPacketCapture that I intend to look at with WireShark in the future, but I haven't gotten around to yet. If someone manages to further fix this problem please do share!

Cheers!

THANKS THANKS THANKS

I have tested on LG G6 H870 with Fulmics 2.0.
Befor after display off the WifiOffDelayIfNotUsed went higher and higher and now absolutely low.

Fulmics 2.0 based on v10T it should also run with other roms
 

ben cherian

Senior Member
Dec 18, 2010
554
79
0
Guys seriously don't use any greenify or clean master like thing. All these things hinders with normal Android task managing system.
Apps like FB, twitter, other social media apps does constant background syncing which cause wake ups in between. So turn off sync of all from account settings.
Always on display consumes 8-9% within 7hrs of sleep which is normal because display is LCD. Turn off AOD or keep fone UPSIDE down so that AOD turns off by proximity sensor.
I have drain of 1 to max 3% at night for 7 hours and 8-9% drain With AOD on.

Tip- before sleeping try a restart fone and keep fone aside.
 

flaviusbob

Member
Jul 7, 2011
25
16
0
I agree with you. Perform a restart and optimize phone every morning. Keep the phone upside down at night. I get around 3-4 hours SOT of normal usage, syng, gps, wifi, and sometimes data. I find this battery to be above average, and it does its job. My question is who has time to look on its phone more than 4 hours per day? maybe teenagers.
 
  • Like
Reactions: EMJI79

Perseus

Retired Senior Moderator / Recognized Developer
Feb 10, 2011
10,633
8,463
0
Atlantis
2.3 Flaming / Lack of respect: XDA is about sharing and this does not involve virtual yelling (flaming) or rudeness. Flaming or posting with a lack of respect is unacceptable. Treat new members in the manner in which you would like to have been treated when you were a new member. When dealing with any member, provide them with guidance, advice and instructions when you can, showing them respect and courtesy. Never post in a demanding, argumentative, disrespectful or self-righteous manner.
Light cleaning done on the thread. Please stay on topic of REDUCING the Drain or cause thereto.
 

Percy247

Member
Aug 22, 2017
43
6
0
Battery drain whilst phone off H870DS

I have a g6 H870ds on Nougat 7.0, v10j firmware and on 3 network in the UK.

Two major issues on standby drain.

Firstly, the battery drains a minimum of 2% hour with screen off and all battery saving settings on. Don't use social media apps and android system tends to be highest battery user. Phone battery drain 14-16% overnight! Is this normal? Max standby time with very little use is 48 hours. Previous phones have done up to 4 days on standby!

Secondly, turned actual phone OFF at bedtime last night with battery on 8% and it died during the night. I will repeat this test with a full battery over a 24hr period to see how much charge the battery is losing. Again is this normal? How much should a battery discharge when switched off?

Another issue I have with this phone is that it will constantly search for a signal when there is none. At home I have wifi and aeroplane on otherwise cell standby drain kills the battery.

If I turn the phone on and off it will then lose 15-25% battery very quickly before settling back to normal. Is this normal on this phone. Is it a battery calibration issue? I read fully charging it and discharging the phone 3 times might help. Is there any truth in this?

I have tried a factory reset and playing with very settings but it makes no difference to battery drain. I Need to establish if I have a faulty phone or battery or this is just how the phone works on Nougat then I can decide to either keep or sell.

Any help would be greatly appreciated thank you.
 

vctrrl

Senior Member
Feb 7, 2013
161
12
0
Niterói
Well, I have a significant drain overnight. Today I had 14% lost over 10h with no usage at all connected via WiFi. I don't like to disable things I'd normally use like WiFi etc or to put the phone on airplane mode overnight but I'd like to manage to reach less battery consumption while idling. I don't have things like Google's location history turned on but the Google Assistant is on and I let apps sync normally (like Facebook, Messenger, Instagram and all the other typical apps). I'm using Better Battery Stats and GSam (granted BATTERY_STATS permission via ADB) to track what's draining my battery.
 

KingFatty

Senior Member
Feb 4, 2009
338
54
0
Facebook Messenger is known to consume lots of power - even if you aren't actively using it. Even if you switch to Facebook Messenger light, that still consumes more power than it seems it would need.

Consider doing a test: logging out of Facebook messenger app, and then uninstalling/disabling that messenger app. Does your battery consumption get much better?

personally I uninstall facebook messenger and disable it (I"m not rooted, so I can't fully remove it), and then access the website via Chrome browser desktop mode. Yes, it's possible and I"m doing this right now, you just have to make sure to follow these steps: 1) load facebook in chrome - it should default to the mobile version of the website, 2) click on the messenger icon in the website, 3) after you get redirected to the app store page for facebook messenger app, hit the back button until you are back at the facebook mobile webpage, 4) select the chrome browser option to request desktop site, 5) after the site reloads, click the messenger icon in the website. That will bring up the list of messenger chats and you can choose what you want to view from there. Note: you just need to do this once, and then just keep that Chrome tab loaded in chrome, so you can just jump right back into the messenger page directly by selecting that tab. You don't need to go through all those steps again.

Anyway, with Facebook messenger app disabled on my phone, my battery life is great overnight, although I haven't rigorously monitored the usage. I prefer to set my phone in the battery saver mode overnight too, see if that also helps you (I use the quick access toggle switch that you see when swiping down, and just click the leaf icon to turn on battery saver immediately, regardless of battery level).
 

Unundra

Member
Jun 27, 2017
16
5
0
So has someone compiled this kernel and put it somewhere that can be downloaded? Or is this everyone on their own to compile the kernel themselves?
I assume you mean the kernel I mentioned in #141. I bricked my phone a few weeks ago so I effectively stopped trying to fix the problem any further. I must have a compiled kernel somewhere though, I'm sure. I just got my phone back from LG, very stock, and the battery drain at work is excruciating again, so I'll either find and flash my old kernel or just compile another one. When I do I'll either post it in the development section (I'm not sure I'm allowed to yet) or PM you a compiled version or something.

Edit: Uploaded the compiled kernel. I've just flashed it and it's working on US99715a. I suggest using Kernel Adiutor to toggle the wakelock blocks. Back up your boot image in TWRP before flashing and don't forget that I am not responsible if something goes wrong! Also, by blocking these kernel wakelocks, expect the WifiOffDelayIfNotUsed partial wakelock to go bananas. I suggest installing the patched wifi-service.jar also mentioned in #141.

Edit 2: The kernel appears to mess something up with the micro sd card, it's recognized as corrupted and asks you to format it (which I haven't done). Works fine in TWRP though.
 
Last edited:

DavDav1990

Member
Sep 22, 2017
6
0
0
My standby drain still high even after removing LG bloatwares. Almost in par with my screen consumption but still phone idle always came on top. Have you guys still having the same problem? It's kinda unfortunate to have battery drain for doing nothing :\
 

Percy247

Member
Aug 22, 2017
43
6
0
Screen off battery discharge anyone?

I am using Gsam to try and work out what is causing battery drain and here are my most recent stats.

Time off charge; 45hrs 23 mins, battery usage 93% of which;

Screen - 29% (SOT 10 mins max, discharge whilst on - 2% / off 91%)
Held awake - 16%
Apps - 51% of which Android 21.7%, Kernel 16.4%, google svcs 5.4%
Radio - 4%

Nougat battery usage only tells me; screen 1%, idle 32% and android OS 1%.

Three questions;

1. Is the screen off discharge figure of 91% correct and what does it mean? Does this point to a problem?

2. Does the drain caused by Android, Kernel and google services appear normal or could this point to another issue.

3. How reliable are these figures and why do the screen discharge figures vary so much (Gsam 29% and built in battery usage 1%)? Which should I believe?
 

Percy247

Member
Aug 22, 2017
43
6
0
Just got the v10m firmware update for H870DS and this seems to have reduced standby drain somewhat. Overnight standby drain was 9% or only 1.2% an hour compared to the usual 2-2.5% an hour I was getting previously. Hopefully this was not just a one off and things will improve!
 

Killua96

Senior Member
Apr 5, 2012
1,545
477
113
Castelvetro di Modena
Just got the v10m firmware update for H870DS and this seems to have reduced standby drain somewhat. Overnight standby drain was 9% or only 1.2% an hour compared to the usual 2-2.5% an hour I was getting previously. Hopefully this was not just a one off and things will improve!
Keep us updated! Could you tell me if they fixed the phone idle percentage or if it's alway high as ****? :confused:
 
Our Apps
Get our official app!
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone