yashsingh1/xdaforums huggingface dataset:
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] Antsu:
There's some error logs. Didn't notice anything unusual while using the phone and while those errors happened. No freezings, lags and reboots. Screen on and off drain is about same level than with previous test version. Overall performance very good. I've put windows- and transition animations off and animator to 0.5. Interesting how quick the phone can be.

Edit. More logs. Nothing happened though.
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] Antsu:
Screen off battery consumption has been just decreasing, now it's 0.8%/h, with the latest test version. Screen on consumption is about 10%/h. Adaptive brightness is on, at lowest level.
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] saayuj98:
They're 'kernel' sources?

Edit: Nevemind,checked the kernel repo for new branch. Thanks :)
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] bedalus:
They certainly took their sweet time! Ah well, at least we can get on with it now.
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] Mostafa Wael:
i heard it will be a pita to sort it out since they crammed all the things in one blob ... :rolleyes:
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] habylab:
Always have, and probably always will.
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] bedalus:
https://goo.gl/aSLW3d

Edit : Test V2
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] liam_davenport:
Stuck on a black screen with the led on, PC won't pick the phone up so can't get a log sorry
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] bedalus:
Really appreciate the post, thanks for trying. I've been given some advice from [MENTION=3637908]kairi_zeroblade[/MENTION] so I'll have another go tomorrow.

No more tests required obviously people! Move along...
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] bedalus:
Okay, https://goo.gl/aSLW3d

2nd attempt, please can someone test, be sure to have something to flash back to if it doesn't boot.
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] NevaX1:
Directly boot into fastboot
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] bedalus:
[MENTION=5767887]NevaX1[/MENTION] thanks for testing. I think I may messed up hacking the device tree... will try again when I get home
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] bedalus:
Hopefully a case of third-time's-the-charm: https://goo.gl/Yyn8CV

Android N only!

Please make sure you have something to flash back to if it won't boot :)
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] fcisco13:
Same here, no go black screen white lex...
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] bedalus:
Damn, looks like I'm going to have to start from scratch with this one!
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] bedalus:
Okay, franco pushed his source, and I've noticed that there appears to be a commit in common between the current N releases here in our forum that clears the device tree files.

https://github.com/franciscofranco/one_plus_3T/commit/eac7443e757347caa9edf6c930d38d4ba07787d2

It's quite a straightforward commit, authored by cyanogen, simply a dummy file required to allow the make process to recognise that the device tree files in this location should be wiped.

I think the previous builds all suffered from a botched device tree...

So here's another attempt: https://goo.gl/8mdLO5

If this doesn't work I'll find some time to upgrade to N on my own device this weekend which will make it quicker to get something up and running.

Unless the above works of course!

Brave testers, please ensure you have a working kernel to flash back to!
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] yung40oz84:
gonna test bud

---------- Post added at 03:07 PM ---------- Previous post was at 02:53 PM ----------

Black screen bro
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] bedalus:
Thanks for testing. I'll get onto N in the next day or two and I'll be able to figure out what the problem is.
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] bedalus:
I always wonder if it's a bit egocentric to quote myself, like

Well said @bedalus. What a guy.

Ahem, anyway, I've been building N kernel from scratch since yesterday, starting with essentially a stock kernel, and am slowly whittling down the config to something clean and simple, disabling all the unnecessary config options (debug stuff mostly). I still haven't worked out what was causing the black screen with the blind builds, but I'm zeroing in on it. If I had to guess now I'd say it was that

CONFIG LCD_CLASS_DEVICE and/or
CONFIG BACKLIGHT_CLASS_DEVICE

..had to be enabled, which I suppose makes sense, but the Marshmallow builds didn't require this. Still, not 100% sure yet.

Thanks again to those who tested. I should have a fairly optimised working build up in the next few hours.
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] habylab:
Looking forward to it!
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] fcisco13:
Saw you post on freedom thread, guess you are on it now?? Anyways, can't wait for the good stuff!
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] bedalus:
Yes, I needed to upgrade so that I could get on with my kernel building addiction!
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] bedalus:
Quoting myself again now:

So... turns out this wasn't the problem. In fact I now have a config very similar to my optimised M config.

[MENTION=3637908]kairi_zeroblade[/MENTION] may be interested since I'm using his commit to separate the 3 and 3T device trees:

Here's what must have happened. I just noticed that my latest test configuration turned off the 3T device tree, but also turned off our tree for 3 by mistake. But I already flashed this kernel and it was working fine! I rebuilt it and flashed it again, and it was still working fine! Here's the output from the build process:

LD vmlinux.o
MODPOST vmlinux.o
GEN .version
CHK include/generated/compile.h
UPD include/generated/compile.h
CC init/version.o
LD init/built-in.o
LD vmlinux
SORTEX vmlinux
SYSMAP System.map
OBJCOPY arch/arm64/boot/Image
DTC arch/arm64/boot/dts/15801_PVT/msm8996-v3-pmi8996-mtp_15801_PVT.dtb
DTC arch/arm64/boot/dts/15801_DVT/msm8996-v3-pmi8996-mtp_15801_DVT.dtb

As you can see, the device trees are still being appended. So I reverted kairi's commit. and the kernel build and added both sets of device tree. Okay, I reapply the kairi's commit, and both trees are still appended.

This is pretty frustrating. I'd guessed there was a problem cleaning the device trees and/or the scripts that append the trees. They shouldn't be appending trees that aren't selected in the config! But I thought cyanogen's commit was highlighting an isolated problem. I guess there is a similar sort of problem in our new combined device tree location.

Anyway, since using make mrproper doesn't actually clean these folders properly, there is a simple and more efficient solution:

rm -rf arch/arm64/boot/dts
git checkout HEAD -- arch/arm64/boot/dts

This has a benefit over mrproper anyway in that you don't have to completely rebuild the entire kernel all over again!

EDIT: Just realised I forgot to make my point. The reason the initial test builds all failed was because I built my N kernel using the OP source, but hadn't applied kairi's commit to separate the trees, so both were built, and I hadn't applied anything else that would let them coexist. Even when kairi helped me out, it was too late, because mrproper wasn't cleaning the dts folder properly. Anyway, mystery solved!
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] Mostafa Wael:
[MENTION=6295391]bedalus[/MENTION] is it safe now to say that Moxie will be back to Nougat safe and sound?

Also, your thread is actually one of the most informative ones I have ever seen in a very long while, if not the most one!

Cheers for that buddy! :highfive:
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] bedalus:
Yep, I'm being quite meticulous in the first few commits in the new branch just in case anyone needs to refer to a nice clean base for N.

I'll push a release this evening probably in the next hour or two.

Thanks for the feedback. I try to keep the thread useful for other developers. Whenever something new occurs to me I figure it's worth writing about as it might help someone else out too.
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] Mostafa Wael:
You rock sir! :good:

:highfive:
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] bedalus:
Version N1 is here

- Rebuilt from scratch, jumping off from OP N source drop

- Added BLX

- Added Sultan's patches to disable navigation hardware keys when screen is in use

- Trimmed down the config to get a more optimised build

- a few miscellaneous performance patches

I've pushed 'stable_N' which is basically just a nice stock kernel with my config, and 'testing_N' which will be my branch for tinkering and meddling.

TO-DO

- Linux mainline updates

- Trim down the config some more

- Re-add any nice little patches I forgot about
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] fcisco13:
Booted up no problem, will test. Thanks
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] Mostafa Wael:
Oh I missed the release. I hope I am not too late :angel:
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] fcisco13:
Smooth but i got a little battery drain overnight, stock (freedom) was flat line, this one dropped 10%.... Ill test a bit more.
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] bedalus:
That's interesting. I had a flat line on one of my earlier test versions. I'll take a look through the config in case I switched off something important!
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] Mostafa Wael:
[MENTION=6295391]bedalus[/MENTION] could you upload your future release builds somewhere else? Mega is failing me big time here.

Thanks!
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] bedalus:
Version N2 is here

- Fixed screen-off gestures

- Trimmed down the config even more

- Update to linux 3.16.47

- F2FS enabled (was in N1 too, but forgot to mention)

TO-DO

- Re-add any nice little patches I forgot about

- Investigate possible battery drain when device is idle

Thanks to [MENTION=7834506]noéDefalt[/MENTION] for flagging up the issue with the screen-off gestures.
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] bedalus:
I still have a dev host account: http://d-h.st/jrsR
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] Mostafa Wael:
[MENTION=6295391]bedalus[/MENTION] I would like to pinpoint something weird, and even weirder it isn't only with your kernel.

On OOS 4.0.2 (I am using FreedomOS 2.3), custom kernels (with no overclocking) result in lower benchmark scores, and the degradation in the score is pretty much considerable. For instance, Geekbench 4. On stock kernel, average single core score is around 1740 and multi core score is around 4106. On custom kernels, the single core score is hovering between 1639 and 1668, and the multi core score was hovering between 3665 and 3878. Kernels tested are Moxie-N1 and RenderKernel-R1. Even Xceed kernel was resulting a relatively lower score to what it used to score on other LAOS based ROMs (1828 vs 1950 in single core and 3802 vs 4310)

As for the actual performance, it isn't that much of a bummer as what the geekbench scores claim, tho i find stock kernel more consistent when it comes to app launch speed. So is there any clue ?

-TDK
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] bedalus:
Yep, I was wondering the same thing myself and have no clue! It wasn't this way in Marshmallow was it?
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] Mostafa Wael:
it never was.

that's very strange...
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] bedalus:
Left my phone off the charger last night to test:

Seems like it's back to normal on vN2. That flat line is when I went to bed!
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] habylab:
Quick question: I see Franco's kernel is on 3.18.31, is there any benefit to upgrading to this version of Linux? Or too much hassle?

Can't remember what the stock version is...

Edit: found out it's 3.18.31 as well. Assuming typo?

I will test now, see if the performance is satisfactory. Franco's kernel is super smooth and brilliant battery life.
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] liam_davenport:
Damn what network are you on lol your signal sucks :crying:
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] bedalus:
Yes, sorry, it's supposed to be 3.18. Incidentally there are usually benefits to upgrading to a newer kernel version, so long as your hardware is still supported. The problem we have with 3.18 is that it won't be supported for much longer as it is near the end of its LTS life. I think it's extremely unlikely that we'll have a newer kernel version either as a lot of the drivers required won't be compatible with later kernel releases (unless someone makes them compatible, and that's no small task).
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] bedalus:
I'm about 5 miles north of Chester, it's quite rural around here!
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] habylab:
Ah okay, did think it was a typo.

Actually, I won't test for now.

Is there anyway you could add in the below ability to block these wakelocks? Or just block them by default? From Franco's kernel app, presumably hooked into his kernel, so must be a commit somewhere.
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] bedalus:
I think they're all necessary wakelocks, aren't they? Headphone jack makes sense, wlan is the wifi hardware, and ipa is part of networking. Someone correct me if I'm wrong?
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] habylab:
No headphone wakelock there. I think the idea is to stop these taking up too much battery - they took up ~5% total. I've disabled all of them and still have WiFi (it's WiFi scanning) and headphone support.

Testing your kernel now.

Findings so far: latency seems quite high, and the smoothness doesn't seem to be there when opening apps.
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] bedalus:
I think there's something up with it, the benchmark scores are low and volatile too. I'm not sure what the cause is yet, but appreciate the testing!
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] habylab:
No problem.

Back to my previous kernel for now, free to test others when I can!
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] Mostafa Wael:
Fyi arter97 has teased an upcoming Linux 4.4 (or 4.1) kernel version :good:

