yashsingh1/xdaforums huggingface dataset:
[Huawei P9 Lite ROMs, Kernels, Recoveries, & Other ] Avsky0:
20170406

Rebased on older, more stable Huawei sources (from 2016, everything else is the same)

Removed some of the debugging stuff from the kernel

Enabled Huawei hotplugging driver (it appears to only control big cores tho?)

20170405

UKSM patched to v0.1.2.6 again

Enabled/Disabled a lot of stuff in defconfig

Disabled mostly debugging stuff, which should result in slightly faster kernel.

Enabled a lot of USB drivers (so most stuff should work with Host Mode, if anyone ever uses that)

Enabled some missing Huawei code from older kernel sources, which I believe caused lowmem killer to go haywire, causing heavy apps to randomly close (I tested this one a bit, apps like Snapchat seem to no longer close, can never be sure)

20170404 - BUGFIX attempt

Rolled UKSM back to v0.1.2.3, should help with apps closing without any error

20170330

Removed Thunderplug, as it was causing freezes and bootloops (Huawei HMP doesn't like to have cores offline apparently), system should be stable now

Hotplugging will most likely return, with different driver or when Huawei releases 4.1 kernel sources.

My birthday release, yay, have a stable kernel everyone

20170329

Fix multiple lcd_notify calls

Protect against some hotplug race conditions

Run Thunderplug in per-core mode by default (gotta save the energy!)

Dynamic Fsync (ported to lcd_notify)

Fixes to backported UKSM (possibly fixes binder errors, apps not opening until reboot)

20170325

Initial release
[Huawei P9 Lite ROMs, Kernels, Recoveries, & Other ] RazOne:
Works with LineageOS 14.1?

---------- Post added at 10:11 AM ---------- Previous post was at 10:10 AM ----------

Or nougat not supported?
[Huawei P9 Lite ROMs, Kernels, Recoveries, & Other ] Avsky0:
Yes, I'm running it on LOS 14.1 right now.

If somebody could test it on stock and EMUI5 ROMs (just for the heck of it, keep backup) I'd be grateful.
[Huawei P9 Lite ROMs, Kernels, Recoveries, & Other ] Potato997:
Installed succesfully on L31 running Resurrection Remix nougat. I will try for a few days and report back feedback :)
[Huawei P9 Lite ROMs, Kernels, Recoveries, & Other ] SALVO9:
Will try it on EMUI 5 as soon as I have time.. very happy to see our device is getting devs' attention, keep up the good work!
[Huawei P9 Lite ROMs, Kernels, Recoveries, & Other ] object_120:
Good afternoon. Your modification will work on EMUI 4 ?

thank you

upd.: on EMUI 4 it worked

http://cs5-1.4pda.to/9967169/Screenshot_2017-03-26-14-54-33.png?e28279d161430a29fd16f793d314a066
[Huawei P9 Lite ROMs, Kernels, Recoveries, & Other ] Chisetdel31260:
Hello

I have tested on vns-l31c636b361 (nougat), it does not start blocking your device is booting now ....

(I think I forgot the root)

I will re-try with but I get it with dload c636b170.

New try, l31c636b170 (emui 4) + twrp meticulus, ok :good:
[Huawei P9 Lite ROMs, Kernels, Recoveries, & Other ] GuestK00238:
Flashed it more than a day ago, working great on LineageOS 14 (VNS-L31), yet to find any issues...
[Huawei P9 Lite ROMs, Kernels, Recoveries, & Other ] Thijs van Hal:
Wat does it really do haha? Saw "whats in" but dont really know what that means hahaha.
[Huawei P9 Lite ROMs, Kernels, Recoveries, & Other ] uspy:
Are you planning to add other CPU/ GPU governors?
[Huawei P9 Lite ROMs, Kernels, Recoveries, & Other ] Avsky0:
It's something I'd like to do at some point, but there are very few governors which are properly adapted to octacore devices and none so far worked out of the box with Huawei kernel. I'm keeping my eye mostly on ElementalX and Impulse, but they'll need changes to even compile.

For now stick with interactive, next release with thunderplug enabled by default will bring better battery life.
[Huawei P9 Lite ROMs, Kernels, Recoveries, & Other ] uspy:
It's really nice to hear that you are working on it. Thanks for your reply.
[Huawei P9 Lite ROMs, Kernels, Recoveries, & Other ] Avsky0:
20170329 release

