[Galaxy Tab Pro 12.2, 10.1, 8.4 Original Android De] retiredtab:
Issue with my 21 ALPHA builds

I discovered an issue with my 21.0 ALPHA builds. I don't know if this started with my first Jan 2024 build or not since I don't have that and subsequent builds anymore.

As some of you may know the March 2024 security patches aka QPR2 nearly killed all "legacy" devices like ours due to massive 8,500+ commit changes to AOSP Android 14 code.

For almost 7 weeks, I could not even compile SM-T320 without errors until around late April 2024. When it finally compiled and everything seemed to work for what I need, I didn't notice this until now.

My 21.0 ALPHA builds, while it goes into deep sleep PROPERLY, it loses about 3-4% battery every 10 hours. If it does NOT go into deep sleep properly, it loses way more than that. My 21 build has the Valera/original wifi drivers so it works with 5Ghz channel 149+.

https://github.com/retiredtab/andro...mmit/f82ad818c672f95b9d3a3d2ca818114385b96e8f

The phoval 20.0 build, without my wifi changes, loses about 1% every 10 hours. With my wifi changes on 20, I never checked so I don't know for sure as I was trying to make 21 work with QPR2.

Deep sleep is something I check with all my builds (private and public) on all my devices for years now. I use the app devcheck to check deep sleep. While I check for deep sleep, I do NOT keep track of the battery percentage lost over time because I've never had a problem with losing more than 2% daily on my devices. Usually devcheck reports 97%+ deep sleep.

I have wifi + airplane mode enabled and bluetooth + location disabled as my "standard" configuration in 20 and 21.

Possible root causes?

I had to make 2 kernel change just in order to compile Android 14. They are

https://github.com/retiredtab/andro...mmit/672e9f38fc290448f9d1d79dd5ccd0712fb9c49b

https://github.com/retiredtab/andro...mmit/e8a971645d85ac38d35f0347c7ee21a1c8d28dc6

The 2nd change was taken from Khalvat's Samsung Galaxy S5 repo which also uses the msm8974 SoC. So I copied that entire modpost.c file into the SM-T320 so that it compiles cleanly. Khalvat has 21 running on his Samsung S5 so that's why I copied his code. I'm not a programmer so I don't know if one or more of those changes has affected the battery consumption or not.

It's also possible that one of our proprietary drivers (wifi, gps, bluetooth, etc) or kernel code battery drivers is out of date with QPR2 in some manner causing this extra battery consumption while in deep sleep.

I've looked through the adb logcat files and I don't see anything obviously wrong.

Effects of this issue

Assuming the build loses 4% every 10 hours, that is about 10% battery loss each day while it's in deep sleep mode. AGAIN, devcheck clearly shows it's in deep sleep mode 98% to 99% of the time (this is just letting T320 sit idle and do nothing for 10 hours).

At this point, I can't see any of my changes to get 21 up and running as something out of the ordinary. They are the same changes I made to other architectures and they only lose 1 to 2% every 10 hours.

What you can do

If you're not going to use your T320 for a few days, then turn it off otherwise, depending on your configuration (e.g. you might have location + bluetooth enabled + apps calling home frequently) you might have a dead battery after a few days.

BOTTOM LINE: I don't know if I can fix this or not. Please DO NOT ask for "updates". If I can fix it, I will announce it here. So ASSUME that it's "standard" to lose almost 10% battery life daily with 21 in deep sleep mode. AGAIN, DO NOT ask for updates. If losing 10% battery daily is unreasonable to you, then don't use this rom.

All questions regarding an "update" will BE COMPLETELY IGNORED.

PS. I have also added this post #1 under known issues.