yashsingh1/xdaforums huggingface dataset:
[Xiaomi Mi 2] Khaon:
Hm saddens me to hear that. You got issue only at boot right? Could you send me a logcat and dmseg of this occuring at boot? You got adb right as soon the rom boots.

I will in the meantime provide a kernel with no oc nor uv to see if the issue could come of that. If its the case will p*** me off :D

The issue of max frequency could be related to the thermal driver: if your phone becomes too hot, then it will try to decrease the temperature by decreasing the frequencies.

One of the fix you can do , is to force the freq( trickster allows you to do so). My kernel is regulating also the freq. when my devices is overheating- lkets say heavy bhencmark/stress test- it will decreases your freq.

I just set up min freq to 594Mhz, ran a pi benchmark, it stayed at 594, didnt come back to 384 mhz!

Basically this kernel is based on CM's with extra patches that introduces some new features, so it will definitely work.
[Xiaomi Mi 2] Khaon:
I have added a poll on the first page.

I using CM's unofficial nightlies on my nexus10 and ioami mi2 devices compiled by myself. The build used to do so is available here (if anyone want to see the flags used)

At the moment, both my nexus and xiaomi , are compiled with linaro's 4.8.x lastest toolchains.

Would do the release on a weekly basis.
[Xiaomi Mi 2] oile:
Khaon, how can I get logs if the device bootloop? Is it possible to grab it from recovery?

I think bootloop isn't caused by UV because if it is a too low voltage I will have it when using the phone. Also it boots up with standard voltage table, so not it.

I think it is not the gpu oc because 28-09 version has it and never bootloop.

The only add was the cpu oc table (also that 216 mhz could mess things up maybe) so I think the culprit is in there.

I had bootloop on 24-09 cm11 build so it could be not related to cm11 builds
[Xiaomi Mi 2] Khaon:
02-10 build hasnt the same gpu OC than 28-09.

Arf was thinking it was a non booting kernel instead of a bootloop. You could retrieve maybe last ksm from recovery tho.

I wonder if rm -rf all files in caches is realy working. Did you format /cache and wipe dalvik cache?
[Xiaomi Mi 2] oile:
Yes it wiped automatically cache and Dalvik.

If not from recovery, how can I do?

However yes, it is a non complete boot not a bootloop
[Xiaomi Mi 2] Khaon:
You can find answer to your question just here : http://xdaforums.com/showthread.php?t=2185929

(just need to connect to your pc through an usb cable while booting and from a cmd line enter those command)

I just have recompiled my kernel with default UC/OC tables.

Here it is. ( just booted on it).
[Xiaomi Mi 2] oile:
Tried it now.

Not booted. Turned off, reboot, not booted again.

When I connect to the pc it recognises Google nexus Adb, clockwork drivers, but Adb shell remain waiting for device.

Am I doing something wrong? Do I have to try other Adb drivers?

From recovery I clicked report error, but it saved me a log regarding recovery only.
[Xiaomi Mi 2] Khaon:
When you are on the recovery if you plug your phone to the computer, you have an access to adb, you can retrieve there for example last_ksmg

Have you got true dual boot enabled? Stuck on MI logo or cyanogen boot sequence?
[Xiaomi Mi 2] oile:
Tdb disabled (I never enabled it).

Pass mi logo, not passing cyanogenmod boot sequence, if I click power button it vibrates sometimes.
[Xiaomi Mi 2] Khaon:
Ok then you should have access to adb, unless the driver aren't installed correctly.

what does return to output

adb devices

I haven't neither tdb enabled. Your error seems to be related to one mounting point not correctly mounting.

What is the fs of your partition? Atm I am running /cache & /data with f2fs rest with ext4.

I ll format now to see if my devices is not booting with ext4.
[Xiaomi Mi 2] Khaon:
Ok I confirm

I could boot on /data and /cache partition formated with ext4 and with f2fs :D. Good at least this is correctly working. Last time in my life i flash to ext4 I guess on this devicexD

The only issue I could think of could be some script in the init.d, did you install the script moving dalvik-cache from /data to /cache??