New release is out! Note that I wasn't running on a new build for very long, so issues might still surface, keep a watch on this thread.

Changes:

Fix multiple lcd_notify calls

lcd_notifier call was implemented in wrong section of Huawei LCD driver, oops.

Protect against some hotplug race conditions

Stability fixes mostly, based on ThunderZap kernels.

Run Thunderplug in per-core mode by default (gotta save the energy!)

Due to how scheduling works in Huawei kernel, it might keep one or two big cores up after heavy load, but should be fine once the screen is turned off.

Dynamic Fsync (ported to lcd_notify)

I moved Dynamic Fsync (thanks faux123) to lcd_notify to avoid kernel bloat from powersuspend or earlysuspend (which are not present in the kernel).

Fixes to backported UKSM (possibly fixes binder errors, apps not opening until reboot)

My derp in commiting changes might have caused critical fail in Android Binder, which resulted in random reboots and new apps not opening. Tell me if anyone encounters it.

Overall this release should bring much better battery life and smoothness to the system (mostly thanks to dyn fsync).

Download: https://www.androidfilehost.com/?fid=673368273298943375
[Huawei P9 Lite ROMs, Kernels, Recoveries, & Other ] zgomot:
Settings crash, dialer crashes when dialing any number after flashing latest release.

Anyway to unflash, or fix this? I didn't do a twrp backup prior to this, but I did do a cache/dalvik wipe after flashing.

Will a factory reset fix this? Or maybe just wipe /system in twrp?

I'm running stock b170 on vnsl21, meticulus twrp, rooted with magisk. I also have systemless xposed installed, maybe there's a conflict?
[Huawei P9 Lite ROMs, Kernels, Recoveries, & Other ] Avsky0:
Ask someone for stock boot.img or extract it from huawei image.

Also logs, I need logs.
[Huawei P9 Lite ROMs, Kernels, Recoveries, & Other ] zgomot:
So then, would a fastboot flash boot boot.img work to uninstall the kernel?

edit: I was just about to instal catlog to provide logs, while going for another round of dalvik/cache wipe and guess what - it seems everything is ok now. Will keep you posted if any issues arise.
[Huawei P9 Lite ROMs, Kernels, Recoveries, & Other ] Avsky0:
Yes, that's how you flash kernel images. Also keep backup next time.
[Huawei P9 Lite ROMs, Kernels, Recoveries, & Other ] zgomot:
Also a question if I may. Would this kernel provide any benefits over the stock one if I don't install Kernel Adiutor and change any of the settings - basically just flash it and forget it?

edit: 2 questions if you could be so kind as to indulge me.

Does this modify haptic feedback? As it seems to me - either that or I'm crazy - that keyboard haptic feedback is different after flashing this. It's weaker and a little strange (?), however, navbar haptic feedback and other vibrations seem to be the same as with the stock kernel.

Thanks for your time

further edit for feedback: The fingerprint sensor is a bit iffy now. It's considerably slower sometimes, and generally slower and doesn't always vibrate on unlock, like 9/10 times it doesn't vibrate.
[Huawei P9 Lite ROMs, Kernels, Recoveries, & Other ] Potato997:
I flashed today's build and I noticed that only one core was active, and I can't turn on more than 4 cores so I can basically use 2 little and 2 big cores. Is this as it should be expected?
[Huawei P9 Lite ROMs, Kernels, Recoveries, & Other ] Avsky0:
No need to change anything, everything is set up by default. And no, haptic feedback isn't changed in any way. I didn't notice any changes in behaviour of finderprint scanner, maybe something in stock kernel is different compared to sources.
[Huawei P9 Lite ROMs, Kernels, Recoveries, & Other ] zgomot:
I think I might just decide to live with the slower fingerprint sensor. The haptic feedback doesn't bother me all that much. In the little time I have used it it does seem the device is somewhat a lot smoother.
[Huawei P9 Lite ROMs, Kernels, Recoveries, & Other ] Avsky0:
Thunderplug will switch off any CPU without load. It might be something iffy about scheduler, but I guess that there isn't enough stuff running to keep more cores active. You can run some multithreaded benchmark and try then.
[Huawei P9 Lite ROMs, Kernels, Recoveries, & Other ] :
The today's build is a little bit too funky for me... After boot I have expirienced a frezze, and i can't even get a log from adb... Even though my PC is enabled for debugging... After that i force rebooted and still same behaviour. I had to restore my full backup to recover, because just a boot partition recover seemed to bootloop my device (VNS-L31, LAOS14).

