yashsingh1/xdaforums huggingface dataset:
[Xiaomi Mi 2] Beyaz66:
For me, his latest build is as stable as the previous one and I never had random reboots once the kernels were installed and system booted up as long as I wasn't playing/messing with settings.

BUT I have noticed some increase in heat production with the latest kernel on default settings. The entire screen is hotter, cpu+gpu and wifi antena areas on the back side too. Tuning CPU+hotplug(+ksm) according to my personal usage prevented this and allowed me to obtain more battery time (depending the usage) on both screen on&off.

Also, when khaon did changes to l2 cache speed, I observed a slight and noticeable improvement which made mutli tasking/transitions smoother.

I know I'm not really helping you, but in your same case (kk ROM,data/cache f2fs,khaon's kernel,xposed), I don't face to reboots.

Would you still upload me your modified mixer_paths.xml please?

[MENTION=4577448]Khaon[/MENTION] thank you for your help about pm sleep mode!

If you can keep in mound the sound errors reported in this post and just maintain things updated (f2fs especially,intellimm,hotplugs) in your kernel from time to time, we could continue to use it when m1cha's 5.1 CM will be ready and just because I prefer this kernel to any other and I won't go back to stock if not compatible with upcoming 5.1 Roms (if there will).
[Xiaomi Mi 2] T3sla:
Actually it's not exactly the same case since i'm using pacrom stable version instead of cm and ext4 instead of f2fs.Maybe it's rom related cause it's quite old, 31/12/2014 but i'm using it cause it doesn't have the famous sound bug and because of some nice features.Or maybe some governor tweaking is responsible although i doubt it.I don't think lowering boost speed a bit and increasing/lowering some timings could affect stability.

I didn't have the time to observe higher temperatures but i did observe slightly higher battery drain compared to 27/10 kernel, higher voltage settings maybe...Also i had a weird problem with opera browser, when changing tabs there was a long delay before viewing the newer tab while showing the previous.That's most probably opera's problem that happened to be fixed when changing to old kernel, weird coincidence nevertheless.

And here it is the modified mixer_paths.xml, i trust you know how to replace it properly (permissions etc.).
[Xiaomi Mi 2] Alecsandru90:
how about updating your kernel with ivan's sources for cm 12.1?
[Xiaomi Mi 2] Khaon:
Unless I am misstaken Ivan sources are CAF. I am not sure if a CAF based kernel would work on a cm ROM and vice versa ?

Any one to confirm this ?
[Xiaomi Mi 2] Alecsandru90:
his cm 12.1 responds to your question.

also, could you update your twrp for merged partitions?
[Xiaomi Mi 2] Khaon:
When I have access to my computer I will release a new kernel. I ll merge Ivan source but don't expect to gain much. I looked the github history. Basically you have already their extras patches.
[Xiaomi Mi 2] Khaon:
I have set a new build with mitwo-dev team merged sources. Does it work?
[Xiaomi Mi 2] bialabs:
Still freezes also with fiops. Mostly when I use Firefox. First days seemed ok but now no. Latest version is also for KK?
[Xiaomi Mi 2] Khaon:
No for lollipop. You could downgrade to a former kernel I guess for the time being.
[Xiaomi Mi 2] Beyaz66:
hi [MENTION=4577448]Khaon[/MENTION].

Does frandom need to be recompiled everytime the kernel is updated if it's build as a (separate) module?? Do you already have a ready to share .ko module? If so, I wouldn't (try) to prepare a vm machine just for compiling this.
[Xiaomi Mi 2] Khaon:
Frandom causes issues for WiFi on lollipop. But no you just need the .ko file to be compiled for your arch. Then it's code is loaded with insmod

I can build for you this module, it takes for me 40 secs to build a kernel . Just won't be able before tmr
[Xiaomi Mi 2] paul89rulez:
Hi xperian. Your lastest kernel dont work with mokee 5.1.1 :)
[Xiaomi Mi 2] Khaon:
It should work only!with cm based ROM. As far as I know it never worked with mokee
[Xiaomi Mi 2] paul89rulez:
ok thanks, i remebered that (used your kernel + rom until october), im back to mi2s now because my OPO is dead (-____-).
[Xiaomi Mi 2] CBpbxEcmecmBeH:
what did you do to your opo?
[Xiaomi Mi 2] paul89rulez:
Nothing, its dead, persistent random reboots, bad warranty support. Worst phone i ever had.
[Xiaomi Mi 2] Beyaz66:
Yep' do it please. That would be much easier for me !

[MENTION=4438984]T3sla[/MENTION]

Do you still try to make the updated kernel running stable for your device? Did you checked the value of "/sys/module/acpuclock_krait/parameters/boost". It should be "1" by default but you could invert it without UC'ing and see what happens.

See: https://android.googlesource.com/kernel/msm/+/9515bc2e3f22473b38a400f70e850912e986ba88
[Xiaomi Mi 2] Khaon:
When I got back home I ll build frandom as a kernel module. Please remind me if I forget to do this within 7 days
[Xiaomi Mi 2] T3sla:
No, i stopped experimenting cause i was too busy and needed the phone.Also i'm waiting for cm 12.1 which as i see just started to roll out.Since i have a rock stable phone i'll stay with the old one waiting patiently for cm 12.1.But thanx for the hint! Did mixer_paths.xml worked for you?
[Xiaomi Mi 2] acastrocab:
hi [MENTION=4577448]Khaon[/MENTION] now that m1cha has released his cm12.1 version improved would you update your kernel with the new code?and if this is true could you add double tap to wake?
[Xiaomi Mi 2] Beyaz66:
Hi. Could/would you do still it Khaon?

Yeah, I've just put it 2 minutes to see if it works correctly and I haven't noticed any misbehavior. But I still haven't find time to play with the original settings to suit my personal needs. Thanks again for the share!
[Xiaomi Mi 2] Khaon:
yeah gonna do that now.

Edit: this module should be working
[Xiaomi Mi 2] Beyaz66:
Thanks for this, 'haven't seen that at time. It doesn't work for thé kernel version (04.24.15 KK) I use. See dmesg

How can I bypass this?

Also, what is 'QBMS' ??? I've never managed to find something related to Linux/android except dmesg'es.
[Xiaomi Mi 2] Khaon:
did you try insmod?
[Xiaomi Mi 2] Beyaz66:
Yes. I've placed the module in /system/lib, verified permissions/ownership, in terminal: su, mounted system rw, then insmod /lib/modules/frandom.ko

..according to Ryuinforno's frandom launch script:

#!/system/bin/sh
insmod /system/lib/modules/frandom.ko
chmod 644 /dev/frandom
chmod 644 /dev/erandom
mv /dev/random /dev/random.ori
mv /dev/urandom /dev/urandom.ori
ln /dev/frandom /dev/random
chmod 644 /dev/random
ln /dev/erandom /dev/urandom
chmod 644 /dev/urandom

For some reason, I can't anymore upload attachements on xda from my smartphone and the previous one was deleted. So here again the part of dmesg related to this:https://drive.google.com/file/d/0B3M-qrHpOZtLY3pMNlBCMk90YlE/view?usp=sharing

EDIT: MODULE LOADED USING PUNCHMOD

Here's a little help if ever asked.

Download attached punchmod.zip from this post. THANKS to [MENTION=2899970]idcrisis[/MENTION]

Put punchmod from the downloaded zip to /system/bin . Make sure permissions are 755.

Download & Copy Khaon's frandom.ko to /system/lib/modules with permissions = 644.

Put this script in a file (named for ex as frandom_load.sh) and run it as root or copy it to initd folder for an execution at boot time:

#!/system/bin/sh

punchmod /system/lib/modules/frandom.ko ""
#insmod /system/lib/modules/frandom.ko
chmod 644 /dev/frandom
chmod 644 /dev/erandom
mv /dev/random /dev/random.ori
mv /dev/urandom /dev/urandom.ori
ln /dev/frandom /dev/random
chmod 644 /dev/random
ln /dev/erandom /dev/urandom
chmod 644 /dev/urandom

Once the script is executed or device rebooted (if You use initd way), check if the module is correctly loaded with:

#!/system/bin/sh

echo "Script to test frandom and urandom by Ryuinferno"
echo "Testing urandom with 10MB test..."
time head -c 10m /dev/urandom > /dev/null
echo "Testing frandom with 10MB test..."
time head -c 10m /dev/frandom > /dev/null
echo "Testing urandom with 20MB test..."
time head -c 20m /dev/urandom > /dev/null
echo "Testing frandom with 20MB test..."
time head -c 20m /dev/frandom > /dev/null
echo "Test done..."

#More
echo ""
echo "Loaded modules"
echo "TIP: look for frandom"
lsmod

echo ""
echo "Listing dev/ randoms"
echo "TIP: if random.ori and urandom.ori are present"
echo "and the second test was succesfull,"
echo "then frandom should work correctly."
ls -l /dev/*rand*

The first part gives speed test if frandom is loaded.

The second lists loaded modules.

The third lists randoms in /Dev. You should see random.ori and urandom.ori .

Could be tried on different Roms with similar kernels. But I don't recommend to try this on other devices even if the worst thing that could happen is a non booting system. It's up to You.

That said, [MENTION=4577448]Khaon[/MENTION], could you rebuild it without the vermagic ? That will avoid us all of this
[Xiaomi Mi 2] maximilianoh:
Any mirror?

Enviado desde mi MI 2S mediante Tapatalk
[Xiaomi Mi 2] antoniosavio96:
Any mirror? All the links are out.
[Xiaomi Mi 2] Khaon:
Indeed just meant it a shame that our display consume so much energy :(.
[Xiaomi Mi 2] Beyaz66:
Could someone tell me how to get cpu binning speed.

I've tried : su; dmesg | grep PVS

and also searched in last_kms for acpu strings but I've not found.

Thanks.

Edit: Ok, I've found it in last_kmsg. Sorry for this useless post.

For information I've bin=0 pvs=1 and undervolted cpu's global voltage up to -125mV 24h ago and all is good (your cm kernel+pacman rom). I'll try what paul89rulez did and more.

Do you think implementing uv'ed tables for each "type" of chips is feasable for an upcoming update ?
[Xiaomi Mi 2] paul89rulez:
This would be the best thing!
[Xiaomi Mi 2] oile:
Every chip is different
[Xiaomi Mi 2] Beyaz66:
That's why we're talking about 'type' of chips, and uv'ing would come with stable values for each devices. So everyone could benefit from a gain of battery especially when screen is on.
[Xiaomi Mi 2] Khaon:
I have no idea if it is a good idea to decrease those tablet default voltage. At the moment those are stock. Well however I could do that but I don't think users that install that kernel aren't aware of UVing.

But I could do something like -50 to certain step and -75 to lower ones. Well I ll think of it.
[Xiaomi Mi 2] paul89rulez:
Anykernel 2.0

http://xdaforums.com/showthread.php?t=2670512

Hope that this will help
[Xiaomi Mi 2] Khaon:
I am using that ATM, I just need to add extra command before repacking the ROM's kernel. At the moment, the updater-script just repack the ramdisk with the ROM's one. But the ramdisk itself need to be adjusted with current kernel's drivers if it is needed. I will try to do that by the end of the week.

Btw UV/OC/ GPU OC fixed are coming most likely in the evening.
[Xiaomi Mi 2] paul89rulez:
ok tnx :)
[Xiaomi Mi 2] Khaon:
kernel updated

hello everyone here is an update:

works only on cm based rom for now
[Xiaomi Mi 2] paul89rulez:
Improvments only for mi2 users?
[Xiaomi Mi 2] Beyaz66:
May I ask You all to tell us what's Your average cpu temperature and which chipset You are on (s4 or 600). My phone supports strangely very high undervolting (in lower frequencies) and cpu temp' is stable.

Here is the app I use for monitoring it.

For now I confirm that undervolting overall cpu voltage by -162.5mv is safe for me (. I'm already trying smaller voltages and if all is still stable after two days of use and stress test I'll share my volt' table.

[MENTION=4577448]Khaon[/MENTION] You also can add Pacman rom in the 'working on' list. Many thanks for your work
[Xiaomi Mi 2] Khaon:
Thank you! It is added.

Btw, DO NOT forget it is "irrelevant"to say WHaow I can do -XXXmv. It is my default values were very high you could have done for example way much more :D. The default values are Xiaomi's. Some kernel runs higher speed cache on few freq steps. I just mean it is more relevant to give the table.

However, sometimes I have the feeling the UV is not working: I tried-250 NO crash10% of the time I tried90% ofc full freeze, weird!

I ll try your app and report my results
[Xiaomi Mi 2] Alecsandru90:
pac-man and cm11 doesn't boot on mi2s, at least f2fs roms, latest kernel release
[Xiaomi Mi 2] Khaon:
which partitions were formated with f2fs ?
[Xiaomi Mi 2] Alecsandru90:
data and system
[Xiaomi Mi 2] Khaon:
I need to investigate why but the rom won't boot with data partition(UI think it is related with the patching of the fstab due to the dual partition). However cache partition formatted with f2fs should work. Just redirect data/dalvik-cache to /cachee

I:good:
[Xiaomi Mi 2] Khaon:
[MENTION=3642553]Alecsandru90[/MENTION]

I have modified an existing script linking the /data/dalvik-cache to /cache partition.

Just format it with f2fs and stay in ext4 for the data.

You can stay with ext4 on system kinda useless to run f2fs on it. System partition is read-only!Ext4 has speeder reading, however writes are faster.

My current setup :
[Xiaomi Mi 2] TiKaZz:
[MENTION=4577448]Khaon[/MENTION] possible to add support for paranoid? ?
[Xiaomi Mi 2] Khaon:
What kernel is para running?

Eventually( I am hoping on wed max depending on my free time) there will be a working solution for any rom.

EDIT

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

I will release a full "working" all f2fs kernel this evening. The rom mounts the data partition through a sh script. Option flags are targeting ext4 system so it will fail to mount properly the data partition.
[Xiaomi Mi 2] TiKaZz:
I have no idea actually, but I will wait until Wednesday then ?
[Xiaomi Mi 2] Khaon:
Give me a link:to the ROM I all checkout

Envoyé de mon Nexus 10 en utilisant Tapatalk
[Xiaomi Mi 2] TiKaZz:
http://aospal.com/aospal/roms/aries/

Here you go (-:
[Xiaomi Mi 2] paul89rulez:
Aospa is Aosp base.. i dont know if Khaon kernel will work :|
[Xiaomi Mi 2] Alecsandru90:
and why I°m getting higher performance in bechmarks? the phone feels faster , also battery last longer

the formatting isn't a option
[Xiaomi Mi 2] Khaon:
f2fs on /data and /cache with /system on ext4 is the best combo.

You will find some ressources in another thread of mine here
[Xiaomi Mi 2] paul89rulez:
Wow! So i don't need to convert roms tom f2fs! Thx khaon!
[Xiaomi Mi 2] Khaon:
Well it is up to you.

For example google is using f2fs only on the data partition for the moto x and g source
[Xiaomi Mi 2] oile:
ngs.android.pop eating my resources, seems related to kgsl-3d0

Kernel version 28.09
[Xiaomi Mi 2] Khaon:
Try the 02-10 kernel, there was one issue with gpu driver, report if your issue happens again.
[Xiaomi Mi 2] oile:
Actually I had tried the 02-10 but the phone didn't boot up (because of the default extreme OC) .

It could be that some modules remained from 02-10 back to 28-09 causing the problem ?

Please make a default boot up clock version, thanks :)
[Xiaomi Mi 2] Khaon:
By default 02-10 boots with max freq set to 1.7ghz( original clock nope?) and gpu to 400mhz.

EDIT

There were two different installer of that kernel build, sorry for that, but could you try the one you can find on media fire? It doesnt use any kernel default script since it is not really reliable( for now). This is shipped with CM ramdisk.
[Xiaomi Mi 2] oile:
Downloaded. Seems same md5 to me. Isn't it? I used the one you attached here
[Xiaomi Mi 2] Khaon:
Yes atm the one in attached in the same archive than the ones on mediafire( wasnt the case one or two days ago tho).

It is weird, what is exactly you issue? I have hard coded user policy max to 1728000. also gpu should boot at400mhz.
[Xiaomi Mi 2] oile:
Sometimes it bootloops, after it boots, it locks max frequency to 1728000. However is not staying always at 1728 max, sometimes I see it going over or under it. Some behaviour however was reported for Micha default kernel by mi2s users.

I use to lock Trickster MOD
[Xiaomi Mi 2] Khaon:
Your GPU freq and your voltage?

Envoyé de mon Nexus 10 en utilisant Tapatalk
[Xiaomi Mi 2] oile:
With the latest I locked my gpu frequency to 400. Voltages default at boot, Undervolting only after ten minutes and only to 1728, overclock frequencies are not undervolted.

If you can make a new version with default cpu frequency table and fixed gpu overclock libraries (like the 28-09 but fixed) it would be perfect

Thank you for your work and support!
[Xiaomi Mi 2] Khaon:
Have you got a MI 2 or mi2s

The thing is frequencies between 378 and 1.7ghz are stock. And since the device starts with stock min max freq it cann't be related to the cpu.

However the pl15 is oc. For now I can only think of that as source of your problems.

I will release tomorrow a new build with a dual boot binary at boot that use a personal mounting script instead of stock to mount the data partition. It will allow user to format any partition at their convenience
[Xiaomi Mi 2] oile:
Mi2s here.

You also introduced 216 as lowest frequency. Maybe that is causing problems too?

However a default clock version would be very appreciated.

In S600 SOC the adreno 320 was much underclocked so IMHO it could be more reasonable to OC gpu and not cpu as starting point.

However thank you so much for giving us the opportunity to try different things :)
[Xiaomi Mi 2] Khaon:
If you don't touch any thing to default cpu speed it won't matter if there is many more freq steps. Only if you use th them
[Xiaomi Mi 2] oile:
My device boots up with 216 - 2106. I have to lock them in order to have 384 - 1728
[Xiaomi Mi 2] Khaon:
Indeed 2106 might be too high weird my device boots with 384-1728 but if such an issue happens it is a real problem. What is your device and rom? I will look into that tomorrow or the day after tomorrow. Is your device mi2s?
[Xiaomi Mi 2] oile:
Mi2s cm11 version of 24-09 and 05-10 since yesterday . I see 2106 during boot, and sometimes I see 2106 even if 1728 is locked! This happens with FauxClock too (wich is supposed to use shakecramer).

Sometimes I see 1296 and 1512 mhz, while I'm doing nothing. But this happened with M1cha default kernel too also to other users.

Really strange indeed.

But it is no problem if it's not overclocked.

Ps. If you could add the intelli thermal throttling management it could become a perfect kernel.
[Xiaomi Mi 2] Khaon:
Until then I have sorted this out I'll share a build with default table then. I can add intelli thermal. Is it any good? Was removed in many custom kernel from what I have seen
[Xiaomi Mi 2] oile:
I've seen. Well, at least adding the option to turn off or increase throttling and Core shut down temperatures, would be great :)
[Xiaomi Mi 2] paul89rulez:
For me your kernel work perfectly at 2.1ghz (the one before the lastest one). Intellitermal is good, is fully customizable :)
[Xiaomi Mi 2] Beyaz66:
So here I am with the "strange" voltages tables I was talking about.

648000: 600000

702000: 600000

756000: 600000

810000: 600000

864000: 600000

918000: 600000

972000: 837500

1026000: 837500

1080000: 900000

1134000: 900000

1188000: 937500

1242000: 937500

1296000: 950000

1350000: 950000

1404000: 1012500

1458000: 1012500

1512000: 1037500

It took me near one week to achieve this and now I confirm that on my Mi2 (32Go, speed bin0, pvs1, 10/01 Pacman rom, kahon's 28/09 both CM and All Kernel, gov' intelliactive, interactuve or userspace (I hadn't runned enough time on ondemand to ensure that all is ok)) this UV'ing causes no crash, no lags, or other things and my phone still lives.

Each frequency was caped and tested for with usperspace gov at max brightness, launching a a game and cloud music while doing a 5min stability test app and then I switched to intelliactive for a half day of normal usage. Now the device runs for nearly 2 days on intelliactive between 384-1513mhz normally. No change was done in cpu hotplug, i/o shedulre, no init.d script or other tweaks.

I can say some things:

-As I have not done full battery charge/discharge and always was testing these voltages I hadn't and don't feel HUGE difference about battery draining except that it charges a little faster while screen is on. I'll post screen shots about battery stats when it will be ready.

-Phone runs smooth with high frequency capped between 702 and 1134mhz with settings I wrote about (and 240 apps) so -everyone here already now this- but don't ignore this if You want save more battery time.

-I also tried you're latest kernel but these voltages absolutely wont work and phone crashes. High frequ's voltages could nearly be the same, OC'ing works perfectly but UC'ing interesting me more however min stable voltages are much higher for lower frequencies. So this reason makes updating to this kernel useless for me. I will anyway see voltage limits with it.

-My biggest question is if THESE VOLTAGES ARE REALLY WORKING?!? I never saw volt' tables like this one for this devices so is there another way than openning vdd_levels for monitoring cpu's voltage in use?

-Also fauxSound is well implemented, works excellents combined with Viper and freshly received piston2

-I can't see interactive governor for the GPU in kernel manager apps.

-I repeat that putting BLX Mod in this kernel would be appreciatable.

-Another request would be integrating faux's coming intellimm governor.

-I like you're work man! Thanks again.

That all for now..
[Xiaomi Mi 2] T3sla:
I also wonder if those low voltages working.This is extreme undervolting.But then again if they're not working why does the phone crash if you lower them even further?It doesn't seem right not working for some values and working for others.
[Xiaomi Mi 2] Khaon:
Was more busy than I thought lately!

But here is last changelog

f2fs: updated to revision branch

aries: corrected the default max freq bouncing

intelli thermal : introducting, patched to upstream revision

aries : corrected voltage regulator !!! Voltage < 700 mV weren't correctly applied because of it.

I hope i have fixed your problem @oile : it should never go above 1.7ghz unless you change it manually.

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

On its way to be released :

Corrected dynamic mounting on /data partition

BLX mod
[Xiaomi Mi 2] Beyaz66:
[MENTION=4438984]T3sla[/MENTION] I agree with you. I could have see if it crashes if I could lower more but 600mV is the min. I'd like to add that there's still something I don't understand: for the 918mhz (for this exemple) I can down step by step up to 600mV but the device reboot immediately if I go under --don't remember exactly how much it was-- 837.5mV with 10/2's update.

Anyway, as [MENTION=4577448]Khaon[/MENTION] is one step ahead, I'll redo my UV'ing with today's update.
[Xiaomi Mi 2] oile:
Trying it now. Seems perfect now!
[Xiaomi Mi 2] Khaon:
Little update :

initial support for full f2fs: recompiled the dual_boot binary to mount data partition with a personal script (now you can format your data partition with f2fs formatter)

request: added driver for gamepad/joystick

intelli thermal enabled by default
[Xiaomi Mi 2] sh1n0da:
Boot loop for me with the last update. CM11
[Xiaomi Mi 2] oile:
Had a bootloop too with 05-10. Very strange, since it's working flawlessly.

I cannot seem to get good result on antutu, it's indicative but..who cares.

Thanks Khaon!
[Xiaomi Mi 2] Khaon:
I have sometime a boot loop at first reboot, but then it vanishes
[Xiaomi Mi 2] oile:
I continue to have bootloop. It's now 50% of every boot.

Could it be caused by Intelliplug or oc table?
[Xiaomi Mi 2] RadarNyan:
Hi there, my Mi2S(16G) is running official CM11 nightly (with official CM kernel) and I've been experiencing some issue that Minimum/Maximum CPU frequency doesn't work as expected: When I try to set Minimum CPU frequency, let's say 594MHz, it jumps right back to 384MHz; When I try to set Maximum CPU frequency, it works for a while but then it may jump to any random value, sometimes not even a selectable one. (I have checked "Set on bot" and I don't have "Enable per-app profiles" enabled, but it just doesn't work.)

:confused: So my question is, can I flash this kernel over the official CM? Is it gonna fix my issue with CPU frequency?

Thanks in advance.