yashsingh1/xdaforums huggingface dataset:
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] paolo21r:
with global miui works perfect but with lineage and RR not work only this,the phone call all others works perfect
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] oatcooky:
I have the reverse experience. Now this Lineage works perfectly with a Pebble watch, previously Bluetooth would disconnect randomly if WiFi was on.
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] nijel8:
It always has been and it will be this way. Something works for some, doesn't for others.

It's Android with hundreds of hardware variations. Not like iOS with few devices and one watch.
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] sarthakwarlock:
Nicely said :)
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] oatcooky:
I'm getting some crazy results with CPU and core_ctl settings. The stock settings have the best performance *and* battery life compared to mat9v and zolaIII settings, the latter are slower and have slightly higher power consumption. Maybe it's related to what apps are frequently used - I've got Firefox, WeChat, WhatsApp, K9 and Writeily Pro always open, and I do a lot of reading and writing stuff on the phone.
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] branja6:
nijel8, is there a way that u can include slow-motion video mode in the default camera app?
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] nijel8:
What is Slow motion 90/120 FPS in back camera settings?
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] nijel8:
Need help confirming something for helium.

Please, disable core_ctl in settings, reboot, run for a while, let it sleep for a while, just run your phone as usual... Check with kernel app if all 4 big cores are online. Let me know.... Thanks.
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] Mabool:
Hi every body,

I'll installing this rom in my helium 4gb/128gb, but i have a last question before starting, i saw that this phone need to unlock bootloader, this is true ?

Where can i verify if the bootloader is unlocked ?

If i need to unlock it, i saw that an xiaomi's account is needing, but don't have it and don't want create one in this chineese company if possible, maybe have you an other solution ?

Thx for all and sorry for my beginner's question :)
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] valerio.tosti:
Hey nijel. I have helium. I did exactly what you wrote.

Here a screenshot.

I am not that experienced. Hope i could help
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] Mabool:
I test adb and i have this result :

fastboot flash recovery recovery.img

"target reported max download size of 536870912 bytes

sending 'recovery' (16404 KB)...

OKAY [ 0.534s]

writing 'recovery'...

FAILED (remote: Partition flashing is not allowed)

finished. total time: 0.539s"

That would like say i need to unlock my bootloader ?

Thx for your help
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] nijel8:
... or fallow the guides for flashing TWRP with locked bootloader and then you can flash whatever custom rom you want...
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] nijel8:
That helps... As I expected not all big cores are online as they should with core_ctl disabled. Now we need to find out why...

Let see if you can help. Open /system/build.prop with root access text editor and add these 2 lines:

ro.core_ctl_min_cpu=4
ro.core_ctl_max_cpu=4

Reboot, let it run for a while, post same screenshot.
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] Zola III:
I am very curious what whare you running in the background while taking that screanshot if you could recall?
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] valerio.tosti:
Im not 100% shure but i think just basic apps like facebook, and some luxembourgish news app
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] valerio.tosti:
Now after adding both lines in build prop

Naturally after rebooting and running for a while
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] Zola III:
Well I ask because utilisation looks horrible, first core is choking meaning something is also wrong with task migration logic & or packing...
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] valerio.tosti:
Ok i had in battery settings the batterysave on.

Now i have put it on balanced and it seems that core1 is ok now. See pic
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] nijel8:
Yeah, looks like all default kernel tunables are in play incl performance governor etc but something is messing up the big cluster on helium. I know perfd needs some core_ctl min/max-cpus to reset cores even without any hotplugging enabled. Strange thing is perfd should be disabled by default. Don't know what exactly is messed up with helium... This really needs more advanced debugging...
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] Zola III:
Well you can send me sched tunables applied as they are now if you wish I want to see what's wrong.
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] valerio.tosti:
I think that was my fault. I checked in cpu settings in kernel auditor and it was on performance. Now i put it on powersave.

Strange think i never played with kernel auditor settings.
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] branja6:
Didn't quite understood that but, yeah, I'm thinking about 120FPS 720p videos. I can't find setting for that in the default camera. Can U add it?
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] nijel8:
It's not about that. I want to know what's in play with core_ctl disabled and what is changing cpu sysfs tunables after boot if they are really changed at all. Looks like nothing from cpu.conf is applied and I am sure the script runs as it should at boot.

You know too much stuff to guide someone what to look for.

Unlock that damn bootloader and get on the train... :)
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] nijel8:
It's in there hence my question...
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] Mabool:
Thx for your answer.

I test 3 tutos and don't work, i think i'll reste in MIUI Rom :(

Have a nice day and at later.
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] branja6:
Hmmm...there is something definitely off. My default camera doesn't look anything lile that.
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] Zola III:
Well that battery save option is f*cked up it actually eats energy. Their are generally two approaches when tuning HMP sched depending of do you want to use hotplug when you go for reasonable task packing and distribution limits as you want plugged off core's not to get brought on to much (Sony configures it like that) & second one when you don't use hotplug all cores idle and then you want to distribute load as much as you can so you don't pack tasks at all when ever possible (Xiaomi use it like this). Both approaches have their ups and downs. I do prefer the first one.
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] nijel8:
Looks like replacement from gapps...
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] branja6:
Is there a way that I can install a version of camera that you have?
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] nijel8:
Dirty flash rom and don't flash stock or whatever full gapps you're using. Use gapps without camera.

You might need to format system to get rid of gapps restore script.
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] branja6:
Tnx nijel8! But, since I'm pretty much noob, U have to be waaaay more precise than this. :D

(ofc, if U have spare time)

What gapps variant is without camera and how to "format system to get rid of gapps restore script"??

sorry for bothering you
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] valerio.tosti:
Go on opengapps.org and choose android 7.1 pico. Normally that should do it.
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] HannibalLecter:
how did you manage this far without knowing how to format system.

Nijel is helpful but this is like asking him to sit you on his lap and feed you cerelac.

I do not mean to disrespect you but if you don't know this, then do not play the flashing game or else, read tutorials, watch videos before flashing anything.

if you do intend to play this, whenever posting bugs, specify what all did you flash and from where. (provide links too to get instant help)
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] pranavaryans:
He wrote "ofc, if you have spare time".

I found nothing like disrespect or anything in that language.

He simply wants to know many things if someone can help.

When a human child becomes 3-4 years older, they keeps asking everything due to their curiosity, and we give them proper answers so they gets the knowledge.

I think if we keep that "child" word in mind then all the problems will be solved automatically.

so please try to give answers if we can..

Thanks..
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] branja6:
[MENTION=7466743]HannibalLecter[/MENTION], I'm sorry if I offended anyone, but English is not my native language and it happens that I own an Android phone for the first time. I didn't quite understand what he meant by formatting the system. I know that you all guys (and girls) have lives of your own and problems outside of this forum and that you don't have time to explain things to every newbie that ask for help. I didn't want to disrespect anyone.

In the end, I succeeded in flashing and got what I wanted. Thank you for all the answers and information you provided and sorry for my bad English.
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] nijel8:
No problem. Search is your friend for basic questions answered many times already not just here. Google knows them all. :)

Glad you've managed it.:good:
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] HannibalLecter:
No Sir, you did not offend anyone. I feel great that you did not take my message as offensive too. I was genuinely concerned for your device because flashing without complete knowledge about the process can lead to bricked devices or loss of time and energy to get the device fixed.

It is really awesome that this is your first android device and you're on the flashing game.

I assure you that this is the best ROM for your device. :D So cheers to your journey.

Also, in the future, if you need any help (no matter how small or how big) please tag me. I will be there to help you to the best of my knowledge.

[MENTION=5581790]pranavaryans[/MENTION] never said he disrespected the dev or anyone else.

Either ways, will be looking forward to answering all types of questions from now.
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] nijel8:
Ok, let's try this again...

Need helium user to disable core_ctl and any battery saving profiles, reboot, make sure you are not running any custom cpu config for governor or core_ctl, download attached script to /sdcard and run these commands in terminal hitting ENTER after each line:

su

cp /sdcard/cpu.sh.txt /data

chmod 777 /data/cpu.sh.txt

sh /data/cpu.sh.txt

You will find cpu_helium.zip file in your internal storage, just attach it to your post. Thanks.
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] valerio.tosti:
Hey nijel yesterday i installed harfix kernel.

Can i do what you wrote with harfix kernel or not?

If not is there a possibility to have your kernel to flash?
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] rsrohit315:
Why is it so difficult for others developers to add Volte support in their roms? helium user

Only ur rom has Volte support for Helium.... ????

Can u please add substrates support in lineage for Helium..... Just a request
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] jpph:
here you go, not sure what do you mean with power saving profile. Mine is set to performance.
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] Zola III:
OK, that's as mostly it should be default without hotplug. Now let's see other side of the barging, upload containt of /proc/sys/kernel
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] jpph:
http://cloud.tapatalk.com/s/5946cb42caa6b/kernel.zip
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] Zola III:
Hire is one problem sched up migrate is set to 87 while down migrate is 85. My advice is up migrate should be 93 & down migrate to 78. MiUI uses 95 up & 85 down, default what you will find in documentation is 80 up & 60 down but that is little lossy for efficiency. They need to be reasonable far one from another...

---------- Post added at 09:19 PM ---------- Previous post was at 09:02 PM ----------

interesting sched small tasks is almost optimal set for use with hotplug to 30... default is 15.

Sched spill load is set to 100 which is default think 98 would be a better spot.

Sched up migrate min nice is set to its Unix default of 15 & it's advisable to adjust it to 9 so that background tasks that start at the nice lv of 10 never go up to big core's. Lol someone set /proc/sys/kernel/sched_init_task_load to 100? Default is 15 & with & without hotplug I wouldn't recommend going over 33.

Rest is mainly default & generally ok values as much as I sow quickly...

Edit:

If you want more detail explaining of how wrong & I'll those settings that I pointed out are I can provide you one. In the mean time it's important to change those & I don't want to know which way you do it (script, system config, power init...).
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] T.kum1993:
https://drive.google.com/file/d/0B_Aj1wtGS6ojdGRiMXc2cmFZVms/view?usp=drivesdk

Mi max helium nigel8's LineageOS
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] nijel8:
Just flash rom over again...

Mean the default balanced profile, performance is no good for my debugging to see why 2 extra helium cores not firing up with default settings but thanks anyway.
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] jpph:
ok here with balanced mode, and auto optimization off. http://cloud.tapatalk.com/s/5946dc4084668/cpu_helium.zip
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] nijel8:
I'll leave [MENTION=7466743]HannibalLecter[/MENTION] to answer this one:)
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] nijel8:
[MENTION=4400802]jpph[/MENTION] and [MENTION=6636248]T.kum1993[/MENTION]

Thank you, guys.

Cores looks goot, all online as they should be.

Wondering why I see screenshots and feedbacks with cores 6 and 7 being offline and not firing up!?:confused:
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] jpph:
myself I had the case on the previous version. After reboot, I had to enable and disable core_ctl to have all core online.
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] nijel8:
Feel free to correct/add anything and I will put it out for testing:good::

# Enable sched boost
write /proc/sys/kernel/sched_boost 1

# HMP scheduler (big.Little cluster related) settings
write /proc/sys/kernel/sched_upmigrate 87
write /proc/sys/kernel/sched_downmigrate 85
write /proc/sys/kernel/sched_window_stats_policy 2
write /proc/sys/kernel/sched_ravg_hist_size 5

# HMP Task packing settings for 8956
write /proc/sys/kernel/sched_small_task 30

write /proc/sys/kernel/sched_freq_inc_notify 400000
write /proc/sys/kernel/sched_freq_dec_notify 400000

# Enable timer migration to little cluster
write /proc/sys/kernel/power_aware_timer_migration 1

# Enable sched colocation and colocation inheritance
write /proc/sys/kernel/sched_grp_upmigrate 130
write /proc/sys/kernel/sched_grp_downmigrate 110
write /proc/sys/kernel/sched_enable_thread_grouping 1

# Additional sched
write /proc/sys/kernel/sched_spill_nr_run 3
write /proc/sys/kernel/sched_init_task_load 15

# set cpu_boost parameters
write /sys/module/cpu_boost/parameters/input_boost_freq "0:1017600 1:0 2:0 3:0 4:0 5:0"
write /sys/module/cpu_boost/parameters/input_boost_ms 200
write /proc/sys/kernel/sched_upmigrate_min_nice 9

write /proc/sys/kernel/sched_spill_load 98

I wish we could get EAS and not worry about these things...
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] nijel8:
If you ever encounter that situation again I would like you to run that script again so I get the idea why those cores are offline and find the offender...
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] Zola III:
For now correct those two & make it durable.

write /proc/sys/kernel/sched_upmigrate 93

write /proc/sys/kernel/sched_downmigrate 78

& this one;

write /proc/sys/kernel/sched_init_task_load 33

It's important that it stays above what is set in

write /proc/sys/kernel/sched_small_task

so that new processes isn't hold down when it starts (considered for a small task that is not allowed to migrate).

In couple of days when I am finished will send you a whole thing.

One more thing you can have doctoral thesis on MIT & you would be again ended up worried about this, it simply is complicated.
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] nijel8:
After 24 hrs testing these scheduler settings of yours I can say only one thing... WOW... Never seen so dramatic improvement in battery consumption from anything like this before. Basically 2x less... The big cores spents almost 100% of the wake time idling[MENTION=1989751]400[/MENTION]MHz which explains it all. Now I can see how much power we've wasted before for tasks that don't need to migrate to big cores at all. And all this without any performance drawbacks.

GREAT JOB!!! IMPRESSIVE...:good:
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] oatcooky:
Can I apply these settings using /system/etc/cpu/cpu.conf? I tried it and almost all settings work except for sched_init_task_load, that keeps going back to 100. I have to use EX Kernel Manager to change it manually.

Still trying these settings with Zola's power efficient governor settings. It's a little bit slower than stock but I don't mind, I want crazy battery life :)
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] Zola III:
I ain't done yet. Told you that is just to make it bearable. ;)

---------- Post added at 07:11 AM ---------- Previous post was at 07:06 AM ----------

Add this & then go load a couple of heavy pages in browser then tell me how it feels.

write /proc/sys/kernel/sched_heavy_task 78
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] E90 Commie:
Sounds excellent with those new settings. Would it be possible to add a flashable ZIP or is it just a question of copying and pasting the script using Root Explorer?
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] Zola III:
I won't be making any scripts nor flashes that's for certain. I leave all of that to "developers" or responsible power user's who do know what they are doing (most of the time at least).

So in your case you will need to manually add them (copy paste) in to init.qcom.power.rc (same goes for everyone else who isn't on nijel8 unofficial Lineage).

But as I stated before I am not done yet & future complications (for me) represents that approach differs for optimising for all cores active idling without whatsoever hotpluging (where you want as much as possible load balancing so no task packing) & when you use hotpluging (& want to achieve less calls for sleeping cores to jump in so reasonable task packing and groping is priority over load balancing). I do prefer second approach (with hotpluging) but not as Sony does it (only core 0 active idling & with tight task packing, which I found to extreme) but more power/performance/user experience oriented (2+2 idling & reasonable packing & task/load distribution, core topology, optimal frequency utilisation & cetera). I set my goals pretty much high when I say that I want to achieve better power/performance results than with power aware scheduler (that I don't have high opinion of).
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] E90 Commie:
Sounds good. I assume it is a matter of firing up Root Explorer and then cut and paste the script there without any problems.

I will give it a shot and thank you very much for your development work - you are extracting awesome power from this device.
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] Zola III:
I have future requests for kernel sched sub rutine integration. So this is addressed to [MENTION=5857684]TheStrix[/MENTION] [MENTION=4399618]nijel8[/MENTION] [MENTION=3292224]franciscofranco[/MENTION] & pretty much anyone else who does the kernel development for either RN3 or Mi Max.

https://partner.nameless-rom.org/gi...mmit/6e35cb2f06f764c8eedf4bee4941e919ac73dba4

Even this have CAF origin testing is certainly needed.

Goal is making sched_heavy_task much more relevant & useful. We can put frequency/load restrictions to per core trough regular interactive governor tunables but we also want to override those when when really heavy task happens (the one that will take xx% utilisation of the core where it's currently running & after more than one window not being utilised) so that it can really fast ramp up to meet it's actual performance demand & or make migration to more capable core more swift. Not only this situation happen often but the exhibited task behaviour is also common in every day use from well let's say anyone of us as web browsing. As you probably already know tick based schedulers are slow in ramping up so every little bit helps. This should be both power/performance better for such tasks that don't last for long duration of time (bigger apps launching, web pages loading & cetera) but we still need a restriction for medium tasks (which most are) especially in cases whit significant GPU load as rendering or gaming where we actually need to give more headroom to GPU so the sched_heavy_task tunable needs to be carefully set (which actually is a tricky part considering how inaccurate relative load calculation is). All do the "Web Browser Workload Characterization for Power

Management on HMP Platforms" academic work paper isn't the freshest one in the meantime nothing actually changed much so it's still relevant. In the meantime recommendation goes (& even afterwards) in increasing of the number of tracking windows number by increasing sched_ravg_hist_size from its default 5 (50ms) to 12 (120ms) all do I think 100ms should actually be enough I advise 120ms so that it at least can track last 3 governor ticket as most of you still like to keep it at 40ms (disregardles of UP down tunable difference).

At the end best regards I hope you will at least consider this.

---------- Post added at 11:38 AM ---------- Previous post was at 11:30 AM ----------

Yup pretty much... But make a backup of the original one before doing anything & edit a one that is already in flashable zip. I still use old school Total Commander mostly.
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] nijel8:
Not all of them, some will be overwritten b/c of the apply order init.qcom.power.rc. I might expose them as well, probably not needed, scheduler once tuned should work for all, it's not like governor or core_ctl which depends on usage pattern.

Waiting patiently... :)

I was a little too over excited last night seeing all that. But this still needs more testing with heavy tasks to see how they migrate and if there is performance issues if any. What I saw was with very light use, mostly idling but still impressive improvement. When this goes out this weekend we'll get more proper feedback.
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] oatcooky:
Hehe, weekend, I can't wait ;) I was thinking of just editing qcom.power.rc or whatever to effect these new settings.
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] nijel8:
Sure, you can, just unpack/repack boot.img.

Or just execute the attached script after boot. That's how I do it... :)
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] TechExhibeo:
Yeah this is just an assumption from user's side, OP should clearly mention about the sources and follow the rules of XDA

-TechExhibeo
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] Zola III:
Hardly an assumption & hardly from just a regular user.

I told you once & won't be doing it again kid didn't compile anything.

Better check the comments on your own mutual git repo instead acting as someone who doesn't know what is going on.