[Xiaomi Redmi Note 5 Pro ROMs, Kernels, Recoveries,] Desmanto:
I am experiencing high battery drain during sleep. In MIUI 9.5.17.0, i only lose about 4-5 % during sleep, which is about 0,6%/hour. I constantly achieve 10+ hours in 1,5 days; usually around 12-14 hours SOT. After switching to RR since 20180706 build, I have never got SOT more than 10 hours anymore after the first day. The best I can get is 9 hours with about 1 hours gaming; that is within a day. Currently using Firmware 8.7.5, stock kernel (was thinking to flash custom kernel), RR 20180724 build. (RN5 global whyred 4/64 GB)

Check with BBS, google play services always wake up the sensor. Sometimes it is the Lineage OS system or phone. I have tried for several nights with various result.

- Turn on wifi, phone lose approx 2%/hour

- Turn off wifi and switch to LTE, phone lose approx 0,6-0,7%/hour, which is normal drain

- Airplane mode, phone almost not lose any percent in 5 hours!!! Even though the BBS is reporting the Play services is waking up the phone for 3+ hours. So sensor wake up is no the culprit.

- Tested on other night with wifi on, still 2%/hour. But at rare occassion I get 0,6%/hour. (I don't know what changed at that night).

But one thing I am sure is if the wifi is on, it drains more than using LTE. So it must not be the internet, but something with the wifi. Using different wifi router give the same result, one is set to metered (same restriction as mobile data), the other is unmetered. BTW, they are the same wifi router I connected to when using MIUI and get 10+ hours SOT. Charging speed is also a bit slower than using mobile data. Total charging time average 2 hours 18 minutes in previous MIUI or if using mobile data in RR, but 2 hours 28 minutes if using wifi in RR. (using the same charger, same cable, same room temperature)

I thought I was the only one with battery drain during sleep. It turns out other LOS user also reporting the same. Since RR is based on LOS, maybe there is some link somewhere. It was stated that the wifi deep sleep drain is being investigated.

I have calculated the difference. If the wifi is using 2% and mobile data only 0,6%; there is 1,4% difference. If i interpolated this data to 24 hours, there will be about 33% different. That means using wifi will only give 67% usable battery life compared to mobile data in a day. Which is why my SOT never reach 10 hours anymore. If 9 hours is for 67%; then if there no wifi deep sleep drain, I should be able to achieve 13,5 hours as usual.

I am not sure what to include as the logcat, the tests should be done in a long period. So I don't know which part to include. The log will be too long.

==========

The other bug I experienced is the wifi transfer. I turn on the network traffic indicator. I am also using the date to show the seconds. When I copy some big files more than 100 MB using MiXPlorer to PC folder share, the network traffic indicator will be frozen, sometimes stuck at 0 b/s or maybe 2,1 MB/s, the seconds also stop ticking. After a while there will be a pop up "SystemUI isn't responding", 2 choices : Close app and Wait. I can choose wait for several times until the transfer finish. Only after the transfer finished, the seconds will be ticking again. If I choose close app, then the whole screen black and it seems to go thru UI restart, I need to unlock phone again, and sometimes the whole things break up, such as magisk suddenly reported not installed, and other root apps broken. I need to restart the phone to make it works properly again.

So the whole statusbar hanged up when there is a big traffic passing thru. I experienced this in the last 2 builds, 20180717 and 20180724; but not in the first one since I switch to RR 20180706.

- Tried other setting, turn off the seconds, still same frozen up

- Turn to immersive mode (hide the statusbar), still frozen

- Turn off network indicator, transfer works fine, seconds ticking properly. no SystemUI isn't responding error

So the culprit must be something related to the network traffic indicator which can't handle high transfer speed in the statusbar. And the change happened in 20180717 build.

As current workaround, I have to manually turn off network traffic indicator when I need to transfer big files. Or Sometimes if I ignore the error too long without pressing wait, the phone will auto restart after several minutes. Hence the transfer fails if it needs more than several minutes to complete