yashsingh1/xdaforums huggingface dataset:
[X Style (Pure) Android Development] mddunner:
Got it, thank you! I'll try to give this a go today and report my results. I'm a light user mostly interested in stability and battery performance.
[X Style (Pure) Android Development] Curlyfry2121:
It's stable, I recommend you turn off touchboost, turn on bricked hotplug, and change the governor to either zzmoove or conservative. At least that's my set up.
[X Style (Pure) Android Development] mddunner:
Right on. And those settings are changed within Kernel Auditor? Thanks for the tips!
[X Style (Pure) Android Development] ismithx:
can you screenshot your parameters for me please?
[X Style (Pure) Android Development] Curlyfry2121:
Kernel auditor could do it. But I'll say if your really into it and like tweaking the kernel, get ex kernel manager, it's a couple bucks but it's very nice and well worth it.
[X Style (Pure) Android Development] rayparlour:
Good to see some dev still going on with this phone. Kernel seems pretty good, but im getting random reboots occasionally on validus rom.

Also if u could maybe add swipe2wake/swipe2sleep that would be great.

Thanks for everything.
[X Style (Pure) Android Development] Curlyfry2121:
Yeah and now there's cosmic os at Android file host, gonna test on this room soon, I just noticed it has alucard hotplug on this rom, gonna check it out. But really I think bricked hotplug is more balanced. Like where this custom kernel goes, already getting nice daily updates.

Haven't used validus so can't vouch for that. Don't use the interactive govenor and see if it fixes it
[X Style (Pure) Android Development] ausaras:
I flashed 1.3 yesterday and I am experiencing booting problems. After flashing v1.3 and wiping cache/dalvik, phone boots up OK. But if i reboot the phone, again, it becomes stuck at the bootanimation.

I am running AICP12 5/17 nightly. I also tried 5/14 nightly, same thing happened. Did not experience this problem with v1.2
[X Style (Pure) Android Development] XDleader555:
Tested this issue on a clean Rom flash. v1.3 seems to be fine after many reboots.

Might be a kernel base issue? I occasionally get a boot issue where the phone boots and vibrates occasionally, but will never get to the lock screen. I suspect there's a bad setting found on the data partition since wiping /data fixes it. Unfortunately, the last time it happened, I had ADB disabled so I couldn't pull a log. Next time it happens, I'll see if I can get some data to resolve it.

EDIT: Happened again, you might be onto something. I'll check what's going on.

EDIT2: Got it. Seems like a wifi driver issue, or something tied to it? The system kills everything after this exception and loops.

05-13 12:49:43.718 3668 3859 E AndroidRuntime: *** FATAL EXCEPTION IN SYSTEM PROCESS: WifiStateMachine
05-13 12:49:43.718 3668 3859 E AndroidRuntime: java.lang.StringIndexOutOfBoundsException: length=0; index=0
05-13 12:49:43.718 3668 3859 E AndroidRuntime: at java.lang.String.charAt(Native Method)
05-13 12:49:43.718 3668 3859 E AndroidRuntime: at com.android.server.wifi.WifiNetworkHistory.readNetworkHistory(WifiNetworkHistory.java:352)
05-13 12:49:43.718 3668 3859 E AndroidRuntime: at com.android.server.wifi.WifiConfigManager.readNetworkHistory(WifiConfigManager.java:1887)
05-13 12:49:43.718 3668 3859 E AndroidRuntime: at com.android.server.wifi.WifiConfigManager.loadConfiguredNetworks(WifiConfigManager.java:1716)
05-13 12:49:43.718 3668 3859 E AndroidRuntime: at com.android.server.wifi.WifiConfigManager.loadAndEnableAllNetworks(WifiConfigManager.java:464)
05-13 12:49:43.718 3668 3859 E AndroidRuntime: at com.android.server.wifi.WifiStateMachine$SupplicantStartingState.processMessage(WifiStateMachine.java:4613)
05-13 12:49:43.718 3668 3859 E AndroidRuntime: at com.android.internal.util.StateMachine$SmHandler.processMsg(StateMachine.java:980)
05-13 12:49:43.718 3668 3859 E AndroidRuntime: at com.android.internal.util.StateMachine$SmHandler.handleMessage(StateMachine.java:799)
05-13 12:49:43.718 3668 3859 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:102)
05-13 12:49:43.718 3668 3859 E AndroidRuntime: at android.os.Looper.loop(Looper.java:154)
05-13 12:49:43.718 3668 3859 E AndroidRuntime: at android.os.HandlerThread.run(HandlerThread.java:61)

EDIT3: Found a relevant commit. I'll upload a new build after class.

EDIT4: It's a Rom source issue. I'll see if I can compile out a module for a quick fix, but ask your Rom developer to apply this commit: https://github.com/AOSPAPlus/android_frameworks_base/commit/7dd7ab6573de08bc9a56839e1ff15674dbddd011

EDIT5: You know, I should actually test these fixes before posting. I'll let you know.

EDIT6: Ok, I believe I've found the actual culprit. But the above commit is something we might be worried about anyways.
[X Style (Pure) Android Development] ausaras:
Thank you for investigating this issue. I was really enjoying this kernel with bricked-hotplug.

Looking forward to the new version!
[X Style (Pure) Android Development] ozg33k:
So awesome that this kernel was made. Thank you so much.
[X Style (Pure) Android Development] XDleader555:
Here we go. I've confirmed this fix works on my device on Lineage OS. This is only a temporary fix and goes away after you flash/update your Rom again.

This is for when you see "*** FATAL EXCEPTION IN SYSTEM PROCESS: WifiStateMachine" referencing "WifiNetworkHistory.java" in logcat while stuck at the bootanimation. I can't guarantee that it'll fix your issue without a logcat. I also can't guarantee that this will work on different Roms or newer versions in the future.

Not even sure if you need this anymore, but it's here for anyone else having this issue.

Seems there's a little bit of discussion going on at code review about it.
[X Style (Pure) Android Development] dzidexx:
[MENTION=3623188]XDleader555[/MENTION]

Hi, I'm using your kernel with RRemix 5.8.3, very good job.

I observed strange thing:

Kernel adiutor doesn't keep settings. Yesterday I did set both cpus to intelliactive, bricked hotplug min/max/max(screen off) cpus online to 1/6/2. After reboot everything OK 6/5/4/3/2 cores online.

Today morning after unplagged from charging - all six cores online or deep sleep.

Now I'm checking ExKM with interactive, brickedH & 1/6/1 - default.

22:24 - interactive, brickedH. Everything ok.
[X Style (Pure) Android Development] dbolivar:
First of all, thanks for the kernel. I'm gonna try it out, but have two questions:

1) Is this wifi issue supposed to happen on every LOS-based ROM, even the ones recently updated (say, last week)? Is there a quick way to test, or only leave a logcat running while waiting?

2) You mentioned it uses the original ramdisk. I'm currently using Magisk (which patches the ramdisk). If I first uninstall Magisk (flash uninstall zip in recovery), flash your kernel, and then flash Magisk installer, should it work?
[X Style (Pure) Android Development] XDleader555:
As long as this commit isn't merged or resolved, you'll possibly be affected. This isn't caused by my kernel (afaik). Its a Rom issue. You can't really check if you're affected. If you're experiencing this stuck boot issue, you can still connect by adb and run:

$ logcat | grep FATAL

Here's the commit I'm referencing:

https://review.lineageos.org/#/c/167135/

You don't have to uninstall magisk. The kernel is separate from the ramdisk. By original ramdisk, it means it uses the current ramdisk that you're using.
[X Style (Pure) Android Development] dbolivar:
Cool, thanks. Just flashed the kernel and indeed Magisk kept working, including SafetyNet = pass. And I must say: WOW, your kernel is MUCH faster, even with the default settings! Excellent job! And lots of settings to play with... :)

I didn't flash the wifi fix, will try it in case the issue happens and report here.

Current ROM: crDroid 3.2

Device: XT1572, LATAM dual-sim
[X Style (Pure) Android Development] xgerryx:
Flashed this with the newest RR Rom and lost root upon booting up. Also randomly rebooted a few times in the first 5 minutes of using it. Didn't change anything in settings yet.

After a couple hours of Bluetooth at the gym, major problems with reboots still, reverting back to the stock RR kernel.
[X Style (Pure) Android Development] dzidexx:
For me it works great!

RR 24.04(better gestures then 14.05), ExKM - intelli, interactive, zzmoove for both cpus, bricked hotplug.

Intalliactive - no problems,

Interactive - it disables big cpu?!?

Now testing zzmoove.
[X Style (Pure) Android Development] ismithx:
I seem to have some sort of bug where I am stuck at boot with the latest kernel on Mokee OS. the wifi fix does not work for me, I'll try to pull a logcat again when I have the time to brick and unbrick my phone.

BTW I can get out of that by dirty flashing the OS again
[X Style (Pure) Android Development] Ken C:
Just wanted to say that it's nice to see Somebody working on a kernel for this device. I wouldn't even know where to start.

Going to try it on the newest AICP and let you know what I get. Saw another post saying that had that room with this kernel.

Keep up the good work is appreciated

Tapatalk
[X Style (Pure) Android Development] XDleader555:
You asked for it, you got it.

05/21/17 - 7:38AM - v1.4

Added Wake Gestures by flar2 (DT2W, S2W, S2S)

Added uKSM

Interactive CPU governor pulled from Pixel source (Seems to have fixed our crashing issue)

Added Despair and Chill CPU governors

Power efficient work queue mode (wq_power_saving)

KEXEC

Updated zmalloc and zram

Adreno Boost

Overclocking/Underclocking

I added flar2's wake gestures to our device, which results in a little more customization than previous. While the code is based off frankenclark, it's not exactly the same. We'll need testers before I can say anything is stable. (Look for battery drain, waking up correctly, in phone calls, etc.) (Seems like there's a bug, if you enable wake gestures while the screen is off, the screen will stop responding eg. automatically setting it on boot)

Also pulled in the interactive driver from a relatively new source. It seems to be a lot more stable than the previous one we had. I also need people to confirm if this is fixed.

Downloads are in the usual spot: https://xdaforums.com/devdb/project/?id=20678#downloads
[X Style (Pure) Android Development] lknnnn:
I love u！Thanks a lot！:good:
[X Style (Pure) Android Development] XDleader555:
If you can get a logcat, I might be able to fix it. If you are affected by the wifi bug, I noticed my phone decided it was a good time to regenerate the application cache so boot took about 10 minutes.
[X Style (Pure) Android Development] dzidexx:
I always do backup boot+system before flashing another kernel, but

Do you suggest wipe dalvik after it? Now I have 05-17-1950 build. [MENTION=3623188]XDleader555[/MENTION]

Ps.

Zzmoove&brickedH works very good - 11 hours and now battery at 77%.
[X Style (Pure) Android Development] XDleader555:
Nah, I don't think you'll need to wipe davlik/cache. Save yourself from waiting 10 minutes for an app cache rebuild. I believe you only need to wipe those if you're modifying the system (update to ROM).
[X Style (Pure) Android Development] dbolivar:
Just installed the new version, boots fine, however I think the new interactive governor has some issues: all the CPU cores are constantly at the max frequency (both little and big cores), therefore the hotplug driver never unplugs them. I fixed that by changing the governor for something else that scales properly, and setting the "Idle Frequency" of the Bricked Hotplug to something higher than 384 MHz, which is the minimum (so it would never unplug a core).

Of course that with the default settings it's the most butter smooth experience I had, since there's no clock scaling nor unplugging. :) But I think it would impact battery... The temperature remains fine, however.

BTW: your kernel also works with the latest Dirty Unicorns weekly.
[X Style (Pure) Android Development] XDleader555:
Thanks for letting me know. I'll work on setting some optimized defaults for everyone.
[X Style (Pure) Android Development] ismithx:
oh NICE! I installed the latest kernel, no bootloop/stuck issues
[X Style (Pure) Android Development] mddunner:
Installed 05/21 update on CR droid 3.2. Booted right up. Running stock settings for now and will report back on results. Thank you for all your work on this. I'm looking forward to tweaking
[X Style (Pure) Android Development] dbolivar:
Power Suspend Mode

Does [MENTION=3623188]XDleader555[/MENTION] or somebody have more information about how the Power Suspend Modes work? The default used to be Hybrid, now it's LCD Panel. From what I researched, it seems that:

Autosleep: power suspend based on idle time.

LCD Panel: power suspend based on screen on/off.

Hybrid: mixed Autosleep + LCD Panel.

So I would think Hybrid should give the best battery savings, but I don't know if it can cause issues with other kernel features, or ROM features such as Ambient Display, Moto Actions etc. (especially the ones that should turn on the LCD panel from sleep).
[X Style (Pure) Android Development] XDleader555:
Small Update

05/22/17 - 2:37AM - v1.5

Wake Gestures: Fixed touchscreen not responding when enabling gestures with the screen off

Wake Gestures: Fixed touchscreen not responding in ambient display

Wake Gestures: Phone call detection

Set msm_hotplug as default

Tweaked msm_hotplug defaults slightly

Increased default idle frequency for bricked_hotplug to 600mhz

Downloads: https://xdaforums.com/devdb/project/?id=20678#downloads
[X Style (Pure) Android Development] XDleader555:
Right, forgot about that. I merged Power Suspend 1.6 (and 1.7) where shamu-specific changes were made. Autosleep isn't working correctly on shamu.

I'll look into re-enabling those options and you can decide if autosleep is working correctly or not.
[X Style (Pure) Android Development] angrymexican76:
Hats off to you boss man! This kernel is running phenomenal on my X-pure with Resurrection remix!
[X Style (Pure) Android Development] mddunner:
Sticking to kernel adiutor for now... I disabled touchboost and set CPU governors to zzmove. I'm having trouble determining if bricked hotplug is properly enabled. Looking at the CPU Hotplug section, I see MSM hotplug disabled, and Bricked Hotplug enabled. Is that all that is required?

So far so good on CR Droid 3.2!
[X Style (Pure) Android Development] ismithx:
I find that cores frequently ramp up quickly and as much as 3 cores may come online while the phone is idling, anybody else have this problem?
[X Style (Pure) Android Development] jason2678:
If you don't like the default behavior and you're using the interactive governor you could look into some of the Nexus 5X scripts. Both devices use the SD808.
[X Style (Pure) Android Development] Bwangster12:
How is this kernel as a replacement for the Lineage 14.1 stock kernel... from a battery perspective? If I flashed it, enabled the DT2W stuff and then maybe changed the governor to impulse or something... will that be good? I love LineageOS, but want DT2W and want to squeeze out more battery on this aging Moto X Pure.

Does this have to be re-flashed after each Lineage update?
[X Style (Pure) Android Development] XDleader555:
You'll know Bricked Hotplug is enabled when you see cores being taken offline.

None of the defaults for the cpu hotplugs have been set. You'll need to tweak to your liking.

It's too early to tell the battery life. After all this kernel was first released five days ago.

And yes, kernels have to be flashed again after each update.
[X Style (Pure) Android Development] dzidexx:
[MENTION=3623188]XDleader555[/MENTION]

Last two builds - cannot set hybrid power save mode - only auto, userspace & Lcd.

Also cannot change selinux - always back to enforcing.

RRemix 24.04.
[X Style (Pure) Android Development] Gulfstream 650:
I'm definitely seeing better life with screen off, went from an average 54% deep sleep to 75% with the latest kernel. I'm using the bricked hotplug, zzmove scheduler, and zen I/O. Using Kernel Adiutor I'm not seeing how to change or see what profile zzmove is using, do I need another tuner for that? To early to gauge SOT battery life, but I'm really digging the kernel so far!
[X Style (Pure) Android Development] branran:
Is your battery life better on this kernel or the stock CrDroid one?
[X Style (Pure) Android Development] mddunner:
I feel like it's still too early to tell... Only been a couple days. So far seems about the same to me. I'll continue to monitor and report back
[X Style (Pure) Android Development] Bwangster12:
So about the same... but smoother/faster operation?
[X Style (Pure) Android Development] mddunner:
I'm not a heavy user, so it really feels the same to me. The stock cr Droid kernel already felt real quick, as does this one. I was mostly looking for better battery performance out of handbag.
[X Style (Pure) Android Development] XDleader555:
The hook for auto sleep is never called on our device.

* v1.4 - add a hybrid-kernel mode, accepting both kernel hooks (first wins)

It seems that the panel hook and autosleep hook did the same thing. At this point, panel mode seems to be sufficient.

Here's a log of powersuspend in autosleep mode

05-23 12:49:55.981 0 0 I : [ 677.826316,0] [POWERSUSPEND] panel resquests wakeup.
05-23 12:49:56.395 0 0 I : [ 677.982236,0] [POWERSUSPEND] panel resquests wakeup.
05-23 12:50:03.745 0 0 I : [ 685.524721,0] [POWERSUSPEND] panel resquests sleep.
05-23 12:52:43.151 0 0 I : [ 844.568201,0] [POWERSUSPEND] panel resquests wakeup.
05-23 12:52:43.151 0 0 I : [ 844.716960,0] [POWERSUSPEND] panel resquests wakeup.
05-23 12:53:01.883 0 0 I : [ 863.758485,0] [POWERSUSPEND] panel resquests sleep.
05-23 12:53:05.522 0 0 I : [ 867.273922,0] [POWERSUSPEND] panel resquests wakeup.
05-23 12:53:05.522 0 0 I : [ 867.404211,0] [POWERSUSPEND] panel resquests wakeup.
05-23 12:53:35.308 0 0 I : [ 897.179805,0] [POWERSUSPEND] panel resquests sleep.
05-23 12:53:41.409 0 0 I : [ 903.162844,0] [POWERSUSPEND] panel resquests wakeup.
05-23 12:53:41.409 0 0 I : [ 903.292282,0] [POWERSUSPEND] panel resquests wakeup.
05-23 12:54:00.446 0 0 I : [ 922.338665,0] [POWERSUSPEND] panel resquests sleep.
05-23 12:54:05.478 0 0 I : [ 927.365292,0] [POWERSUSPEND] panel resquests wakeup.
05-23 12:54:05.608 0 0 I : [ 927.494469,0] [POWERSUSPEND] panel resquests wakeup.
05-23 12:54:15.616 0 0 I : [ 937.507367,1] [POWERSUSPEND] panel resquests sleep.
05-23 13:03:03.830 0 0 I : [ 1465.558968,2] [POWERSUSPEND] panel resquests wakeup.
05-23 13:03:03.830 0 0 I : [ 1465.716587,0] [POWERSUSPEND] panel resquests wakeup.
05-23 13:03:10.336 0 0 I : [ 1472.229756,2] [POWERSUSPEND] panel resquests sleep.

If autosleep were working, we would see the following.

[POWERSUSPEND] state activated.
[POWERSUSPEND] entering suspend...
[POWERSUSPEND] suspending...
[POWERSUSPEND] suspend completed.

In conclusion, I'll leave powersuspend as it is.
[X Style (Pure) Android Development] komidzo:
I'm curious what steps you took to get this to work. I flashed tonight and it made my phone crash over and over right when it got booted up. It would get to the unlock screen and woot reboot.

Did you have a kernel manager installed before? After? Which one?

Thanks!
[X Style (Pure) Android Development] XDleader555:
Seems to be a bug I'm encountering too. I believe a temporary fix is to switch the interactive governor to something else before the screen turns off.

I'll work on finding a fix.
[X Style (Pure) Android Development] XDleader555:
Updates and some more stuff

05/24/17 - 2:54AM3:16AM - v1.6

Update linux from 3.10.102 -> 3.10.105

Added Lazyplug

Moved msm_hotplug to system_wq

Fixed boot issue caused by msm_hotplug

Set Lazyplug as default. (msm_hotplug still works if set by user)

I think I accidentally had two hotplug drivers coming up on boot causing a crash in the last build. Let me know if this build fixes it.

EDIT: Will upload new build defaulting to Lazyplug.

I've also added Lazyplug from frap129, you can see what each option does here: https://github.com/frap129/angler/blob/dev/ng-mr2/drivers/cpufreq/lazyplug.c

The quick tl;dr is that cpu cores stay on longer in favor of getting tasks done quicker and then ramping frequencies down (and voltages) thus saving power.

Downloads are in teh same spot: https://xdaforums.com/devdb/project/?id=20678#downloads
[X Style (Pure) Android Development] lilcdroid:
Newest build has solved the constant reboot issues I was having as described above by komidzo. Using this on CRdroid 3.2. I prefer running interactive with glassfish tweaks so changing governor's wasn't an option for me. We'll see how Lazyplug works, but so far looks like we have a winner. Kudoos and thanks for your time and effort.
[X Style (Pure) Android Development] Curlyfry2121:
Lazy plug has made my standby a lil better so far. Cores stay on during screen on and turn off when screen off so I'm kinda digging it.
[X Style (Pure) Android Development] mddunner:
I got 1 day 16 hours and 2 hours SOT with my last charge using zzmove. This did include some bluetooth audio playback, but I was hoping for more SOT. I'm installing this latest update and will try Lazyplug. Still on CR Droid 3.2, XT1575.

Thanks for your continued work on this!

Edit - Realizing I got my terms mixed up. I'm still using zzmove governor, but am using lazyplug rather than bricked hotplug.
[X Style (Pure) Android Development] dzidexx:
Ups...

I lost my sim card!!!

Flashed 1.6 at 17.05, wifi ok, no cellular communication.

Restored efs - not helped.

Restored backup RRemix - system, boot, efs - ok.

Flashed again - no cell.comm.

I haven't such problems with any previus version. [MENTION=3623188]XDleader555[/MENTION]
[X Style (Pure) Android Development] GchildT:
Latest AICP for Moto X Pure - So far, so good. Data and Wifi work, which is usually the biggest issue I have with MXP kernels.
[X Style (Pure) Android Development] dbolivar:
Very nice addition, the Lazyplug hotplug driver. Looks like an interesting approach. I've been struggling to get optimal performance from msm_hotplug and bricked_hotplug, I was setting them either too agressive but smooth, or too battery-friendly but with some lags/stutters. It reminds me an older discussion I was following a few years ago, regarding CPU governors (it wasn't on Android, though, but it's the Linux kernel anyways): some people advocated that the CPU frequency scaling was actually *detrimental* to battery life, because of the scaling overhead vs. task efficiency. The hypothesis was that by leaving the CPU at max frequency all the time (performance governor), tasks would be executed faster and with less overhead, allowing the CPU to enter idle states (C1, C2 etc.) more quickly, thus saving more power. The concept sounded plausible, but on Android I noticed a higher drain with this approach, so I reverted to other scaling governors. It's an interesting topic, though.
[X Style (Pure) Android Development] XDleader555:
Might have something to do with the updated linux version. If you can get me a logcat I can start helping you.

You'll need adb or root.

Through adb:

adb logcat -b all -d > %userprofile%/Desktop/logcat.txt

Through your phone:

Download a terminal app

su
logcat -b all -d > /sdcard/logcat.txt

It'll take about 10 seconds for the command to work. Preferably catch the log as soon as you boot.

Upload the logcat as an attachment.
[X Style (Pure) Android Development] dzidexx:
Now I have 22.05 & moto is charging now.

I'll do it later. [MENTION=3623188]XDleader555[/MENTION]
[X Style (Pure) Android Development] rayparlour:
On latest AICP. v1.6 fixed the rebooting issue, but now im encountering times the screen wont turn on, i can feel the haptic feedback from inputs but the screen stays off. the only solution is to restart
[X Style (Pure) Android Development] dzidexx:
Hmm...

Flashed at 22.05 and all works fine.

[MENTION=3623188]XDleader555[/MENTION]

Thanks for help.

I think that it was:

"Huge network failure Orange, there are problems with access to the Internet".