yashsingh1/xdaforums huggingface dataset:
[Xiaomi Mi 2] T3sla:
I have a problem with 03/01 kernel.Even in idle, without running any app after restart, cores 1 to 3 never go to sleep which is very odd cause even when browsing some cores always getting on that state.Things are getting weirder, if the screen goes off then 2 cores always are offline no matter what stress you put in cpu.This happens with every governor i guess cause i tried 4 of them.So for everyone who wants to reproduce the issue, restart, check core usage(all cores are awake), screen off for a few seconds, check core usage again(2 cores always offline, for me 2 and 3).If anything has to do with that, running pacrom-rc3 (not the latest nightly i know) clean rom installation.You can see that on the attached video, i'm using system monitor for cpu monitoring which has a floating window, very useful feature.
[Xiaomi Mi 2] Khaon:
Delete mpdecision and thermald located at system/bin and power.msm8960 system/lib/hw.

I removed intelli plug for Franco hot plug

Sent from my nexus 10
[Xiaomi Mi 2] T3sla:
I can't find these files, seems they are already deleted or never existed.Not just on these folders but everywhere.Maybe because i use pacrom...?

Edit : I was wrong, there is a thermald.conf file on system/etc.
[Xiaomi Mi 2] netweaver2009:
Hi,

I just updated my ROM and Kernel from today's Google drive versions (thanks for that, I hated the old location), wiped cache+DALVIK cache + reboot.

Now I'm in a reboot loop. I was on an XperianPro ROM version from October last year, with his last stable kernel, using f2fs.

I was also using an app to show, while booting (overlayed on the spinning circle), the logcat of dmesg. The developer said it might not be compatible with all kernels, Maybe that's the issue? Now I don't see the logcat anymore while booting ...

I'll restore my Nandroid backup somewhere at 5 PM (CET), if you want me to get some info from the system, let me know.

Merci pour ton travail!
[Xiaomi Mi 2] T3sla:
[MENTION=4577448]Khaon[/MENTION] deleting thermald.conf in system/etc doesn't help.
[Xiaomi Mi 2] Khaon:
I have corrected the deleting, if you want you can re download.

No it was /system/bin/mpdecision, /system/bin/thermald, /system/lib/hw/power.*
[Xiaomi Mi 2] Khaon:
You should have all the time two cores online, the rest being hotplugged.

Flashing my rom and then the kernel should work out of the box. What is your set up? f2fs on which partition? tdb or normal dual boot?
[Xiaomi Mi 2] Khaon:
Just run an antutu benchmark with default settings (interactive and hotplug enabled, interactive gpu governor) to see if qcom optimized libraries would yield a boost.

This is the score. Is that any good heh?
[Xiaomi Mi 2] netweaver2009:
f2fs: system+data. Standard setup.

Normal dual boot. I've not been near tbd in more than a year

Flashed using Philz Touch recovery, the one modified by XperianPro to support f2fs formatting etc ...

Any logfiles I need to check out? Maybe I can still get in using adb. Now I've pulled the battery since I couldn't silence the phone ... it kept auto rebooting :)
[Xiaomi Mi 2] Khaon:
Can you try twrp?

fastboot boot image.img

to boot instead of flashing a new one.(on mediafire for now)

So you flashed my cm ROM and then the latest files from the drive, right?

What you can do is give the output of(after flashing AnyKernel2 archive)

/tmp/anykernel/ramdisk/fstab.aries
/tmp/anykernel/ramdisk/init.aries.rc

It contains the new ramdisk anykernel should compute/patch.

We will see if something failed ( might be related to f2fs on system , some issue, I am running ext4 on system)
[Xiaomi Mi 2] T3sla:
Flashed the new one still doesn't work, only two cores are always online no matter what...
[Xiaomi Mi 2] Khaon:
It is normal to have all the time two cores online. But anyway franco's hotplug outperform intelli.
[Xiaomi Mi 2] T3sla:
The problem is it never uses all 4 cores even if i run antutu or other cpu stress apks.
[Xiaomi Mi 2] Khaon:
Indeed you are right! 3-4 hours ago I applied40 + commits from 3.4.105 branch, seems that is the culprit.

When I benchmarked earlier this morning, before those commits, the governor was behaving like it should be.

In my apps the cpu load is always 71%.(the hotplug goes on at 80++%).

I will look that later on, most likely will be fixed this evening
[Xiaomi Mi 2] T3sla:
After a restart and deleting cache and dalvic cache again seems to work now...:confused:Sorry for the trouble man...Btw there is big delay before the other two cores going online, is this controled by the governor?Is it possible to configure it?

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

Well from what i figured out it needs huge stress to bring them online.Try with Stabillity Test app.The good thing is we have great battery with 2 cores...
[Xiaomi Mi 2] netweaver2009:
Some (good) progress, flashing your anykernel 2.0 (today's one) via twrp produces a running system. the ROM starts and upgrades fine.

So there must be some kernel install dependency to the recovery used.

The look-and-feel speed (opening up folders +opening/closing apps, swiping etc...) is remarkably less than my previous ROM though. I don't see any reason yet to upgrade permanently. I'll keep playing with it for a while though, see how it evolves. Maybe the XperianPro ROMs are optimized (automatic OC + UV based on the specific CPU bin) already 'out of the box' while yours needs manual tweaking afterwards?

Thanks again.

EDIT: A few (as far as I can see now) apps (Flitsmeister, FlitsNav and Shell Motorist) failed to upgrade and now look 'unistalled'. Maybe because I'm having low memory, so not enough storage to upgrade. I'll reinstall them and see what happens. Does updating the ROM (and the subsequent update of all apps) have an impact on the individual user app storage requirements?

EDIT2 : I guess, looking at the previous discussion, I'm also running with the 2 core setup :D Hence the 'slower' speed. I'll follow the new builds when they arrive, since you're now supplying them via super easy Google Drive downloads.
[Xiaomi Mi 2] netweaver2009:
Seems there is something funny now with the ROM, Playstore app doesn't open anymore, no FC or other error message. Just black screen and back to home. When trying to install from the web, the app install doesn't work either. I still/now have 700 MB free, should be enough to continue. After restore of a Titanium Backup version of the Playstore app, I get the same funny behaviour. mmmm :( I'll get a minimal GAPPS package and flash that one. And I've found lots of other apps uninstalled.
[Xiaomi Mi 2] Khaon:
Well the dalvik-cache is located at /data/dalvik-cache . Is your phone almost full or the userdata partition ? You could resize /data or make a symlink at /data/dalvik-cache pointing to /cache/dalvik-cache for example.

When you install a rom it formats your /system partition where are located all gapps applications. You should use PA's GAPPS best around and update to date. You can grab there (PICO module is 88 mb only.
[Xiaomi Mi 2] netweaver2009:
I did install PA GApps. Some things got back to life, playstore is OK. Google contact sync needed disable/enable to get contacts to show up again, Google camera again FC while doing camera blur post-processing, as it did 3 months ago. Not a 100% positive experience so far. But I'm stubborn, I'll try to see this one through and fix what's needed. And I have a good backup ;)

---------- Post added at 08:36 PM ---------- Previous post was at 08:16 PM ----------

I had 700 MB free of the 4GB userdata.

I had expanded my system1 to +900MB (and reduced system2 accordingly of course) months ago. This funny behaviour I have not seen yet when dirty flashing roms of the same family. Anyway, I hope I have the 4 cpu cores back online soon. The other things are nuisances more than issues so far.
[Xiaomi Mi 2] Alecsandru90:
how about patching with the latest linux kernel patches for arm?
[Xiaomi Mi 2] Khaon:
Sure.. but which ones?

-----------------------------

I have restored for the time being intelli_plug I didnt have the time to look onto that matter.

Also, I have set the max screen off frequency to 918Mhz.
[Xiaomi Mi 2] T3sla:
So the kernel that is on google drive now is the new one?Just asking cause the name is the same.
[Xiaomi Mi 2] Khaon:
Yup, you can check the hour of edit :P
[Xiaomi Mi 2] T3sla:
Lol... i trust your word :P Too bad it didn't work.Is there any way to modify the hotplug parameters?It would be useful to make profiles depending on how much power or battery you want.
[Xiaomi Mi 2] Khaon:
You mean Franco? The issues come from a sys fs entry that holds the latest load computed. For some reason I noticed that this variable is incorrect. Was stuck at 70 %no matter what. I will check tmr what is breaking the code

If you ask how you can tunne intelli plug, its fs entries are located at sys/module/intelli_plug
[Xiaomi Mi 2] T3sla:
No i was asking about hotplug parameters for whenever it will be ready to be implemented in your kernels, just curious.Like the percentage when to kick in the other cores.But useful to know how to edit intelli plug parameters:good:
[Xiaomi Mi 2] Khaon:
new build online that fixes kitkat issues related to the ramdisk and with the cpu hotplugging.

changelog:

AnyKernel2:

correctly delete all lines from ramdisk related to the execution of mpdecision and thermal and doesn't set ondemand governor

Kernel:

intelli_plug updated to 3.9

switch back to intelli_plug until I fix mako_hotplug
[Xiaomi Mi 2] Khaon:
Ok! mako_hotplug fixed, there is two version on the repo one with intelli plug and the other with mako_hotplug.

For the next release, both will be integrated.

ONLY INTELLIMM INTELLIACTIVE, INTERACTIVE AND ONDEMAND are working with mako_hotplug
[Xiaomi Mi 2] Alecsandru90:
https://android.googlesource.com/kernel/common.git/+/experimental/android-3.14 or

https://www.codeaurora.org/cgit/quic/la/kernel/msm-3.14/

all of them?
[Xiaomi Mi 2] T3sla:
Ok mako hotplug seems to work fine:good:The only think i don't like with mako is that keeps always two cores online, intelli plug only one.Is there any way to change that and other parameters of hotplug?In trickstermod there is hotplug control but it doesn't work.
[Xiaomi Mi 2] Khaon:
Tu will take a look at it. Never looked at those branches.

Yeah dunno why trickster fails. You can use aero control or some other app.

Entries are located at sys/kernel/mako_hotplug

Sent from my nexus 10
[Xiaomi Mi 2] T3sla:
Nope....no such file/directory.I searched the whole / tree.Maybe something different with lolipop or pacrom...?
[Xiaomi Mi 2] Khaon:
my bad, the correct path is

/sys/devices/virtual/misc/mako_hotplug_control
[Xiaomi Mi 2] Khaon:
I made coexist mako_hotplug and intelli_plug together, their sysfs entries are located respectivly at

/sys/devices/virtual/misc/mako_hotplug_control
/sys/module/intelli_plug/parameters
[Xiaomi Mi 2] T3sla:
So we choose using some kind of app?
[Xiaomi Mi 2] Khaon:
You can use aero control and you can even add custom entries

I use trickster plus aero to access all features from apps

Edit : you can also setup a init.d script with the value of your liking.
[Xiaomi Mi 2] rasik80:
Hey Khaon thanks for the fantastic kernel!

I have one question: I see that someone reach 30k on Antutu. I am using your kernel overclocked to 2k and the pacman rom but I can't nearly reach that level.

Is there any particular setting I have to apply using Trickster or any other program?

thanks!
[Xiaomi Mi 2] netweaver2009:
Same here, even with the latest powerplug fixed kernel, the device feels clearly lesser smooth than with my older kernels out-of-the-box. It seems that the Khaon kernels potentially allows lots more tweaking and tuning and is a lot more up-to-date with fixes and patches but the default performance settings are not as 'smooth' and chewed on, as say the XperianPro kernels. So it depends more on the individuals tweaker's skill to get the most out of the device after installing the kernel. I experienced that before, that's why I kept going back to the XperianPro builds.

Maybe XperianPro tuned more towards performance vs battery life. And for sure more geared towards the casual Custom ROM/kernel users. I still think the effort he made getting the device to auto-tune (UV)voltages/(OC)frequencies based on specific device/CPU bin category had a very good impact, out of the box. I really wished people could combine efforts and thoughts and make a mix kernel, best of both worlds.

Doing an Antutu on XperianPro kernel cause the device to crash or FC sometimes, due to the undervolting he had applied. It was always recommended to push the voltages up on all frequencies before doing the benchmark. And even then the full (synthetic) benchmark potential could not be reached due to the thermal throttling kicking in. So benchmarking gives very little real life info. What really matter is the day to day working, smoothness, etc... Together with battery life!

Anyway, I'll see if I can improve things using 'Aero Kernel Control'. Any hints from people are very welcome.

Khaon, thanks again for all your effort!

PS. as meaningless as it might be, I did a Antutu 5.5 run, on the latest out of the box Khaon Kernel/ROM and I got a score of 27778 (max CPU speed 1700). At Max CPU speed 2100, the phone crashed. Default voltages too low I guess. I had to take the battery out to get it back to boot.
[Xiaomi Mi 2] T3sla:
First you have to disable thermal throtling which is a bit dangerous.Then overclock both cpu and gpu.You have to remember that Khaon uses f2fs as filesystem which gives some extra points.
[Xiaomi Mi 2] Khaon:
It was default setting with freq set to 1.89Ghz

What is default freq of gpu?

First I strongly suggest to those not running my latest ROM build to install this.

Also the rom itself and f2fs play a role with the score. I am releasing ROMs build with better flags but also more up to date compilers. Important libraries such bionic(libm, lib, etc) are part of the rom.

Like said @T3sla the thermal driver may reduce your frequencies during a benchmark due to the overheat. Don't default kernel comes with ondemand governor?

You may switch from bfq to fiops or deadline should bring better performance and enhance a bit battery consumption.

I made a mistake ksm is not enabled by default, you may enable it to icnrease performance until I release a new build.

interactive + fiops/sio is a good combo battery friendly and perf.

You may tune the hotplug driver to turn quicker the extra cores
[Xiaomi Mi 2] Khaon:
I have just uploaded a new build of my kernel.

I have increased L2 cache clocks speed. It should be more smooth, tell me if you notice any improvement.
[Xiaomi Mi 2] Alecsandru90:
how about uploading the lolipop kernel with same patches ?

have you looked over my links? wich patched can be used?
[Xiaomi Mi 2] Khaon:
Sorry forgot to upload that but since it is the same zImage, I will edit my script to build both.

I took a look to the repo's, the core of the patchsets comes from linaro. I know aurora dit a really good jobs for libraries etc but I don't think there will be much left to cherry-pick regarding kernels, but still, I looked into more.

I looked so far to qcom patch for arm and cpufreq's driver ( cpufreq + governors).
[Xiaomi Mi 2] rasik80:
Hi Khaon,

which one exactly? there are many zip files there

thanks!
[Xiaomi Mi 2] netweaver2009:
Thanks.

So I first reduced the GPU frequency to 320 MHz. Then I upped the max CPU frequency to 1998 MHz + I enabled KSM and switched to fiops IO Scheduler. CPU Governor I kept on Interactive. Antutu5.5 test result was 28259. A bit better. This was with the kernel with still the old L2 cache speed. I then made the changes stick at boot time in Aero, as it seems stable in this config.

I do think the phone 'feels' faster, could be placebo effect though :D I'll update now to the faster L2 cache kernel version and check again.

For fun I upped the GPU frequency to 400 MHz again (same other settings) and the phone crashed hard during benchmarking. So back to 320 Mhz for benchmarking. I'll keep it at 400 MHz for normal working. I was using f2fs on the XperianPro kernels too, so I'm used to the 'effect'.

The phone feels a bit warmer ... The voltage/frequency table probably could be tweaked further, as per XperianPro kernel. Any idea how to keep the GPU alive during a benchmark at 400 MHz?
[Xiaomi Mi 2] netweaver2009:
Update: the phone with the latest kernel, with faster L2 cache speed and previous Aero settings, feels nicer and snappier for sure, Antutu gives me a hard crash though, even with max GPU frequency of 320 MHz.

I don't really care, as long as the phone is stable with normal usage. I'm not a gamer so I'm not really having high sustained loads.

Day to day stabilty will have to prove itself over the coming days/weeks.

I'll also keep an eye on the battery consumption, with all the recent changes. It surely feels hotter to the touch after doing some stuff on it so I guess the battery will suffer.
[Xiaomi Mi 2] Beyaz66:
Does this mean that they both can be activated at the same time? Isn't it risky? In other words, should I only use one at most?
[Xiaomi Mi 2] Khaon:
Sorry I expressed myself badly. Original mako hotplug doesn't support enabling disabling. I just just allowed the user to switch from one to the other.

By default mako hotplug is enabled. Enabling both of them at the same time would be retarded
[Xiaomi Mi 2] netweaver2009:
New update, after getting the new Antutu 5.6 pushed just now, I ran it again and it succeeded this time fine. It ended up at 29885. Not bad, again with only 320MHz gpu speed. I had 1 unexpected reboot today. Battery life is clearly less but still manageable.
[Xiaomi Mi 2] Khaon:
I have increased cache speed for all frequencies above 1134 (included) Mhz. Thus those frequencies will requires higher voltage ofc. However I am not sure we will stick with this increase for all frequencies. But the gain is really worth at least on 1134 fre
[Xiaomi Mi 2] Beyaz66:
That is what good sense would. For safety, could you make the kernel automatically setting mako_hotplug_enabled to 0 when intelli_plug_active is set to 1, and, activating mako when intelliplug is turned of?

Worst thing: with jan 8th's kernel, screen doesn't go on after the screen is off for a while. Every time, the phone doesn't want to wake up. I've joined 2 last kmsg from when kernel was used without changing parameters.
[Xiaomi Mi 2] Khaon:
It is because your voltage is too low, you have to increase it since the cache speed have been increased.

I think I will lower the cache OC I think but will be still oced
[Xiaomi Mi 2] Alecsandru90:
how about using m1cha's audio libs for fixing the mic issue?
[Xiaomi Mi 2] Beyaz66:
I also tough the same thing. Increasing all voltages by 25mV didn't sufficed. Like you said, there's a balance to find between cache OCing and required power.
[Xiaomi Mi 2] Khaon:
Cm 12 build is already built with that.

Yeah me too some freq step requires more I think i will lower all cache freq for 1.5+++

Sent from my Xiaomi MI2s
[Xiaomi Mi 2] Alecsandru90:
if you use the same libs why the mic isn't working in your build and it does in m1cha's?
[Xiaomi Mi 2] rasik80:
Can you make 2 separate kernels one with higher clock and one with lower? I am using hour oc kernel and I neve experience any problem. I use gpu @ 500 and CPU @ 2000 [MENTION=293102]ND[/MENTION] never had a single crash or problem not even when benchmarking with antutu.
[Xiaomi Mi 2] Beyaz66:
And what will be the benefit of that for us? Or for you as you never had problem?
[Xiaomi Mi 2] Khaon:
I will ask micha probably his sources on github are not up to date. I am using his device tree from his personnal git.

Sent from my Xiaomi MI2s
[Xiaomi Mi 2] Khaon:
Kernel update

Hello little update to the kernel:

apq8064:final voltage for new L2 cache speed frequencies

merged with google's androidd 3.4 branch: squashed the following commits:

Merge remote-tracking branch 'common/android-3.4' into lollipop

ARM: pull in <asm/simd.h> from asm-generic

ARM: be strict about FP exceptions in kernel mode

ARM: move VFP init to an earlier boot stage

crypto: create generic version of ablk_helper

ARM: add support for kernel mode NEON

crypto: sha - Handle unaligned input data in generic sha256 and sha512.

crypto: sha512_generic - set cra_driver_name

crypto: sha512 - Expose generic sha512 routine to be callable from other modules

crypto: create generic version of ablk_helper

defconfig updated:enabled arm crypto

KEYS: Provide signature verification with an asymmetric key

KEYS: Asymmetric public-key algorithm crypto key subtype

KEYS: Implement asymmetric key type

crypto: add crypto_[un]register_shashes for [un]registering multiple shash entries at once

ARM: 8120/1: crypto: sha512: add ARM NEON implementation

ARM: 8119/1: crypto: sha1: add ARM NEON implementation

ARM: 8118/1: crypto: sha1/make use of common SHA-1 structures

crypto: arm-aes - fix encryption of unaligned data

CRYPTO: Fix more AES build errors

ARM: add .gitignore entry for aesbs-core.S

ARM: add support for bit sliced AES using NEON instructions

ARM: move AES typedefs and function prototypes to separate header

ARM: 7837/3: fix Thumb-2 bug in AES assembler code

ARM: 7723/1: crypto: sha1-armv4-large.S: fix SP handling

ARM: 7626/1: arm/crypto: Make asm SHA-1 and AES code Thumb-2 compatible

arm/crypto: Add optimized AES and SHA1 routines

sync with f2fs upstream branch

squashed few commits from CAF:

mm: vmscan: lock page on swap error in pageout

Staging: android: binder: More offset validation

Input: Send events one packet at a time

binder: NULL pointer reference

staging: binder: add vm_fault handler

staging: binder: Change binder mutex to rtmutex.

I have decreased new introduced L2 cache speed however they are still higher than they used to be. I have increased slightly the voltage of the L2 cache itself to prevent users having to apply a significative increase if the core voltage. You should need something like +12.5/+25 on 1.134GHz + freq steps and this build should be stabler than the previous one.
[Xiaomi Mi 2] T3sla:
Seeing some users complaining about Antutu scores i gave it a try myself.I run pacrom 20150106 nightly with anykernel2 06012015 kernel.First try default speeds, cpu 384-1728, gpu 400, both governors interactive, scheduler bfq, Antutu score 30068.Second try, cpu 384-1998, gpu 500 same rest of settings, Antutu score 32321.Thermal throttling was set at 85 C controled by intelliplug, i'm using ext4 partition and system is heavily undervolted.As you see i didn't even use performance governor or f2fs filesystem or other libraries that boost r/w performance and the scores are pretty high.So you must do something wrong, most probably thermal throttling is enabled.I wonder how scores would go with increased L2 cache speed...conclusion, kudos [MENTION=4577448]Khaon[/MENTION] for this great kernel!!
[Xiaomi Mi 2] T3sla:
[MENTION=4577448]Khaon[/MENTION] seeing you oc the L2 cache speed i wonder can we oc/uc other parts of the phone like ram?It's possible on some phones like the moto e.Changing voltage levels on these would be nice too.Also which of these libs are you using in your roms?
[Xiaomi Mi 2] Beyaz66:
Great proposal. RAM uc'ing would be the best next tweak to do.

If I'm not mistaking, he said that he uses dalvik from 1+1 (the only one compatible with CAF based roms and the latest) +bionic also from 1+1 from your link. You may try different bionics (as they are commutable) from here but this will not make huge gain, so wast of time. For CM (or any other CAF based) on Mi2, O+O dalv+bionic combinaison are good enough, if not the best compared to default libs.
[Xiaomi Mi 2] T3sla:
Thanx for clearing that up!About the ram subject i think it will be better if we can oc our ram.From my pc ocing experience ram doesn't consume much power so if the same principle apply on phones it won't hurt getting let's say 20-30% more speed.If not maybe we should stick with default settings or uv if possible.
[Xiaomi Mi 2] T3sla:
There is definitelly an increase in I/O database about 50%! and a smaller 10% in general with bionic and dalvic libs from One+One...not bad at all !