AdguardForAndroid icon indicating copy to clipboard operation
AdguardForAndroid copied to clipboard

High battery consumption in v4.6.4 due to infinite loop in statistics calculation

Open derKief opened this issue 2 years ago • 115 comments

Please answer the following questions for yourself before submitting an issue

  • [X] Filters were updated before reproducing an issue
  • [X] I checked the knowledge base and found no answer
  • [X] I checked to make sure that this issue has not already been filed

AdGuard version

v4.6.x

Environment

  • OS version: OneUI 6.1
  • Device: Samsung S24, Samsung A25

HTTPS filtering

  • [X] yes, I do

Root access

  • [ ] yes, I have it

Integration with AdGuard VPN

  • [ ] yes, I do

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:

  1. Install v.4.6.x
  2. wait a llittle and check battery drain with battery tools like GSAM, Samsung Battery Tracker
  3. Adgaurd is top of the list

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

derKief avatar Nov 01 '24 15:11 derKief

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. One of the two devices suddenly started charging very slowly and it felt very sluggish. After the downgrade to version 4.5 everything is fine again and the problems listed no longer exist.

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. @0xrxL also reported back that it is not resolved for him

derKief avatar Nov 01 '24 15:11 derKief

@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?

On the contrary, I even have the feeling that it has gotten worse.

Please, describe in detail what behaviour of the application has caused you to think this way.

Versty avatar Nov 02 '24 08:11 Versty

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 avatar Nov 02 '24 09:11 derKief

@derKief 15-20% is more than expected. In order to find the cause, we need to take a look at detailed battery dump. Could you provide a battery dump with AdGuard for Android 4.6.4 from one of your devices?

Please follow this steps:

  1. Fully charge your device

  2. Install AdGuard 4.6.4 to your device and wait for AdGuard's battery consumption hit more than 10%.

  3. Switch device to the developer mode. To do this: go to System settings -> About -> tap Build Number 7 times.

  4. Go to Developer Options in the system settings -> enable USB debugging

  5. Download Android SDK Platform Tools to your PC. Choose the appropriate download link for your OS from the Downloads section. Once you tap the link, a ZIP file will be downloaded. You can extract the ADB (Android Debug Bridge) files from the ZIP file and store them wherever you want.

  6. Connect the mobile device to your PC over USB cable.

  7. Test whether ADB is working properly: connect your Android device to your computer using a USB cable, open the Command Prompt, PowerShell or Terminal and run the following command: adb devices

If everything is set correctly, your device will be visible in the list of connected devices

Example

  1. Enter the command adb shell dumpsys batterystats --charged com.adguard.android > batterystats.txt to terminal

  2. Find the batterystats.txt file on your PC and sent it to [email protected], mention the [android] keyword and 5499 number in the email subject.

Versty avatar Nov 02 '24 12:11 Versty

4.7 Nightly 39
4.5 Stable

0xrxL avatar Nov 02 '24 22:11 0xrxL

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.

muchqs avatar Nov 03 '24 09:11 muchqs

@Versty Unfortunately, I can't do that at the moment because I've gone back to v4.5 on both devices and don't have time to experiment at the moment. I also need reliable devices. If I find the time I will create a batterydump. Maybe someone else can help out here.

But as you can see from the comments, I'm not the only one who is still affected by this.

derKief avatar Nov 03 '24 11:11 derKief

Came here to say this. Noticed an increase in the latest version. Consumption is around 16% (did not use the phone in the attached 4 hours).

Screenshot_20241103_095022_Device care

Also noticed phone (Samsung S24) was warm.

Version 4.6.202.

arichiardi avatar Nov 03 '24 16:11 arichiardi

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.

Screenshot_20241103-131302

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.

Gestrid avatar Nov 03 '24 18:11 Gestrid

i have high battery usage as well. almost 13% 💀 Screenshot_20241103_122829_Device care

jordansworld avatar Nov 03 '24 18:11 jordansworld

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.

solkarnar avatar Nov 03 '24 19:11 solkarnar

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.

MGS9500 avatar Nov 03 '24 19:11 MGS9500

Also having the same issue on Galaxy S23.

Screenshot_20241103_171005_Device care

three20three avatar Nov 03 '24 22:11 three20three

I agree with everyone else. I also had a bad experience using Adguard for Android while out today. 40% usage. I've never had any app use that much battery before since I've used smartphones.

Using v4.6.4 on a Pixel 9 Pro Fold.

Screenshot_20241103-144049

TigerCraneStyle avatar Nov 03 '24 23:11 TigerCraneStyle

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.

Gestrid avatar Nov 03 '24 23:11 Gestrid

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.

yochananmarqos avatar Nov 03 '24 23:11 yochananmarqos

In my case all started with the first v4.6 stable release.

derKief avatar Nov 04 '24 00:11 derKief

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.

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.

But here are the screenshots now:

  1. It says Today's background usage: 1290 mAh. Battery is 5400, so 1290/5400*100 = 23.89% battery. https://i.imgur.com/NbTGr0Q.jpg

  2. But the biggest problem is this version PUTS CPU AT MAX and the cores NEVER downclock. You can see the temp graph is literally 100% ABOVE 60C with constant spikes going to 70C, while the core graphs shows most of the cores are AT 100% ALL THE TIME. These measurements are taken while the phone is IDLE. https://i.imgur.com/vlvuwjS.jpg

  3. @derKief mentioned in 2nd post they downgraded to v4.5. So I did that too and here is the temp graph. Also taken while phone is IDLE. Now the temp is NEVER in the red. See the temp graph it's never going above 40C while the cores downclock as normal. https://i.imgur.com/dgpK5pa.jpg

This issue needs to be put at the TOP of the priority list and this release needs to be pulled ASAP.

muchqs avatar Nov 04 '24 00:11 muchqs

It's insane how literally nobody (neither in AdGuard team) noticed this bug during the entire development of version 4.6.

And, in truth, also this is insane (compared to the last nightly)

Screenshot_20241104_011801_Device care

0xrxL avatar Nov 04 '24 00:11 0xrxL

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.

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

muchqs avatar Nov 04 '24 00:11 muchqs