[Nexus 6 Q&A, Help & Troubleshooting] micmars:
Kernels and Tweaking

If you wish to flash a kernel, here are a few guidelines to get you started

Note: Most all of this was written entirely by @wrongway213.

1. Kernel Basics:

1.1: Stock Kernels: You can keep a stock kernel if that is with which you are comfortable. The stock kernel will force encryption, and there are modified stock kernels that will not force encryption.

1.2: Custom Kernels:

1.2.1: Hotplugging: Hotplugging is basically the background process going on telling your phone when it needs to bring CPU cores on and offline. This controls how much power your phone consumes - both how much battery it drains and how snappy it feels. You can use a kernel tweaker app (more below) to set all kinds of things in the kernel, including how hotplugging is done. Different kernels have all sorts of different hotplugging options.

As of 5.1, stock kernel uses all four cores online at all times as opposed to hotplugging. This is said to save power. Some kernel developers have adopted this as the default for their custom kernels, but they are still tuned very differently than stock. The user can still choose to revert back to hotplugging if they prefer it. Prior stock kernel, including 5.0X Lollipop, use something called MP-Decision to scale your frequencies. Some are of the opinion that MP-Decision is entirely too aggressive in how it handles this. It attempts to give the user a snappy and smooth experience, but in the end it mainly drains battery. The same smooth experience can be achieved via hotplugging properly on a custom kernel, and your battery will thank you for it.

1.2.2: Governors: Another awesome thing you can do when you flash a kernel is control the governor it uses. Stock kernel uses an interactive governor, which responds to user input and is generally considered to be a pretty good governor, even for custom kernels, However, it is often modified on these kernels, or at the least assisted with hotplugging in a different way than stock. This governor has been modified by [MENTION=3357040]Imoseyon[/MENTION] for leanKernel, one of the most popular kernels for our device, and a great place to start if you want to know if custom kernels are for you or not. Some prefer to use conservative, which is much less jumpy than interactive - meaning it does not scale frequencies up or online cores as quickly as interactive. This governor has been heavily modified for our device by [MENTION=3292224]franciscofranco[/MENTION] (Franco Kernel dev), so it is a much more viable option for those whom want to conserve battery and still get great performance. There are many different governors offered with different kernels - you can change your experience on the very same kernel by changing governors sometimes. Or you may find that you flash a new kernel and find a whole new set of governors that are more your style. This is all about trial and learning what you like, as none of us can know what is best for your use.

1.3. Kernel Use and Utility:

1.3.1: Wakelocks, An Example

A kernel can do many things if the kernel dev chooses to make it, or to give the user the option to avail such options, or can be omitted entirely if running stock. Though not the source of your wakelocks, kernels can disable wakelocks can control or disable them. This is a good example of the separation of a kernel's ability and a kernel's use.

1.3.2: The Domain of the Kernel:

Many kernel devs choose to leave the kernel footprint small, and allow the ROM side of things to handle as much as possible. Some kernels use the existing ramdisk that comes with the ROM instead of inserting their own to ensure they will play nice with all roms. Other kernels are highly customized and completely and totally change the feel of your device. Most are somewhere in the middle of these extremes.

1.3.3: What Your Kernel Does Not Control:

Your kernel does not control your radio, your WiFi, etc, so thus your phone calls, your data, your mms and sms messages are not impacted by flashing a kernel. Sometimes flashing a kernel may somehow cause something that is controlled by the ROM side of things not to work correctly - this is not the norm, though. If you are having these issues, you should look to your ROM first.

1.3.4: Random Reboots:

Random reboots are something that may be caused at a kernel level. If you encounter one, you should immediately on boot (ie, right after the random reboot) open your file explorer go to the folder:

sys/fs/pstore

There should be an annotated-ramoops file and a dmesg file (think of these as kernel logcats). Open the files as text, copy and paste to www.hastebin.com and send the link to your kernel developer. This will help him or her determine if it the reboot was caused by the kernel, and if it can be fixed.

1.4: Sound Practices:

1.4.1. Avoid Multiple Kernel Tweaking Apps:

The use of multiple kernel tweaking apps is contraindicated. If your rom comes with a performance app but you like to use your own instead, freeze your rom's performance app in (using the built-in App Manager, or with an app like Titanium Backup) and clear its app data prior to using your app of choice. Most kernels have an app that is either directly associated or supported by them, or recommended to use with them. Find this out in the thread before you tune your kernel, as having the right options available and interfaced correctly makes it much easier to do so. It's also good practice if you have flashed a custom kernel already to re-flash your rom before flashing another to ensure settings stick properly. This is not always necessary, but it only takes a minute and it's better safe than sorry.

1.4.2: Default Kernel Settings or Using Terminal Command Line:

Some kernels don't even require an app at all. A few of them are tuned on initial setup via Aroma installer - you set your values and can leave it at that. Others can be tuned directly via terminal emulator.

1.4.3. Kernel Tuner of Choice:

Most kernels require some sort of an app to set your values. If your kernel does not come with a particular app associated with it, there are a few options for you. A popular option has always been Trickster Mod. This app offers the basics that you need if using a kernel that does not have a whole lot of odd modifications and is good for beginners who are using a kernel with no recommended app. Advanced users often use Synapse - it is a very confusing app and definitely not for beginners, but it gives you control over basically everything your kernel has to offer. Kernel Auditor is something in the middle, as it does not allow you as much control (or confusion) as Synapse, but it can do a lot that Trickster can't. It's a great starting point for those of you using a kernel with needs Trickster does not meet, or a good place to jump to if Trickster is just getting old, but you're not ready for Synapse.

1.5: Afterwards:

To be sure, there is plenty more reading to be done, depending on which kernel you choose to flash and how advanced you would like to get with it. This is just meant to give those of you who don't know why they would want to do something like flash a kernel a starting point. The decision is yours.

Happy flashing!