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

Huge battery drain, no doze but a possible fix! #66

Open
9 tasks done
Clanceeinfinity opened this issue Oct 8, 2024 · 8 comments
Open
9 tasks done

Huge battery drain, no doze but a possible fix! #66

Clanceeinfinity opened this issue Oct 8, 2024 · 8 comments

Comments

@Clanceeinfinity
Copy link

Acknowledgements

  • I have chosen an appropriate title.
  • All requested information has been provided properly.
  • This is not a feature request.
  • This issue is not a duplicate of an existing issue.
  • The issue is solely related to this GSI.
  • This issue occurs with the latest available build.
  • I am not running a custom vendor on my device.
  • This issue is not kernel related.
  • This issue is not related to Magisk/KernelSU/APatch.

Info

  • Device: duo2 and tab s7 (where i made the discovery)
  • GSI version: every recent upload
  • Vendor version: idk

Expected Behavior

doze should activate

Current Behavior

doze should activate but it doesn't, also screen on time is drastically reduced and the cpu drains a lot

Possible Solution

I got my duo2 recently so i thought this was just normal, but yesterday i flashed a similar aosp based gsi on my galaxy tab s7, which has always had outstanding battery life.
Suddenly i experienced exactly the same issues as on the duo2, with again doze not activating.

I talked with the maintainer, we came to the conclusion that an app must be crashing in the background, in this case it was com.android.phone.
I first tried to disable it with adb, this didn't work. Then i tried to force uninstall it with ./adb shell pm uninstall -k --user 0 com.android.phone

This worked and completely fixed the drain from an idle 4-5% an hour to 0% an hour. My tab s7 is wifi only so i don't know if this will mess with the calling experience.

Steps to Reproduce

  1. turn of screen
  2. get surprised by a lot of drain
  3. ...

Logs

No response

Additional context

both devices, s7 and duo2, are on 14(AP2A.240805.005)

@Archfx
Copy link
Owner

Archfx commented Oct 8, 2024

This is great information, may I know the link for the tabs7 repository? There were complaints about unacceptable battery drain. This is a great pointer for a potential fix in that direction.

@Clanceeinfinity
Copy link
Author

here is the link of the gsi build (odin flash able build) and the telegram group!
https://xdaforums.com/t/04-10-2024-rom-t870-gsi-aosp-android-14-gapps.4663516/
https://t.me/gts7x

@Clanceeinfinity
Copy link
Author

btw i did try the same on the duo2 but my sim couldn't be recognised anymore 😬
i used this command to revert that action: adb shell cmd package install-existing com.android.phone

@Archfx
Copy link
Owner

Archfx commented Oct 8, 2024

We will have to patch the cause of the issue. Let's see how it goes.

@Archfx
Copy link
Owner

Archfx commented Oct 9, 2024

Did you observe any particular error in the log file during idle? Especially did you observe any improvement after deleting com.android.phone?

I found this on the log

E NetworkStats: java.lang.NullPointerException: Attempt to invoke interface method 'boolean android.net.connectivity.com.android.net.module.util.IBpfMap.deleteEntry(android.net.connectivity.com.android.net.module.util.Struct)' on a null object reference o

Backtracked to the root cause for this as well. However, I don't think fixing the NullPointerException will fix the battery drain. What I think is some other application is creating the deleteEntry NullPointerException. If you can confirm that removing com.android.phone fixed the battery drain, it would be helpful.

@TuayFu
Copy link

TuayFu commented Oct 18, 2024

for this issue i found the battery drain on A14 and the phone seem to drain the battery even if it's in folded position and it's always warm. When i tried checking with the battery app i shows that the screen is draining the battery. So, I turn off the lock screen clock and the screen server and this problem seem to perish. Hope this helps

@Clanceeinfinity
Copy link
Author

screen saver is off my default though or not? what exactly do you mean with lock screen clock??

@TuayFu
Copy link

TuayFu commented Oct 19, 2024

Just the option of what to show on the lock screen, i just turn it off altogether. I also turn off the lift to wake option. Hope this helps

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

No branches or pull requests

3 participants