Now I'm thinking what could be a cause of this? Did i have to turn off the custom control (Thunderplug control from OP) or what?
[Huawei P9 Lite ROMs, Kernels, Recoveries, & Other ] Avsky0:
I had this happen, before the next freeze I managed to pull last_kmsg from the device, but it didn't show anything suspicious. Cold booting fixed it, so it seems that there was some bad stuff left in RAM after reboot? It also occured on LOS14, let's wait and see if it happens again or someone with stock reports the same problem.

edit: thunderplug setting is no longer needed, it runs in PERCORE by default. Unless you would like to switch it off of course.
[Huawei P9 Lite ROMs, Kernels, Recoveries, & Other ] :
Humm, i should probably try cold booting... I will try it later, and i will post if that fixes anything. :silly:

---------- Post added at 02:41 PM ---------- Previous post was at 02:38 PM ----------

Also off-topic here by cold booting you mean power down for a few minutes?

Because i did a hard restart (by holding the power button for 10s).

I'm asking because cold booting could be interpreted as hard restarting... So just to make things clear...
[Huawei P9 Lite ROMs, Kernels, Recoveries, & Other ] Avsky0:
Yeah, by cold booting I mean turning the device off after flashing new kernel and waiting a moment to let any possible leftovers fade away from RAM.
[Huawei P9 Lite ROMs, Kernels, Recoveries, & Other ] Potato997:
At first boot the phone was a little lagghish, but after a cache wipe in TWRP it is smooth. The only thing I noticed is that the double tap to wake in Meticulus's ROM does not work anymore, I'm running his Resurrection Remix nougat.

If you need some logs tell me :)
[Huawei P9 Lite ROMs, Kernels, Recoveries, & Other ] Avsky0:
Meticulus is using his own DT2W implementation. I didn't implement it, because there already seems to be one in Huawei drivers (although it's locked behind build.prop edits, someone on XDA explained it iirc) and I hate the idea of having 2 pieces of code doing the same thing. I might take a look at generic DT2W, S2W drivers once I figure out how to get rid of the Huawei one, but that's low on my priority list. For now we have fingerprint sensor to wake up the device, which is better imo, as it doesn't keep the screen awake.
[Huawei P9 Lite ROMs, Kernels, Recoveries, & Other ] Avsky0:
Fixed release

For anyone encountering problems, I uploaded a new release with reverted hotplugging changes. So far it seems good, but I can't be sure what caused bootloops, so for now I'm trying thunderplug-less kernel to see if that helps.

Download: https://www.androidfilehost.com/?fid=817550096634758440
[Huawei P9 Lite ROMs, Kernels, Recoveries, & Other ] Potato997:
I did not had any problem with the last Kernel, I only had a freeze and I had to force reboot the phone but do not know if it's because of the kernel or not. Apart from this episodes the kernel is stable and the battery life is improved. Even if it's still the second build it's already a good kernel, compliments :good:
[Huawei P9 Lite ROMs, Kernels, Recoveries, & Other ] object_120:
Version 29.03 - bug

network periods lost

EMUI 4

Thanks for the work
[Huawei P9 Lite ROMs, Kernels, Recoveries, & Other ] :
Build 30.3 seems stable for now. I flashed it and wiped the cache, it took a little bit longer to boot, but at least it didn't freeze. Also am I crazy, or did i just notice that my VNS-L31 got a lot faster. I can feel that it's a lot smoother to scroll. Or is it just placebo effect ?.
[Huawei P9 Lite ROMs, Kernels, Recoveries, & Other ] Avsky0:
It's built with Linaro, which is a huge boost. And it got dynamic fsync. And UKSM. Basically there's a lot less overhead when the screen is on.
[Huawei P9 Lite ROMs, Kernels, Recoveries, & Other ] zgomot:
Build 30.3 seems great. No freeze, no crash, haptic feedback is the same as stock, fingerprint sensor is as fast as stock.

The device is indeed a lot faster and smoother now, and when I say a lot, I mean a whole lot. Blazing fast.

Excellent work OP. Thanks.
[Huawei P9 Lite ROMs, Kernels, Recoveries, & Other ] simo255:
Anyone tried to flash it in nougat?
[Huawei P9 Lite ROMs, Kernels, Recoveries, & Other ] jordynisti:
I've tried in b336 with revolutionOS rc4 but in can't flash in revolution recovery, the installation fail
[Huawei P9 Lite ROMs, Kernels, Recoveries, & Other ] Avsky0:
Revolution recovery doesn't support loop devices afaik (which is what the installer uses), also any stock ROM newer than B336 is using 4.1 kernel, so things probably won't work. Huawei hasn't released new sources yet, so I can't do anything about that.
[Huawei P9 Lite ROMs, Kernels, Recoveries, & Other ] HassanMirza01:
Guyz,,, if this Kernel working on MM and Lineage ROMS then it wont wont run on Nougat as both MM and N have different structure,,, it could hardly be managed to support both MM and N at the same time but it will cause issues,,, Meticulus's roms all are based on MM even Lineage thats why same TWRP and Kernel can work on all his roms,,, also, for Nougat, Huawei didnot release its sources yet,,, we are waiting for sources from huawei :D :)

In the mean time,,, and for some basic features, you can use Elite kernel on Nougat devices.... Good Luck
[Huawei P9 Lite ROMs, Kernels, Recoveries, & Other ] jordynisti:
Yes i know, but in description avsky0 wrote "people reported working on EMUI 5"

I've only tried and reported mine experience
[Huawei P9 Lite ROMs, Kernels, Recoveries, & Other ] robi10101298:
With what this kernel can help my phone?
[Huawei P9 Lite ROMs, Kernels, Recoveries, & Other ] Potato997:
Read the first post.
[Huawei P9 Lite ROMs, Kernels, Recoveries, & Other ] robi10101298:
Flashed it, and my phone seems more stable... Also, resolved the issue with Google Camera where u couldn't upload photos to Instagram. Lineage OS 14
[Huawei P9 Lite ROMs, Kernels, Recoveries, & Other ] iSonik:
Works on Android 6 with PA. Only DM-vertiy is still n
[Huawei P9 Lite ROMs, Kernels, Recoveries, & Other ] tw1st3d83:
Hey man, i flashed last night Veno kernel on my phone running Resurrection Remix nougat from meticulus, everything was fine, the flashing, booting, phone is snappier, battery is way better than on "stock" RR kernel but apps started to close down, it is not like they FC with error message, they just kick me back to home screen...

Any idea what to do to stop this from hapening?
[Huawei P9 Lite ROMs, Kernels, Recoveries, & Other ] buhanita:
Is this working with L21C432B170 stock? I will unlock bootloader and install twrp and root before flashing...
[Huawei P9 Lite ROMs, Kernels, Recoveries, & Other ] zgomot:
It is working.
[Huawei P9 Lite ROMs, Kernels, Recoveries, & Other ] Avsky0:
I never had this happen, maybe sometimes with Snapchat app, but it's crap to begin with. That seems more like an issue with android low memory killer, did you apply any custom settings to it?
[Huawei P9 Lite ROMs, Kernels, Recoveries, & Other ] tw1st3d83:
no i did not, i use default settings for kernels, dont like to change anything becouse i beleve that you optimized it the way it should be... it seems that happens only with "heavy" apps like facebook or substratum when compiling, google+ and some games...

EDIT: I tried to get the log but there are no rule when this "kick out" is gonna happen so i did not managed to get any log yet.
[Huawei P9 Lite ROMs, Kernels, Recoveries, & Other ] Potato997:
I had experienced it too, also camera stop working very often. I will stick with stock kernel as now
[Huawei P9 Lite ROMs, Kernels, Recoveries, & Other ] Avsky0:
Yeah the lack of any kind of error message is weird. Guess I'll have to try randomly reverting changes until it works again.

I intend to work more on the kernel again once new sources are available, as new version might be more compatible with some neat patches.
[Huawei P9 Lite ROMs, Kernels, Recoveries, & Other ] buhanita:
But with stock L21C432B170 it's everything working?
[Huawei P9 Lite ROMs, Kernels, Recoveries, & Other ] zgomot:
Yes, everything works fine.
[Huawei P9 Lite ROMs, Kernels, Recoveries, & Other ] Avsky0:
I think I found the cause for apps closing and camera sometimes not working. It seems race protection changes in new UKSM are causing regressions in older kernel sources. Should have a new "old" build ready soon.

EDIT: Fixed build is up, can anyone confirm that problems no longer persist?
[Huawei P9 Lite ROMs, Kernels, Recoveries, & Other ] zgomot:
After a few days of using the 30.03 build with no issues at all, I just had a first random reboot.

What's the best way to go about getting logs next time this happens? After the reboot? I did nothing particularly odd when it happened, was just browsing the XDA app.
[Huawei P9 Lite ROMs, Kernels, Recoveries, & Other ] Avsky0:
Neat way is to create an init script like this

#!/system/bin/sh
cat /sys/fs/pstore/console-ramoops > /cache/last_kmsg.log

And then copying that file from cache after reboot happens.

If your ROM doesn't support init scripts, then it's best to do it manually from terminal or ADB shell:

cat /sys/fs/pstore/console-ramoops > /sdcard/kmsg.log

Stock Huawei ROMs need root to read it iirc, move to su before trying to copy the log.
[Huawei P9 Lite ROMs, Kernels, Recoveries, & Other ] zgomot:
I'm not sure what you mean by "move to su before trying to copy the log"
[Huawei P9 Lite ROMs, Kernels, Recoveries, & Other ] Avsky0:
Enter "su" command, so you can enter commands as root. Also check out new release, I think I've got the problem down, since I can't reproduce it anymore.

EDIT: It seems to still be there, yet no errors in kmsg. I don't have time to check out logcat right now, I welcome everyone to take a crack at it.
[Huawei P9 Lite ROMs, Kernels, Recoveries, & Other ] zgomot:
Oh, ok, I get it now.

Also yay for new realease.
[Huawei P9 Lite ROMs, Kernels, Recoveries, & Other ] :
I see no difference with the 4.4 version. (I was on build 30.3).

Edit: The device seems to be a little bit laggy...
[Huawei P9 Lite ROMs, Kernels, Recoveries, & Other ] Laurisss:
Hey , could you add Emui 4.1.2 support? The latest VNS-L21C432 firmware is B170. Cant flash your kernel.
[Huawei P9 Lite ROMs, Kernels, Recoveries, & Other ] tw1st3d83:
i did not tried new build yet but i think i solved my problem by switching to stock power HAL in meticulus extra settings... after hitting that switch an reboot, the phone works normal for now...

i will test new build too but tommorow, im not home wright now...
[Huawei P9 Lite ROMs, Kernels, Recoveries, & Other ] zgomot:
Just want to offer feedback on build 04.04.

AMAZING battery life and smooth as butter.

Admittedly, there's not yet been 24h since I flashed it, but I can safely say this because I have a daily routine at work and I use my device pretty much the same way every day - lots of music streaming and listening to youtube videos (in the background, admittedly, via xposed module) If on previous builds, by this time I'd have around 50% battery left, today, after constant youtube streaming since I started work, I'm sitting comfortably at 71%.

What a fantastic job you did here OP. Kudos!

---------- Post added at 08:10 AM ---------- Previous post was at 08:05 AM ----------

I'm on L21C432 B170 and was able to flash this without problem. Moreover, the kernel is performing great.
[Huawei P9 Lite ROMs, Kernels, Recoveries, & Other ] buhanita:
Do I need unlocked bootloader? Or I just need to flash twrp via fastboot?
[Huawei P9 Lite ROMs, Kernels, Recoveries, & Other ] Potato997:
You can't flash anything with a locked bootloader
[Huawei P9 Lite ROMs, Kernels, Recoveries, & Other ] buhanita:
And if I unlock bootloader I will loose all my data right?
[Huawei P9 Lite ROMs, Kernels, Recoveries, & Other ] zgomot:
Yes, because it does a factory reset afterwards.
[Huawei P9 Lite ROMs, Kernels, Recoveries, & Other ] zgomot:
[MENTION=8134750]Avsky0[/MENTION] Just had another random reboot.
[Huawei P9 Lite ROMs, Kernels, Recoveries, & Other ] iSonik:
The kernel is supppper smooth. Sadly i cant use it. After 30 mins or so my phone starts acting weirdly. I cant open any apps anymore and the alarm wont go off anymore :/ Tried 2 versions. Luckily i had a boot backup

Edit:

I am on AOSPA 6.0.1
[Huawei P9 Lite ROMs, Kernels, Recoveries, & Other ] zgomot:
Well, I think AOSP is the culprit here.

In my case, I've been using it for about a week, on stock MM and I have none of those issues. Performance is excellent, battery life is fantastic, alarms go off just fine.

Only issue is a couple of random reboots here and there, but I'm sure they'll eventually be fixed.
[Huawei P9 Lite ROMs, Kernels, Recoveries, & Other ] iSonik:
Yeah seems so. But i like AOSP way more than stock. Any troubleshooting ideas? Maybe changing up the Lowramkiller a lil?
[Huawei P9 Lite ROMs, Kernels, Recoveries, & Other ] zgomot:
Sorry, no idea.
[Huawei P9 Lite ROMs, Kernels, Recoveries, & Other ] danerrickcuba@gmail.com:
You guys are right, on the paranoid AOSP the kernel usage result in unpleasant experience, BUT using it on resurrection remix MM, it's absolutely perfect, pleasurable and satisfactory experience and the ROM is fully twicked and stable:

-New World Order-
[Huawei P9 Lite ROMs, Kernels, Recoveries, & Other ] zgomot:
Another reboot.
[Huawei P9 Lite ROMs, Kernels, Recoveries, & Other ] Avsky0:
I rebased the kernel on older Huawei sources and it seems that all the crashes and reboots were caused by something introduced between May 2016 and January 2017 release. I also removed some debugging stuff from the kernel, hopefully it stays stable now, if so, I can give up newer drivers for stability, everything else stays the same (features etc.).

Download: https://www.androidfilehost.com/?fid=673368273298945423

EDIT: Also I recommend disabling ZRAM, as UKSM manages memory better without it. (if your kernel tuning app doesn't offer a switch, just set it's size to zero)
[Huawei P9 Lite ROMs, Kernels, Recoveries, & Other ] zgomot:
After flashing the latest build I was prompted with a white screen asking me to enter a password to decrypt storage.

I had to restore backup.
[Huawei P9 Lite ROMs, Kernels, Recoveries, & Other ] Avsky0:
Strange, I didn't touch anything related to encryption. Can anyone else confirm this problem? I'm not running stock atm.
[Huawei P9 Lite ROMs, Kernels, Recoveries, & Other ] marcin111177:
+1

Wysłane z mojego HUAWEI VNS-L21 przy użyciu Tapatalka
[Huawei P9 Lite ROMs, Kernels, Recoveries, & Other ] Avsky0:
Alright, it seems that there's still something going on with encryption. I'm going to get a stock ROM running during weekend and I'll take a crack at it. Until then, AOSP/CM ROMs shouldn't have any issues.
[Huawei P9 Lite ROMs, Kernels, Recoveries, & Other ] :
Hello,

I'm thinking about using MagiskSU, but from what i have understood, Magisk is using the boot partition for root, so if i try to update this kernel will i lose Magisk (Root)?
[Huawei P9 Lite ROMs, Kernels, Recoveries, & Other ] Avsky0:
No, this kernel doesn't overwrite boot partition, Magisk should stay intact.
[Huawei P9 Lite ROMs, Kernels, Recoveries, & Other ] :
Thank you for the quick response.
[Huawei P9 Lite ROMs, Kernels, Recoveries, & Other ] iSonik:
Kernel works now with AOSPA but 2 big CPU-Cores are now always disabled?
[Huawei P9 Lite ROMs, Kernels, Recoveries, & Other ] Avsky0:
Huawei hotplugging driver seems to keep mostly 2 powered on, I tested it and it brings the remaining 2 cores up in CPU heavy scenarios, although 4 big cores are rarely needed.
[Huawei P9 Lite ROMs, Kernels, Recoveries, & Other ] iSonik:
oh really? Because it seems lile they are always disabled (the 2 latter ones)