[ROM][Android 8/9/10][Unofficial] LineageOS for Mi-4c/Mi-4s

lousido

Member
Jul 12, 2009
10
1
23
Thank you very much WJXXBSH
I have updated the ROM to version 20200612, everything perfect.
I download the ROM and the OpenGapps Pico from the PC, I flash the ROM, I delete system / system / product / Webvieb (I already had another one installed) and system / system / fonts / NotoSansCJK.ttc. I flash the Opengapps, do the wipes, reboot and READY.
 

Kayoo80

Member
May 18, 2020
13
1
0
Thank you too WJXXBSH !

I have updated the ROM to version 20200612. The ROM is absolutly fine. I'm now an happy and loyal fan of your work.

I had some difficulties to update from 20200514 : i thought that i could flash directly 20200612 (incremental update) without swipe system, cache, data : i had a bootloop and it always com back in orange fox ; so i had to swipe almost all (system, cache, data, internal storage). Is it normal ?

How to correctly update between each version without the risk to loose all apps ?

Thanks from France ;)
 

WJXXBSH

Senior Member
Dec 22, 2018
86
56
18
Thank you too WJXXBSH !

I have updated the ROM to version 20200612. The ROM is absolutly fine. I'm now an happy and loyal fan of your work.

I had some difficulties to update from 20200514 : i thought that i could flash directly 20200612 (incremental update) without swipe system, cache, data : i had a bootloop and it always com back in orange fox ; so i had to swipe almost all (system, cache, data, internal storage). Is it normal ?

How to correctly update between each version without the risk to loose all apps ?

Thanks from France ;)
It's not needed to wipe everything (except cache/dalvik-cache) when installing updates. If you have Gapps installed to "/system", you may need to wipe "/system" additionally before updates. Wipe "/data" (or factory reset) is the least used way, which is not recommend to use.
 
Last edited:
  • Like
Reactions: lousido

Kayoo80

Member
May 18, 2020
13
1
0
It's not needed to wipe everything (except cache/dalvik-cache) when installing updates. If you have Gapps installed to "/system", you may need to wipe "/system" additionally. Wipe "/data" (or factory reset) is the least used way, which is not recommend to use.
Thanks for your answer. I'll try with your next update. ;)
 

lizerome

Member
Jun 22, 2020
7
1
0
Holy sh‎it somebody actually made a working port of 17.1, I'm impressed.

Quick question (apologies if it's been answered already or it's really obvious), would it be possible to get SafetyNet checks working on the ROM somehow? I know one of the official Lineage builds from 2018 could do it, but I'm not sure what the requirements are for it exactly. I assume the ROM has to be signed in some way or introduce restrictions (locked bootloader, no su binary, SELinux, etc.) Normally I wouldn't even have Play Services installed, but more and more apps require it and it's fuc‎king annoying.

If it can be spoofed with Magisk somehow that also works, I just thought I'd ask in case there's an easy solution I don't know about or something that you're using.
 

Kayoo80

Member
May 18, 2020
13
1
0
disable autoboot when charging (power OFF)

Hello, i want to disable the autoboot function while mi MI4C is OFF when i plug it to the power to charge it. Does somenoe know how to do ?
 

nos1609

Senior Member
Feb 16, 2009
229
210
73
Moscow
Hello, i want to disable the autoboot function while mi MI4C is OFF when i plug it to the power to charge it. Does somenoe know how to do ?
Agree, had to boot to recovery to be able to charge the battery at least to 10% to survive the boot stage. It's a cool feature, but it is not suitable for our device with slow charge.
 

WJXXBSH

Senior Member
Dec 22, 2018
86
56
18
Holy sh‎it somebody actually made a working port of 17.1, I'm impressed.

Quick question (apologies if it's been answered already or it's really obvious), would it be possible to get SafetyNet checks working on the ROM somehow? I know one of the official Lineage builds from 2018 could do it, but I'm not sure what the requirements are for it exactly. I assume the ROM has to be signed in some way or introduce restrictions (locked bootloader, no su binary, SELinux, etc.) Normally I wouldn't even have Play Services installed, but more and more apps require it and it's fuc‎king annoying.

