yashsingh1/xdaforums huggingface dataset:
[Xperia Z1 Original Android Development] Androguide.fr:
[KERNEL][CM-based] Pimped Kernel (F2FS|SoundControl|DT2Wake|CPU & GPU OC|Color Control|Voltage|FastCharge|Intelliplug...)

​

THIS KERNEL IS ONLY FOR AOSP/CM BASED ROMS

(= NOT COMPATIBLE WITH SONY FIRMWARES)​

All the kernel features are controllable through my Pimp My Z1 app, (thread here).​

Features

Download

Disclaimer

# Neither me or any contributors to this kernel can nor will be held
# responsible for any damage or any kind of problem related to its use.
# You are using this piece of software AT YOUR OWN RISK.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.

Sources

Credits

XDA:DevDB Information

Pimped Kernel, Kernel for the Sony Xperia Z1

Contributors

Androguide.fr

Kernel Special Features: Sound Control, GPU OC, Intelliplug, PowerSuspend, Dynamic Fsync, exFAT, F2FS, KSM, Intellidemand, Intelliactive, SmartassV2, InteractiveX2, Lionheart, Wheatley, Badass, Lagfree, BFQ, SIO, FIOPS, Westwood, Hybla, HSTCP, HTCP, Veno, Illinois, LP, BIC...

Version Information

Status: Beta

Created 2014-02-25

Last Updated 2014-07-29
[Xperia Z1 Original Android Development] Androguide.fr:
Reserved

Instructions for switching to F2FS

/!\ WARNING: This operation will wipe all your data as well as your internal storage /!\

Download an F2FS version of Pimped Kernel

Flash it in recovery

Reboot recovery, you should now be in the included modified CWM

Go to 'mounts & storage' and select 'format /data and /data/media (/sdcard)'

Go to 'mounts & storage' and select 'format /cache'

Reboot & Enjoy

Why using F2FS?

I recently compared ext4 & f2fs in a series of benchmarks, and F2FS clearly provides better performance than ext4.

You can read the full comparision & benchmark results here: http://xdaforums.com/showthread.php?t=2697069

Please note that f2fs might be more prone to data corruption or otherwise be less stable, although I have not encountered any issue at the moment.
[Xperia Z1 Original Android Development] Poesini:
Great, flashed it. Works like last one, but still can't disable MP-decision :(

And can't CPU OC yet.

I don't know if Honami control will fix these issues.

Thanks, great anyway!
[Xperia Z1 Original Android Development] Juzman:
Subscribed. Cannot wait for this to be an awesome "pimped" kernel for CM11.

Will you have a flashable zip?

I fastboot flashed the boot.img, however no more root / superuser.

Update: flashed supersu zip - now have root.

Kernel is working fine, however getting random soft reboots every now and then.

FIOPS / 2048 readahead / Intellidemand / ECO on / intelliplug on / mpdecision off

min 300 / max 1267200 / multicore power saving 1
[Xperia Z1 Original Android Development] CappyT:
Thank you for your hard work, [MENTION=4752917]Androguide.fr[/MENTION] , you are making awesome things.

Testing the kernel now.

[OT Mode ON]

Also, a little bit OT, but.. does omnirom support theme chooser?

[OT Mode OFF]
[Xperia Z1 Original Android Development] pranii23:
Is there any possibility of including gamma control like as in Xperia Z??
[Xperia Z1 Original Android Development] Ahki767:
Could you add pegasusq governor?
[Xperia Z1 Original Android Development] Androguide.fr:
Thanks for your support.

Omni currently does not include the theme chooser, but I hear a revamped one is on its way.

I will look into it but I don't think I'm a good enough kernel dev to do the port, if DooMLoRD ports it to DoomKernel then I will probably merge it.

If you have a link to its implementation on an other msm8974 device's kernel, please send it to me and I'll take a look.

InteractiveX2, SmartassV2 & Lagfree are merged but not enabled as they cause build errors when enabled in defconfig , I will try and fix those when I got time.

Same for the VR I/O Scheduler, it's merged but not enabled in defconfig atm.
[Xperia Z1 Original Android Development] Androguide.fr:
Nice, there has been an avalanche of commits merged on the CM kernel, apparently related to the remaining camera & hardware overlays bugs, I merged those and I'm building right now.

EDIT: here's a link for the flashaholics, this one has the Omni boot logo as I'm at work and I forgot to commit the Pimped Kernel boot logo, but otherwise it's the same kernel with the new CM commits included.

I'll rebuild it tonight with the correct bootlogo and version name.

Download: http://d-h.st/kZ1

MD5: b44957069fbeb431ccb0e2e5b7772e72​
[Xperia Z1 Original Android Development] Miustone:
Great kernel! runs great with Omni Honami ROM (latest build) :good:
[Xperia Z1 Original Android Development] BunkerBert:
Can someone make a flashable zip of the new kernel? Iam @ work and want to flash this "on the fly" :D

Ty for your awesome work ;)

Gesendet von meinem Xperia Z1 mit Tapatalk 2
[Xperia Z1 Original Android Development] CappyT:
[MENTION=4752917]Androguide.fr[/MENTION] there is a problem with your kernel, I get strange random reboots and sleep of death...

I tried to set governor to interactive, but no luck at all...

Inviato dal mio Xperia Z1 utilizzando Tapatalk
[Xperia Z1 Original Android Development] shamps:
Any chance this week have tap to wake feature??

Cheers!

Sent from my Xperia Z1
[Xperia Z1 Original Android Development] Androguide.fr:
I won't be able to help unless you provide me with more infos such as which rom you're running and a logcat of you trying to set the governor for example.

A kmsg of the random reboots would be nice, too.

I suspect the issue is with the ramdisk as none of the above issue seem to occur on Omni.
[Xperia Z1 Original Android Development] CappyT:
Ok, today i will switch to aosb and then if it happens i will provide logcat an kmsg... Any app to use for that? (Apart of echo from terminal?)

Inviato dal mio Xperia Z1 utilizzando Tapatalk
[Xperia Z1 Original Android Development] Ry Chy®:
Nice...wow...cool!

I am running this kernel on the new cm11 4.4.2 rom AOSB. Without problems. Now I can run my *.flac Music whith more GAIN...YEAH!

Only thing is that for example Bard´s Tale wont save the data to sd-card. Can it be solved with the kernel? I just heard in the AOSB thread its a Android 4.4 related problem. In this moment I am saving my sd-data and try to partitioning it. Or maybe this is useless? Can I get the apps to save to sd-card with this kernel maybe?
[Xperia Z1 Original Android Development] Androguide.fr:
For the logcat you can use the "Catlog" app.

For the kmsg I don't think there are any apps, you'll need to use adb or the terminal:

cat /proc/kmsg > /sdcard/kernel-message.txt

or, after a random reboot to get the kmsg from before the reboot:

cat /proc/last_kmsg > /sdcard/last-kernel-message.txt
[Xperia Z1 Original Android Development] Androguide.fr:
Did you have this issue with the CM kernel or the previous kernel you were running ?

If you didn't then it's probably due to the mass storage support for sdcard commits included in the ramdisk, it might not be compatible with other roms.

I will rebuild the kernel with the stock CM ramdisk tonight.
[Xperia Z1 Original Android Development] Ry Chy®:
Was on stock rom before (Monx´s Rom for Z1 and DooM´s Kernel), no problem at all. Since I´ve flashed AOSB yesterday, with stock cm-kernel or this one, I have this problem.

~~~~~~~~~~~~EDIT~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Didn´t had success with partitioning sd-card in any way. Neither with Win7 Software or TWRP. Bad thing. Is there any patch or workaround for Android 4.4 ?
[Xperia Z1 Original Android Development] Androguide.fr:
Don't do that!

The mpdecision binary is just there as a way to enable or disable mpdecision in userspace, it's here to make-up for the lack of sysfs interface as mpdecision is closed-source and qualcomm didn't intend it to be disabled.

There was a bug in Pimp My Z1 which I fixed today where I didn't disable mpdecision when enabling intelliplug on boot, so that didn't stick, but other than that the toggle in the app works fine (verified with faux clock).

This is how to use the mpdecision binary if you want to do it manually in terminal:

To disable mpdecision and enable intelliplug (never do one without the other, or you'll be left without any hotplugging mechanism)

stop mpdecision
echo 1 > /sys/module/intelli_plug/parameters/intelli_plug_active

To enable mpdecision and disable intelliplug:

start mpdecision
echo 0 > /sys/module/intelli_plug/parameters/intelli_plug_active

About CPU OC & VDD control, still not much progress, the CM kit-kat kernel doesn't use acpuclock-krait/acpuclock-8974 to define the frequency & voltage tables anymore, and I haven't been able to implement OC on the replacement. For OC I'm not too much in a hurry either as I don't really see the need to overclock this processor, it's already plenty of power, for my use of a smartphone at least. But voltage control would be nice, yeah, I need to look further into it.

About the omni stuff, no there isn't an option to set the size of the navbar, and I won't include it (unless it's merged in the upstream omni repos), as this completely breaks one of the basic UX rules of android, the 48dp touch target rule.
[Xperia Z1 Original Android Development] Destroyedbeauty:
Can't we just use an "echo 0" on the "enable" file under the /mpdecision sys folders for disabling it, and a "echo 1" on the Intelliplug module below / straight after?
[Xperia Z1 Original Android Development] Poesini:
Intelliplug doesnt seem to work, at least for me it never shuts down the second core so Im left with 2 running cores at 300 at minimum which with MPDecision I get one core at 300 when idle.
[Xperia Z1 Original Android Development] prbassplayer:
For the life with me I can't figure out why this kernel doesn't work with my kernels wlan.ko. If you flash with the one built with this kernel works fine
[Xperia Z1 Original Android Development] tcchuin:
I'm experiencing the same thing. Checked by using trickster mod and the built-in performance tool in omnirom.
[Xperia Z1 Original Android Development] Juzman:
Does this mean we will soon have pimped kernel on SlimKat? :)
[Xperia Z1 Original Android Development] gallardo5:
Camera issue is the most strange thing i've ever seen in Android :confused: my camera was working fine yesterday after flashing your kernel even after several reboots. Today after rebooting it stoped working again (freezing at one frame after reboot, then "cannot connect to the camera). The only thing Im doing is updating CM every day with CyanDelta. Any possible solution to this? I tried wiping cache and camera data, still no go.
[Xperia Z1 Original Android Development] Androguide.fr:
When you update CM, your kernel gets replaced with the CM kernel from the nightly you're flashing, just reflash Pimped Kernel after updating CM and you'll be ok.
[Xperia Z1 Original Android Development] gallardo5:
Sorry, I forgot to mention that Im also doing this. Ive got app set up to flash your kernel after cm flash, and it geta flashed as bootlogo is yours so Im always running latest CM and your latest kernel. Maybe there is something that I shouldnt do to have camera working or anything?
[Xperia Z1 Original Android Development] Androguide.fr:
As I said, there is no sysfs interface for Qualcomm's mpdecision (=no msm_mpdecision folder under /sys/kernel), the mpdecison binary (/system/bin/mpdecision) is used as a replacement for the lack of sysfs interface, allowing us to toggle it on and off.
[Xperia Z1 Original Android Development] nardusg:
Is it possible to get +ANT working in this kernel?

Thanks for the great work so far :D
[Xperia Z1 Original Android Development] gallardo5:
I think I found why camera wasnt working. I was using ART, after switching to Dalvik it works again
[Xperia Z1 Original Android Development] lowrider_05:
i´m using ART and my camera works but if it freezes a reboot fixes it.
[Xperia Z1 Original Android Development] marouane80:
hi mr pimped !:good:

can you build a kernel for xperia z1 compact (amami) on cm11. we have a build that boot but without graphic. thank you !
[Xperia Z1 Original Android Development] berimornils:
Kali say, FXP added support in the past

Отправлено с моего Xperia Z1 через Tapatalk
[Xperia Z1 Original Android Development] Destroyedbeauty:
I can verify that 1) disabling MP-Decision and 2) then enabling Intelliplug, + ECO Mode, forces all 4 (or 2 in eco mode) cores online at the same time and is causing unneeded battery drain, specially when screen is off..

Tried with init.d script, Fauxclock and Pimp My Z1 - the issue is there no matter what.. :thumbdown:

How to fix this?
[Xperia Z1 Original Android Development] Poesini:
I have been reporting this for like 15 days probably and no one said anything :(
[Xperia Z1 Original Android Development] husky69:
Hi,

as my current ROM fails to boot I have to replace it by the looks.

Two questions, as I didn't find a clear answer skimming the thread:

Is this kernel stable (enough) for daily use, e.g. no random reboots?

Is it possible to use this with Slimkat ROM, too?

Thanks for telling :D
[Xperia Z1 Original Android Development] Juzman:
Kernel is very stable on CM / Omni. Unfortunately doesn't work on SlimKat. :(
[Xperia Z1 Original Android Development] BunkerBert:
Ezz! How Can i switch?

Gesendet von meinem Xperia Z1 mit Tapatalk 2
[Xperia Z1 Original Android Development] Destroyedbeauty:
In developer settings
[Xperia Z1 Original Android Development] Androguide.fr:
I'll take a look at it, thanks for reporting. This probably is a problem in my intelliplug implementation, just use mpdecision in the meantime.
[Xperia Z1 Original Android Development] BunkerBert:
Edit: Found!

Gesendet von meinem Xperia Z1 mit Tapatalk 2
[Xperia Z1 Original Android Development] Androguide.fr:
2014-03-13 Build

Here is a new build:

Changelog

Downloads
[Xperia Z1 Original Android Development] Juzman:
Keeps getting better. May just have to move back to CM or Omni.
[Xperia Z1 Original Android Development] Poesini:
Ahhh nice :), nice, nice :)

Is the TWRP fix added?
[Xperia Z1 Original Android Development] Androguide.fr:
Still not, completely got out of my head, sorry.
[Xperia Z1 Original Android Development] Poesini:
U dont need to apologize lulz I was just mentioning. Nothing that is critical though I can survive with CWM just fine :)
[Xperia Z1 Original Android Development] Destroyedbeauty:
It's better if he fixes the faulty Intelliplug + ECO Mode combination first..
[Xperia Z1 Original Android Development] tcchuin:
yeah, that's the reason i jumped ship from stock rom to custom rom&kernel :eek:.

but take your time please, no rush :D
[Xperia Z1 Original Android Development] gallardo5:
Sorry for bringing it back, but I though my camera was fine, but it broke again. Even reboot doesnt fix it, it hangs every time I open it and then "cannot connect to the camera". After reboot the same thing happens all the time
[Xperia Z1 Original Android Development] Destroyedbeauty:
Try with cleaning data + cache, and FC app. Then boot into recovery and wipe cache and Dalvik Cache and try again! :)
[Xperia Z1 Original Android Development] Androguide.fr:
2014-03-14 Build

I fixed intelliplug, here's a build

Changelog

Downloads

EDIT: strangely, this seems to have broken wi-fi, I'll look into it tomorrow
[Xperia Z1 Original Android Development] fizfaka:
i experience slow charging and my phone get very hot, even just with browsing. its happen with last kernel. is this issue fix with this new build?
[Xperia Z1 Original Android Development] tcchuin:
Is this the same problem that's faced by doomlord kernel?
[Xperia Z1 Original Android Development] nardusg:
wifi not working with latest kernel... 03-10 wifi works but 03-24 no wifi

Or is there something I need to activate somewhere ?
[Xperia Z1 Original Android Development] darkrulerz:
Well...Androguide.fr is already aware of that according to his post.

So yes, seems wifi is indeed not working ;)
[Xperia Z1 Original Android Development] nardusg:
oops... did not see that... thanks :D
[Xperia Z1 Original Android Development] Destroyedbeauty:
I am also getting this kind of issues on latest. Going back to previous, non-working Intelliplug / eco-mode kernels..

[MENTION=4752917]Androguide.fr[/MENTION]
[Xperia Z1 Original Android Development] Androguide.fr:
By latest do you mean 03-13 or 03-14 build ?

Please use the 03-13 build (latest usable one) until I release a new one.
[Xperia Z1 Original Android Development] tcchuin:
also, is it possible to tune the variable in intelliplug? i remember doing that while i was on other kernel.
[Xperia Z1 Original Android Development] Destroyedbeauty:
I meant 03-14 build (working Intelliplug / non-working Wifi) kernel build. So I am back on 03-13 build.

The only issues on 03-14 build was 1) Non-working wifi and 2) Slow charging and overheat issues when phone is charging / in use unplugged from charger..
[Xperia Z1 Original Android Development] Androguide.fr:
Yeah you can tune the fshift and run hysteresis in /sys/module/intelli_plug/parameters

I'll add those controls to Pimp My Z1 once intelliplug is fixed whithout breaking WiFi.
[Xperia Z1 Original Android Development] zhuoyang:
I saw [MENTION=4752917]Androguide.fr[/MENTION] said that F2FS is implanted in another thread and what is left now is a F2FS recovery. Great work on that :D

Sorry for my bad English /.\
[Xperia Z1 Original Android Development] Androguide.fr:
Still needs a few fixes on the kernel side too, but yeah eventually we should be able to use Samsung's F2FS for all partitions except ext sdcard.
[Xperia Z1 Original Android Development] tcchuin:
just realised that I've confused intelliplug by faux123 with mpdecision by showp

http://xdaforums.com/showpost.php?p=48778204&postcount=3

Sorry for the trouble caused and thanks :)
[Xperia Z1 Original Android Development] CappyT:
Intelliplug is working correctly for me...

Inviato dal mio Xperia Z1 utilizzando Tapatalk
[Xperia Z1 Original Android Development] Androguide.fr:
It does not, eco mode works but intelliplug doesn't, you'll always get 2 cores online.

Here is a screenshots with intelliplug working, from the last build
[Xperia Z1 Original Android Development] CappyT:
Oh, i think 2 cores at least must be online... Anyway I wait till is fixed...

Inviato dal mio Xperia Z1 utilizzando Tapatalk
[Xperia Z1 Original Android Development] Destroyedbeauty:
Btw, it is one more issue that I've to report.. Snake Charmer kernel module isn't working either. it will always reset to Off both in Pimp My Z1 and Fauxclock app. Is this related to Intelliplug issue?
[Xperia Z1 Original Android Development] Androguide.fr:
Snake Charmer isn't implemented in the kernel (neither in Pimp My Z1), the option appears only in the beta version of FauxClock. It seems faux is trying to emulate the snake charmer behaviour in userspace through the app.
[Xperia Z1 Original Android Development] juicio90:
Work for me?
[Xperia Z1 Original Android Development] Destroyedbeauty:
Ok, I see..

How is Wifi error & slow charging / heat issues fix going?

Intelliplug is working, but not Wifi on latest kernel..
[Xperia Z1 Original Android Development] Androguide.fr:
Either you have intellliplug disabled (under power management), or you're running the 03-14 build, in which case your wifi isn't working.
[Xperia Z1 Original Android Development] juicio90:
Look:
[Xperia Z1 Original Android Development] juicio90:
And...
[Xperia Z1 Original Android Development] Androguide.fr:
It's easy to verify, please open Terminal Emulator and run the following command, then post the result:

cat /sys/module/intelli_plug/parameters/intelli_plug_active && cat /sys/devices/system/cpu/offline
[Xperia Z1 Original Android Development] juicio90:
Sorry, but can't upload more than one shot. Look this too.

Isn't the lasted version, but work fine right now..
[Xperia Z1 Original Android Development] Destroyedbeauty:
Builds before 03-14 got working Wifi, but faulty Intelliplug module that forces all cores online, and working Intelliplug is using dynamic, load on-system Hotplug policy that offlines / onlines cores depending on system overall load..
[Xperia Z1 Original Android Development] Poesini:
Intelliplug seems to be enabled, but doesnt really work (you can see any of the cores ever get turned off)
[Xperia Z1 Original Android Development] juicio90:
Comand don't work :
[Xperia Z1 Original Android Development] Androguide.fr:
You got a typo, it's intelli_plug_active, you got 2 'i's instead of 2 'l's
[Xperia Z1 Original Android Development] juicio90:
Omg...sorry!

Look:
[Xperia Z1 Original Android Development] Androguide.fr:
As expected, you have 2 cores online, the correct output would be:

1
1-3

The 1 means intelliplug is enabled, the 1-3 means cores 1 to 3 are offline.

However, even with intelliplug working properly you can have 2 cores online too, of course.

To see more obviously that intelliplug isn't working properly, disable eco mode in Pimp My Z1.

Do what you want, but using intelliplug on builds prior to 03-14 will drain a lot more battery than using mpdecision.

Btw, just a heads-up, mpdecision isn't bad at all you know, Qualcomm engineers probably know their own SOC very well, and although Paul Reioux (faux) has a very solid personal & professional experience with embedded systems he is working more or less alone on this driver.

In terms of performance to battery ratio, I'm not sure intelliplug is drastically better than mpdecision, but it's open-source and customizable as opposed to mpdecision.
[Xperia Z1 Original Android Development] juicio90:
Yes... Now 3 core are online... That means isn't working properly right?
[Xperia Z1 Original Android Development] juicio90:
OK. Right now I power off eco mode and see this:
[Xperia Z1 Original Android Development] Destroyedbeauty:
Intelliplug is better for battery life, mpdecision is for performance. It's well known fact and also other users experience when comparing those two! Let's use my own experience, so can you imagine how highly I value fully working Intelliplug, without sacrificing wifi ofc and other issues..

I used Intelliplug on my old & sold Z and got 1,5 days out of one charge with 9,5-10 hours screen on time, when I only got 14-16 hours on mpdecision w/ 3,5-4 screen on time.. The good thing with Intelliplug is that it doesn't use pesky CPU boost to "cheat" performance / smoothness, it controls the overall CPU calculation and needs straight in kernel low-level areas.

This was with the same governor, IO and CPU settings on both hotplugging policys - Intellidemand governor and Deadline scheduler.
[Xperia Z1 Original Android Development] Kingcool88:
Are you guys working together on wifi fix for Slimkat?
[Xperia Z1 Original Android Development] husky69:
After a bit of reading it looks like SlimKat's not supported by this kernel.

Are there any plans to make it work for that wonderful ROM?
[Xperia Z1 Original Android Development] Juzman:
I wish it were. Developer of SlimKat said he has no plans to get the ROM to work with this kernel. :(

I'm considering swapping back to CM11 for the kernel.
[Xperia Z1 Original Android Development] Androguide.fr:
Intelliplug is now working properly without breaking wifi on the latest Omni build (uploading right now), it should also work with the latest CM nightly but needs to be tested.

About SlimKat, [MENTION=3877985]prbassplayer[/MENTION] I suspect it's because you're missing the last 17 CM commits in hardware/qcom/wlan.

It would be nice if maybe you could try to make an experimental build where you merge CM's latest wlan commits and use my kernel sources, see if that works ?

I needed to merge those in order to get Wi-Fi to work on Omni on my latest build as well, Wi-Fi was broken even when using the CM kernel sources before I did.
[Xperia Z1 Original Android Development] juicio90:
Where is the link? :p

I'll try!! :D:thumbup: