yashsingh1/xdaforums huggingface dataset:
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] grey77:
cpu.conf settings work as expected overall BUT

write /sys/devices/system/cpu/cpu4/core_ctl/min_cpus 0

keeps resetting to 2 after every restart. Re-setting this control upon boot via KA helps to override it.

Well, at least now it respects

/sys/devices/system/cpu/cpu4/core_ctl/not_preferred 0 0 0 0

I recall having to patch boot.img to change that value. Yes yes I know that 1 0 0 0 as well as setting cpu4/min_cpus to 1 might be preferable for stability and lag spike issues reduction.

PS: Ok,

write /sys/devices/system/cpu/cpu4/core_ctl/min_cpus 1
/sys/devices/system/cpu/cpu4/core_ctl/not_preferred 1 0 0 0

setting of 1 big cpu minimum seems to be respected and /sys/devices/system/cpu/cpu4/interactive/ folder stays permanent. so be it :)

PPS: Also the file seems to miss some settings compared to old setups. I don't think those r important ones and they seem to be set to default values somewhere else but nonetheless, just saying:

write /sys/devices/system/cpu/cpu0/core_ctl/offline_delay_ms 100
write /sys/devices/system/cpu/cpu0/core_ctl/is_big_cluster 0

# configure governor settings for little cluster
write /sys/devices/system/cpu/cpu0/cpufreq/interactive/timer_slack -1
write /sys/devices/system/cpu/cpu0/cpufreq/interactive/align_windows 0
write /sys/devices/system/cpu/cpu0/cpufreq/interactive/max_freq_hysteresis 0
write /sys/devices/system/cpu/cpu0/cpufreq/interactive/powersave_bias 0

# configure governor settings for big cluster
write /sys/devices/system/cpu/cpu4/cpufreq/interactive/timer_slack -1
write /sys/devices/system/cpu/cpu4/cpufreq/interactive/boost 0
write /sys/devices/system/cpu/cpu4/cpufreq/interactive/align_windows 0
write /sys/devices/system/cpu/cpu4/cpufreq/interactive/boostpulse_duration 80000
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] nijel8:
Only the tunables changed from kernel defaults are in the cpu.conf... Anything else up to you.

Not sure about min_cpus resetting to 2... have to check it out although might be happening on helium only for some reason and I can't debug helium...
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] grey77:
Ive tested ur patched App-Settings_7.1.2.apk.

Rotation and DPI per app works, but requires restart indeed. But it works! :D Previously I lost hope giving up on the idea of normal xposed usage on Nougat - there r so many xposed modules that miss proper Nougat updates still.

PS: Tested with WPS Office (I know, some apps behave weirdly).
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] Zola III:
You could use some reading:

https://xdaforums.com/mi-max/how-to/power-performance-kernel-tuning-tweaks-t3584897

Start reading from the end. I prefer 2+2 core setup with specific topology it's not the most power saving one (as it drives more in standby/idle) but it's best suitable in general. You also have it's rework in 1+4 form from Jerry08. It's my work & rather specific on many things feel free to pass it on PDA.ru if you wish. Scripts are fond on the first page in flashable form.
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] grey77:
[MENTION=4232632]Zola III[/MENTION], yeah Ive read many posts of urs (been reading this topic from time to time since 2016). Yet I do prefer battery life against all these 2+2 optimizations . Performance-wise Mi Max has more than enuf power for regular web/office browsing usage profile. I recall times when having 1 core @ 200 Mhz (out of 2 @ 1600Mhz) of Galaxy SII + custom scripts (cores control, undervoltage, governors) was pretty much enuf for the majority of tasks so I got used to some lag spikes at scrolling.
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] Zola III:
Addition while you ware absent are HPM sched setting's; medium task packing, higher initial task load & giving priority to the high priority tasks (one's using more than 78% of cpu) over all priority & tick scheduling. I am into this from Froyo days with single A5 Huawei U8110 but many things changed & not even quad core is always enough anymore... 2+2 in real usage doesn't spend much more than 1+4 & disregarding which you prefer I made effort that sleeping ones don't get initialised without a good reason. It's true big cores are overkill for simple tasks as reading but my intentions ware to create best possible setup for overly anything you could use also regarding app load and snappines as the part of user experience while also staying as battery friendly as possible.

Naturally you are free to charge it as you like but at least read HPM documentation first as I had unique approach in some things so it's relevant that you don't create conflicts by mismatched logic.

приветствие.
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] grey77:
I see. My case is making not 4+1 but rather little 1+big 0 making CPU starving for background threads under low load. I prefer deleting unnecessary background services (like crazy media scan for the whole disk space or google services), getting rid of non-optimized apps and limit CPU activity to less cores and lesser frequencies instead of optimizing bloatware mess with intellectual scheduling.

From what I've seen before, the solution based on excluding some or all cores from core_ctl logic via core_ctl/not_preferred doesn't seem solid. Ideally, that concept of CPU cache optimizations should be implemented in core_ctl logic itself.

I believe we ve been using them for quite some time

write /proc/sys/kernel/sched_upmigrate 85
write /proc/sys/kernel/sched_downmigrate 75
write /dev/cpuset/camera-daemon/cpus 0-3
write /sys/devices/system/cpu/cpu0/core_ctl/busy_up_thres 75

etc. I got all this HMP setup in my scripts since February as well. It works. CPU hungry camera is not freezing/crashing. It might feel somewhat laggy in a few apps but power consumption is low (smartphone feels slightly warmish/close to ambient temperature at reading).

EDIT: found ur post:

https://xdaforums.com/mi-max/help/whats-smart-cpu-efficiency-explain-t3673751

so news is we got a new patched kernel code for our old configs! =)

from ur post:

so basically all performance configs need at least 1 core of each cluster to be permanently enabled all the time due to that core`s offline to online latency time.

Anyways, I used to swap between a few CPU/GPU config profiles including another for gaming (balance between performance and thermal throttling) and one more for benchmarking (unlimited power for short duration tests). Ill read into ur suggested links thoroughly to make it way into performance profiles. :)
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] nijel8:
Works just fine with default cpu.conf and cpu4 min_cpus 0 and not_preferred 0 0 on my hydrogen. Should work on helium as well. Check your custom cpu.conf...

Not any Lineage... Official doesn't even have any load based hotplugging... Only overheat based one for big cores...
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] grey77:
Ive just tested it with default cpu.conf and those 2 lines changed. it boot-ups with Minimum CPU big: 0 (according to KA) and changes to 2 in a few minutes next time I come back to that KA tab... it might be a bug of KA itself, I made sure no KA`s autoloading profiles and/or apply on boot settings enabled it just changes to 2 sporadically while using KA.

EDIT: seems its KA related bug. It stays at 0 unless I start browsing KA tabs... I recorded a video - gimme a few mins to upload it.

here we go:

https://drive.google.com/file/d/1ErHdh6GkEiUTTkZWswCima2eYFSHHacW/view?usp=sharing

I implied Lineage os with ur valuable support for Mi Max ofc xD

Mi Max`s relatively small community has no bright custom ROM developers but u. U manage to visit every Mi Max discussion and often come up with a solution for issues others cannot fix. rant off, sorry. :)
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] facepainter:
I think the not_preferred setting has to be applied before you apply the min CPU=0 setting

---------- Post added at 05:13 PM ---------- Previous post was at 05:10 PM ----------

Actually think you might be right, I used to have a lot of trouble with KA and corectl, I think ka forcing the big cores on to read their state screws up the permissions
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] k4rn8g3:
Nope ..

Using ur latest build...

I clean flashed (with locked bootloader.) Helium 4/128
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] nijel8:
As far as I know KA has always been buggy... The good thing about it is it's open source so it's easy to fix specific device bugs if someone interested... I even thought about doing Mi Max specific build but don't really feel the need.

I use EX Kernel Manager btw, never had problems, use it only for gathering current state/info though... and for testing changes before I do them in ROM/kernel...
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] Zola III:
Well then you need to go with Sony AOSP settings which is only one permanent active core & high as possible task packing with mid process utilisation but it's not all that good around, certainly it's good for your usage scenario.

Their is a thing with both topology & 2+2. First one is each pair of course (0 & 1, 2 & 3...) share L2 cache & access to it so by configuring it to 1,0,1,0 per cluster you get non shared access & usage of all available L2 cache (performance difference is in 6~10% increase while power consumption is 5~6% more) you also get faster init of deep sleeping ones (as the L2 cache is already on) so it's a win, win scenario. Second part is two core's per cluster simply as most of the software is SMP & only per two core's this day's. So when you for example put only one big core active the SMP task will wait for init of the other one & use it anyway so you will actually lose on efficiency.

If you don't set up no cpu on per cluster you basically brick HPM scheduling and meaning of it as hotplug will always be late to accommodate currently issued task requirement and scheduler will issue it to the first available ready core which probably won't be ideal so it will be migrated (up, down, side) on the core's that hotplug bring on when they are ready.

So giving all possible problematic that is present I basically tried to make a possibly best operating environment for all around. If you dig true script you noticed /proc/sys/kernel/sched_heavy_task 78

Wile up migrate & down migrate is set to 93 & 78. It basically ignore tick scheduler (ondemand, interactive & cetera) rules for active marked queued tasks that cross the 78% utilisation in sched_ravg_hist_size time limit which I set to 12x 20ms. So that those tasks have headroom if migrated in the meantime & or can hit physical possible performance limit for a short period of time. The 78% is actually aggressive optimized ondemand default (80%). Finally it's also account in IO load in schedule calculations.

I collaborated with nijel8 regarding scheduler fixes & logic (as that whose a real priority) along with some other things like the recent WiFi CVE implementation. Never whose nor will be for to much drifting away from stable maintained base.

Sorry for the long elaborate which probably doesn't interest everyone around here.
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] facepainter:
Would you recommend this if you have hotplugging disabled?
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] Zola III:
Defaultly it's disabled (not used) & I described what it does along with other parameter that determines it's time frame (window).

Without hotpluging it's absolute job idle load placement & no packaging at all as it whose on MiUI 8 firmware. That & Sonys AOSP one core are opposite extreme ends of use patterns, my sits in between.
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] arbitrarygrill:
I noticed that load is being spread too heavily to the first core? What command would make load more spread out across other cores? It's causing my cpu to rarely be below 1ghz because it's using the first core to decide frequency
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] liguangming1981:
I just flashed this ROM for the second time after going back to MIUI for a while, and I have to say I'm much more satisfied this time - previously the battery life when using a VPN connection (vital for China) on this ROM was considerably worse than on MIUI, especially when connected to mobile data and not wireless. But now my battery usage with a VPN on this ROM is comparable to MIUI, if not better (around 13-14%/h screen on with mobile data according to AccuBattery). And this ROM is SO smooth - it really is fantastic. I doubt I'll be going back to MIUI again. Thanks so much, nijel.
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] Zola III:
[MENTION=4065413]grey77[/MENTION] it's in the fifth post:

https://xdaforums.com/showpost.php?p=71739624&postcount=5

Among other things tell me how files upmigration on it.
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] facepainter:
That's on purpose I think, to an extent it's better to clock a core slightly higher than to bring another online.
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] Zola III:
One GHz delta is optimal value for lithography this SoC's are made & we use boost on purpose to get there on any real load. First core will always be more utilised as most small & RT tasks start (& end there).
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] alez88:
Hello, I've got some signal issues, should I flash the firmware again?

Thanks.
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] shaglord:
Found three problems. Anyone got an idea?

1. Usb drives (tried two) won't become visible to apps. Only to the system files app. I tried both letting my file manager access the usb directly and I tried mounting with Stickmount and none work. Stickmount manages to find the usbStorage and says it's been mounted but going to that path (even through root explorer) there is no folder there. Just a weird looking file sd1 or something.

2. When installing the rom there is a huge problem. When gapps is installed (which you require to do only after a clean install) the initial setup connecting to networks always fail when google servers are blocked. I live in China but I still use google a lot through vpn. The install procedure needs to allow the user to skip the part where it connects and log in after a vpn connection can be set up. Which is after arriving to the home screen. (I had to install the phone 10 times before I realized it was gapps that caused the problem. As a workaround I had to set up a computer on my network to connect to a vpn and then share it's connection. Pop that ip in the phone as a gateway and then it worked. But what a nightmare! You might want to warn users with blocked servers that they are screwed if they install gapps.)

3. I'm on my home wifi and the phone always prompts me to sign in to my own wifi. It's annoying as hell. Must have something to do with google being used to check internet connectivity. The weird thing is it doesn't seem to disappear when connected to a vpn.

Otherwise I have to say the ROM looks and feels very promising. I want to thank the developer for the hard work.

To you other users. Have you found the use of xposed 88.2 to be acting weird in any way? I got it working with all modules except greenify which won't seem to recognize xposed.

/a
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] liguangming1981:
I also live in China and had the same issue as your second point. However, I managed to find an adb command that allowed me to disable the initial setup entirely so it just went straight to the home screen so I could install Shadowsocks and jump over the Great Firewall. But you're right -this is a major inconvenience for those of us in China, although it seems to be a Lineage thing rather than just a problem with this specific ROM.

As to your third point, I can't say that I've seen a similar problem. I've never been prompted to sign into my home wifi, either when my Shadowsocks is running or when it's not running.

I do have a question for you since you live in China: Do you have a China Unicom SIM card by any chance? If so, do you find that it doesn't get great signal strength with this ROM? I've got a China Mobile and a China Unicom SIM in my phone and the Unicom one always seems to have significantly lower signal strength than the Mobile one does.
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] facepainter:
I think USB drives are mounted under /mnt/mediarw/randomhash/.
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] shaglord:
Sorry I'm on china telecom and have never tried a china unicom.

Thanks for your input :)

/a
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] Zola III:
The used property libs & PNX micro kernel & RIL abstraction layer are from MiUI so the reception should be equal level. Rest is tied to your reception area... Regarding the rest you are barking on the wrong tree. Request (wishes) should be made to official Linuage on their own forum.

https://review.lineageos.org/#/c/178267/4/src/com/cyanogenmod/setupwizard/util/SetupWizardUtils.java

Best regards.
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] oatcooky:
Can you share the adb command? I travel frequently to China and setting up a new ROM with Gapps is always a hassle.

As for signal reception, I've found that China Telecom sometimes gets flaky 4G in crowded areas. The signal level bounces up and down and sometimes drops down to almost zero bars but mobile data still works.
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] nijel8:
Just for your information signal level(0+) doesn't matter much as long as you have steady data connection.... It matters a lot more for voice.
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] azizak:
any uptade?

Mi Max cihazımdan Tapatalk kullanılarak gönderildi
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] bdogan1912:
No. Final versions released devs preparing for the LOS15.
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] azizak:
did u test any Oreo rom? which rom is stable? i try some Oreo rom. ( aicp, omnirom, nitrogen). My sd crashed yesterday. it is not working now. and my camera is not work, my phone now battery drain fast. do u know any rom in Oreo, close to stabilization.

Mi Max cihazımdan Tapatalk kullanılarak gönderildi
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] bdogan1912:
Currently using [MENTION=2772810]dungphp[/MENTION]'s Lineage OS 15 unofficial build with [MENTION=4399618]nijel8[/MENTION]'s kernel. Battery drain is common issue and much likely to be fixed in incoming days. Other than that currently having youtube problem which videos not goes up from 240p kinda annoying. For now i am testing the ROM for him. You can test as well but just dont expect stabile oreo ROM for now. Most builds are on alpha or beta stage.
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] azizak:
which thread dungphp's Los 15?

Mi Max cihazımdan Tapatalk kullanılarak gönderildi
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] bdogan1912:
https://androidfilehost.com/?w=files&flid=214466 scro down you'll eventually see LOS15 builds both helium and hydrogen. Choose what suits you best. And install gapps from NitrogenOS test thread otherwise it causes problems with gapps. Follow the instryctions on NitrogenOS test thread and you'll be fine. Also i will send you nijel8s oreo kernel. Stock kernel causes slow connection and timeout errors.
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] HannibalLecter:
[MENTION=4399618]nijel8[/MENTION]

Knew something was going on in the background :P

If you could consider replacing Nougat sounds with Pixel 2 sounds.

thats quite minimal I would assume.

#HateNougatLOSsounds
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] Zola III:
Next weakened probably... It's far from over regarding N development and quite to early regarding O.

One more thing instead asking bold questions check both nijel8 repos along with Linuage changelog.
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] :
Just A Query

Does that mean that I can change DNS for mobile data using any build prop editor?​
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] nijel8:
Updated...

Thanks to [MENTION=4400802]jpph[/MENTION] we have more reliable and FAST download mirror for current releases. Don't forget to thank him!!!

I know AFH has been slow and hit and miss for some time... Last night had to upload firmwares a few times before they stick... PITA...

That is exactly what it means... Haven't tested it thou... Let me know...
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] :
I tried to change the DNS but it didn't work although I was using Harfix Kubix kernel. I don't know if changing the kernel have any effect on telephony settings.
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] nijel8:
Harfix Kubix kernel shouldn't but who knows...

Code looks right that's why I haven't tested it...

https://review.lineageos.org/#/c/184448/
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] :
Ok, I will test it again without Harfix Cubix Kernel. and report back.
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] HannibalLecter:
yes O is really really far away... N has another month at least.

RR and other custom ROM development teams have called their FINAL builds way too early.

8.1 is very different from 8.0 so those who started working on 8.0 have to re do many things for 8.1 :P
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] nijel8:
I doubt 8.0 will see official releases at all...

Only MIUI does X.0... lol...
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] Zola III:
Let's be realistic and say O will take 3-6 months more for beta stable/polished stable one's. 8.1 two to three months more.

& for a last time this & similar devices will only see queasy Oreo build's (as without kernel I won't call it a real thing). But that's not of a big importance as we won't see much of the vendor's push or persuade much direct update policy any way in the next year to year and half & in the mean time most of us will retire this good old serving horse anyway.

---------- Post added at 09:52 PM ---------- Previous post was at 09:45 PM ----------

Neither will MiUI... Their simply ain't compatable kernel for the bord... Their will probably be a Mi-UI upgrade of the things but not & Android version one. Sure their will be (probably even official) stable Linuage 15.xx builds but as you know it won't ever be a complete package.

On the other hand we (you & me) already did plenty (more than Xiaomi or Lineage or anyone else for that matter) regarding device.

Best regards.
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] Monsuta:
My phone charged at 2500mAh @ 4V on 10-28-17 build with clean flash, & the quick charge 3.0 green light didn't show(it used to show on more earlier build with the same QC3.0 charger & cable), and never charge @5V since last month (not sure if can charge at 5V before using QC 3.0 charger, didn't pay attention), my phone are acting weird?
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] nijel8:
2500mA is plenty, volts doesn't matter. QC3.0 max is 3000mA. Our kernel was limited to 1500mA for regular charger and 1800mA for QC charger in case hvdsp deemon can't negotiate better current. Now both limits are up to 2000mA.

For the light... Don't know, was/should work as expected if something in other framework parts didn't change...Setting ON? Toggle it, glitches happens...
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] oatcooky:
Oh well, plenty of good work done by folks on this thread and others to keep this workhorse device going. I usually change devices every 2 years and it's already 1.5 years in... I just might go for a Mi Max 2 because I focus more on battery life than performance but this big old slab will be sorely missed. It's sad that the Project Treble developments on separating kernel and firmware updates won't make it to this device. It's also sad that these very capable devices are treated as disposable when it wouldn't take much for manufacturers to keep the drivers updated. But then again, if people kept their phones for 3 years, the smartphone market would shrink drastically.