If it can be spoofed with Magisk somehow that also works, I just thought I'd ask in case there's an easy solution I don't know about or something that you're using.
As most Chinese apps don't check SafetyNet, I don't know much details about it (there is also no GAPPs on my device). For most custom roms, the most easy way to pass SafetyNet is using Magisk. There is a way to avoid the kernel to add bootloader status in cmdline, the su binary could be removed manually, and SELinux could be enforcing after boot process. But doing these things is not a good choice rather than using Magisk, it provides both root access and SafetyNet.
 

WJXXBSH

Senior Member
Dec 22, 2018
86
56
18
Agree, had to boot to recovery to be able to charge the battery at least to 10% to survive the boot stage. It's a cool feature, but it is not suitable for our device with slow charge.
Do you mean the device got a bootloop when charging (power off) with battery less than 10%? I found this problem last week by accident, as I keep my device with more than 40% battery for most time. Theoretically, the device should boot into charging mode (only a white battery icon on screen) when connecting with charger after power off. It's currently unknown about the reason why it got a bootloop when charging with (some specific) low battery level, it seems like a kernel panic at that time.
 

Gourcuff14

Senior Member
Feb 19, 2018
94
4
8
Hello. Sound drops, I have loaded lineage-17.1-20200612-UNOFFICIAL-libra. I do have some mods. I loaded nikgapps core, magisk and modules ainur, audio modification library, volume steps extender. Viper4Android won't run without some workaround so I haven't bothered, selinux related possibly. I have to reboot system to regain audio. It isn't continuous but it does happen randomly. Could reboot UI be added into advanced power options? Thank you.
 

Kayoo80

Member
May 18, 2020
13
1
0
Do you mean the device got a bootloop when charging (power off) with battery less than 10%? I found this problem last week by accident, as I keep my device with more than 40% battery for most time. Theoretically, the device should boot into charging mode (only a white battery icon on screen) when connecting with charger after power off. It's currently unknown about the reason why it got a bootloop when charging with (some specific) low battery level, it seems like a kernel panic at that time.
Yes it got a bootloop, exactly !
 

lizerome

Member
Jun 22, 2020
7
1
0
After a few days of using the ROM, I was going to make a post complaining about the scheduler/overclocking/voltage settings being too aggressive, but more on that later.

Immediately after I first installed it, I noticed that something felt off about how quickly my phone would heat up, and how unusually hot the back would get from seemingly mundane operations (installing an app, scrolling in a browser tab, etc). With extended use (20-30 minutes) things would quickly get ridiculous, with the buttons on the side getting hot enough to burn your hand. About as hot as the flashlight LED gets when you leave it running for an hour by accident, since Xiaomi in their infinite wisdom decided to pump enough voltage through this thing that would power a lightbulb. I had to find a metal surface to use as a heatsink and hold the phone against it, because I was afraid it would literally cook itself.

While investigating the issue further, I noticed the following:

- After a fresh reboot, doing something simple like opening this thread in Chrome and scrolling it up and down would cause the CPU temps to be stuck at 85-90 °C
- The two "big" cores would be permanently disabled, regardless of use (idle phone, screen off, listening to music in the background, playing a game, opening apps, etc., the cores would be shown as being in "deep sleep" 99% of the time)
- Predictably, the battery life would PLUMMET through the ground. I left my phone at ~40% as I went to sleep, by the time I woke up it was dead with 0% battery (this is on a freshly installed, genuine Xiaomi battery and no apps open on my phone), same with just using Chrome on a full charge (95% to 10% in about an hour)
- Turning the phone on, not even unlocking the screen and leaving it to charge to full would also cause it to heat up, seemingly from background processes (the sensors reported the battery to be at only 29°C, whereas the CPU was hovering around 50-60°C). The surface I left the phone on would also be hot underneath every time I checked, so I assume it stayed that way basically the entire time it was charging.


But what's REALLY weird is that right as I was about to post this, the issue seems to have magically disappeared overnight. I didn't install/uninstall/update anything, and my use case is exactly the same. I tried browsing this thread in Chrome, I tried to install some apps, I tried doing more intensive tasks, but I can't reproduce any of it.

- The "big" cores are back, and are now running no matter what
- The CPU temperatures don't rise above 50°C, even with intensive use

So... I guess that's it. It was unusable for 5 days, and now it's fine for no reason. My best guess is that it has something to do with the installed apps being optimized/compiled in the first few days after a factory reset, or the RAM compression being weird under certain circumstances, or some random thing getting stuck in an infinite loop somewhere. What's really strange is that the task manager applications I used wouldn't even report the CPU load being high, my phone would reach 95° while consistently saying that it's using ~19% of the CPU and the clocks were hovering around 600 MHz. No idea how accurate those numbers are without root access though, or if a program can even measure the resources being used by drivers and kernel-mode sh‎it.

Everything seems to be working fine now, so I suppose I'll report back if I have anything more constructive.

 

WJXXBSH

Senior Member
Dec 22, 2018
86
56
18
After a few days of using the ROM, I was going to make a post complaining about the scheduler/overclocking/voltage settings being too aggressive, but more on that later.

Immediately after I first installed it, I noticed that something felt off about how quickly my phone would heat up, and how unusually hot the back would get from seemingly mundane operations (installing an app, scrolling in a browser tab, etc). With extended use (20-30 minutes) things would quickly get ridiculous, with the buttons on the side getting hot enough to burn your hand. About as hot as the flashlight LED gets when you leave it running for an hour by accident, since Xiaomi in their infinite wisdom decided to pump enough voltage through this thing that would power a lightbulb. I had to find a metal surface to use as a heatsink and hold the phone against it, because I was afraid it would literally cook itself.

While investigating the issue further, I noticed the following:

- After a fresh reboot, doing something simple like opening this thread in Chrome and scrolling it up and down would cause the CPU temps to be stuck at 85-90 °C
- The two "big" cores would be permanently disabled, regardless of use (idle phone, screen off, listening to music in the background, playing a game, opening apps, etc., the cores would be shown as being in "deep sleep" 99% of the time)
- Predictably, the battery life would PLUMMET through the ground. I left my phone at ~40% as I went to sleep, by the time I woke up it was dead with 0% battery (this is on a freshly installed, genuine Xiaomi battery and no apps open on my phone), same with just using Chrome on a full charge (95% to 10% in about an hour)
- Turning the phone on, not even unlocking the screen and leaving it to charge to full would also cause it to heat up, seemingly from background processes (the sensors reported the battery to be at only 29°C, whereas the CPU was hovering around 50-60°C). The surface I left the phone on would also be hot underneath every time I checked, so I assume it stayed that way basically the entire time it was charging.


But what's REALLY weird is that right as I was about to post this, the issue seems to have magically disappeared overnight. I didn't install/uninstall/update anything, and my use case is exactly the same. I tried browsing this thread in Chrome, I tried to install some apps, I tried doing more intensive tasks, but I can't reproduce any of it.

- The "big" cores are back, and are now running no matter what
- The CPU temperatures don't rise above 50°C, even with intensive use

So... I guess that's it. It was unusable for 5 days, and now it's fine for no reason. My best guess is that it has something to do with the installed apps being optimized/compiled in the first few days after a factory reset, or the RAM compression being weird under certain circumstances, or some random thing getting stuck in an infinite loop somewhere. What's really strange is that the task manager applications I used wouldn't even report the CPU load being high, my phone would reach 95° while consistently saying that it's using ~19% of the CPU and the clocks were hovering around 600 MHz. No idea how accurate those numbers are without root access though, or if a program can even measure the resources being used by drivers and kernel-mode sh‎it.

Everything seems to be working fine now, so I suppose I'll report back if I have anything more constructive.

I'm sorry for the inconvenience things that happened to you, though It seems really strange. I use this rom on my only mobile phone (Mi-4c, 3/32) for days and nights, but it's hard to find these problems since the first stable version of lineage-17.1 roms.
Here are the things I know currently:
  • Due to bugs in EAS scheduler, the big/little cores couldn't be offline dynamically (if it's offline, it won't be back until a reboot), so they're always online.
  • Charging with original charger may get a slow charging speed, related errors could be seen in kernel logs (so this is the reason caused heavy CPU loads while charging?), but there is no way to fix it currently. Charging with USB is a lot faster and cooler than the origianl charger (that's the way I'm using).
  • The deep sleep mode should work most time, and the battery usage should be about 3% when I left my Mi-4c on my table from morning to night. However, there is exactly some reason that may break deep sleep (WLAN, USB charging, background apps, etc...). If you found the deep sleep time is 0% (though it's not easy to get this situation), a reboot is needed.
  • The thermal control profile is surely kind of aggressive than the one I used before (or in stock roms). My city in China is not hot for most time, so I may seldom notice the heating problem.
  • According to some feedbacks before, some kind of GAPPs may result in similar issue like this. I didn't install GAPPs on my device as Google is blocked in China, so I don't know much about it.
 

lizerome

Member
Jun 22, 2020
7
1
0
I'm sorry for the inconvenience things that happened to you, though It seems really strange. I use this rom on my only mobile phone (Mi-4c, 3/32) for days and nights, but it's hard to find these problems since the first stable version of lineage-17.1 roms.
Here are the things I know currently:
  • Due to bugs in EAS scheduler, the big/little cores couldn't be offline dynamically (if it's offline, it won't be back until a reboot), so they're always online.
  • Charging with original charger may get a slow charging speed, related errors could be seen in kernel logs (so this is the reason caused heavy CPU loads while charging?), but there is no way to fix it currently. Charging with USB is a lot faster and cooler than the origianl charger (that's the way I'm using).
  • The deep sleep mode should work most time, and the battery usage should be about 3% when I left my Mi-4c on my table from morning to night. However, there is exactly some reason that may break deep sleep (WLAN, USB charging, background apps, etc...). If you found the deep sleep time is 0% (though it's not easy to get this situation), a reboot is needed.
  • The thermal control profile is surely kind of aggressive than the one I used before (or in stock roms). My city in China is not hot for most time, so I may seldom notice the heating problem.
  • According to some feedbacks before, some kind of GAPPs may result in similar issue like this. I didn't install GAPPs on my device as Google is blocked in China, so I don't know much about it.
I was charging it with a regular wall charger (charging brick + cable), so that's possible. Ironically, I started doing that instead of plugging it into my computer because the phone straight up wouldn't charge from a USB port unless the proper drivers were installed on the computer, and even then it was hit and miss (even on the stock ROM). I'll try to get the kernel logs next time it happens, since that seems like a reasonable explanation.

Also to be clear about the deep sleep thing, both the small and the big cluster CAN enter deep sleep now, and spend about 50% of their time in it (I'm guessing when the screen is off and I leave the phone somewhere). The issue before was that the small cluster would spend 50% in deep sleep and 50% being active, but the big cluster would be in deep sleep for 99% of the time and active 1% (effectively disabled). I initially assumed this was the cause of the heating issues (the phone was trying to run everything on 4 cores instead of using fewer cores or distributing the load evenly), but it's likely to be unrelated, or just incidental.

Google Apps COULD be the issue, since I first noticed it when installing applications from the Play Store, and Google's virus scanner was enabled by default. It kept happening after I disabled it though, and the issue was seemingly fixed randomly after a reboot without me uninstalling anything or changing any settings. When I get around to reinstalling/updating the ROM, I'll skip GAPPS and see if I can get the issue to reproduce itself, just to rule it out.

The way it makes sense to me intuitively is that something was running on my phone which caused it to heat up to roughly 50°C on idle, so using any application would be added on top of that and push the phone into 90°C territory. That "something" could be Google Apps, error messages being spammed to logcat/dmesg, or a driver/module like zram. The only other explanation I could come up with is that the issue is the clock speeds themselves, but I didn't see anything obvious like the cores being permanently stuck at 1440 MHz or trying to reach ridiculous values that far exceed the stock limits. I'm kind of stupid for not looking at the logs when it happened, since it would make pinpointing the issue way easier. Then again, it kept happening for the better part of a week, so chances are the bug will come back eventually. If I find something useful, I'll let you know.
 

Kayoo80

Member
May 18, 2020
13
1
0
Hello. Sound drops, I have loaded lineage-17.1-20200612-UNOFFICIAL-libra. I do have some mods. I loaded nikgapps core, magisk and modules ainur, audio modification library, volume steps extender. Viper4Android won't run without some workaround so I haven't bothered, selinux related possibly. I have to reboot system to regain audio. It isn't continuous but it does happen randomly. Could reboot UI be added into advanced power options? Thank you.
Hello Gourcuff (Yoann???) ! Can you describe how could you install Ainur audio mod ? I didn't achieve it wi version 20200514 ! What is the exact zip file u use for Ainur ? Thanks from France !
 

WJXXBSH

Senior Member
Dec 22, 2018
86
56
18
Hello Gourcuff (Yoann???) ! Can you describe how could you install Ainur audio mod ? I didn't achieve it wi version 20200514 ! What is the exact zip file u use for Ainur ? Thanks from France !
Sorry for the inconvenience, but I never install audio mods on my device, I don't know much about it. I have heard that some audio mods could not be installed into this rom (like Viper4), or the driver didn't work after an installation. However, there are not enough information in the logs sent from users, so I don't know exactly what happened.
 

Kayoo80

Member
May 18, 2020
13
1
0
Sorry for the inconvenience, but I never install audio mods on my device, I don't know much about it. I have heard that some audio mods could not be installed into this rom (like Viper4), or the driver didn't work after an installation. However, there are not enough information in the logs sent from users, so I don't know exactly what happened.
Hello, I don't know how can i do to send logs...
 

Gourcuff14

Senior Member
Feb 19, 2018
94
4
8
Hello Gourcuff (Yoann???) ! Can you describe how could you install Ainur audio mod ? I didn't achieve it wi version 20200514 ! What is the exact zip file u use for Ainur ? Thanks from France !
Hello Kayoo80. Yes Yoann from Mr Aulas, Olympique Lyonnais :laugh: (Not to get confused I'm just using the username)

The modules are on Magisk. If they disappear have a look at the modules official website. Ainur website is

http://ainuraudio.ru/

Narsil is wide. Sauron a bit more compact.
 

lizerome

Member
Jun 22, 2020
7
1
0
Update:

After a bit of testing, it seems like the issues have nothing to do with each other (or at least they can happen independently), so I'm listing everything separately for the sake of clarity. I've rebooted the phone about 20 times so far, and I couldn't find any correlation between the issues and a cold boot, reboot, boot from charging screen or a boot from recovery (though iirc both of the "big cores disabled" cases I could reproduce so far happened after my phone reached 0%, I plugged in a charger and THEN booted the OS, so I'm trying that next). Most of these tests were done with airplane mode on, and no obvious resource draining applications in the background (Facebook, Discord, GPS tracking, etc). Nothing changed between each case besides me turning the phone on and off, nothing was installed, no settings were modified, nothing was disabled that wasn't before, etc.

As a side note, the "SOC" and "Battery" temperatures reported by the sensors are completely meaningless. I have never seen them at anything other than 29°/30°, whether I left the phone out in direct sunlight or a 2° fridge. It could also be DevCheck not knowing how to read the values correctly - either way, disregard those.

Issue: Phone gets 10-15°C hotter when charging
Explanation: Does NOT happen when charging from the USB port of a computer. DOES happen when charging from the USB port of a charging brick/adapter/outlet/powerbank, but not always. Has nothing to do with the cores being enabled or disabled. This is with the phone booted into the OS, I haven't tried testing it with the "battery screen" yet (turning off the phone completely, waking it up by plugging in the charger and letting it display the battery graphic without turning the phone on and booting the OS), or the stock MIUI ROM (could just be Qualcomm/Xiaomi weirdness which has nothing to do with this ROM).

Issue: Cores are unable to enter deep sleep
Explanation: Affects both little and big cores, though I couldn't get a scenario where both were enabled but only one of them couldn't enter sleep. This has the incidental side effect of raising the phone's idle temps by about as much as the battery charging issue (to roughly 50° at 0% CPU load), since the cores are always running at 302 MHz or higher, even with the screen off. This is SEPARATE from the battery issue, which happens regardless of the cores being online or able to enter sleep. Interestingly, charging the phone from a computer can temporarily cause this (both clusters CANNOT enter deep sleep while the phone is being charged, but CAN enter it once the cable is disconnected). I thought adb and developer options might be the cause of this at first, but it happens every time even if they're disabled (strangely, trying to open an adb shell connection to the phone and turning the screen off immediately makes it unusable, as if it was updating once every 15-20 seconds, exactly what you would expect if the phone was entering some sort of power save mode - yet it still reports the deep sleep time as 0:00:00 and the phone gets warmer than idle).

Issue: Big cores are unable to wake up from deep sleep
Explanation: Could potentially affect little cores as well, but once again I couldn't find a case where only the big cores were online. I also have cases where
1) big cores are offline, little cores cannot sleep
2) big cores are offline, little cores can sleep
3) big cores are online, both cannot sleep
4) big cores are online, both can sleep
so the cores being offline and unable to sleep are likely separate issues as well. (Edit: I should note as well that in both cases I've seen so far, the big cores don't just go offline and fail to wake up after some point, it's more like they start disabled, from the very first second the phone boots.)

Issue: Phone reaches dangerously high temperatures with light use
Explanation: Unfortunately I couldn't get this one to reproduce so far, the initial case was about reaching 96°C with only a Chrome tab open, and the big cores disabled. It's possible this was an edge case that happened as a result of the phone running at 100% CPU load for an extended period of time while also being charged. The highest I could reach since then was 80°, cores offline or not. Regardless, it would be nice to get to the bottom of this since it's arguably the most important issue of the four. I know SoCs adjust their clocks based on the thermal limits and <= 99° is still technically safe, but it's far hotter than I've ever seen this phone run in the 5+ years of me owning it and I'm not convinced Xiaomi actually specced this thing to withstand that temperature for multiple hours. The plastic covering the LED flash on the back of my phone is warped, literally deformed, because of the heat it was subjected to over the years.

Screenshots of three separate cases (open in a new tab):

https://i.imgur.com/4wVuwpR.png

On boot #1, the big cores were offline and the little cores couldn't ever enter sleep (during 8-9 hours of various use throughout the day, including with airplane mode on, every app closed, the screen turned off and the phone left on my desk for over an hour)
On boot #2, the temperatures rose to 45°-50° whenever the phone was connected to an AC charger. The back of the phone would be noticeably warm after half an hour of charging. Both core clusters were online and could sleep, the temps returned to idle after disconnecting the charger.
On boot #3, plugging the phone into a USB charger caused the cores to be unable to sleep. Disconnecting it from USB and trying an AC charger instead allowed the cores to sleep again, but strangely, this time it wouldn't cause a heating issue (the back of the phone was cold, CPU temps were the same as with USB charging)

dmesg and logcat dumps from every case are also attached, in case they have anything useful.
 
Last edited:
  • Like
Reactions: corwinux

WJXXBSH

Senior Member
Dec 22, 2018
86
56
18
Update:

After a bit of testing, it seems like the issues have nothing to do with each other (or at least they can happen independently), so I'm listing everything separately for the sake of clarity. I've rebooted the phone about 20 times so far, and I couldn't find any correlation between the issues and a cold boot, reboot, boot from charging screen or a boot from recovery (though iirc both of the "big cores disabled" cases I could reproduce so far happened after my phone reached 0%, I plugged in a charger and THEN booted the OS, so I'm trying that next). Most of these tests were done with airplane mode on, and no obvious resource draining applications in the background (Facebook, Discord, GPS tracking, etc). Nothing changed between each case besides me turning the phone on and off, nothing was installed, no settings were modified, nothing was disabled that wasn't before, etc.

As a side note, the "SOC" and "Battery" temperatures reported by the sensors are completely meaningless. I have never seen them at anything other than 29°/30°, whether I left the phone out in direct sunlight or a 2° fridge. It could also be DevCheck not knowing how to read the values correctly - either way, disregard those.

Issue: Phone gets 10-15°C hotter when charging
Explanation: Does NOT happen when charging from the USB port of a computer. DOES happen when charging from the USB port of a charging brick/adapter/outlet/powerbank, but not always. Has nothing to do with the cores being enabled or disabled. This is with the phone booted into the OS, I haven't tried testing it with the "battery screen" yet (turning off the phone completely, waking it up by plugging in the charger and letting it display the battery graphic without turning the phone on and booting the OS), or the stock MIUI ROM (could just be Qualcomm/Xiaomi weirdness which has nothing to do with this ROM).

Issue: Cores are unable to enter deep sleep
Explanation: Affects both little and big cores, though I couldn't get a scenario where both were enabled but only one of them couldn't enter sleep. This has the incidental side effect of raising the phone's idle temps by about as much as the battery charging issue (to roughly 50° at 0% CPU load), since the cores are always running at 302 MHz or higher, even with the screen off. This is SEPARATE from the battery issue, which happens regardless of the cores being online or able to enter sleep. Interestingly, charging the phone from a computer can temporarily cause this (both clusters CANNOT enter deep sleep while the phone is being charged, but CAN enter it once the cable is disconnected). I thought adb and developer options might be the cause of this at first, but it happens every time even if they're disabled (strangely, trying to open an adb shell connection to the phone and turning the screen off immediately makes it unusable, as if it was updating once every 15-20 seconds, exactly what you would expect if the phone was entering some sort of power save mode - yet it still reports the deep sleep time as 0:00:00 and the phone gets warmer than idle).

Issue: Big cores are unable to wake up from deep sleep
Explanation: Could potentially affect little cores as well, but once again I couldn't find a case where only the big cores were online. I also have cases where
1) big cores are offline, little cores cannot sleep
2) big cores are offline, little cores can sleep
3) big cores are online, both cannot sleep
4) big cores are online, both can sleep
so the cores being offline and unable to sleep are likely separate issues as well. (Edit: I should note as well that in both cases I've seen so far, the big cores don't just go offline and fail to wake up after some point, it's more like they start disabled, from the very first second the phone boots.)

Issue: Phone reaches dangerously high temperatures with light use
Explanation: Unfortunately I couldn't get this one to reproduce so far, the initial case was about reaching 96°C with only a Chrome tab open, and the big cores disabled. It's possible this was an edge case that happened as a result of the phone running at 100% CPU load for an extended period of time while also being charged. The highest I could reach since then was 80°, cores offline or not. Regardless, it would be nice to get to the bottom of this since it's arguably the most important issue of the four. I know SoCs adjust their clocks based on the thermal limits and <= 99° is still technically safe, but it's far hotter than I've ever seen this phone run in the 5+ years of me owning it and I'm not convinced Xiaomi actually specced this thing to withstand that temperature for multiple hours. The plastic covering the LED flash on the back of my phone is warped, literally deformed, because of the heat it was subjected to over the years.

Screenshots of three separate cases (open in a new tab):

https://i.imgur.com/4wVuwpR.png

On boot #1, the big cores were offline and the little cores couldn't ever enter sleep (during 8-9 hours of various use throughout the day, including with airplane mode on, every app closed, the screen turned off and the phone left on my desk for over an hour)
On boot #2, the temperatures rose to 45°-50° whenever the phone was connected to an AC charger. The back of the phone would be noticeably warm after half an hour of charging. Both core clusters were online and could sleep, the temps returned to idle after disconnecting the charger.
On boot #3, plugging the phone into a USB charger caused the cores to be unable to sleep. Disconnecting it from USB and trying an AC charger instead allowed the cores to sleep again, but strangely, this time it wouldn't cause a heating issue (the back of the phone was cold, CPU temps were the same as with USB charging)

dmesg and logcat dumps from every case are also attached, in case they have anything useful.
Thanks a lot for your detailed testing. I'm investigating on these problems, this reply may be updated later.

What I know for now
  • The "force USB quick charging" driver makes USB charging faster (even faster than original charger), but also makes it unable to deep sleep during this period.
  • According to the default core control configs, the big/little cores should be always online (see the value of "/sys/devices/system/cpu/cpux/core_ctl/min_cpus"), but it might also be offlined by thermal engine.
  • Airplane mode or Power saving mode (in "Settings-Battery") may cause it unable to deep sleep. Also, the mobile signal may show 0% for about 1 minute after boot. If you turn on Airplane mode at this time or there is a phone call coming in (even if it shows no signal, it has surely got signal, so phone calls and SMS could come in), the deep sleep mode may not work. WLAN could also affect deep sleep, but the possibility is low after April rom update.
 
Last edited:
  • Like
Reactions: corwinux
Our Apps
Get our official app!
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone