-
Notifications
You must be signed in to change notification settings - Fork 91
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
High battery consumption in v4.6.4 due to infinite loop in statistics calculation #5499
Comments
I installed the new stable version 4.6.4 on both my devices today but unfortunately I quickly realized that the problem with the high battery consumption has not been resolved. On the contrary, I even have the feeling that it has gotten worse. Furthermore, new problems have arisen. For now I have gone back again to version 4.5 on both devices. @Versty and @artemiv4nov please remove the labels Status: Resolved and Resolution: Fixed because unfortunately the problem does not seem to be solved and Fixed. |
@derKief We have double checked the battery consumption rates with 4.6.4 release version, battery usage is within the normal range of 1-10% on our devices. Does AdGuard for Android 4.6.4 still consume more than 10% battery on your device?
Please, describe in detail what behaviour of the application has caused you to think this way. |
During my test phase, both Samsungs had between 15-20% battery consumption. With version 4.5, the consumption on both devices is max. 2%. One Samsung had to deal with severe freezes during the test phase. I found the slow charging much worse. A 15W charger adapter only charged with 1-2 watts. Normally, this is around 10W. The user @0xrxL also reports in the closed case/ticket/report that the new version did not help him. Users on Reddit also confirm that the new version does not help everyone. |
@derKief 15-20% is more than expected. In order to find the cause, we need to take a look at detailed battery dump. Please follow this steps:
If everything is set correctly, your device will be visible in the list of connected devices
|
Can confirm this behavior. On my Vivo X100 Pro, battery usage increased significantly after updating to v4.6.4. Battery usage info in Settings constantly show AdGuard always on top, before that this never happened. (yes i read the AdGuard FAQ saying it's not really accurate). But the biggest indication that it's AdGuard using battery, is the heat it is generating on my phone. Even after I cleared all apps, AdGuard service is somehow causing high CPU usage which then significantly heats up my phone to the point the CPU temp reaches 70C and phone is VERY warm to the touch. This also never happened before with previous version. |
@Versty But as you can see from the comments, I'm not the only one who is still affected by this. |
I'm on the latest stable update myself. AdGuard has used a whopping 27% since the last charge, and my phone has been running unusually hot. I'm using a Pixel 6 Pro running Android 15. It's running AdGuard v4.6.4. For most of the time in the picture above, my phone was idle. I wasn't using it, and it was just in my pocket. |
Just popping in to say i have the same problem too. Have disabled the app for now. 4.6.4 did not fix the issue. |
Same problem on Samsung Fold 6. Updated to 4.6.6 and battery drain stated on the Adguard App is 15%. The phone feels warm and visibly drains over 4 hours. I have turned AdGuard off. This is a problem. |
I should add to my initial comment (seen above) and say that the issue for me actually seemed to only occur in v4.6.4. Either that or it exacerbated the issue to a degree that I only just started noticing it for the first time. I'm not sure which. Either way, I've gone back to v4.6.3, and the issue has definitely gotten better for me. |
What's ironic is the release notes for 4.6.4 claims it fixed a battery drain bug. I had no isssues with <= v4.6.4-beta-1. |
In my case all started with the first v4.6 stable release. |
This v4.6.4 release is absolutely insane and should be PULLED ASAP. The high heat this release creates can possibly DAMAGE HARDWARE. Here's what I posted earlier, it was early morning and I was too tired to post screenshots.
But here are the screenshots now:
This issue needs to be put at the TOP of the priority list and this release needs to be pulled ASAP. |
It is definitely the second one. v4.6.4 exacerbated this issue big time. I noticed my phone getting warm for no reason a while back already, but I didn't know why or which app and never suspected AdGuard. I actually thought it was a system update that caused it. But this v4.6.4 release increased the heat so much and it started immediately after updating so I finally noticed it. Thinking back, I agree with the OP this issue most likely started with the first v4.6 release that's why I noticed phone was getting warm before but didn't know why. Then downgrading to v4.5 immediately solves the issue also kind proves issue started with v4.6 |
Hi all. Please collect debug logs and send them to [email protected] marking email with the number 5499. |
Log sent via email above. Hoping for a quick resolution as this drain is currently unusable on S24U (tried latest release 4.6.4 as well as nightly 4.7 #40). As others stated it's likely a 4.6.x issue, but 4.6.4 is when it became game breaking. If anything else is needed please let us know! |
I found the cause of the bug. Unfortunately it's the same problem we wrote about in the notes, we didn't realize the bug would occur in other time zones. |
Adding my data point here. Didn't notice any issues with 4.6.3. After upgrading to 4.6.4, woke up to a massively overheating phone. Battery drained 50% over 2 hours idle. This can be reproed on a Pixel 9 Pro with a fresh uninstall + reinstall of Adguard (all settings reset to defaults + HTTPS filtering enabled). I closed all foreground apps, leaving Adguard running, and checked the battery drain rate in AIDA64.
|
My OnePlus 12R had a big problem with this today. Based on my usage I probably would have ended the entire day with like 50-70%, but instead it heated up so much it switched from 5g to 4g temporarily and dropped from 100% to 30% in just the morning and early afternoon. This is when I checked and noticed AdGuard was using a lot of my battery, and saw the update. I stopped home and had time to charge up to 70% before work, but then after 5 hours of it almost entirely sitting in my pocket it managed to go from 70 to 30, even on the new update, when normally it would have dropped like 10-20% in this time. |
@jordansworld |
oh no i meant the appsucker app 🤭😅 |
This is GSAM Battery Monitor |
Found it on apkmirror. thankyou so much |
Actually, what we're more interested in is internal Battery stats that AdGuard shows (Stats -> scroll down to battery usage). Could you please post the screenshots (we're mainly interested in CPU time numbers). Also, if you haven't disabled debug-level logging after sending the logs, it'd be helpful if you could send it again. |
Meanwhile, let me please supply more details about what happened and why we're asking for AdGuard's battery stats. General notes about Battery usageBattery usage that all those apps show you (GSam, Android's internal stats, etc) are combined from two basic numbers:
Data usage is something we cannot influence as AdGuard sits between your apps and the Internet and naturally Android counts all your apps' data usage towards AdGuard. CPU usage is what we can work with and what we can optimize. There are some cases when we cannot, but they're pretty rare. For instance, some app may start misbehaving when an ad or a tracker is blocked and start constantly bombarding us with ad requests. There were such cases in the past with Google Analytics, some apps were attempting to get to it and the numbers of blocked requests could up to millions. Anyways, this thing is easy to see in the apps stats, if you don't see millions requests in the stats then you're probably okay. What numbers are okayIn our experience CPU usage for 24 hours should be in the range of 0 to 30-40 minutes (it's counted in minutes, yes). It could go up to 60 minutes if you spend a lot of time with the phone. Anything higher than 60 minutes may signal about an issue. v4.6 CPU usage issueUnfortunately, in v4.6 we made a pretty serious mistake that lead to high CPU usage numbers. Here's what happened:
In order to iterate through these time periods we were using Here is a VERY simplified pseudo-code that goes through time periods (in reality it's more complicated, goes through hours first, then switches to longer periods, etc, but it's not important for the demonstration): while (nextTimeInMilliseconds > 0) {
nextTimeInMilliseconds = truncateTimeToHour(nextTimeInMilliseconds - 1)
doMerge()
} What was missed is how We now fixed this and checked that all kinds of time changes are handled properly so I seriously doubt you can run into the same issue again so please make sure you're using build 204. There's one clear signal that higher CPU usage is caused by stats: if right after the startup the usage is okay, but exactly 30 minutes after startup it starts overusing, then this is it. |
Thank you guys for the new version for us Obtainium users. I updated from v4.5 as I had to downgrade because the heat created by v4.6.4 was crazy. And so far it looks like it's fixed for me. Screenshot 1: CPU temp is normal now. Cores downclock as normal. (it was 70C on v4.6.4, and most CPU cores never downclocked). Screenshot 2: I installed the fixed version at 19:50. The Android battery stat shows for the next 2 hours AdGuard battery usage was at bottom. Screenshot 3: AdGuard battery stat screen shows little battery usage. The two extra graphs I just want to show the timestamp. Since the installation at 19:50, the battery usage is flat. |
Thanks for mentioning Obtainium, frankly, we never heard about it before but it seems to be an interesting alternative to app stores. |
Can be useful or not, but I made a fresh installation of this nightly. Maybe this approach prevented the overwrite of old (and bugged) data? |
Please ignore the issue status, this is how our internal task tracker works, we're following the discussion. |
A little over 2 hours ago I reinstalled build 204. You can clearly see from the screenshot of the Adguard statistics and also from the Thermal Guardian that the CPU load/usage has increased since the installation. It is noticeable that 2 CPU cores are running at the highest frequency the whole time. Unfortunately I don't have an app that records the frequencies over a period of time and therefore can't take a screenshot. Unfortunately, I forgot to create another debug log. But it won't be much different from the last one since the same behavior can be observed. And before any questions arise. The device was not in energy saving mode! I can only repeat myself... there must be something else wrong with version 4.6 and above. If I only had the problem on one device, I would say it was the fault of that device, but now 3 devices in my household are affected. That can't be a coincidence. |
I see this as very negative because the topic is no longer in focus. To be honest, it annoys me. Maybe I should create a new ticket? |
It would be nice if AdGuard could have the same version number for posted "version name" and the package version. Obtainium detects the package version then checks GitHub and sees the posted version doesn't match so it thinks there's a new version out and notifies the user, despite the fact the user is already on the newest version. Just a suggestion. On the battery issue, it's weird it seems fixed for me but not for others. But it's been less than 24hours since my installation. I'll post another AdGuard battery stat screen after 24hours later. |
It shouldn't matter, the issue that I described would've reoccurred anyways. @derKief let's wait for other people to report and then we can open a new issue about that. Hopefully, by that time we'll have some clarity on what's causing it this time. I apologize for the issue taking so long to troubleshoot, but I'd appreciate if you could enable debug log one more time and record it for 60 minutes more. And one more quick question: please open Android settings -> Date & Time -> tell me what time zone do you have there (region is also important) |
@ameshkov |
Drained my Samsung Flip 5 battery from 40%->1% overnight. Adguard is the top culprit according to battery management. Didn't happen before so has to be something about the new update. I, |
@ameshkov |
I have experienced problem with battery drain on my girlfriend's S23 Ultra. It has adguard version 4.6.4 (however Android app settings section says it's 4.6.204). Android settings reported that app data was 140GB ❗ I will try to gather logs when problem reappears. Weird fact: I also have S23 Ultra and also adguard 4.6.4 but this problem doesn't seem to affect my unit. |
@derKief received the log, thank you! I quickly skimmed through it and tbh I don't see issues related to stats merging in the log (thank god this one seems to be fixed for good). How we record&calc battery usageRegarding overall CPU usage, let me explain what I see in the log.
These numbers are then summed up and that's how we calculate AdGuard's own battery usage. The log (13:21:59 - 19:12:19)In the log there are just a few records with battery usage measurements: Log records with measurements
So the overall CPU usage for this 6-hours period is Not ideal indeed, but all these measurements also depend on the usage profile a lot. @derKief I apologize for asking (and we'll definitely try to compensate for bothering you once we fix this), but could you please do one more thing. Could you please downgrade to v4.5 and record a debug-level log there as well? I'd like to understand what's the difference is there with v4.5 and look for the clues by comparing two logs. |
@ameshkov |
Got the log, thank you! I've created a new issue about that. Not yet sure what's causing this in your case, we're looking into it. Mainly, we need to understand how to reproduce this on our test devices. New issue: #5505 |
@ameshkov Thanks a lot |
It's been way more than 24 hours. This is what I see in AdGuard battery screen. 36min CPU time. Is this normal? I noticed CPU usage and temp spike up a lot when using the Bing app, phone gets heated real quick. Battery dropped by about 6% in only 12 minutes!! I'm not sure if this is because a lot of trackers are blocked so Bing goes crazy trying to contact them or if there's something wrong with AdGuard. |
36 min is just okay |
Please answer the following questions for yourself before submitting an issue
AdGuard version
v4.6.x
Environment
HTTPS filtering
Root access
Integration with AdGuard VPN
Routing mode
Local VPN
Ad Blocking
AdGuard Base filter
Privacy
AdGuard Tracking Protection filter
Social
AdGuard Social Media filter
Annoyances
AdGuard Annoyances filter
Security
No response
Language-specific
AdGuard German filter
Other
AdGuard DNS filter
Which DNS server do you use?
Cloudflare DNS
DNS protocol
DNS-over-TLS
Custom DNS
No response
What Stealth Mode options do you have enabled?
No response
Issue Details
Steps to reproduce:
Expected Behavior
When updating to v4.6 i expect same behaviour as with v4.5
Actual Behavior
High battery drain
Screenshots
Screenshot 1
Additional Information
The initial ticket #5460 was closed even though the problem is not yet solved (at least not for everyone).
Since I can't reactivate the initial ticket or can't find how to do that, I'm opening a new one so that the topic isn't forgotten and lost!
Original text:
Since the first version 4.6 I have noticed an increase in battery consumption.
Even the newer versions do not solve this problem. Only a downgrade to v4.5 helps me.
On Reddit you can read about some people who have the same problem.
I have this with a Samsung Galaxy S24 and Samsung Galaxy A25
The text was updated successfully, but these errors were encountered: