yashsingh1/xdaforums huggingface dataset:
[Moto G4 Plus ROMs, Kernels, Recoveries, & Other De] lCrD512:
Yes, they can be implemented/enabled by default but are not done because as you said everyone has their own preference. Kernel manager is the easiest way to control these options but if you want to do it manually you'll need root and a terminal app.

Following are some commands you'll be executing (press enter after typing each command, ignore $ and #) in the terminal app to change/modify things:

1) Grant root access to shell.

$ su

1.1) To enable fp to sleep or work as home button: (should work on this and elementalx kernel, may or may not work with other kernels)

Single tap on fp will lock the device and if held longer should give power/reboot menu

# echo "1" > /sys/homebutton/enable [COLOR="Red"](0 to disable)[/COLOR]

# echo "116" > /sys/homebutton/key [COLOR="Red"](116 for lock/power and 102 for home)[/COLOR]

# echo "25" > /sys/homebutton/vib_strength [COLOR="Red"](to control vibration for this feature only, default is 30)[/COLOR]

1.2) For setting rgb values for screen burn problem:

# echo "r g b" > /sys/devices/platform/kcal_ctrl.0/kcal [COLOR="Red"]("r g b" = values you want, 256 is default for all)[/COLOR]

Example: # echo "200 170 185" > /sys/devices/platform/kcal_ctrl.0/kcal

1.3) To trigger LED light while charging the device:

# echo "battery-charging" > /sys/class/leds/charging/trigger [COLOR="Red"](to disable use "none")[/COLOR]

OR (just in case, both are same anyway)

# echo "battery-charging" > /sys/devices/soc.0/leds-atc-20/leds/chraging/trigger [COLOR="Red"](to disable use "none")[/COLOR]

1.4) For changing available CPU governors: interactive (default), ondemand, conservative, performance, powersave

# echo "ondemand" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor [COLOR="Red"](big cluster)[/COLOR]

# echo "ondemand" > /sys/devices/system/cpu/cpu4/cpufreq/scaling_governor [COLOR="Red"](little cluster)[/COLOR]
[Moto G4 Plus ROMs, Kernels, Recoveries, & Other De] murigny64:
Ok, but if you reboot, you have to redo.

You have to had this to a init.d script.
[Moto G4 Plus ROMs, Kernels, Recoveries, & Other De] AlokSaxena:
working nicely thankyou very much ?

---------- Post added at 07:38 PM ---------- Previous post was at 07:13 PM ----------

Yeah thanks :)

Knew that part I found some guides on xda. I only needed the paths to parameters actually :p
[Moto G4 Plus ROMs, Kernels, Recoveries, & Other De] corlatemanuel:
Are the r3 and r3.1 compatible with arm64 too? Sorry for the dumb question, but in the downloads only r1 and r2 have arm64 in their names.
[Moto G4 Plus ROMs, Kernels, Recoveries, & Other De] AlokSaxena:
yes all are for arm64 only:D
[Moto G4 Plus ROMs, Kernels, Recoveries, & Other De] corlatemanuel:
Ok, I'm on AICP 13.1 with Loony 3.1 and I made a Custom Control in Kernel Adiutor for FP Lock:

echo "1" > /sys/homebutton/enable

echo "116" > /sys/homebutton/key

echo "25" > /sys/homebutton/vib_strength

The thing is that it worked very well at first, but after a reboot... It won't work even if I delete the Custom Control and make another one! Do you think that is has to do with the Kernel, the ROM, or Kernel Adiutor? Is there any other way to get this working?

Edit: I'm dumb, I put it in Init.d from Kernel Adiutor and it works perfectly. :)
[Moto G4 Plus ROMs, Kernels, Recoveries, & Other De] TheNintendoRejection:
Will this fix the gps issue on the recent arm64 ROMs?
[Moto G4 Plus ROMs, Kernels, Recoveries, & Other De] DECHTECH:
Loony did not fix the GPS issue for me while I was using Cardinal And Pixel Experience.

It's safe to assume GPS is buggy in 64bit Oreo ROMS and will be fixed in the future, please be patient for a fix.
[Moto G4 Plus ROMs, Kernels, Recoveries, & Other De] lCrD512:
Update: Release 4

Finally got some time to update the kernel, download link in the first post.

Changes for LoonyKernel-v4:

- Reverted some unwanted features (details in 2nd post)

- Added new boeffla wakelock block driver

- Added wireguard support

- Added adreno idler

- Changed default behavior of fp to sleep or lock device, users will need to enable fp as home button from respective rom settings that's it. Those who need fp as home can change the settings easily using ex kernel manager or if you use kernel adiutor use the app's built-in init.d feature to change the settings, refer to post#31 to get an idea on how to proceed.

- Enabled kernel samepage merging

- Added sweep2sleep feature by flar2

- merged latest changes and fixes from upstream

Reminder: If you've already flashed magisk don't re-flash it, magisk backup script will retain the root. Just flash the kernel in twrp (64bit) and reboot.

For any issues submit proper logs with steps to reproduce the issue if possible, it helps more than simply saying something isn't working.
[Moto G4 Plus ROMs, Kernels, Recoveries, & Other De] UsPdSr:
Very appreciated.

Thank you for taking the time continuing to maintain this kernel.

It is my go-to Kernel for the whole 64bit section. ;)
[Moto G4 Plus ROMs, Kernels, Recoveries, & Other De] AlokSaxena:
Awesome nice to get this back on my device. Minimum frequency increased to 652mhz (small cores) but you still provided lower frequencies as an option for small cores which is nice, definitely at higher frequency I felt some improvements while using my daily apps. Also all cores are active now but big cores are mostly idle according to ex kernel manager stats.

After I saw those changes I thought you opted for this kernel being a little biased towards performance but to my surprise and despite the changes it turned out to be more efficient than others we have.

I only have one doubt, my zram got decreased to 512mb I don't know how but previously it was 1gb. Not an issue as even on 1gb it was never used close to 512mb but still I didn't understand what happened. Is this an issue or not I don't know so woud appreciate if you can clarify.

Thanks again for continuing this awesome kernel :)
[Moto G4 Plus ROMs, Kernels, Recoveries, & Other De] virajmalia:
Hey Alok,

ZRam is like a separate fast-storage-access option like RAM, but uses your internal storage AFAIK. Somebody please correct me if I am wrong here.

Whenever your RAM gets used up entirely, Zram may be utilized, if available, to maintain performance, otherwise the system starts killing background applications.

It has been found that with current workloads (or app usage as we say in common terms), zram is not required for devices with more than 2gb of RAM. If you have a RAM size of 2gb or less, a Zram allocation of 50% of your ram is adviced.

To answer your last question, you should try to increase the value of Zram only if you find your apps are getting killed in the background because the developer(s) usually ensure that the Zram size is set according to other kernel parameters. But you can go ahead and experiment to your heart's content, because we are all testers and devs here ;)

Thumbs up if this helped! Thanks.
[Moto G4 Plus ROMs, Kernels, Recoveries, & Other De] AgrawalHrishi:
Just wanted to know how is the battery backup for this kernel. I'm running Resurrection Remix 6.0 and would like a kernel with at least moderate battery life.
[Moto G4 Plus ROMs, Kernels, Recoveries, & Other De] AlokSaxena:
Thanks I have a 3gb ram variant and multi-tasking seems to be fine here, so I'll better leave it as it is.

Golden rule: If it's working fine don't touch it :p
[Moto G4 Plus ROMs, Kernels, Recoveries, & Other De] djnield:
I've flashed roms before but never just a kernel until now. I was expecting some UI to select options but now gather it doesn't work like that.

Reading the thread it looks like I need a kernel manager.

I'm not rooted so any recommendations which ones to work with your kernel?
[Moto G4 Plus ROMs, Kernels, Recoveries, & Other De] djnield:
Edit:

I flashed magisk in the end so was able to try a kernel manager.
[Moto G4 Plus ROMs, Kernels, Recoveries, & Other De] lCrD512:
*Uses RAM only. It creates a compressed block device in RAM, so it's basically compressed ram
[Moto G4 Plus ROMs, Kernels, Recoveries, & Other De] lCrD512:
ex kernel manager or kernel adiutor both will work fine, I'll recommend ex kernel manager :)
[Moto G4 Plus ROMs, Kernels, Recoveries, & Other De] djnield:
Went for ex kernel manager. Thanks!
[Moto G4 Plus ROMs, Kernels, Recoveries, & Other De] Itemt:
I love u, amazing.
[Moto G4 Plus ROMs, Kernels, Recoveries, & Other De] Itemt:
Battery or performance kernel? Thx
[Moto G4 Plus ROMs, Kernels, Recoveries, & Other De] lCrD512:
Mod Edit: removed unnecessary comment quote

Kindly make a separate thread for your builds. Avoid posting your own builds in someone else's thread without permission. Hope you understand.
[Moto G4 Plus ROMs, Kernels, Recoveries, & Other De] waverxD18:
Thanks sir
[Moto G4 Plus ROMs, Kernels, Recoveries, & Other De] lCrD512:
UPDATE: v4.1 released :)

Download link in OP or check download section.

Apr 05, 2018 Changes:

Restore default gpu clocks

Sdcardfs space leak fixed,

Updates merged from google's android kernel-common git,

Enabled ARCH_POWER and added toggle to enable/disable the same through EX Kernel Manager,

Nuked gentle fair sleeper toggle and re-enabled gfs. Disabling it was causing cores getting stuck at max freq for most of the time,

Added wake-up boost to avoid or atleast minimise any potential wake-up delays. I've personally never faced this on Oreo but some people reported it recently,

Added some more potential wakelocks in Boeffla wakelock blocker driver,

Wlan driver updates merged from latest caf release LA.BR.1.3.7_rb1.11,

Some efforts towards improving memory management a bit.

NOTE: For those who keep asking "How is battery life in this kernel?" I want to remind that battery life majorly depends on one's usage. Kernels, whether stock lineage or custom one, gives you option of choosing various governors, those who need battery focused settings are recommended to try either powersave or conservative governors. Any requests for interactive governor tweaks/mods will be ignored. Same goes for core control also, it's absolutely fine and works normally.

It doesn't make sense to tweak a balanced governor like interactive to make it behave like power saver governors when we already have 2 of them.

Also I've no plans of adding any other custom governors apart form what we already have by default. Those governors are quite old and I've personally tried most of them in this device and ended up using the default one's.

Lastly try to accept the truth that this device isn't great when it comes to battery life.

Reminder: No need to re-flash magisk if already flashed, root will be retained. For fresh/clean installation with roms+gapps, don't flash magisk immediately after flashing kernel. Instead flash magisk after first boot to avoid any sluggishness in ui.

For any issues submit proper bug report. Avoid posts like "I got this issue, do you need logs?", "There's an issue but I was not able to get logs, will try again later" etc. there's no need of doing this. Just post when you have proper bug report ready.
[Moto G4 Plus ROMs, Kernels, Recoveries, & Other De] arun4777:
im now in v4

can i flash v4.1 on top of it
[Moto G4 Plus ROMs, Kernels, Recoveries, & Other De] AlokSaxena:
Yeah I just flashed 4.1 over 4 and no issues
[Moto G4 Plus ROMs, Kernels, Recoveries, & Other De] Joel Oliveira:
Can you try GPU overclock to 650mhz ?
[Moto G4 Plus ROMs, Kernels, Recoveries, & Other De] lCrD512:
Not possible, max is 550 only.
[Moto G4 Plus ROMs, Kernels, Recoveries, & Other De] lCrD512:
There was a derp in kernel version naming due to which it was showing Unknown version under About Phone section. It is fixed now and a new v4.1 zip has been uploaded in Download section. :p

No other changes.

Thanks [MENTION=6970195]Titan068[/MENTION] for getting this into my notice.
[Moto G4 Plus ROMs, Kernels, Recoveries, & Other De] TLastPrism:
This is definitely the best kernel for 8.1 64 bits ROMs no doubt.
[Moto G4 Plus ROMs, Kernels, Recoveries, & Other De] poisonofchoice:
Charging current is around 1500 even at 33 degree Celsius...?
[Moto G4 Plus ROMs, Kernels, Recoveries, & Other De] lCrD512:
With version 5 support for ARM 32-bit roms have been added. For full changelog check the 2nd post of this thread. Please read the below note!!!

IMPORTANT NOTE FOR USERS

There are 2 builds for 64-bit ROMs in this release -

1. LoonyKernel-v5-dts: For official ResurrectionRemix 6.0, by Jleeblanch, which includes the early-mount system partition changes in the device tree sources. RR-official users should use this build to avoid any boot issues with the kernel.

2. LoonyKernel-v5: For other 64-bit roms like AOSiP, Carbon, AICP, DirtyUnicorns etc.

Currently I am not aware of any other 64-bit roms that have the above mentioned changes merged into their device tree sources except RR. So for 64-bit users, if any other rom doesn't boot with arm64 kernel then try the arm64-dts build. The dts build for 64-bit roms will be continued for future releases after the other maintainers update their device sources.

Usual Reminder: No need to reflash magisk if already flashed. Magisk's backup script retains the root. For fresh/clean installation with roms+gapps, don't flash magisk immediately after flashing kernel, instead flash magisk after first boot to avoid any sluggishness in ui.

For any issues submit proper bug report.
[Moto G4 Plus ROMs, Kernels, Recoveries, & Other De] jaxx08:
Thanks for 32bit i was waiting for some 32 bit kernel ?
[Moto G4 Plus ROMs, Kernels, Recoveries, & Other De] Mautaku:
I am using the latest build AIM ROM 64 bits, flash v5 and did not start, flash the dts version and started normally, you can check it.

PS: Thankful for getting a 32-bit version :D
[Moto G4 Plus ROMs, Kernels, Recoveries, & Other De] TLastPrism:
What happened to KSM in the latest version? Did u removed it? Cuz i don't see it in kernel adiutor...
[Moto G4 Plus ROMs, Kernels, Recoveries, & Other De] lCrD512:
I have already checked it and that's the reason there are 2 builds for 64bit for now. Read the update post properly.

Yes, I've disabled it in v5 for now but forgot to mention in changleog. I found no significant improvement with that enabled.

So to avoid slight performance hit (ksm takes up some cpu cycles) I've disabled it. Once we get memory leaks fixed in 64bits I'll add it again only in 64bit initially. No plan for adding it in 32bit builds as I'am quite sure 32bit will run fine without ksm also.
[Moto G4 Plus ROMs, Kernels, Recoveries, & Other De] lCrD512:
Update v5.1

Changes for both 32 and 64bit:

Merged updates from NPJS25.93-14-15 (Feb, 2018) moto kernel sources,

Merged updates for wlan prima driver to bring in-line with latest CAF tag LA.BR.1.3.7-05010-8976.0,

Few kernel-common updates.

ARM64: Single unified builds for 64bit kernel. To avoid any confusions or hit & trial method for users there'll be now only one build for 64bit kernel which should be compatible with all oreo roms irrespective of early-mount changes. This is also easy for me to maintain. :good:

For future releases, if anyone is interested they can contact me in private through telegram only [username: loonycrd] for testing out the builds. I don't have this device anymore so I'll have to depend on testers. If there are any changes which I feel needs to be tested before release then I'll provide test builds on telegram for better interactivity and feedback. :fingers-crossed:

Usual remider: No need to reflash magisk if already flashed. Magisk retains the root. For fresh/clean installation with roms+gapps, don't flash magisk immediately after flashing kernel, instead flash magisk after first boot to avoid any sluggishness in ui. For any issues submit proper bug report.
[Moto G4 Plus ROMs, Kernels, Recoveries, & Other De] Slayer5934:
I probably did a whoopsie but I flashed the 32bit (<- Unless I touched 64 by accident ='D) 5.1 kernel over sgspluss 32bit android oreo (lineage-15.1-20180430-UNOFFICIAL-athene) and I'm stuck bootlooped, I probably screwed up somehow. Anyways here's my log for your amusement :P https://mega.nz/#!2B8SWIxQ!Mv81GS6Q7ychLhXRnfw0SWKKxNMMOahz7NBTpkBx4rQ
[Moto G4 Plus ROMs, Kernels, Recoveries, & Other De] lCrD512:
Re-download the arm build and check again. I've updated.
[Moto G4 Plus ROMs, Kernels, Recoveries, & Other De] Slayer5934:
Ill re-flash the 32bit version over the clean rom and see what happens. Ill edit this when I'm done. Thank you for your fast response :)

Edit: I flashed the arm (32bit) kernel over the clean build but same result, bootloops.. D= Not sure if I'm doing something wrong, Ive flashed kernels before though so I don't think I am.

1. Wipe Dalvik, Cache, System, Data

2. Install Rom

3. Install GApps

4. Installed Magisk

5. Successful boot

6. Went into recovery, flashed kernel

7. Bootloop
[Moto G4 Plus ROMs, Kernels, Recoveries, & Other De] alvintimothyjr:
Running AICP flashing 5.1 caused bootloop.
[Moto G4 Plus ROMs, Kernels, Recoveries, & Other De] Slayer5934:
Maybe you should revert to stable till you can see whats up, I can help you test if you want help. Whatever it is, causing the cpu to screw up because there are lots of misspellings in the log such as "Kevnel Panic - nou syncing:" and random upper and lowercase spellings, the difference between a capital and lowercase is only one bit..
[Moto G4 Plus ROMs, Kernels, Recoveries, & Other De] lCrD512:
If possible contact through telegram - https://t.me/loonycrd

I don't have this device so can't debug the issue myself
[Moto G4 Plus ROMs, Kernels, Recoveries, & Other De] lCrD512:
Bootloop issue has been fixed on both 32 and 64 bit. New v5.1 zip updated links in 1st post.

Thanks [MENTION=7099813]Slayer5934[/MENTION] for the logs, it helped :highfive:
[Moto G4 Plus ROMs, Kernels, Recoveries, & Other De] Joel Oliveira:
Why did you restore the GPU's default clock?
[Moto G4 Plus ROMs, Kernels, Recoveries, & Other De] lCrD512:
I've already answered this. Asking same thing again and again won't change the answer. If you want higher GPU speeds (650mhz+) buy a device which supports the same.
[Moto G4 Plus ROMs, Kernels, Recoveries, & Other De] Joel Oliveira:
I asked him why he removed the GPU overclock. You got my question wrong.
[Moto G4 Plus ROMs, Kernels, Recoveries, & Other De] lCrD512:
Ugh, https://xdaforums.com/showpost.php?p=76132672&postcount=58 check the source if you still have doubts :|

I can add 650 or even more just for show/display purpose but that doesn't make any sense, 550 is what our hardware is capable of and out of which in normal daily use without much gaming you'll be using mostly 400mhz and rarely full 550mhz. So not adding any placebo/bogus patches, hope you understand now. Raw hardware specs below:

Adreno 405: 48(pipelines) @ 550 (Boost) MHz [athene: Max GPU speed 550]

Adreno 430: 192 @ 650 (Boost) MHz

Adreno 420: 128 @ 600 (Boost) MHz

Adreno 418: 128 @ 600 (Boost) MHz
[Moto G4 Plus ROMs, Kernels, Recoveries, & Other De] luiz_neto:
thanks
[Moto G4 Plus ROMs, Kernels, Recoveries, & Other De] lCrD512:
resurrected
[Moto G4 Plus ROMs, Kernels, Recoveries, & Other De] mynewpasswordis789:
Kernel

Which Kernel maneger should i use?
[Moto G4 Plus ROMs, Kernels, Recoveries, & Other De] Ayan Uchiha Choudhury:
1. Do not quote OP.

2. Download kernel auditor and see if it checks your requirements otherwise you need to pay a little for Ex Kernel Manager (but worth it)
[Moto G4 Plus ROMs, Kernels, Recoveries, & Other De] mynewpasswordis789:
Thanks

I have EX kernel maneger
[Moto G4 Plus ROMs, Kernels, Recoveries, & Other De] lCrD512:
v6 Update for both 32 and 64bit

Got some feedbacks from 64bit users that they were facing some issues with frequencies so that has been fixed in this new update.

Now that I had to push this new update publicly, I've also added a couple of features which includes spectrum app support etc. For details about spectrum and other changes kindly read the 2nd post of this thread. Also read the notes provided with changelogs in that post to avoid any issues, I don't write those notes for myself so please read before flashing :p

Thanks [MENTION=6324159]rajatgupta1998[/MENTION], [MENTION=6970195]Titan068[/MENTION] and Abhijeet for testing and feedbacks :)
[Moto G4 Plus ROMs, Kernels, Recoveries, & Other De] ManuelLima1994:
the latest version in 32 bits the mobile does not pass the bootloogo
[Moto G4 Plus ROMs, Kernels, Recoveries, & Other De] Nirman2:
ARM Ik-6-dts is booting but no internet access through hostpot while usb tethering is working and ARM lk-6 version is not booting at all.

Really like the looney kernel as only updated supporting 32bit architecture
[Moto G4 Plus ROMs, Kernels, Recoveries, & Other De] CMKdaGreatest:
What is DTS?
[Moto G4 Plus ROMs, Kernels, Recoveries, & Other De] ChimneysMITH:
All builds boot fine if you flash the correct version. Both dts and non-dts builds have same features only difference is they are for different roms. Read this release post for details: https://xdaforums.com/showpost.php?p=76366688&postcount=63

That's strange because everything is working fine here including hotspot. I am using 32bit dts version

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

Thanks dev I really liked the spectrum modes. Game play was actually improved after selecting that mode. Apart from this kernel I've only used spectrum once in Candyrom but it never gave this good performance in gaming mode it was like all the modes have same level performance but in this you can actually see the difference. Thanks for updating :highfive:
[Moto G4 Plus ROMs, Kernels, Recoveries, & Other De] Slayer5934:
Whats your cell provider? If possible try switching to an APN with IPv4 only, on most (if not all) oreo builds IPv6 is not handled correctly on certain mobile carriers such as T-Mobile. On T-Mobile you can use the StraightTalk T-Mobile APN (wap.tracfone) and it uses IPv4.

Here's an interesting read, if you take a logcat I'm sure you will find (ipv4only.arpa) mentioned multiple times. IPv6 sometimes does not work with it.

https://tools.ietf.org/id/draft-cheshire-sudn-ipv4only-dot-arpa-08.html
[Moto G4 Plus ROMs, Kernels, Recoveries, & Other De] AlokSaxena:
Awesome update :D

Thanks dev v6 is really nice for me specially spectrum support. Good that now I don't have to deal with kernel manager complexities

Just one click to switch between those modes thanks for that. I put it on battery mode before sleep and got significant reduction is idle drain overnight :laugh::victory:

So does this mean that development is resurrected!? I really hope it is.. this is the only 32bit kernel which works great for me.
[Moto G4 Plus ROMs, Kernels, Recoveries, & Other De] asingh470:
Well i tried the 64bit one it was working fine and at the time of charging after 1 hour 12% charged with temperature 46.7% . It was on balanced mode and minimal background activity even wifi was not connected & I reboot the device after that it went into boot loop. May be my bad luck
[Moto G4 Plus ROMs, Kernels, Recoveries, & Other De] lCrD512:
Sorry but I don't have any plans of continuing on xda. I released this build as a fix because some users reported to me on telegram loosing lower frequencies when coming from other kernels or clean flashing this kernel over their respective stock rom's kernel and this build was not possible without testers.

Thanks for you appreciation and you or anyone can contact me through telegram (check op for contact details) for any issues and test/private builds if interested. It doesn't matter if I have to build even for one interested person (which I already do for my close testers circle) as I do this for fun in my spare time. :)
[Moto G4 Plus ROMs, Kernels, Recoveries, & Other De] lCrD512:
Hotspot is working fine as reported by testers to me. There's nothing I changed related to that. That's all I can say without logs. Thanks.

... :-|
[Moto G4 Plus ROMs, Kernels, Recoveries, & Other De] asingh470:
Still testing no issues on RR Rom for now. Hotspot is working fine for me.
[Moto G4 Plus ROMs, Kernels, Recoveries, & Other De] Luis Infante:
Can I Flash v6 over v5.1?