Best would be that you manage to provide your logs
[Xiaomi Mi 2] oile:
Could you point me to the Adb drivers you use for mi2? Mine doesn't seem to be working. No devices recognised. I used aries toolkit from linuxx
[Xiaomi Mi 2] Khaon:
ewww I am on linux,

but using this and this on win
[Xiaomi Mi 2] Khaon:
Is there anyone using the kernel /cache and /data partition with f2fs?

BTW you can remove the dalvik-cache2cache from your init.d now! (unless you dont want to format your /data ...)
[Xiaomi Mi 2] oile:
Linuxx is a developer of xiaomi.eu xD I ll try your drivers, because when it is in bootloop I can't get it seen on windows, but when it is in CWM and correctly booted it works. I don't know why but is useless if not working when not booting
[Xiaomi Mi 2] oile:
Using that ADB Driver installer I got it working when bootloop!! :D

Really hope it helps! Whatever have you done from 09-10 to 10-10 makes a reproductable non-boot

So here it is the log
[Xiaomi Mi 2] Khaon:
When you are booting, you dont see a notification telling that a device has been plugged in(mi2 in this case)

Well then give me last_ksmg as soon you enter in the recovery( just check before in the first lines it is related to the correct kernel), I am not sure tho it will be the previous one.

Did you applied wipe cache then dalvik-cache in advanced settings? It seems that the delete from the edify scripts(it is the script that is exec when installing the zip in the recovery) is not enough, next builds won't be shipped with wiping cache for example
[Xiaomi Mi 2] Khaon:
OK good checking in, give me also a screenshot of

adb shell mount

Some of your partitions aren't mounted, how were formated system, data & cache?
[Xiaomi Mi 2] oile:
When do I have to do "Adb shell mount"? When it is bootlooping or it is good enough now that it is booted with 09-10?

Because this is my primary phone, I need it to be working for a while for my girlfriend :)

However never formatted nothing, always used Miui, wiui, cm11 vanillas
[Xiaomi Mi 2] Khaon:
adb shell

to go in the android-terminal during the non booting seq

then once in it just type

mount

Also (during boot seq aswell)

adb shell su -c dmesg > dmesg.log

would be very helpfull.

What annoys me is I have tried to reproduce your error by formating /data and /cache back to ext4(so like a new device) I could boot so I could with f2fs.

Just to be sure, sorry for asking again xD, did you format /cache & wipe dalvik? ( /cache is format upon "wipe cache" but wpiking dalvik cache requires you to go adv)
[Xiaomi Mi 2] oile:
It says "can't create dmesg.log Read Only file system

Attached screenshot of error and mount command

And yes of course I cleared dalvik from advanced alotough your last kernels do it correctly on their own

Let me know if I can do anything now, because I need my phone working in a few minutes
[Xiaomi Mi 2] Khaon:
Anyway the issue is /data isn't mounted properly. I guess your data is having ext4 as fs?

I ll have to go soonish aswell.

The only difference between 9-10 is that during the processing boot it should mounts correctly your data wheter it has been formated with f2fs or ext4.

For some reason it doesnt work, you can stick with 9-10 until i have sorted it out :x

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

Formated again my /data to be sure <_<, I ll kill my nand drive at this rate :D:D

rootfs on / type rootfs (ro,relatime)
tmpfs on /dev type tmpfs (rw,seclabel,nosuid,relatime,mode=755)
devpts on /dev/pts type devpts (rw,seclabel,relatime,mode=600)
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,seclabel,relatime)
selinuxfs on /sys/fs/selinux type selinuxfs (rw,relatime)
debugfs on /sys/kernel/debug type debugfs (rw,relatime)
none on /acct type cgroup (rw,relatime,cpuacct)
none on /sys/fs/cgroup type tmpfs (rw,seclabel,relatime,mode=750,gid=1000)
tmpfs on /mnt/asec type tmpfs (rw,seclabel,relatime,mode=755,gid=1000)
tmpfs on /mnt/obb type tmpfs (rw,seclabel,relatime,mode=755,gid=1000)
tmpfs on /mnt/fuse type tmpfs (rw,seclabel,relatime,mode=775,gid=1000)
none on /dev/cpuctl type cgroup (rw,relatime,cpu)
[B]/dev/block/platform/msm_sdcc.1/by-name/system on /system type ext4 (ro,seclabel,relatime,data=ordered)
/dev/block/platform/msm_sdcc.1/by-name/userdata on /data type ext4 (rw,seclabel,nosuid,nodev,noatime,data=ordered)
/dev/block/platform/msm_sdcc.1/by-name/cache on /cache type f2fs [/B](rw,seclabel,nosuid,nodev,noatime,nodiratime,background_gc=on,discard,user_xattr,acl,active_logs=6)
/dev/block/platform/msm_sdcc.1/by-name/persist on /persist type ext4 (rw,seclabel,nosuid,nodev,relatime,nodelalloc,data=ordered)
/dev/block/platform/msm_sdcc.1/by-name/modem on /firmware type vfat (ro,relatime,uid=1000,gid=1000,fmask=0337,dmask=0227,codepage=cp437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)
[Xiaomi Mi 2] oile:
I never formatted data in any way other than "default" ones in MIUI, WIUI, CM11 if they do it on their own .

Never used any formatting script.

Can I backup data, format to f2fs and restore on it? maybe it will be faster too

maybe if you have IM platforms you can reach me there
[Xiaomi Mi 2] Khaon:
Yes you can backup your data through an app(- like titanium backup) I AM NOT SURE BACKing up from recovery will work 100%.

You must format /cache (done with wipe cache in main menu) and wipe /data/dalvik-cache at each kernel flash however.

Check your PM
[Xiaomi Mi 2] Beyaz66:
From what I have experienced during kernel update to 10/09 and also pacman rom update to 10/09, I had problem with mounting /system partition as rw with some of my apps and also terminal emulator but no problem with some other. I've re-installed the mount binary and the issue dissapeared. Could it be related to what You're talking about?

Other thing: it seems there's something wrong either with fauxsound or with Viper. I hadn't looked at this deeply, so this is just an observation . All my sound settings change from Headset panel. Exemple: I want to modify Phone speaker settings, its panel does nothing, but Headset's does. Same with integrated DSP manager.
[Xiaomi Mi 2] Khaon:
Nope the only binary that has been modified so far is dualboot_init to load my /data mounting script.

Hm could the sound bug be simply because fauxsound and viper doesn't work well together? Is this happening with viper driver off?
[Xiaomi Mi 2] Riichard63:
I was facing a bootloop with last pdate even if I wiped cache and dalvik. So I had to push my update through sideload ^^
[Xiaomi Mi 2] Khaon:
Important update!

changelog :

To those that were experiencing issues with non booting devices it has been corrected. Also data and cache partition boots with ext4 or f2fs. ( didnt test with system)

User having TDB enabled might be having an error during the boot, please report if it the case!
[Xiaomi Mi 2] oile:
Formatted in f2fs with xperianPro recovery, Installed on system2 trough normal Cwm and everything is working really smooth!

Thanks a lot :)
[Xiaomi Mi 2] Khaon:
again little update:

@Beyaz66
[Xiaomi Mi 2] Beyaz66:
I'm confused. What was fixed for others brokes what was always working for me on your kernel: booting on system 2 with TDB enabled, changing active sys.

Kernel seems to force installation on sys 1. And when installed, it always boot on system 1 where I had WIUi which was formatted with it's datas.

Tell me what you need to see what's going on, i'll give it.

Too bad, was excited by BLN ;)
[Xiaomi Mi 2] Khaon:
Lastest version should at least be able to mount sys0 or sys1. Are you sure you have flashed lastest ?

If you have adb access during the boot, you can provide /fstab.aries /fstab.aries.patched /fstab.aries.system and an output of mount ( adb shell mount) and blkid. I have no idea how looks like the partition table with tdb enabled.
[Xiaomi Mi 2] Khaon:
Ok I have figured out the source of your problem. Well, I will release a version of my kernel only for TDB user until I have sorted out a workaround for both TDB users and non users. Will be online in one or two hours.:good:
[Xiaomi Mi 2] Beyaz66:
You're the fastest man!

I've made a mistake, fstabs and parted print come from pac withtout kernel changed to yours, but that doesn't matter.
[Xiaomi Mi 2] Khaon:
Ok this one should be working on TDB and ONLY.

I coded to make it universal with f2fs & ext4.

Hope it will be working first try :D
[Xiaomi Mi 2] Beyaz66:
I hoped too! This one bootloops. Any of the sys wants to boot..
[Xiaomi Mi 2] T3sla:
It's nice to see my request, BLE, being implemented :) Thanx Khaon, so far no problem at all with your kernel, i don't use TDB though.I wonder how BLE works, i set it on 85% and gsam battery monitor shows that charged till 100 and then drops about at 80%.If we leave the phone charging at which point will start charging again?How much % drop from BLE level will trigger charge again?
[Xiaomi Mi 2] Beyaz66:
My bootloops definitly comes from :

and not from your partition mounting scripts which all are supposed to make the device boot up.

Also I've seen data=ordered and not noauto_da_alloc as option for ext4 in your TDB partition mouting script, why?
[Xiaomi Mi 2] Khaon:
Indeed, those are MIUI mounting opts, will change that on next update.

I didn't see you edit your former post.

Ok, the dualboot_binary mounts itself sys0 or sys1 after outputing fstab.patched.system. Then call the script if it exits. Then init binary mounts fstab.patched.aries.

The issue you are having is just booting on sys0 whatever you choose in the recovery, right?

I will be busy the whole day and most likely tomorrow, but, then I take a deeper look at it. In the meantime, you can repack the ramdisk.

You can use this website just repack the newest with one that is working for you
[Xiaomi Mi 2] Beyaz66:
Here is my last try story

Sys0 Wiui KK installed after full wipe, so no user app

Sys1 PAC 10-15, +200 user apps

If I install 10-13 kernel (not modified for TDB) on sys1

Booting on sys1 launches pac without all my apps -only fx file explorer installed when I tried your kernel two days ago is here- and rom is like installed with factory reset. DualBoot Switch shows that I'm on sys0.

So I'm scared and try a boot on sys0. Wiui boots, no user app. Again DualBoot switch show active sys as sys0.

Then, I reinstall pac rom on sys1 and rom boots with all my apps (wiui is still present on the other side, no fx file explorer, no user app).

It's like I have two sys0, one mounting data0, the other a data0' and a sys1 which doesn't wants to do anything except being hidden when kahon kernel is installed on sys1. In french we tell that a BORDEL :)

I hoper this could help you seeing what I don't even understand.
[Xiaomi Mi 2] Khaon:
Well when the limit charging level has been reach it will "flag" the device is charged, hence cuf the charge. However, didn't test much so far, but seems either until you plugged back & in OR upon reboot it will charge again. What I do know, is I have my device most of the time plugged in to the computer, kinda happy to cut off the charging
[Xiaomi Mi 2] Khaon:
When you boot inside the recovery, it will check if you have tdb enabled or not, then it pastes mount_ext4.sh ( the content will depend on tdb enabled or not). Original dualboot_init looks for mount_ext4.sh and if it exits then it uses it. My dualboot_init loads my custom script. The one that is shipped with my kernel doesn't handle TDB on /data partition. That's why if you repack with a older or origianl ramdisk it should work
[Xiaomi Mi 2] enyx.es:
Hi there

Im using your 13-10 kernel version on gummy ROM and I have no WiFi. WiFi Mac is unknown 28-09 version worked all OK. Do you need any logs? Anything?
[Xiaomi Mi 2] Khaon:
This version uses any kernel right? If yes , it is most likely a ramdisk issue
[Xiaomi Mi 2] enyx.es:
Yup it was all kernel version... Should I flash stock kernel or.... Any course of action would be appreciated
[Xiaomi Mi 2] Khaon:
you can repack the ramdisk with a working one. repack

In the next day I will release again an all kernel version . Just busy for the time being.
[Xiaomi Mi 2] T3sla:
Thanx for explaining that.I have another small request, if it's possible of course.I'm trying to make conservative governor snappier but sampling_rate is limited at 200000.Can you edit that limit to let's say 20000 or 10000.I'm thinking that around 50000 will be the ideal but won't hurt if there is more room to tweak.The point is to increase frequency faster thus more responsive, but also faster decrease which saves battery, while using all the intermediate frequencies something that other governors don't do.And maybe after testing i could give you the settings and make your own conservative governor.Btw kernel so far rock stable, great work man!
[Xiaomi Mi 2] RyśRyszard:
Is there any chance for kernel working on MoKee OS?
[Xiaomi Mi 2] Beyaz66:
I'd like to. But every time I try, website give me "Uh-oh, something went wrong! The following errors occurred:

No Source image file was chosen. Please go back to the main page and try again." "Notice: Undefined index: source in /media/webserver/www/nibble/repack/repack.php on line 22" (tried from computer, phone, with different broswers)
[Xiaomi Mi 2] Beyaz66:
Would somebody repack a kernel from attached archives through this for me? I get an error when I do by myself.

Put pac boot.img as source

and kahon's as new please.

This request is also on xiaomi.eu. If someone else already did, no need to do it again.

Thanks.
[Xiaomi Mi 2] T3sla:
Same error, seems automatic process doesn't work well:confused:
[Xiaomi Mi 2] Khaon:
Hello have been busy lately. You can use then an offline tool to repack the ramdisk. You can use this http://xdaforums.com/showthread.php?t=2073775 or any other tool. I ll do it for you in few hours if you need

Envoyé de mon MI 2S en utilisant Tapatalk
[Xiaomi Mi 2] Khaon:
I just have repacked my kernel with the original PACMAN's ramdisk, won't work on any f2fs partition. However it will on TDB devices.
[Xiaomi Mi 2] sh1n0da:
Is it possible to have Double Tap to Wake?
[Xiaomi Mi 2] netweaver2009:
Dt2w was not v stable on Mi2s before, it caused overheating since the workaround to overcome lack of proper touch screen hardware, needed almost constant enabling of the touchscreen. So if you do put it in, please make it switched off by default. And able to enable afterwards if one really wanted. Thanks.
[Xiaomi Mi 2] Khaon:
Double tap drains more battery. I don't like it much but I could implement it and make it disabled by default.

Fast charge is the next thing I will add.

Thank you netweaver didn't know that.

Envoyé de mon MI 2S en utilisant Tapatalk
[Xiaomi Mi 2] T3sla:
I don't know if you saw my previous post so repeating just in case.Can you change the limit of sampling_rate on conservative governor from 200000 that it is now to 10000?Also there is a limit on BLE at 95%, can you change that to 100 cause from time to time it's good to charge at 100% for battery calibration reasons.Thanx again!
[Xiaomi Mi 2] sh1n0da:
Ok thanks if you can!

Nice work anyway
[Xiaomi Mi 2] paul89rulez:
why? It already work on pacman rom.. I'm running your kernel f2fs + alecsandru pacman f2fs rom from 1 week
[Xiaomi Mi 2] Khaon:
Indeed, I totally forgot, also I was really busy, I had already corrected the issue of max percentage from 95% to 100% on my github. I will compile now a new build with conservative's min sampling rate to 10000, and blx is already fixed.

I don't remember who said that WIFI was broken on pacman rom. Also there is an issue I didn't took time to correct for TDB users.
[Xiaomi Mi 2] Khaon:
New build online

New build online:

changelog:

fast charge: initial introduction- thanks to @faux123 for this.

BLX: corrected max battery extension max level

Conservative: decreased min_sampling_rate to 10000, sampling rate is equal to 40000 by default- request by @T3sla

Faux's fast charge sysfs interface is located here:

/sys/kernel/fast_charge

@T3sla

I could port [MENTION=4325945]ktoonsez[/MENTION]'s ktoonservative governor when I got time if you want, I guess it is working way much better then default one.
[Xiaomi Mi 2] Fortinho:
Some problem here.

Philz recovery, system, data & cache formatted in f2fs.

Wiped data, cache and davlik cache.

- Flashed ROM (Alecsandru's one), flashed GApps, flashed kernel (18/10) ----> bootloop (15 minutes on PAC loading logo);

- Flashed kernel (18/10), flashed ROM (Alecsandru's one), flashed GApps ----> bootloop (15 minutes on PAC loading logo).

What's wrong? Mabye is caused by TDB that was enabled on CWM?
[Xiaomi Mi 2] Khaon:
Sorry for that, one binary I edited in the ramdisk is not yet compatible with TDB.

you can use my kernel only with ext4 on TDB. But you will have to repack the ramdisk.

I will edit the OP and upload a working version for TDB and ext4 until I can make a full universal kernel

Envoyé de mon MI 2S en utilisant Tapatalk
[Xiaomi Mi 2] Fortinho:
So at the moment If I want to use F2FS first I have to disable TDB from CWM, am I right?
[Xiaomi Mi 2] Khaon:
Indeed, if it is not an issue to disable TDB. my kernel will work out of the box.

Atm i am using cm with data cache to f2fs

Envoyé de mon MI 2S en utilisant Tapatalk
[Xiaomi Mi 2] Beyaz66:
Many thanks for this. TDB works as it shoushould.

Someone said that wifi's not working, yes, but it was about Gummy rom.

Some nice changes since I wasn't here. I hope that fast charge comes disabled or can be disabled and soonly an universal kernel so you'll not need to repack your kernel just because I use TDB and others don't. Ktoonservative should make interests, that's the case for me.
[Xiaomi Mi 2] Khaon:
Fast charge is not enabled by default, very usefull when you connect your device on a USB3 port just to charge it.
[Xiaomi Mi 2] enyx.es:
I think that someone was me! [emoji12] Was broken in gummy ROM
[Xiaomi Mi 2] Khaon:
may you attach gummy's kernel image?
[Xiaomi Mi 2] enyx.es:
If you don't mind, ill upload it tomorrow. I'm out today
[Xiaomi Mi 2] Khaon:
Well depends on how fast you want me to take a look, I have the afternoon, I can download it if needed :p.
[Xiaomi Mi 2] paul89rulez:
Here you go, but is little old
[Xiaomi Mi 2] Khaon:
New build online

changelog

Kernel:

mm: Added filesystem dynamic read-ahead (Credits to Chad Gooldman)

block, bfq: add Early Queue Merge (EQM) to BFQ-v7r6 for 3.4.0

block: introduce the BFQ-v7r6 I/O sched for 3.4

Kernel not working on TDB kernels where data has f2fs as FS AND IF ROM IS BOOTING ON SYS2.

However, you can link dalvik-cache to /cache partition even if it has been formated with f2fs

Thought of a new workaround to mount enabled/disabled TDB where fs are either ext4 or f2fs. Stay tunned.

I just build a new CM Rom, however there is memory exceptions in some libraries, won't be available today most likely.
[Xiaomi Mi 2] Beyaz66:
It also doesn't work with TDB where data (and all other partitions) has EXT4 fs.

How is it possible to have

Sys0 Miui + data0 (where A, B, C apps are installed)

Sys1 PAC + data1 (with D, E, F apps)

and when one of the kernels not working with TDB is installed

always sys0 (that's not the question as it was already pointed before) + DATA3 with G H apps not coming from data0 or data1 ??

That means there's useless datas I should delete somewhere. Doesn't it?
[Xiaomi Mi 2] Khaon:
Yeah my bad, I just recalled reading your post the issue with current binary is failing mounting sys2, I had enabled TDB just to try out but my rom is installed on sys1.

Edited the post above and OP.
[Xiaomi Mi 2] Khaon:
@Beyaz66

I have repacked for you the pacman ramdisk so it load the correct binary to handle TDB on sys2.

I will re writte from scratch a script that handle f2fs & ext4 and also detects if it has to mount or mount + bind folder to partition. So w/e setup users will have(tdb , rom on sys2 with f2fs etc) it will work.

New ROM build online: nightly built 20/10

Currently being uploaded on mediafire
[Xiaomi Mi 2] Beyaz66:
I'll give it a try next hour in the train when download finishes. Thanks