yashsingh1/xdaforums huggingface dataset:
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] bedalus:
- Nougat version: this post -

BLX

Moxie provides Battery Longevity eXtension, a feature that I believe is currently unique to this project. BLX prevents your battery from charging to its full capacity. Why is this useful? Because charging your battery reduces its capacity over time. To help prevent this, I've designed this mod to cut off the battery charging earlier. (Testing of BLX: this post and rationalle: this page)

To enable BLX edit:

to any value from zero (disabled) to 10 (full BLX). I've found that when using the DASH charger, 10 works well and limits the charging to about 80%. For non-OEM chargers, a value of 5 has the same effect.

Still using Marshmallow? (I am!)

Final M kernel: This Post

Coming from another custom (Marshmallow) kernel? Check this link!

Remember to hit thanks for NevaX1 :)

* * *

In order to comply with GPL, linux kernels may be modified and distributed so long as their source code and compilation tools are public, allowing anyone to reproduce an identical binary.

Toolchain: here

Kernel Source: https://github.com/bedalus/oneplus3kernel

Wifi Module Source: https://source.codeaurora.org/quic/la/platform/vendor/qcom-opensource/wlan/qcacld-2.0

I accidentally vented a post on my development philosophy: here just in case anyone is interested in how I approach development!
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] camdadeye291:
Good to see another dev :) Greetings brother!
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] cerealguy:
Welcome to the party [MENTION=6295391]bedalus[/MENTION]! :D

Inviato dal mio ONEPLUS A3003 utilizzando Tapatalk
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] Gauraav:
[MENTION=6295391]bedalus[/MENTION] Tnx a lot for this!!!!:D
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] juginkrebs:
Thanks Keep up the Work !
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] mixtapes08:
Wow.. Glad to have you here bedalus back from nexus s days :)

Sent from my ONEPLUS A3000
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] AlkaliV2:
First and foremost, thank you for sharing post 2. That kind of stuff is why I really come here. With that said, I flashed your kernel and it lives up to the name. The kernel is fast and fluid with all my tasks. Thanks for sharing your work and development skills with us :good:
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] bedalus:
Hey mixtapes, it's a small world! I'm a better programmer than I was back then. Well, maybe not better, just more patient :p

How've you been? What phones have you rocked since the Nexus S?
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] bedalus:
I enjoyed writing it and I'll try to keep it up. I want to provide more insight into what each update has actually changed.
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] mixtapes08:
Oh that's good to hear. :). Nexus 4,5,6p then op3. 4 and 5 are both sold already 6p on my girlfriend and I have op3 and the oldest nexus s that I use for alarm lol. How about you?

Oops I forgot the galaxy nexus that also sold already hehe.

Sent from my ONEPLUS A3000
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] bedalus:
Yep, Nexus 4. I think I saw you over in that forum too IIRC. Then I got sick of it all, and rocked a dumb flip phone for a while. I thought I was in the matrix. Then I got a HTC One X plus, but it was too heavy, and I really didn't think the beats audio was that impressive. In fact I thought it sounded bad. Incidentally, I think the audio from the jack in the op3 sounds very good!

I later had a go with a Nokia 830, which was an excellent device, but as everyone says, Windows Mobile is a poor ecosystem. The OS itself was a bit ropey too.

I also had a Moto G 2nd gen at some point. Another solid device, but a bit too discrete for my taste! I then had a Sony X3 compact. A very nice device! But I broke the screen :(

I'm sure I'm forgetting some. But I felt the op3 was a total bargain at the price. I couldn't resist. It's a bit short on battery, but that's my only gripe.
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] bedalus:
Okay, it's been hard work, but v2 is here: http://d-h.st/qUqT

I'll go into detail about the commits in the next day or two.
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] juginkrebs:
Delete

Gesendet von meinem ONEPLUS A3003
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] partridge79:
[MENTION=6295391]bedalus[/MENTION]

What is up with this thread theres no OP (1st post). no info at all

what is this kernel for OOS, CM, AOSP?
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] aj8600:
I am no dev and am probably asking a silly question. But could one compile the current cm14 N kernel with this and build a custom N kernel?
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] jukiewalsh:
It says it's for stock on the OP, meaning OOS. Also if you click the GitHub link you'll see it's forked from the official stock OOS kernel source, as well as in the repo you'll see the branch is called stock.

So if I had to guess I'd say it's for stock ROM..
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] partridge79:
[MENTION=5441030]jukiewalsh[/MENTION]

I was using xdalabs and there was no OP at all the 1st page had 1 post from a moderator saying thread cleaned (hence my post saying theres NO OP. So no links to click either :eek: but coming back now i see that OP has been restored along with the rest of page 1. (Which has all the info i required) Must have been some maintenence being done to post thanks for the heads up tho ;)
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] jukiewalsh:
Ohh okay haha gotcha
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] dpryor88:
Will this work with community builds?

Sorry if it's a stupid question..

---------- Post added at 05:52 PM ---------- Previous post was at 05:35 PM ----------

Edit:

It doesn't. Haha.
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] demon507:
As compared to?

On wifi or on lte or mixed?

Sot and overall usage?

Any special settings like governor..grenify or something?
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] Stroky:
Comaperd to Bluspark and ElementalX.

Settings stock, i only change the Read ahead size to 256 kb.

Special Apps i use is L Speed.
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] bedalus:
Thanks for the support.

I've attempted to adapt franco's patch, but the code is too different, and I'm not sure it's actually possible.

In other news, I've made some changes to the battery charging code, and I'll be testing these today.
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] Miksel12:
This is the same commit but for pixel: https://github.com/franciscofranco/marlin/commit/1a7a93bd33f48a369de29f6f2b56251127bf6ab4

I think this one would be compatible with our op3.

He is also using power efficient wq on a lot of processes: https://github.com/franciscofranco/marlin/commits/nougat Maybe interresting?
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] bedalus:
Ah-ha. Very nice work. The patch from pixel was easy enough to adapt.

Moxie v5 pending someone confirms fixes scrolling: https://mega.nz/#!i98gkQRQ!blETBHuhE5Qe5ipiuooyp5aksuzDiuk6uzOFqYbe87I
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] jayden2009:
Flashed this one on community build..... Didn't boot up?
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] bedalus:
I'm not supporting community builds.
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] fcisco13:
3% loss over night on v4! Cant see how it can get any better!! Thanks bro testin v5
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] bedalus:
Can anyone confirm if this fixes the scrolling in Google+ / tapatalk ?
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] slewis1972:
Does seem a tad nipper Inc Tapatalk, don't use Google+
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] fcisco13:
Tapatalk does seem a bit more smooth.
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] slewis1972:
Had quite a few reboots with v5, had to swap back to v4 to see if rom related before I reinstall.
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] fcisco13:
Im using v5 on freedom, no reboots, might just b your rom. Did you change any settings? Undervolt?
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] AcmE85:
Flashed it on rooted and xposed stock OOS 3.2.7 without issues.

Although not being "60fps-smooth" (I can't recall that g+ ever was),

I can definitely notice an improvement. Thanks!

But what I also notice (and so with all custom kernels I've been testing so far on the op3),

the fingerprint unlock is slightly delayed. You will feel the vibration followed by the screen lighting up.

On the stock kernel this happens almost simultaneously. Same goes when using the powerbutton to power on the display.

Nothing that really bothers me, just wanted to ask if this is due to some battery savings?

I don't know if this has been asked before (I did search though),

would you consider adding color calibration support to the kernel?

Edit: I also notice improved scrolling performance in Relay for Reddit App.
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] bedalus:
What ROM are you using? I'm assuming these were soft reboots (you would see the bootloader menu if they'd been caused by the kernel).
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] Stroky:
I come every time back to your Kernel. Its definititly the best Kernel for the Phone! Thanks for your work.

Gesendet von meinem SGP511 mit Tapatalk
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] bedalus:
Thanks everyone for reporting on the GPU kthread tweak from Pixel. Seems like a nice quick win. Good stuff.

Cheers!

I'm using the stock kernel source. I don't recall deliberately changing anything with the fingerprint sensor or suspend/resume code, but perhaps merged something from android kernel-common. I'll have to take a look through my commit history.

Sorry, I like to keep it simple. I'm happy with sRGB.
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] bedalus:
I'm glad you like it, and really appreciated the support. The more people using the kernel, the easier it is to develop.

Other people will feel different of course, and everyone should feel free to use whatever they like.
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] slewis1972:
Back on v5 after removing some exposed modules that updated at same time previously. So far so good.
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] bedalus:
Good stuff. Let me know if you have any hard reboots (you'll see the bootloader menu). This would indicate a serious problem with the kernel.
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] bedalus:
Moxie v5: here

Changed since V4:

- HZ to 128: HZ is usually 100, and provides a rate at which certain tasks need to be updated. Making it 128 increases the rate slightly. Con Kolivas argues that on a desktop HZ should be 1000! Not sure what the benefit of that is, since I doubt people can detect differences of time measured in milliseconds. But 128 is a nice tweak since a lot of kernel code divides by the HZ value, and division by 128 requires less operations to return a result

- Remove ethernet: This reduces kernel size a great deal, and you'll see an obviously smaller download. Ethernet support is presumably required for some forms of tethering, but I suppose that most popular forms on android actually use adb or proprietary drivers

- CFQ tuned for SSD: CFQ was designed for rotational devices, but remains the best option for IO queuing probably due to being the most evolved algorithm. Still, improvements can be made for non-rotational devices because there is no benefit in predicting when data will be required from physically close sectors. Turning off this 'idling' increases the maximum possible IO bandwidth by a significant margin.

- linux 3.18.44: includes dirty cow patch

- GPU work moved to faster kthread: fixes some scrolling problems with certain apps

Coming soon...

The battery longevity work continues. I'll post some new info about that shortly.
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] bedalus:
Charged to 100%, used for a while, charged again:

Charged overnight then used as normal:

Above are a couple of screenshots of my battery behaviour with the reduced voltage thresholds. If you're not familiar with the aims of this mod (not public yet) go check this post.

As you can see, the battery appears full after charging, but then to quickly drain. This is, I believe, a phenomenon related to the way the battery capacity is measured. The measurement involves taking regular readings of the voltage from the battery, and converting it to a percentage via the 'fuel gauge' functions. It doesn't take long before the fuel gauge properly represents that the battery has not been fully charged. Perhaps the gauge assumes a state of 100% has been reached when the battery voltage crosses the upper threshold (that I've lowered in my test version), or perhaps it is possible for the battery to deliver a voltage above that which it has been charged for a short time before levelling off at a sustainable voltage. Either way, it appears that the modification I've made has had the desired effect.

Any insights would be welcome :)
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] Miksel12:
[MENTION=6295391]bedalus[/MENTION] What are your thoughts on EAS, could you implement it? And if so would you do it?
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] fcisco13:
May i ask.... In simple terms what are you trying to do with that project about charging??
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] core_x:
He wants the phone to stop charging at 90% to increase the battery's longevity.
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] AcmE85:
If I understand correctly he wants to lower the max voltage threshold so the device stops charging a little bit earlier (under 100%) to prolong battery longevity.
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] abhibnl:
flashed and using the kernel for the first time. Looks stable as stock kernel is as of now. Very minor performance improvement in general UI usage. I really like the close to stock approach of the kernel. :)

Feature Request: Considering the default vibration is really low, could you please consider adding vibration control into the kernel for next update?
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] crzykiller:
Desktops use 1000hz exclusively for gaming mice and keyboards. I myself can notice the slight change when switching my mouse from 500hz to 1000hz haha. Anyways, Google has upped the Hz from 100 to 300 in the Nexus phones and the Blu_spark kernel dude tried it but it borked the touch vibration. Does upping it to 128hz do the same thing or because it's not a massive bump in speed it doesn't change anything? Also what are your thoughts on the ZEN I/O scheduler? Some devs say it's the BEST for our device while others say CFQ is, is there really a large difference between the 2 when it comes to performance?
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] bedalus:
Uh...

Did you read that post? There's a lot of information in there. If you need a tl;dr, basically charging the battery kills the battery. Charging it to a lower voltage will allow it to live longer.
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] bedalus:
I like new technologies but I think this is a little too bleeding edge for my taste.
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] bedalus:
Sorry, this doesn't interest me. If anything I'd have it completely disabled.
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] geekynoob:
Hello [MENTION=6295391]bedalus[/MENTION] why are you so awesome..?? Thanks for the super kernel but most important thanks for making the thread so so so insightful.. Get to learn so much here..
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] abhibnl:
Lol! Looks like gonna have to live without that being present. :highfive:
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] abhibnl:
I don't know why but seems like my device doesn't like this kernel, lol. No disrespect meant for developer at all, but seems like this is not as stable as the stock kernel is, at least for my daily usage. Everything works as it should but 2-3 times daily, my apps freeze, turn totally white or black, and then i have to force close them and then reopen. No specific apps, happens randomly on apps i use like Youtube, Whatsapp, Chrome, Modern Combat 5, 9 Gags etc. I just can't completely start with a clean flash of the rom because of the kernel, no time to do that honestly. Will test it more for few days and will report back if the situation changes.
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] Antsu:
[MENTION=4296062]abhibnl[/MENTION]

Hi, what's your rom and did you flash moxie over stock kernel? Have you tweaked kernel settings?
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] bedalus:
The only other person to report a problem attributed it to exposed modules. What ROM are you using? If you haven't got time to start fresh, you could try nevaX1's stock image (in OP) then flash Moxie on top. Should eliminate incompatibilities with ramdisk mods other kernels may have left behind.

Anyone else having problems?
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] abhibnl:
I am using latest OOS 3.2.7, no xposed at all. And yes, it was flashed over a stock kernel. Only kernel tweaks are in CPU max frequencies, that's it. No modification in GPU, IO, Network, Thermal or other sections. Little cluster UC to 14XX, Big cluster UC to 19XX

Appreciate your quick response. Like mentioned earlier. I'm using completely stock ROM, OOS 3.2.7, no custom kernels flashed before flashing moxie. I will try to clear cache/dalvik and see if it helps.
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] Antsu:
[MENTION=6295391]bedalus[/MENTION]

Could you provide md5sum for the kernel? Although I haven't had any problems with downloads, but it would be helpful to ensure everything's ok.
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] abhibnl:
FYI

This is the MD5 checksum that i have for the file i flashed:

00A1BC6021409DFC037989790E2B4765
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] Antsu:
Matches with mine: 00a1bc6021409dfc037989790e2b4765
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] bedalus:
Have you tried not using these tweaks?
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] abhibnl:
I can try to use it totally stock but honestly, i was using the stock kernel with even lower UC values than this and never faced a single app freeze. But i can try to give it a shot for a whole day. But like i mentioned, it's too random and happens only 2-3 times a day but still, it is there.
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] Antsu:
[MENTION=4296062]abhibnl[/MENTION], what SuperSu version you use? I have 2.78-SR1.

Sorry for asking all this, just trying to figure out what's different in our setups...
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] abhibnl:
No worries, i'm all in for a resolution and help. I'm using SuperSU latest stable, 2.78.
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] abhibnl:
This could seem like a quick move but yesterday i was unable to play Modern Combat 5 at all. The game opens fine and then the touch screen becomes totally unresponsive to touches. Then i'm rquested in a window to either close or wait for the activity. i tried restarting phone, clearing cache, dalvik cache, but issue persisted. The moment i flashed the stock kernel back by flashing the full rom zip again and not clearing any data/cache/dalvik (to make sure no modifications from previous kernel are there), the game works totally fine. I'm attaching a logcat from the time when this issue happened. Hope it would be able to give you better help on the issue. If it's from my side, let me know what it could be and i will try to test again this weekend.
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] bedalus:
Thanks for the log, let me build a few test kernels and we can see if we can find one that works for you. It may take a few attempts to isolate the fault.

Edit: https://mega.nz/#!zsNmTKxA!ubeBVMk94Ve60WfLR_cG81zVP-8KUWD9333kYxu8FrM [MENTION=4296062]abhibnl[/MENTION] can you try this one please? If anything crashes be sure to send me a log!
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] abhibnl:
I really appreciate the gesture but i don't want you to take any hassle just to isolate an issue a single user received as i saw no one reporting any such issue. But i will surely test it over the weekend. Could you please advise me if i need to go back to stock kernel in any case, would flashing the boot image be sufficient or i need to flash the full rom zip?

Also, could you let me know if there were any kernel related issues that you were able to detect from the log?
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] bedalus:
There were no kernel logs to view as they are disabled in the release versions, but are enabled in the one here.

No need to reflash rom, no need to reflash stock kernel or wipe caches. Just flash :)
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] bedalus:
Okay, I've completed the Battery Life eXtender [BLX] mod. Here's a screenshot. What it shows is charging to 80% (then a bit of normal usage) then charging to full 100% (then a bit of normal usage).

I've created an interface so the user can set a level from 0 (no effect) to 10 (full BLX). I'm just doing a bit more personal testing then I'll release a test version and the patch.
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] bedalus:
Here's another screenshot, later in the day I charged it to level 5 (the medium setting):

Interestingly the behaviour was a little different. It seemed to stop before reaching 100%, and stayed pretty level at about 96% (unlike level 10 where it drops pretty quick to 80%).

For my own purposes, I'll be using level 10, the maximum setting to improve the longevity of my battery as much as possible.

Other users of my kernel may want a medium setting as a compromise, or 0 (the default setting) if they don't want to make use of this feature.
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] fcisco13:
Thanks for all the effort, can't wait to try it.
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] bedalus:
BLX

Battery Life eXtender

Patch 1

Patch 2

For other kernel devs, both patches are required.

The sysfs interface is located at /sys/class/misc/batterylifeextender/charging_cap_level

The value can be 0 (no effect - default) to 10 (maximum BLX, full charge limited to about 80%).

When the device is fully charged with BLX at level 10, the expected behaviour of the fuel-gauge is to quickly drop to ~80% then level off. There are plenty of screenshots in the last few pages.

Test kernel: here

Warning: This mod has only been tested by one person. Me! Although I feel it is safe, if you are not comfortable with modifying the charging behaviour then please skip this testing version.

Some more links and technical info here
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] fcisco13:
So if we change the value to anything other than 0 it will show stop charging at that value but still show 100% on the phone?
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] bedalus:
The charging will stop at a reduced level. The higher the BLX, the lower the charge.

But the fuel-gauging software seems to assume a value of 100% after charging, then drop to whatever the true level is.