yashsingh1/xdaforums huggingface dataset:
[Galaxy S 5 Android Development (Snapdragon)] ecotje:
Battery drain not solved

I am seeing similar battery drain with the version from 2018.02.04 on the kccat6 device of my spouse.

About 20 hours of battery life when doing no or very light work (some browsing, email, texting, app auto update). Screen battery use was 1% and GPS turned off all the time.

It was a fresh install with full factory reset & wipe & Magisk as only customization.

Other than that this is very stable ROM. No issues with camera, fingerprint or GPS.

Maybe I can find something in the logs....

Would it make sense to install an earlier version such as 20171216?

Ewald
[Galaxy S 5 Android Development (Snapdragon)] xDieser_Rene:
Which Version is the stablest and best performance? Or which settings do u use for kernel? (Apps,etc.)
[Galaxy S 5 Android Development (Snapdragon)] cvxda:
I was using the very same version as daily driver since 2018-02-04 until yesterday with no problem whatsoever. Yesterday I built a new version with all February kernel security fixes applied which I'm running since. With both versions I'm always somewhere between 0.3 and 0.7%/h.

I'll upload yesterday's release shortly.

Corinna
[Galaxy S 5 Android Development (Snapdragon)] cvxda:
Resurrection Remic 5.8.5 20180212

New release for kccat6 and lentislte.

All the latest February ASB[1][2] kernel patches applied.

Corinna
[Galaxy S 5 Android Development (Snapdragon)] ecotje:
Battery drain

Many, many thanks for this new version of this wonderful ROM. Performance and stability are near perfect. If only I could solve the battery drain problem!

As promised, I recorded Catlog for a few hours and analysis revealed massive (up to ~100/s) amounts of debug messages of wpa_supplicant, many of them WPS related (which I don't use) but also PSP, CTRL-DEBUG, random-mix pool etc. I noticed that my WiFi region code was not set and that WIFI mode was "always-on", even though I am sure I had set it to "Europe" and "only when plugged-in" yesterday. Resetting those, reduced the amount of messages to a few per second (which is still chatty IMHO). However, about 15 minutes later the region code was again unset, WIFI set to "always on" and wpa_supplicant had resumed it's extreme chatty behavior.

Also, these messages continue while the phone is in sleep mode. I have not been able to reproduce the process by which these settings change. Putting the phone to sleep for 5 minutes or plugging power in/out is not sufficient. Some time must pass... Strange!

EDIT: Rebooting the phone unsets the region code, but leaves WiFi mode unmodified.

I will try to reduce the log level to INFO and see if that improved things. Maybe this is not root cause of the battery drain but it seems to me this behavior can't be helpful. I believe someone else mentioned that for him/her WiFi mode seemed to be always-on.

PS Sleep is set to 1 minute after display off, screen lock set to "swipe".

Happy to upload the logs if needed.

Ewald
[Galaxy S 5 Android Development (Snapdragon)] cvxda:
This is how it is, the builds are userdebug builds, after all. We already tried to reduce the number of debug messages from the kernel and it helped a lot, but that doesn't affect messages from the upper layers of the system.

Interesting. I'll try this, too, now. Hopefully it allows reproducing the issue.

If you can upload them to some pastebin, I'd take a look as time permits.

Corinna
[Galaxy S 5 Android Development (Snapdragon)] ecotje:
Progress on battery drain

Thank you for taking the time to look into this, highly appreciated! Lots of progress in the meantime:

- installed 20180212

- the region code still disappears after a while --> hardcoded default country into /system/etc/wifi config files

- WiFi-mode now stays on "Only when plugged in" (at least no change in last 2 hours) :)

- executed wpa_cli -p /data/misc/wifi/sockets/ -i wlan0 log_level info --> logcat stays silent for up to 20 seconds! --> planning to integrate into wpa_supplicant config at boot

- disallowed most apps to start at boot and keep awake (to eliminate as many possible causes ... and waste your time)

- moved email, google play services and download manager apps to "battery optimized" so all apps are now battery optimized

Predicted battery life is now 1 day and 12 hrs while actively using the phone (thus WiFi is always on). That is a huge progress compared to the 5 to 6 hours I had before :good: Now let's see if that turns out to be correct.

I have attached one of the logcat files from this morning while running the 0180204 version. You will notice the massive amount of wpa_supplicant logs. I fully understand (and support) the need for userdebug builds, but this seemed Wifi FW related (gFwDebugLogType=3, gFwDebugModuleLoglevel=14,5) and a bit over the top maybe.

I have taken backups in between so I can go back and selectively repeat the steps or execute anything you would like me to test.

Ewald
[Galaxy S 5 Android Development (Snapdragon)] cvxda:
In theory this should not be necessary. I'm using "always on" all the time and only have moderate battery drain, as outlined before.

From what I see there these are not kernel or FW messages. Compare with the output of dmesg.

FWIW, I have a test build with changes in the wlan kernel driver. There's at least one patch for a potentially battery draining problem which might have been introduced by a previous patch. Please try

https://cygwin.de/lineageos/kccat6/lineage-14.1-20180215_164621-UNOFFICIAL-kccat6.zip

Give it at least 2 days or so. Uh... I hope it's ok that this is a lineage build???

Thanks,

Corinna
[Galaxy S 5 Android Development (Snapdragon)] tni.andro:
Your logcat WPS messages are normal and part of the Wifi network enumeration / probing Android performs. It doesn't matter that WPS is disabled on your phone, Wifi networks are still probed for their WPS capabilities.

As I noted here, the 'Keep Wi-Fi on during sleep' setting is broken and Wifi stays on, regardless of the setting (explicitely turning off Wifi works).
[Galaxy S 5 Android Development (Snapdragon)] ecotje:
With the February 12 release I am now able to replicate the overnight battery consumption of < 1%. On the graph it was pretty much a flat line for about 6 hours or so. That is a huge progress.

