Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Severe battery drain while idle #1899

Open
ViRb3 opened this issue Jan 4, 2022 · 20 comments
Open

Severe battery drain while idle #1899

ViRb3 opened this issue Jan 4, 2022 · 20 comments

Comments

@ViRb3
Copy link

ViRb3 commented Jan 4, 2022

Issue Details

This is likely the same issue as #1831. I don't know when it started, but my battery has been, for the past months, draining at least 30% overnight while the phone is idle/stand by. I disabled all apps' "Background data refresh", and the phone is always on strong signal Wi-Fi. I looked at the DNS logs first thing this morning and noticed that the same few reverse IP lookups are performed literally every 30 seconds, non-stop, forever. The IPs in question are all private IPs that do not exist on my Wi-Fi network.

Do you have any idea what could be causing this?

Thanks

Screenshot

Details

  • AdGuard version:
    • AdGuard for iOS 4.3.1(919)
  • Device model and storage size:
    • iPhone 12 128GB
  • Operating system and version:
    • iOS 15.2
@VGisHere
Copy link

VGisHere commented Jan 5, 2022

I can confirm same issue at my end.
Before going to sleep, I see battery percentage roughly at around 30-35%
On waking up nearly 6-7 hours later, I see battery percentage plunged to 10-15% and then I go on to check battery stats, I see AdGuard Pro with some background activity continuously during entire night.

Also, I’m using VPN method to block custom ads on yahoo, particularly, m.yap.yahoo.com. I’m not sure if this VPN method is behind the battery drain.
@ameshkov

@ViRb3
Copy link
Author

ViRb3 commented Jan 5, 2022

I turned off AdGuard before going to bed last night, and my battery drain was cut in half, around 15% per 8 hours now, instead of 30%. I still don't think this is normal, and I suspect that the constant DNS queries are still happening, they just drain less battery when not going through the overhead of AdGuard. Does anybody have a clue what is causing these queries?

@VGisHere
Copy link

VGisHere commented Jan 5, 2022

Apple continuously performs some DNS queries, if you turn on VPN mode without any surfing, in no time, you would be able to see a lot of DNS queries to/from Apple, which IMO, can’t be turned off unless you turn off mobile data and WiFi.
The main issue would probably be that why AdGuard consumes so much battery !
I’ll try out Native mode and see if there is any improvement in terms of battery consumption.

@ViRb3
Copy link
Author

ViRb3 commented Jan 5, 2022

The DNS queries in my case are all private (local) IPs though, they have nothing to do with Apple. I did see some Apple queries, but they were happening MUCH less often.

@VGisHere
Copy link

VGisHere commented Jan 6, 2022

My observation is that the Native approach does less battery drain than the VPN approach.
And the only reason I'm using VPN approach is to block "m.yap.yahoo.com" !
I wonder which all sites break if they add this to their blocking list.

@ameshkov
Copy link
Member

I looked at the DNS logs first thing this morning and noticed that the same few reverse IP lookups are performed literally every 30 seconds, non-stop, forever

This is actually a known issue, but it's not with the AdGuard app. We've seen it on AdGuard DNS and AdGuard Home before.

Sometimes bonjour service goes mad and starts doing these reverse lookups all the time. The only reliable way to make it stop is to reboot the device.

@ViRb3
Copy link
Author

ViRb3 commented Jan 11, 2022

Thanks a lot for your reply. I tried restarting my phone multiple times and I even wiped it, but the issue never stopped. But wow, this would explain why I was never able to solve it - all of my home is covered by AdGuard Home! I suspect you are blocking some domain in the adblock list that triggers this bug...

@ViRb3
Copy link
Author

ViRb3 commented Jan 11, 2022

For what is worth, I also have iMazing set up on my Mac to backup my device over WiFi every day, so that's probably keeping a constant bonjour connection too.

@ameshkov
Copy link
Member

@ViRb3 hm, how long did it start to occur? The latest version of AGH does indeed breaks DNS service discovery so it might be the issue: AdguardTeam/AdGuardHome#4120

On the other hand, it shouldn't matter much. I've seen pretty similar reports with other DNS software, even without any filtering whatsoever.

@ViRb3
Copy link
Author

ViRb3 commented Jan 11, 2022

It's been happening for a few months unfortunately, at least since 11/2021. I don't think it's that specific issue in AGH. I will try to do a lot more experiments over the next few days, and I'll include disabling AGH too.

@NeutralGround
Copy link

@ViRb3 Try changing blocked response TTL under low-level settings to a higher value, eg. 3600, seems to work for me. I have been searching around for a fix and this is my current solution. Something to do with bonjour discovery service, especially for custom DNS users.

@ameshkov
Copy link
Member

ameshkov commented May 9, 2022

Interesting, please let me know if this helps.

@Tratosca
Copy link

Tratosca commented Aug 16, 2022

I'm actually facing high battery drains when device is idle on iOS 15.5 using the full tunnel mode for DNS blocking. Using a high TTL (7200s) didn't solve the issue. I'm using DNS over HTTPS with Cloudflare servers. iOS is constantly phoning home with ~800 requests to Apple names in only an hour !

@NeutralGround
Copy link

I'm actually facing high battery drains when device is idle on iOS 15.5 using the full tunnel mode for DNS blocking. Using a high TTL (7200s) didn't solve the issue. I'm using DNS over HTTPS with Cloudflare servers. iOS is constantly phoning home with ~800 requests to Apple names in only an hour !

How high? Need more details. For me, in the last 10 days it is 3%. Also, what is your blocking mode config? It is better to return 0.0.0.0 than REFUSED or NXDOMAIN as some apps may try to query further if latter.

@Tratosca
Copy link

I'm actually facing high battery drains when device is idle on iOS 15.5 using the full tunnel mode for DNS blocking. Using a high TTL (7200s) didn't solve the issue. I'm using DNS over HTTPS with Cloudflare servers. iOS is constantly phoning home with ~800 requests to Apple names in only an hour !

How high? Need more details. For me, in the last 10 days it is 3%. Also, what is your blocking mode config? It is better to return 0.0.0.0 than REFUSED or NXDOMAIN as some apps may try to query further if latter.

As I recently switched again to AdGuard VPN implementation after having used iOS system wide DNS profile I'm waiting for iOS to correctly report battery consumption after a few days but for now it seems to be around ~12%. I'm using the default mode (which return a 0.0.0.0 IP) and my 2 blocklists are also using 0.0.0.0 as returned IP for blocked hosts.

@NeutralGround
Copy link

How large are your blocklists?

@Tratosca
Copy link

How large are your blocklists?

I'm using BlackJack8´s "regular hosts.txt" rule with 14342 rules and a custom one with 184 rules.

@NeutralGround
Copy link

NeutralGround commented Aug 18, 2022

Could you share what are your most active domains/companies under activity page? Do switch to “all time”.

Also, how much battery drain do you experience after a night of shut eye?

@Tratosca
Copy link

Tratosca commented Aug 18, 2022

Could you share what are your most active domains/companies under activity page? Do switch to “all time”.

Also, how much battery drain do you experience after a night of shut eye?

It's by far Apple with ~12300 requests in two days ! Akamai is the second with ~4500 requests. Most of the requests aren't blocked but only SSLized using Cloudflare DNS over HTTPS servers.
This night was good actually even if some requests were made: the app is showing in the battery usage screen this way image

But I was in power saving mode. Will try next night in normal mode and keep you informed. Thanks for your help.

@G7TOK
Copy link

G7TOK commented Dec 10, 2024

IMG_5301
IMG_5302
IMG_5303

Still killing my battery

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants