[ONE General] ZakariyyaaR:
Melted-Butter Smooth Profile - ZakR

Allllrrite. (: Here we go..

Based upon the small success I had with my previous profile, I am presenting to you a slightly experimental but melted-butter smooth configuration for V137. Enjoy (:

Every single device is different. No two devices in the world are truly the same. This is a little experimental and may be laggy for you.

My OnePlus One

Kernel Version: AK V137

UKM Version: UKM V3.8.1.2 Special Edition

ROM: Blisspop V2.2

Build date: 25th March 2015

GAPPS: PA Pico for Lollipop

GAPPS Compile date: 15th March 2015

Mods: Viper4Lollipop, Camera Next Mod V22, OPO Stereo sound V3 (thanks abhi!

PVS Bin: 4

Speed Bin: 3

Synapse settings

CPU

CPU Frequency Scaling

CPU Minimum Frequency: 300MHz

(//Reducing the frequency to 146MHz has been found to consume more power than 200MHz/300MHz. Besides, I don't want to have longer latency when waking the cores from idle*)

CPU Maximum Frequency: 2457MHz

(//As much as possible, I tend to stay away from OC and UV, better stability and longetivity of internal components)

MSM Limiter

Disabled

(//CPU boost driver tends to pair well with the hotplugging we're going to use*)

CPU Boost Driver @abhi08638 has advised to disable CPU boost driver as the Slim governor is counterproductive. Bear this in mind as it may or may not impact the outcome of your tweaking.

Enabled

Boost: 20ms

Sync Threshold: 1574MHz

(//Lowered from the default because I wanted the CPU scaling up quicker)

Input Boost: 50ms

Input Boost Frequency: 1728MHz

(//The CPU governor we're using is based on elemental X governor which has tunables that will vary this frequency of 1.8GHz)

CPU Governor: Slim

(//This governor is heavily based on the elementalX kernel. I've carried out some experiments and found that this governor allows the cpu to get back to idle quicker than the interactive governor, both with stock settings. The tuneables in this governor work really well with CM's kernel driver*)

CPU Tunables

Powersave bias: 0

(//Highly recommended not to set this to 1 as it will insist on suppressing the CPU to lower frequencies by shaving a tenth of the intended frequency. A little complicated. No use to us)

Input event minimum frequency: 1728000, 1728000, 149700, 1497000

(//When you touch the screen, it's input right? So the CPU(s) will get raised temporarily to this frequency respectively for X number of microseconds, where X is the tuneable "input event timeout". I wanted to try a quad-core adaptation of the idea behind the big.LITTLE architecture in newer SoCs. Therefore when you touch the screen, two cores are temporarily raised to 1.8GHz and the other two are raised to 1.5GHz. Why only two cores raised to 1.8GHz? I carried out a little experiment (again) and found that keeping a minimum of two cores online is slightly more power consuming but for the reduced latency it provides in response it's worth it. So these two cores (cpu0 + cpu1) are already online and they just get raised. The other two cores (cpu2 + cpu3) have to come online and then get raised which takes slightly longer in terms of response time. As a result, they're the two cores which are not the main depended-on cores for when input is detected, and their maximum frequency is three steps lower so they reach their maximum frequency at a faster rate from offline (1.5GHz))

Sampling rate: 20000

(//This tuneable is kept the same as ui_sampling_rate)

Sync frequency: 300000

(//As far as my beginner-level understanding stretches, this tuneable is similar to what is included in the CPU boost driver*)

Up threshold: 85

(//CPU gets a load. If load makes the CPU pass this threshold, it's frequency is raised. I didn't want to keep a balanced profile. I wanted it to be more responsive and if that meant raising the frequency quicker by lowering the threshold, I went ahead with it)

Gboost: 1

(//The developer of elementalX kernel for the nexus line, [MENTION=4684315]flar2[/MENTION] (amazing developer), has coded this tuneable into his kernel to make it easier for the CPU to scale up frequency steps under intense workload. We definitely need to make things easy for the CPU so we will set this to 1 (true))

Down differential: 3

(//Default value. Calculates indirectly the down threshold for the governor. We don't wanna change that to any lower or higher. Lower wouldn't allow the CPU to scale down when not needed, higher would make it scale down more frequently, fluctuating the frequency steps and causing excessive power consumption)

Sampling rate minimum: 10000

(//Minimum number of microseconds (1*10^-6s), so in our case 10000*0.000001=0.1s, the CPU evaluates the load and calculates appropriate frequency. We're keeping it default. Changing this value causes some error in synapse when I tried to go lower)

Up threshold any CPU load: 85

(//Lower threshold = more responsive CPU scaling = better response = reduced latency = slight battery impact)

Sampling down factor: 2

(//I didn't want the CPU to scale down under high loads. Setting this to one 1 makes the CPU evaluate at regular intervals, regardless of workload. Setting it higher than one makes the CPU evaluate at a multiplied interval, resulting in less overhead and better performance. Only when it's done what it's designed to do, I'm letting it scale down. This tuneable acts as a multiplier for the time space in between evaluations of workload)

Up threshold multi core: 85

(//I wanted cores to come online quicker when at relatively intense workloads)

Input event time out: 400

(//Measured in milliseconds, this will set the duration of time input boost is active. I lowered it from the default 500 so it's active for a shorter period of time. Input boost frequencies if you remember are based on the biggielittle idea. Two powerful cores, two weaker cores. Two cores will be online all the time, if you haven't touched the screen for 4 seconds (400 milliseconds) then the CPU will evaluate, check there's no load incoming and then scale down, ready in anticipation of the next evaluation, subsequently letting CPU reach idle quicker)

Ignore nice load: 0

(//Something about niced loads which I don't understand)

Optimal frequency: 300000

(//Self explanatory. Although we want melted butter, we still need butter at the end of the day. We need fluidity but we need a juiced device to be fluid on. Point is. We're not wanting to disregard battery completely)

UI sampling rate: 20000

(//Sampling rate changes temporarily when you touch the screen. What's sampling rate again? That thing where the CPU evaluates how much stuff it has to do and how much powaaah it needs to do it with. I increased it by 5000uS to make the CPU sample/evaluate less so that when under stress it doesn't scale down)

Two phase frequency: 1728000, 1728000, 145700,145700

(//As stated by [MENTION=4684315]flar2[/MENTION], this sets the max frequency for moderate workloads for each core respectively. If more power is needed, the cores will scale up to 2.5GHz)

Hotplug

Intelliplug 5.0

Disabled

(//Based on a first hand experience the fluidity in the scrolling, transitions, animations and response times were smoother with MSM MP Decision*)

MSM MP Decision

Minimum number of CPUs online: 2

(//As mentioned afore, slight battery impact but for the benefit, it's worth keeping two of these cores on)

Maximum number of CPUs online: 4

(//Need I say more?)

Minimum number of CPUs online when screen is off: 1

(//I don't have any Bluetooth car systems, cloud syncing, audio playback, sound recording and streaming so if you prefer, knock this up to 2)

Start delay: 30000

(//The number of microseconds before the CPU checks whether to unplug or hotplug any of the CPUs. For a balanced profile, I slid it down. However, I turned it up so that cores are hotplugged and unplugged less frequently. This may mean they're on for a tad bit longer but when under workload they don't get switch off as often resulting in work done efficiently*)

Time between checks: 120

(//It checks more often than when set to default value but the actual magic takes longer to work so it doesn't fluctuate onlining and offlining at crucial times)

Unplug and hotplug tuneables: Stock

(//They're tweaked by ak. Best to leave them as they are)

Thermal

Intellithermal

Disabled

(//Default kernel settings came with it off which means AK doesn't use it)

Enable Core Control: On

(//You want this on in case your CPU starts cooking your internal hardware)

Frequency Throttle Temperature: 65

Core Throttle Temperature: 70

Thermal Tunables: Stock

CPU Voltage

Stock

(//My reasoning follows: If you can get very good battery life without decreasing power consumption which may or may not have an effect on stability, fluidity and longetivity, why fiddle? That being said, knock yourself out)

I/O

I/O: sio

(//In my opinion based on reading up various input/output schedulers, sio has decent stability with adequate performance. It's cons come in play if you have a flash file system which we don't as far as I'm aware)

Read Ahead: 1024

GPU

GPU Frequency Scaling

Minimum Frequency: 200MHz

Maximum Frequency: 578Mhz

(//I keep it as 389MHz and change it to 578MHz when doing tasks which require more power. For me, 389 is just as smooth when opening basic activities and tasks)

GPU Governor: msn_adreno_tz

(//Best governor as it is stock, therefore the most optimised for the 330 GPU inside*)

GPU simple tunables: None enabled

Gamma

Values

Contrast: 260

Saturation: 280

Value: 260

CABC Control: Off

(//Haven't played with the display settings much. Once I have, I'll be sure to update)

Other display tunables are stock

Sound Control

All three boosts: +2

High Performance Mode: Off

(//Oddly enough, with high performance mode enabled there was no sound in my earphones. With viper4lollipop mod + DDC, I believe I don't need any higher quality*)

Memory

Z-Ram

Z-Ram: 0

Compression Algorithm: lzo

Maximum Compression Streams: 1

Virtual Memory

Drop Caches: Enabled

Extra Free Kilobytes: 20000

Laptop Mode: Enabled

Memory tunables other than the ones above are stock

Wake

My ROM supports DTW and DTS, I have no need for other gestures besides the ones built in. I did try out the init.d scripts from the kernel but the result was terrible. After booting up, there was immense screen jittering. I enabled "show visual touches" in developer options and on the home screen I could see random touches at about 20 times a second. I thought this was due to some incompatible mod with kernel or ROM. I retraced my tweaking configurations and it dawned on me that the kernel gestures were the root of this mayhem. Anyone out there that has random touches on the screen, check to see if your kernel gestures are interfering with your ROM gestures.

Misc

TCP Congestion Control: Cubic

FSYNC: Enabled

Vibrator Intensity: 20

(//Change it to what you prefer)

USB Fast charge: Default

Fast Charge Level: 1200mA

ADV

Krait-C Settings: C0-C3 Enabled

(//The processor is intelligent enough to fall deeper into sleep if each threshold is met. Forcing it to go straight to C3 state will just make it aggressive and increase the delay it wakes up. Those of you that need to finger-bump the screen a few times for it to wake, switch off C3 state)

Kernel Samepage Merging: Disabled

Arch Power: Disabled

BUILD.PROP

WiFi Scan Interval: 300seconds

VM Heapsize: 512MB

Tools

SELinux status: Permissive

(//This is to allow Viper4Lollipop to function)

Optimise Databases on every new flash

* Your mileage may vary. Every device is different. This is my experience and opinions based on extensive research. If I've stated something incorrect, if you have feedback of any sort, please don't hesitate to correct me or tell me.

The Results

I took the first three screenshots yesterday. 6 hours and 10 minutes of SoT with 1 and a quarter hours of 1080p video playback over Wi-Fi. 50% brightness. Played GTA SA (30fps, medium settings) and had a screen recorder running for 15 minutes from 17% battery to about 5% battery. The last screenshot I took just right now, leading me to believe at this rate I'll get easily 7 and a half hours of SOT and maybe hit 8 and a half/9ish if I underclock to 1.7Ghz. If I go even further I can hit 10 hours easily, underclock to 330Mhz on GPU, 1.5GHz on CPU and keep 2 cores online maximum. I can't seem to upload more than 4 attachments or at once so I'll upload the .tgz file in another post.

If I have made any mistakes, once again, I reiterate that feel free to correct me. Thank you. Peace. (:

//Edit//

Some screenshots of this profile a day or two later (last three screenshots). No underclocking, no undervolting of any sort. No project volta either.