Unfortunately, my spouse charged her phone before I could take a screenshot or grab the battery analysis data (need to get up before 6AM to beat her to it :().

However, the battery drain during the day seems still much too high and data seems to point to WiFi & Cell (Phone radio). I also noticed far greater battery drain when connected to a 5GHZ band. Maybe it's a firmware issue. I had to flash a new version of the bootloader and modem and possibly I rushed a few things there. Some people mentioned they had to do a few factory resets before things stabilized.

Will definitely give it a try, but I get the feeling it may be better to take a more step-wise approach before wasting too much of everyone's time

1. first restore the original ROM (which has an earlier modem/bootloader than supported for this custom ROM) and record reference battery consumption data.

2. update with the newest firmware and re-validate the battery drain

3. install February 12 release

4. install https://cygwin.de/lineageos/kccat6/lineage-14.1-20180215_164621-UNOFFICIAL-kccat6.zip

Fortunately, I was able to borrow a really nice S7 phone for my spouse :fingers-crossed: Would not want to ruin her Valentine's week now...

Thanks again,

Ewald

---------- Post added at 10:22 PM ---------- Previous post was at 09:54 PM ----------

I'm sure they are for normal use, but the wpa_supplicant logs were just a little bit too abundant (~50% of all log messages) when you are trying to spot something in the logs.

A temporary "wpa_cli -p /data/misc/wifi/sockets/ -i wlan0 log_level info" in init.d did the job, specifically as this message storm continued all night due to WiFi staying always on.

Yes, I took notice of your very useful remark earlier and on the 2018.02.04 version that was my conclusion too, even to the point where in my case I found the settings reverted two times to "always-on" without me changing it (was not able to reproduce this reliably though). However on the 2018.02.12 version, the overnight battery drain was definitely below 1%, which seems to indicate that WiFi may have been truly off. Will definitely validate as have the phone a few days available for testing now...

Thanks for your help and findings,

Ewald
[Galaxy S 5 Android Development (Snapdragon)] thubi:
battery life with build RR-N-v5.8.5-20180204-kccat6-Unofficial

After using it now several days. Battery consumption seems to be ok here. Overnight there is nearly no loss...

:good:

battery_RR_20180204_kccat6
[Galaxy S 5 Android Development (Snapdragon)] ecotje:
Update on battery drain

I have come to the same conclusion. Battery life with 20180212 is absolutely great ! I think I found what when wrong, but it took a whole series of tests (and mistakes) to figure it out.

1. Flash latest ROM G901FXXU1CQJ2_G901FTNL1CQJ1_G901FXXU1CQC1_HOME.tar.md5 --> battery life is a total disaster, even after wiping everything and full factory reset (about 5 hours battery life). This is the original scenario I followed before installing this ROM. Basically the radio and WiFi drain the phone (see https://drive.google.com/open?id=1sSeVWFoQdxd6G7iajH_-qJEvQMNkibmn)

2. Restore of a backup of my original ROM (PHN-G901FXXU1CPF6-20160711155451) --> battery life is again as original (3 days), but the phone offers no software updates and thus does not meet the minimum requirements (bootloader/modem) for this ROM

3. Factory reset of original ROM --> phone now offers 3 consecutive updates, but stops at the one but last update available on SamMobile: G901FXXS1CQI5 with bootloader G901FXXS1CQi5 and modem G901FXXU1CPJ1. Between each update, cache partition is wiped. --> battery life seems now OK (48 hours predicted) but the phone just turns off when battery reaches ~75%. There seems to be a huge mismatch between what Android (tools) report(s) and the real battery status. :confused:

4. Factory reset of G901FXXS1CQI5: battery life is now correctly displayed but has been reduced to 23 hours predicted. Applied suggestions from this forum: https://us.community.samsung.com/t5/forums/v3_1/forumtopicpage/board-id/GalaxyS/thread-id/27453/page/1 including removing google chrome. Battery life improved to about 48 hours predicted. This sounds good enough to test this ROM.

5. Install 20180212 (or even restore nandroid backup without modem/firmware): battery life is even better.

The only changes I made was to quiet "wpa_supplicant" (see above), change CPU governor to "powersave", pm_mode to hybrid and optimize all apps for battery (see above).

Even with all the battery monitoring tools and active use this morning, about 72 hours battery life is predicted: https://drive.google.com/open?id=14Zt69iysuSA_lkEo3aO-YQmW87qnWFof ! :good:

Hence, I stand corrected and deeply apologize for wasting everyone's time. Hopefully others can learn from my mistakes:

1. Phone updates must be installed correctly e.g. wipe cache in between

2. Not always good to grab the very last ROM available. Apparently Samsung has reasons not to offer it as update.

3. Factory reset the official ROM after installation and validate battery life first.

Ewald
[Galaxy S 5 Android Development (Snapdragon)] RootNightmareX:
So what is the reason the videos zoom in ? Will it be fixed?
[Galaxy S 5 Android Development (Snapdragon)] RootNightmareX:
[MENTION=3419717]cvxda[/MENTION] I saw that Fingerprint unlocking is always on even when screen is turned off. Any way to switch that off ? Because i have battery drain because of it.
[Galaxy S 5 Android Development (Snapdragon)] irock4god:
Well i am experiencing video zoom on my fb feeds and youtube. Any fix?
[Galaxy S 5 Android Development (Snapdragon)] Tarzangold:
: P
[Galaxy S 5 Android Development (Snapdragon)] TuXEKRO:
I've also updated, but the problem persists with unwanted zoom in qualities higher than HD.

I just updated, maybe I have to do the clean install from 0?
[Galaxy S 5 Android Development (Snapdragon)] xMandy:
nice theme :cool: wasisndas? ;)
[Galaxy S 5 Android Development (Snapdragon)] Stamgastje:
A clean install won't fix it, this is a bug in the ROM/OS.
[Galaxy S 5 Android Development (Snapdragon)] stewwert:
I'd like to know too!
[Galaxy S 5 Android Development (Snapdragon)] Tarzangold:
Playstore free Theme Engine Substratum and + Modern UI Theme .

And this for Navbar and small Icon's

Look here https://xdaforums.com/showpost.php?p=70658130&postcount=131
[Galaxy S 5 Android Development (Snapdragon)] TuXEKRO:
Two suggestions to add that I miss:

1. FM Radio

I sometimes need to connect it to the car.

2. Theme Manager / Engine

I used it a lot in the old CyanogenMod, and now I have to settle for what I find in the PlayStore.

Thanks for the ROM and greetings!
[Galaxy S 5 Android Development (Snapdragon)] TuXEKRO:
And one more thing. I would like to have a 2G / 3G switch in the tiles (in the quick accesses of the noftifications bar).

I usually leave it on 2G when I turn off the screen to save battery (works great).

Regards!
[Galaxy S 5 Android Development (Snapdragon)] nightryder:
Installed the ROM yesterday. My phone is incredibly fast, battery life is good. No problems so far. Thanks you very much for keeping the dev of this phone alive!
[Galaxy S 5 Android Development (Snapdragon)] ireaper4592:
https://www.androidfilehost.com/?w=...022980b50b506b3e897ce05de2a8ea3cd815ae5ffb153
[Galaxy S 5 Android Development (Snapdragon)] Tarzangold:
Hello Ireaper4592

Thats not for my Handy g901f !!!!!!!!

AP_G900FXXU1_BL-CQAV_MO-CQAW.tar.md5

or No ?????
[Galaxy S 5 Android Development (Snapdragon)] cvxda:
Definitely not. I'd suggest to download the original files from Sammobile rather than arbitrary third-party uploads. Please have a look into our flash howto in the LineageOS thread.

Corinna
[Galaxy S 5 Android Development (Snapdragon)] cvxda:
I'm not aware that the G901F stock ROM comes with a FM application. How's it called? I tried CM's FMRadio with default and qcom backends but it just doesn't work (missing device, etc).

Lineage Theme Manager for Nougat is still WIP and not available yet.

Corinna
[Galaxy S 5 Android Development (Snapdragon)] TuXEKRO:
Thanks for answering.

1. In the stock ROM (when I bought the phone) I had FM Radio. Try to make a port, but from what you see it does not work with just copying and pasting the .apk jej

I'm from Spain, but I do not think it influences having a radio or not in ROM

Regards!
[Galaxy S 5 Android Development (Snapdragon)] andreoide:
SM-G901F kccat6 S5 Plus does not come with FM Radio....

I think your provider added some FM app in the stock.

[emoji111] peace
[Galaxy S 5 Android Development (Snapdragon)] KiprasLT:
Hey, which Gapps version do I download? About to install the ROM :)
[Galaxy S 5 Android Development (Snapdragon)] GalaxyTroll:
Battery life has been great for me with the latest build, I'm getting at least 4:30 SOT using Reddit, youtube and snapchat. The 0% overnight drain is fantastic and standy drain is great as well.
[Galaxy S 5 Android Development (Snapdragon)] Ryanze:
Hi, i'm owning g906 since last year and i was using CPF3 for entire time because i found only that stock rom that already has root mod. No reference i found that newer version likr CPL1 has root mod. But the last 3 days, i want to switch to custom ROM. And i tried LOS, without update stock rom to cpl1, i found it drain battery so quick. Even with charge on, the battery charhe max 50-60% only after 5 hours screen off charging.

Then i switch to RR yesterday and still find it battery draining (with cpf3). Then i suspect it maybe because i used old bootloader. Today i flash stock cpl1 with odin. But i need twrp to install RR. Unfortunately, twrp site is down. Anyone please kindly mirror latest twrp for lentislte to flas with odin? Because i still using stock recovery.

Thanks ?

Edit: Nevermind, TWRP site is up again. Have a nice day!
[Galaxy S 5 Android Development (Snapdragon)] sunirmalya:
is anyone else having trouble with bluetooth ?? 1202
[Galaxy S 5 Android Development (Snapdragon)] ecotje:
Sorry for my ignorance but does 1202 stand for a Plantronics model? If so I don't own this model, but I have successfully paired and used several Plantronics models such as PLT Focus and several types of Voyager (e.g. 9xxPlantronics, 1st gen, 2nd gen). The only thing I noticed is that sometimes you need to pair a number of times (error: connection refused, wrong pin even when 0000). Some models need to be in their cradle for pairing (e.g. PLT Focus).

What type of issue do you have?

Ewald.
[Galaxy S 5 Android Development (Snapdragon)] sunirmalya:
no sorry mate - it is the latest build date RR-N-v5.8.5-20180212-lentislte-Unofficial.zip -sorry for not being clear
[Galaxy S 5 Android Development (Snapdragon)] ecotje:
I run the same version but apart for the pairing issues mentioned above, no issues so far. What problem are you facing? Maybe I can try to replicate.

Ewald

---------- Post added at 11:55 AM ---------- Previous post was at 11:21 AM ----------

My spouse finally recorded 64 hours of battery life on a 2 year old battery (battery calibration performed) with 3 hours of light gaming, ~1 hour of web browsing, lots of alarms and calendar reminders (wifi off during sleep, no data use, Bluetooth/NFC off during the night). As you said, the most amazing part is the near zero overnight drain, specifically since we live in an area with very weak GSM signals (0 to 1 block out of 5, yet not missing any calls or txt messages).

However it took a bit of a journey to get there (see https://xdaforums.com/showpost.php?p=75581885&postcount=978).

One interesting finding: there is no /system/csc folder. I was under the impression that it was needed to enable certain phone features (official ROM only?), but clearly one can live without it. The only things I noticed is that many "secret codes" are not working and of course all CSC related properties in device HW are blank. Could that explain why we can't save the WiFi country code?

Would it be beneficial to restore it from the backup of the last official ROM?

Ewald
[Galaxy S 5 Android Development (Snapdragon)] Néocray:
Since my last update, I didn't have much time to spend on my massive battery drain problem. The battery was holding almost a day if I don't use the phone.

(For memory, here is when the drain appeared, and here are some results from investigation.)

Some days ago, I went through a battery calibration for no result.

But yesterday, I have installed the last update (which is the 20180212 build) and it has made the battery drain even worse. The battery is now completely depleted in less than 7 hours, with only a couple calls and some internet searches.

I managed to save the BBS dump and logcat just before shutdown, if it can be of any use.

But I don't know what to do, since a full clean install doesn't solve the problem…

https://xdaforums.com/galaxy-s5/dev...ung-galaxy-t3534296/post75077474#post75077474
[Galaxy S 5 Android Development (Snapdragon)] ecotje:
[MENTION=5888226]Néocray[/MENTION]

I went through a seemingly similar experience, but ultimately was able to resolve it (see https://xdaforums.com/showpost.php?p=75581885&postcount=978). Did you upgrade the firmware from your official ROM before installing this ROM? If so, it's important to clear cache after each update and do a factory reset on the last ROM. I learned the hard way that I had to find a stable base on an Official ROM with recent FW and, as it turned out, fix the battery drain problem there first. To my surprise, I saw the same things there: massive amount of wakelocks, google services and Chrome being the biggest culprits (e.g. uninstall of Chrome improved things a lot), and massive drain from GPS, phone radio/standby and WiFi. However, the root cause seemed to be related to some mismatch between the FW and Android. Basically Android seems to receive wrong data (e.g. GPS events that are not there, wrong signal strengths) and these (can) cause massive amounts of wakelocks, very similar to the ones you are seeing. At some point I even had the phone dying with 71% battery according to Android, while in reality the battery was fully drained. One other thing to try is to boot in save mode: this will eliminate all possible app related issues (just in case). My niece had similar issues on her S7: from an amazing 6+ days of battery life to 7 hours after installing two Samsung updates.

Hope this will help,

Ewald
[Galaxy S 5 Android Development (Snapdragon)] elDiabllo:
Great rom, I'm using v5. 8.5-20180212.

I have 2 questions...

1. When battery is bellow ~25%, touchscreen is not respond correctly. I've notice that on older versions of RR. Is just me or is a common problem?

2. This problem is most important for me: I can't use wifi calling or volte. Is any way to enable vowifi/volte? Is very important to me cause I have low signal I'm my house (1st floor and basement) but I got full wifi signal. Is important cause i need to receive calls. I can call through whatsapp or Facebook but I need to receive calls. Pls help.

Thx.
[Galaxy S 5 Android Development (Snapdragon)] sunirmalya:
1. same for me
[Galaxy S 5 Android Development (Snapdragon)] elDiabllo:
After reinstall the rom, in hidden menu - *#*#4636#*#* I found volte option Off but I can't put it ON. Any help?
[Galaxy S 5 Android Development (Snapdragon)] toonami2011:
How i can this Room??? i have SM-g906s
[Galaxy S 5 Android Development (Snapdragon)] andreoide:
It is a good idea to start reading from the first post.

You seem to have the right model phone so that is no problem.

Many people say this is s good ROM.

Enjoy! :good:
[Galaxy S 5 Android Development (Snapdragon)] Néocray:
I have spotted a strange bug. The data is shutdown after each time I receive a MMS. There is still data speed on the icon (4G, 3G, etc.), but there is also a cross (x) and no data connection. Problem solved with a manuel off/on on data switch.

I've read your post, but I can't clearly see the walkthrough of what you did precisely to solve the problem.

The ROM that was installed before RR was not the official ROM (which is BOG), but instead the NEE one for Nordic countries, because they got the 6.0.1 update 9 months before the BOG release.

I have already revert back to the BOG modem firmware because of a bug which was extensively discussed on this thread. (Which was: phone reboot after 3G to 4G signal switch and was only present on devices using NEE firmware while having been originally on another CSC code.)

And yes, I clear cache and dalvik after each RR update.

So, to summarize, you advice me to perform in order:

full NAND backup

full official firmware installation (through ODIN maybe?)

get the latest OTA update

factory reset from the ROM

root

recovery reinstall

reinstall ROM and kernel backup from the NAND backup

clear cache + dalvik

enjoy

Is that it?