---------- Post added at 11:16 PM ---------- Previous post was at 11:14 PM ----------

And as for the relatively worse performance, it is abundant across most custom kernels AFAIK. There has to be something that explains that. And no, it is not SELinux
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] bedalus:
I just quickly tried to find some mention of that in his thread, all I'm finding are references to things being backported from later kernels. Can you provide a link to where he's said this? If not, don't worry, I'll PM him.
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] bedalus:
Guys, I noticed that my benchmark app was being affected badly by the Kernel Adiutor app. I'm no expert on the OS side of things. Did something change from M to N in app behaviour?
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] stryker09:
he posted it on his twitter

https://twitter.com/arter97/status/810169150630981632
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] bedalus:
Ah thanks. I'm very impressed, but I don't think anyone should hold their breath. There's probably a lot of drivers that still need porting to get a functioning android system.
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] Mostafa Wael:
It was on his Twitter :)

I will try to fetch it for you no worries at all. :highfive:

I see habylab has reached it earlier than me :o

:good:
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] bedalus:
test kernel

I've built one with franco's commits for the wakelocks. Do you want to give it a try?

There's also a bunch of other stuff in there (all the upstream stuff from android common that was in the v9 marshmallow version).

I think I know what's causing the volatile benchmark results. I had another app open, and it was killing the CPU. I think in android N there seems to be a different kind of multi-tasking going on. Also, I think we're back on JIT, which isn't quite as high performing.
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] Mostafa Wael:
But under same circumstances, on stock kernel, the benchmark scores were higher :eek:

Also it is not fully JIT, more of a hybrid tho AFAIK.

Anyhow, I will give your kernel a spin soon. :)
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] bedalus:
I just tested and got near identical scores to my M kernel. How much higher was stock?
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] habylab:
Could this be related to the news that OP cheated benchmarks?

Testing now!
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] bedalus:
[MENTION=5060769]Mostafa Wael[/MENTION] ah yes, I do remember reading that the first time. I'm using geekbench 2.
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] bedalus:
How'd you get on with the wakelocks?
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] bedalus:
Ah, I think finally understand what happened in N. It's all here: https://source.android.com/devices/tech/dalvik/jit-compiler.html

We're possible dealing with a few things here (and I'm just doing some benchmarks as I write this to shed some light). We've got Oneplus with code that boosts benchmark scores (and perhaps sanitising their code for public release is what caused the delay). We've also got the return of JIT code compilation.

JIT can be disabled:

bedalus@bedalus-Lenovo-IdeaPad-Y510P:~/kernel$ adb shell
OnePlus3:/ $ su
OnePlus3:/ # su
OnePlus3:/ # stop
OnePlus3:/ # setprop dalvik.vm.usejit false
OnePlus3:/ # start
OnePlus3:/ # cmd package compile --reset -a

With JIT (using CF bench):

native mips	2590	2609
java mips	1395	1897
native msflops	3721	3525
java msflops	1529	4023
native mdflops	3466	3295
java mdflops	1463	3727
native mallocs	84870	76158
native mem r	15963	15575
java mem r	1596	5810
native mem w	11528	11395
java mem w	975	5953
native disk r	2747	2430
native disk w	2388	2188

2nd column there shows the scores improve after having already been run once.

Without JIT:

native mips	2655	2624
java mips	1898	1851
native msflops	3294	3386
java msflops	3294	3769
native mdflops	3332	3331
java mdflops	3646	3505
native mallocs	81421	70218
native mem r	15866	15632
java mem r	5654	5731
native mem w	11419	11429
java mem w	7779	7698
native disk r	2367	2261
native disk w	1678	1730

(using CF Bench)

This time the results are better in the first run. However, overall the results still aren't as good as on Marshmallow. I still need to test the stock kernel to see how it compares.
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] bedalus:
Version N3 is here

- Brought config in line with latest arm specification from android common

- Committed more patches from android common, mainly updates for ext4, sdcardfs and ARM64 specific fixes

Testing_N is the branch you want to look at for the full list of changes. Since this release doesn't differ much to N2 other than bring in a large number of the latest performance/stability patches from android common, I was wondering if there's anything interesting that I could actually say about it... Instead, have a word cloud of the commit messages:

Edit: Ah, google do some fun stats on their shortened links: https://goo.gl/#analytics/goo.gl/EZoQMM/all_time
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] habylab:
I believe better, they didn't show up in BBS anyway. Good work!
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] fcisco13:
Still on this, very smooth, thanks.
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] Mostafa Wael:
what's your insight on updating the Linux kernel to 4.x ? is that possible via an OEM update? is it possible to be done seamlessly ?
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] bedalus:
I think there is no chance that we'll see a 4.x kernel that will boot to a fully working OS. It's just too much work to forward-port all the drivers.
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] Konskl:
is it in sync with the OOS 4.0.3?
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] bedalus:
Version N5 is here

I've merged in the 4.0.3 source drop from OnePlus but I'm not happy with some of the code, so I've rolled back part of the update.

Here's the commit: https://github.com/bedalus/oneplus3kernel/commit/e1983709a29db05ff8e38fb7ad534eff5785f475

There's no reason for them to be mucking about with these core files.
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] bedalus:
N5 just above is now mostly synced with it, but 4.0.3 was only a minor code drop anyway.
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] Mostafa Wael:
well i remember that i read somewhere about Linux 3.18 nearing its EOL state :(

that's why i am asking...

thanks for you intriguing insight! :good:
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] bedalus:
Yep it is, so we'll stop seeing official patches for security and maintenance, but kernel devs here will continue to support the device. I'll happily backport any critical security patches as they are released upstream.
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] bedalus:
I got a bit of time to myself today to do some benchmarks that I've been meaning to get around to for a while, Moxie (linaro toolchain) vs Moxie (google toolchain) vs Stock.

Back near the beginning of January I'd already established that there were some tests I could run in Geekbench2 with a very low coefficient of variance (i.e. results were consistent). Since the results were so consistent across multiple passes, I could get very reliable averages and then compare them against other kernels.

I've done that today, and happily Moxie scores a slight win over both itself(!) and Stock. The results are in the usual spreadsheet: https://docs.google.com/spreadsheet...icsWlnU8jRSBeOKUfjN12nreE/edit#gid=1967281373

I haven't put any effort into the presentation of the data since I'm mostly testing for my own purposes, but just to briefly summarise, when looking at: blowfish multithread; blur image; read sequential (ram); and stream add, we can see results that are better across the board for Moxie built with Linaro than the other two options (with the slight caveat stock scored a median result of 1212 on stream add vs 1211 for Moxie/Linaro).

I like to compare the geomean of the data to give me an overall picture, and shows Moxie/Linaro to perform roughly 1% better than the other options.

However, there are some caveats to this. I also tested using CF Bench, and found that stock seems to have a large advantage in the native mallocs test. No idea why, but perhaps the memory clock speed is hiked when benchmarks are detected. There was some scandal involving benchmark cheating recently with oneplus. Not sure how they achieve this (if they are indeed guilty) but I presume they wouldn't release the offending code.

There's a further and much more annoying result to these tests...

I did record just one full sweep of benchmark results for Moxie/Linaro and stock on both Geekbench2 and CF Bench to see a rough, but complete comparison to what we had with Marshmallow.

Neither Moxie nor stock could match up to the performance we had in M in Geekbench2's Stdlib Allocate test (mallocs), or CF Bench's Java MIPS / Java Memory Write.

Again, the inconsistent mallocs may be down to some underhanded OnePlus benchmark shenanigans, but the Java result across both stock and Moxie highlights that the new ART/JIT combined compiler just isn't providing the same level of performance.