yashsingh1/xdaforums huggingface dataset:
[X Play Original Android Development] squid2:
Squid Kernel r11

The highlight of this release is a new CPU hotplug driver I created specifically for MSM8939. I've named it ClusterPlug.

The idea behind it stems from the fact that this CPU has a rather odd big.LITTLE configuration, where the big CPUs are of the same type as the little ones. Clock-for-clock, the performance per watt of the big and little cores are about the same, but the little cores are slower than the big ones. The regulator layout on this device has big and little CPUs grouped together, reducing the benefit of hotplugging individual cores. However, hotplugging clusters can result in significant savings, as you can shut down the regulators for an entire section of the SoC.

These considerations led to the somewhat unconventional design of this hotplug, where it always keeps the big cluster online, and only activates the little cluster when required. Not only does this save battery power, but it also improves performance (real world and benchmark) by keeping single threaded tasks running on the fast cores.

I've enabled this hotplug by default on the kernel. Everything comes configured with sane defaults out of the box, so no additional configuration is required. Be aware that manually enabling/disabling cores with hotplug enabled is useless, so don't do it. If you do want to disable hotplug or change settings for whatever reason, you can configure it under /sys/modules/cluster_plug/parameters.

In this build, I also enabled my "Lionfish" CPU governor that I've been offering on surnia and osprey for some time. It's essentially an enhanced version of the "conservative" governor that tries to balance responsiveness with a preference for lower frequencies, and it also tries to minimize frequency jitter.

Be aware that a cpufreq touch booster is enabled by default on this kernel. The touch booster will boost the CPU to full speed whenever you touch the screen. This gives the best responsiveness, but it increases power consumption somewhat. You can disable it if you're concerned about battery life.
[X Play Original Android Development] Higgsy:
Cool update, I am getting random reboots when opening photos after flashing, no mods to the kernel. Tied for a last_kmsg but doesn't look like it is enabled as returns nothing
[X Play Original Android Development] mishko:
[MENTION=6485916]squid2[/MENTION] After flashing r11 CPU governor was set on Interactive by default.

EDIT: Can you please provide all values for r11 if it's not too much trouble?

Skickat från min XT1562 via Tapatalk
[X Play Original Android Development] Higgsy:
Noticed this too
[X Play Original Android Development] LuizHenrique91:
+1

It's warmer too.

Edit: I think it's warmer because of the CPU boost. That would be natural.
[X Play Original Android Development] roberth1990:
For me the row i/o scheduler works much better than fiops, so I will have to disagree with having fiops by default and saying the defaults are sane.
[X Play Original Android Development] squid2:
Interactive has always been the default scheduler. The scheduler is set by the ROM, not the kernel. What values do you want to know?
[X Play Original Android Development] squid2:
The last_kmsg hsa been replaced by /sys/fs/pstore on newer kernels. If you could capture the pstore logs after a reboot, that would be great. My suspicion is an interaction with the QCOM Power HAL. I may need to leave the hotplug off by default in the kernel, and then enable it in scripts on CyanogenMod once I create a modified Power HAL that doesn't conflict.

P.S. I experienced by first ever SoD when testing this on a CyanogenMod built the the QCOM PowerHAL left in. Now that I can reproduce it, I'm going to investigate the causes.
[X Play Original Android Development] manan001:
Hello [MENTION=6485916]squid2[/MENTION] i did not get any sod till now but after flashing xposed getting sod.. Am on kernel r10g 11nov.
[X Play Original Android Development] squid2:
Try deleting the Power HAL (/system/lib/hw/power.*.so) and see if the SoDs still happen.
[X Play Original Android Development] manan001:
I found something i changed main core governs to conservative from interactive that created problem it seems.. Now reflashing xposed and then will let you know..

Please find logcate

https://drive.google.com/folder/d/0B9uhHVejSzdOQ2FFWWZaVHNTRms/edit

Update: it seems HAL not creating problem did not delete. If there is different kernel governs for big and small cores then it creates sods.. I changed governs for big cpu core and kept default for small cpu cores.. This created problem.. Still doing some more experiment
[X Play Original Android Development] mishko:
Oh, I just thought Lionfish was enabled by default w r11. Mvm about the values ;).

Skickat från min XT1562 via Tapatalk
[X Play Original Android Development] squid2:
Setting different governors on different clusters could cause problems. When I encountered my first ever SoD this morning, I was experimenting with what you did (differing governors on the clusters), along with lowered CPU idle frequencies (that aggravate the power HAL).. I haven't yet isolated which of the factors caused the SoD, though I was effectively asking for it with last night's setup ;)

When running r10x kernels with unmodified stock settings, I've never had any SoDs.

P.S. For people who want to tone down the CPU boost, you can configure it under /sys/module/cpu_boost/parameters. Probably all you'll want to do is run:

echo "1113600" >/sys/module/cpu_boost/parameters/input_boost_freq
[X Play Original Android Development] seamonkeys:
Device restart when playing youtube with r11, stock rom
[X Play Original Android Development] squid2:
I can confirm this happens, and it's caused by the bloody Power HAL. Go into TWRP, mount /system, and then delete all the /system/lib/hw/power.*.so files. Reboot, and the issues will go away.
[X Play Original Android Development] Higgsy:
Can't recreate the reboot now myself on r11! Recreated it consistently earlier
[X Play Original Android Development] squid2:
I couldn't recreate it myself either on the stock ROM. My suspicion though is that a performance hint sent through the Power HAL is involved though, perhaps when trying to play a video. If you ever encounter a reboot, the pstore logs remain as long as you don't reboot, so just pull the log when convenient.
[X Play Original Android Development] MacLaughlin:
The r11 is causing a bootloop on my device. Currently running your cm build.
[X Play Original Android Development] Higgsy:
Here you go hopefully this is what u are after http://pastebin.com/5FGXHBLf, this was a BSOD tho.
[X Play Original Android Development] Davirus849:
Using the r11 here, nothing strange to report.

I'm just not sure if I like the CPU to be on 1651 most the time, I may switch back to interactive (on both cores) if I found an impact with the battery.
[X Play Original Android Development] manan001:
R11 needs quick fix.
[X Play Original Android Development] Higgsy:
[MENTION=6485916]squid2[/MENTION] got a reboot was in photos again. http://pastebin.com/1Cz4V4rp
[X Play Original Android Development] squid2:
Thanks for the log. It shows what happened quite clearly. As I expected, it's a Power HAL interaction. My hotplug tries to schedule the next hotplug iteration on CPU 0 when the CPU is offlined by the Power HAL, triggering a kernel BUG event.

I can prevent this crash by not forcing the new hotplug check event to be performed on CPU 0, though really the problem is that it's fighting the Qualcomm power HAL. I'll see if there's a way to prevent the Power HAL from interfering without having to delete the file.
[X Play Original Android Development] Davirus849:
Is this a problem for CM users too?
[X Play Original Android Development] manan001:
Yes
[X Play Original Android Development] Higgsy:
Interesting, gone back to 10g and will test when u release the next build.
[X Play Original Android Development] ludaloskpo:
Is possible to make OC in little cores to make a real octa core experience?

Enviado desde mi XT1562 mediante Tapatalk
[X Play Original Android Development] LuizHenrique91:
Same here. With 29% of battery I opened the camera and took one picture. My phone rebooted and couldn't boot anymore. I had to flash one oldest version.

[MENTION=6485916]squid2[/MENTION] if I just rename the power.default.so instead of removing, I'll disable the power HAL?
[X Play Original Android Development] squid2:
Squid Kernel r11b

I've posted a new build that works around some annoying stuff done by the perfd binary driven by the PowerHAL. This should prevent the main causes of crashes related to the PowerHAL. The Qualcomm PowerHAL, and perfd in particular, still conflicts with ClusterPlug, you'll see log spam in dmesg when they are fighting. The perfd binary is just a proprietary binary invoked through an awkward mechanism that tries to force the big cores offline when performing certain actions and tries to mess up and break your settings when it conspires against the user with the aid of it's accomplice the Qualcomm PowerHAL.

For the stock ROM, I still recommend getting rid of the PowerHAL and perfd when using this kernel, but you can now keep it if you insist. If you keep the PowerHAL and ClusterPlug on the stock ROM, it shouldn't crash any more, though you'll see conflicts in the dmesg when doing certain actions. For CyanogenMod, there are fewer conflicts because I had removed the cursed perfd binary early on. On CyanogenMod, in a future build, I plan to fully replace the Qualcomm PowerHAL with my own that doesn't interfere with things that I don't want it to interfere with.
[X Play Original Android Development] roberth1990:
I upgraded to r11 from r10g, but phone locks completely up after being on for an hour, and it continued to do so even after upgrading to r11b.
[X Play Original Android Development] squid2:
Which ROM are you running? What settings have you changed? Can you describe the nature of the lockup? Does it just freeze not respond do anything? Does it reboot after a few seconds? Does it refuse to turn on unless you force a reboot? Are you able to capture any logs? I haven't experienced any such issues with default settings on the stock ROM and CM.
[X Play Original Android Development] roberth1990:
I am running you distribution of CM 12.1, I am using the lionfish cpu governor with a minimum frequency of 200 mhz and the highest possible maximum frequency, "Temperature Throttle" thermal driver, row i/o scheduler with a readahead of 2048 kb otherwise the default settings.

It happend both the times on the course of a couple of hours while I wasn't using the phone. Both of the times I had to force a reboot. I haven't checked any logs, I don't know what logs to check anyway.

I downgraded to r10g and the phone seems to crashed and rebooted automatically suddenly while writing this post, with that kernel I am running the interactive scheduler, otherwise the same settings as described above.
[X Play Original Android Development] squid2:
Most likely the Qualcomm Power HAL is causing your trouble. It can cause issues unless you keep the interactive governor and set the idle frequency to 960 MHz on the big cores and 800 MHz on the little cores (ie. leave the default settings). This is why I want to get rid of it and replace it with something less obtrusive.
[X Play Original Android Development] squid2:
Squid Kernel r11c

Continuing on my quest to incapacitate perfd, this release removes the kernel interface used by perfd to interfere with hotplug. You will no longer get log spam and wars inside your kernel when trying to play or record videos with hotplug enabled on the stock ROM (where perfd is present). Be aware that while perfd is no longer able to sabotage hotplug, that the Qualcomm Power HAL will still try to cause crashes if you change CPU governors or idle speeds. It will seem to work for a while, but eventually the PowerHAL will stab you in the back when someone gives it a hint to kill your phone.
[X Play Original Android Development] FilipeRgz:
testing here last update...
[X Play Original Android Development] Davirus849:
Ok. I'm not messing around with the kernel settings this time.

I'm just wondering if I should leave the interactive governor or should I switch it for the lionfish.
[X Play Original Android Development] squid2:
In the interim, either leave it as interactive or get rid of the Power HAL. I noticed that your screenshot shows a state where CPU 3 is stuck offline. When the hotplug fails to online CPUs 0-3, it concludes that something is interfering with hotplug and just tries to enable all cores it can. This had happened to me once when testing earlier; I'll need to figure out what causes it. Try rebooting and check if hotplug works properly after that.
[X Play Original Android Development] Davirus849:
It went back to normal after some minutes, about 5 minutes.

I just noticed it turns off some of the big cores again after using the camera for video for some 10 minutes. I used to experience something like this with the built in Cyanogen Kernel, while having the Core Control enabled.

Yet, even with some big cores disabled, the system runs fine, and goes back to normal behaviour after some minutes, maybe is just trying to cooling off.
[X Play Original Android Development] LuizHenrique91:
Do I need to run it on every reboot?
[X Play Original Android Development] jellysheep:
Thank you very much for your work. The new kernel runs great. Now using conservative governor on the big cores and performance governor on the little cores (apparently performance is needed when they are activated). Is there a possibility to tune the hotplug?

I don't know what you changed in this release, but with r11c the NFC tag reading fully works!! [emoji2] It didn't work well on all up to your r11 kernel. Didn't test r11b though. Do you need any logs or another test on r11b?
[X Play Original Android Development] manan001:
What about usb tethering os it working well?
[X Play Original Android Development] jellysheep:
I don't know, as I never use it. Maybe someone else could check?
[X Play Original Android Development] Davirus849:
I'm not sure about USB, but WiFi tethering works fine.
[X Play Original Android Development] squid2:
Squid Kernel r11d

This release improves the Lionfish load calculation logic to only compute the load of a particular CPU core only once per sampling period. This solves an issue where bogus CPU loads were being calculated on MSM8939 (lux), leading to wild frequency fluctuations (that the whole idea of Lionfish is to minimize). This also improves the computational efficiency of the governor. You will now be able to experience Lionfish on lux the way it is meant to be - with stable, semi-conservative frequency selection.
[X Play Original Android Development] rober788:
on the latest build i saw that battery is is going faster than previous. Is this latest build the same?
[X Play Original Android Development] Electric Flute:
Do we have to manually change to Lionfish?

Sorry I didn't get it.
[X Play Original Android Development] LuizHenrique91:
yes
[X Play Original Android Development] madcat1990:
Latest build is working fine on my XT1563.

Will check out the battery! :)
[X Play Original Android Development] Electric Flute:
Thanks.

Hey Squid, maybe this information should be in the OP to the newcomers?

Anyway, I changed it with Kernel Toolkit but it reverts to Interactive after reboot... Is there a way to keep it?

Edit: Just saw a setting to keep on boot. Sorry.
[X Play Original Android Development] Berlino:
You can try "Kernel Adiutor" from Playstore - it keeps settings for me.
[X Play Original Android Development] manan001:
View attachment 3545134View attachment 3545135

There is some issue with little cores the are not used at all.. I changed its governs to conservative then also not working and once i close it changes to interactive automatically..
[X Play Original Android Development] Davirus849:
Impressive work Squid!

With this kernel, the performance is as good as usual, but the battery life is incredible.

Zero complains here.

---------- Post added 17-11-2015 at 12:00 AM ---------- Previous post was 16-11-2015 at 11:58 PM ----------

http://xdaforums.com/showthread.php?p=63732464
[X Play Original Android Development] sas46:
I'm following that kernel since the beginning of the project in september, I'm an all day user that really needs an improvement for the stock kernel's lags. I saw that 10f gaved a really good improvement in terms of lags and battery life

I work and I haven't a lot of time to daily update this kernel, what's the best (almost bugfree) release for me?
[X Play Original Android Development] shanthasorooban:
I am using the latest one r11d. Its almost bug free. And Battery life also quite good.

Which rom are you using? Stock?

If not Stock, give a try to Nov-15 CM build and r11d Combo. Wonderful when they are together.
[X Play Original Android Development] sas46:
Thanks for your reply

I'm using the stock 5.1.1 'cause I don't want to lose Moto features, I'm happy with it but I need to get rid of that lags. I'm coming from a Moto X 2014, it was smooth as hell (but terrible battery life and memory) and sometimes make me want to throw away my actual phone.

Last question: Am I going to lose Moto Voice or other Moto features with that kernel?
[X Play Original Android Development] LuizHenrique91:
What is the app that show the frequencies on that floating transparent window?
[X Play Original Android Development] Davirus849:
https://play.google.com/store/apps/details?id=flar2.floatingmonitors
[X Play Original Android Development] manan001:
Hey bro for little cores the governs and frequency changes once i close the audit kernel app.. I did clean installation with 15 nov build and also using the latest 11c version but problem persists..
[X Play Original Android Development] paugustin:
I would say r10g is the best choice. It's my daily driver and it's rock stable while giving great performance and battery life.

You will not lose any Moto feature or app.
[X Play Original Android Development] sas46:
I've flashed r10g and it's awsome!! Smooth, fast and finally LED for notification!

Is there aa way to control or disable it? Light flow?
[X Play Original Android Development] sas46:
As you see from the screen attached my phone is not going in deep sleep

Yesterday I've flashed the kernel and I went to bed, so I didn't use my phone for almost 7h
[X Play Original Android Development] jellysheep:
Which kernel build do you use? Did you tune any CPU settings?
[X Play Original Android Development] sas46:
I'm using the r10g as Paugustin suggested to me

Previously minimum frequencies were set by default to 960mhz for the big and 800 for the little, now I've set both to 200mhz, let's see how it goes
[X Play Original Android Development] manan001:
Yes even i found that r10g is much more stable and holds frequency and governs for big and little cores
[X Play Original Android Development] jellysheep:
Probably you should check if some apps keep your device awake (wakelocks), e,g, using Better Battery Stats or similar apps. Also look in the 'Apps' settings for running services.
[X Play Original Android Development] sas46:
I'm using greenify to prevent that kind of problems
[X Play Original Android Development] jellysheep:
Ok, then I'm sorry I don't have an idea what the problem could be. Are you on stock ROM or CM? If CM, did you check if a restart or a clean install (wipe system before flashing) improves the situation? Does Greenify show any running processes that will not be stopped?
[X Play Original Android Development] sas46:
I'm going to test this night and tomorrow I'll post my results
[X Play Original Android Development] sas46:
That's my usage with 4h 35m sot
[X Play Original Android Development] brom25:
Greenery Facebook app :good:
[X Play Original Android Development] sas46:
Since the last update greenify has some troubles hibernating facebook, I've send a bug report to developer, because if it's opened in background the app sees that it's "working"
[X Play Original Android Development] drsubhash81:
Is there any one with asian indian moto x play xt1562 and led working? I have almist used all version of the squid kernel but led does no seem to work. I am on stock rom with squid kernel. Also tried to use softwares like lightflow led blinker etc but nothing works.
[X Play Original Android Development] skdubg:
You cant configure the LED on stock. its working only in supported apps like whatsapp
[X Play Original Android Development] raj wedhikar:
I m using the latest one and having no issues with led notification light...performance is also nice
[X Play Original Android Development] skdubg:
hi,

this kernel doesnt work with a Droid Maxx 2. phone is in bootloop
[X Play Original Android Development] roberth1990:
Maybe read both title and first post before you start doing anything.
[X Play Original Android Development] route9:
I flashed r11d and have the following issue: When calls are comming in, I can hear the ringtone, but the screen keeps staying black. I only can activate it pressing the power-button. I use the original lockscreen with pattern and have my phone always in a leather case.

Can somebody confirm this? So I went back to r10f and everything´s ok now. (x-play dual-sim, stockrom)

Sorry for my bad english.
[X Play Original Android Development] skdubg:
Droid Maxx 2 is "lux" aka Moto X Play

read the changelog of this kernel!
[X Play Original Android Development] bednar1988:
I have the same on incoming calls however in my case the screen turns on after 2 secs. No need to turn on the screen manually.
[X Play Original Android Development] LuizHenrique91:
Can you check if the file you downloaded is corrupted?
[X Play Original Android Development] skdubg:
its the same file i use an the Moto X Play and there is no problem with it
[X Play Original Android Development] droider007:
i think drivers and other things for x play are up to date with latest droid maxx 2 kernel........it doesn't mean that this kernel is made for droid maxx 2......this kernel is only for x play......don't install it on droid maxx 2
[X Play Original Android Development] skdubg:
yes i know that. but its the same phone, with same hardware components/partition layout.

so i hope for the check of compatibility by the developer
[X Play Original Android Development] LuizHenrique91:
OT here: when you got your Maxx 2, did you notice some lags or stutters on UI with all stock?
[X Play Original Android Development] skdubg:
it feels like the same as Moto X Play.

but there are a few Bloatware Apps from Verizon
[X Play Original Android Development] droider007:
i think with slight modifications....this kernel can work on droid maxx 2
[MENTION=6485916]squid2[/MENTION]
[X Play Original Android Development] route9:
Thx!

It seems that the problem is now fixed. I did another wipe (cache and dalvik) using TWRP :good:
[X Play Original Android Development] mahir1995:
Which is the best version.. I heard some saying r10g
[X Play Original Android Development] ephumuris:
Latest version is working great for me on latest Cyanogenmod 12. No issues at all. Latest is greatest for me.
[X Play Original Android Development] ludaloskpo:
Little core cause system lags

Enviado desde mi XT1562 mediante Tapatalk
[X Play Original Android Development] mahir1995:
I'm using stock
[X Play Original Android Development] shanthasorooban:
Can i use this with latest RR rom?
[X Play Original Android Development] ephumuris:
That's exactly what I meant the OEM. I keep checking their github.
[X Play Original Android Development] XMoDuLeSx:
I did a full restore and flashed the kernel again with no issues but when I flashed xposed and run my modules the deep sleep issue appears :/

Edit: reflashed the ROM and v74 xposed problem solved
[X Play Original Android Development] Zobat:
excuse me but xposed should not be mentioned

it works though :)
[X Play Original Android Development] XMoDuLeSx:
Dunno but with v73 I had that issues that's why I mentioned xposed