[Q] Power settings API - Gen8, Gen9, Gen10 Q&A, Help & Troubleshooting

So, I've been working on a widget for the Archos 101 and basically have it working flawlessly with any other hardware state that is common among Android systems (silent mode toggle, screen brightness, wifi, etc) and I want to make it so that it will toggle between the various power settings (overdrive, optimal, and powersaver) which basically provide throttle control for the CPU. However, I can't seem to find the correct code for those settings. I've been digging around in the source code and still no luck.
Does anyone know what is used to adjust the state?
If I get it going, it will be free on the market. I'm mostly doing this to keep learning Android development and not really looking to become rich off it.

It switches the clockingtables and the Governor.
So it is not only one api call.

Actually it might be just the governor;
conservative, ondemand and performance seem to fit the behaviour although I'm not 100% sure.

No, in the powersave they switch the max Frequency to 800Mhz

Related

[Q] Best Setcpu profiles?

Hello,
I am wondering what the best Setcpu profiles are for SGSII when you want performance while awake and save as much as possible in Idle.
Can I put it all the way down to 500mHz while screen off and still be able to run background processes properly?
I don't really see why this shouldn't work. I had it set like that, but I also have it set to 500MHz when active quite often, as this is enough for many applications. Still, that might not be necessary, as it resides in this state quite much of the time anyway.
Since I have undervolted my phone recently, I had to set the "screen off" profile to 800MHz so that the screen comes up (otherwise, it wouldn't). But in the end, it probably doesn't matter too much what you have set for that profile, as the phone should be sleeping most of the time anyway, shouldn't it?
jeo1996 said:
Hello,
I am wondering what the best Setcpu profiles are for SGSII when you want performance while awake and save as much as possible in Idle.
Can I put it all the way down to 500mHz while screen off and still be able to run background processes properly?
Click to expand...
Click to collapse
Profiles are useless, the ondemand governor should scale down your cpu by default when not in use, that' s the whole point of this governor!

[Q] Maintain Full CPU Speed with Screen Off

I was just wondering if there is a way to allow the X2 to maintain full CPU speed, even when the screen is off. The reason I am interested in this is that I want downloads and other background operations to be able to complete quickly, even when I turn the screen off to conserve energy.
Some background:
In order to make our phones conserve battery, the CPU frequency is reduced when the screen is off. I am not sure if this happens with 100% stock, but it is certainly the case with custom ROMs (e.g. I'm now running Eclipse 1.2), and I know some of the performance scripts do this as well.
Ordinarily, this is great, because it drastically improves battery life. But there are times when I want a background process to run (e.g. app updates or internet downloads), and I want to turn off the screen to save battery, but I would like the process to keep running at full speed.
Yesterday, I was transferring files over wifi, and I was getting speeds of 1.2MB/s or more when the screen was on, but when I turned it off, the speed dropped to around 400KB/s or so. I turned the screen back on to check, and sure enough the speed resumed at the higher rate. (BTW, I have the wifi sleep policy set to never). I'm assuming this was all due to CPU frequency throttling.
Ideally, I would like to have the current battery-conservative behavior most of the time, but in some occasions I would like to switch the behavior to allow full CPU speed during screen-off.
Is there a setting I can change (or a script, app etc). I've seen some info about SetCPU. Does anyone recommend this app, and is it likely to conflict with or be overridden by the settings in a custom ROM or performance script such as supercharger etc?
I would love it if someone could point me to some more information about this issue, and the Android settings and hacks that affect it. Thanks in advance!
If u have a script in init.d that refers to CPU frequency ...then whenvu use setcpu the value u put for min should hold. Atvleast for a little while. U can also set a screen off profile in setcpu.
Imbnot sure if these values will hold for long tho due to our kernel limits

[Kernel] [AOSP/TW] Plasma kernel Note4-1.21

Code:
Disclaimer: I am not responsible for any damage caused by or done with this kernel.
.
About
Welcome! Plasma kernel is a unique and specially tailored custom kernel for the Snapdragon variant of the Note 4. It is the product of my strange brain and the monkeys that reside within it. Plasma kernel is designed to be very flexible, able to cater to those who wish to miser every bit of power, as well as those who demand performance, speed, and fluidity. It combines some common features from brilliant developers around the world, along with a great deal of my own work. One thing worth mentioning is that unlike most other kernels, this one does not offer many CPU governors, as much work was put into its flagship governor, ZZMoove. Currently Plasma kernel is only for TouchWiz ROMs, but an AOSP version is already in the works. Thank you for your interest!​.
Screenshots
.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
..........
.
..........
.
.
General Features
Compiled with Linaro 4.9, tuned and optimized for Cortex A15
Initially based on Starkissed's (twistedumbrella) repo
All settings fully configurable with andreilux's free Synapse app
Mpdecision and thermald disabled
Additional I/O schedulers (noop, deadline, row, cfq, bfq, sio, fifo, zen, vr, fiops)
CPU under/overclocked to 268 MHz - 3,072 MHz
CPU voltage control
GPU under/overclocked to 166 MHz - 800 MHz
Simple GPU Algorithm
Charging control
mDNIe Hijack color control for KitKat
KCAL color control for Lollipop
Kernel Samepage Merging (KSM)
CRC control
TCP control
SELinux always permissive
Frandom
Rngd control
Stereo call recording
Fauxsound
Plasma Features
Extended LED control
Touchkey multipress lockout
Touchkey remapping at the driver level
Touchkey Flicks
Touchkey Slides
Turbo Home button
Plasma Simple Scaling Lock instead of Hardlimit
Optional kernel-level universal wakelock
Optional always-on voice detection tweaks
Optional always-on touchscreen (can wake from deep sleep)
Touchscreen reduced scanrate while sleeping to save power
TouchWake (my implementation)
Slide2Wake (my implementation)
Pull2Wake (my implementation)
Arc2Wake (my implementation)
PlasmaUnlock 2.0
MultiButton
Stem Gestures
Tactile controls (vibrate when touched with finger or S-Pen)
S-Pen adjustable minimum pressure (aka sensitivity)
S-Pen adjustable fixed pressure
S-Pen WorryFree mode
Detailed Plasma Features
ZZMoove: Plasma Edition
Heavily modified version of ZZMoove
Supports various low-level boosts that hook into all other Plasma features
Music detection to help avoid skips
Native Input Booster
Applies a different up_threshold and various other parameters when input events are detected
Dynamically restarts governor timer to instantly apply the requested boost
Can detect, restart, and change frequency within 1ms (according to Wikipedia, 1ms = the time for a neuron in human brain to fire one impulse and return to rest, 100-400ms = time for the human eye to blink).
Many, many other features to be documented later
Extended LED control
Full sub-LED control (RGB) allows you to calibrate to a beautiful white, since not all LEDs are the same and may exhibit ugly tints with factory settings
Adjustable global high and low power sub-LED brightness
Optional pulse (fade) style blinking
Adjustable blink timing
Customizable driver-level TouchWiz LED colors
High/low missed notification sub-LEDs color, defaults to white
High/low charging sub-LEDs color, defaults to white with a red tint
High/low charged sub-LEDs color, defaults to white with a green tint
Touchkey multipress lockout
If you find yourself accidentally pressing a touchkey, this feature can require a double or triple press. Useful for handing someone your phone and not having them accidentally press the Back button.
Touchkey remapping at the driver level
Touchkey Flicks
Quickly pressing and flicking up from either touchkey can perform 2 unique actions
No residual pass-through - meaning only your action gets performed, the touchkey press and any touchscreen input are blocked at the driver level
Supported by Automatic Media Mode
Optional crossed mode to offer an additional 2 unique actions
Touchkey Slides
Quickly slide across the touchkeys from either left or right for 2 unique actions
No residual pass-through - meaning only your action gets performed, the touchkey presses are blocked at the driver level
Only works while the screen is off
Can wake from deep sleep, but may be unreliable for now
Turbo Home button
By default the home activity is executed after the home button has been pressed AND released, which can introduce as much as 100ms of wasted time. This feature will immediately send an up-event as soon as a down-event is detected. Unfortunately this breaks the ability to press and hold the home button - however there is one workaround - another optional mode that will send the up-event, then immediately send another down-event, and whenever you lift your finger, that will provide the mating up-event. This will allow long-pressing the home button, but the downside is that it always must send a complete press before starting to hold.
Plasma Simple Scaling Lock
A very simple replacement for hardlimit
Locks governor name and min/max for anything but Synapse
Kernel-level control of back (flash) LED
Optional kernel-level universal wakelock
Optional always-on voice detection tweaks
Force screen on when activated - If you use a 3rd-party lock screen, you may have noticed "ok, Google" is acknowledged, but doesn't wake anymore. This will send a power-on event to mimic the normal behavior.
Turn power off on second activation (from screen-off) - This was a silly idea I had, but it sorta works. I was frustrated because after saying "ok, Google" and asking my question, the screen would stay on. When this is enabled, it will turn the screen off when you say "ok, Google" a second time. Example: Ok Google...what time is it in NYC?...[The time is 12:21 AM]...ok, Google...[screen turns off]. This obviously only works for things that don't require more input, in which case touching the screen will restore normal behavior. It's sorta cool though because in a quiet car you can ask a question to your pocket and then tell it to turn itself off.
TouchWake (my implementation)
When the screen times out you can wake it with a tap or button press. Functionality is like the existing, well-known TouchWake.
DoubleTap2Wake (see PlasmaUnlock)
Slide2Wake
Pull2Wake
Pull2Wake will wake your device when swiping from the top of the screen, to the bottom. If done slowly, you can use your fingertip to
Arc2Wake
Now part of Stem Gestures
Turn your phone on while grasping it - left/right arc with your thumb from above Home to the side
Touchscreen
Support for waking from deep sleep
Adjustable width for valid Slide2Wake/Pull2Wake to filter out false positives
Reduced scanrate while sleeping to save power
Support for detecting finger hovering (very buggy at the moment)
PlasmaUnlock (previously called PatternUnlock)
A kernel-based screen/input locking mechanism. It is designed to be as flexible as possible, from serving as a simple way (eg. DoubleTap2Wake) to augment your existing power-on methods, to a robust means of protecting your phone from prying-eyes. It features up to a 20-step lock pattern, verified against not only x/y coordinates, but also time between taps, and tap peak-width. Because it resides within the kernel, low-level access provides some unique features not found elsewhere, such as power key blocking, screen blanking, and locking that takes effect so early, it even blocks the boot-animation.
Can be on at all times, doesn't need a wakelock
No complex coordinates to set, the pattern recording feature accessible via Synapse makes creating your pattern easy
Up to 20 taps can be recorded
Mode for taps only, or swipes only (like connect-the-dots), or both
Taps are validated against x/y coordinates, optionally milliseconds between taps, and optionally width
Relative coordinate mode allows for abstract patterns to be input anywhere on the screen, as long as the display is in a portrait orientation
All detection methods can be independently disabled, achieving a variety of results such as:
Unlock with a sequence of wide-thin-wide presses anywhere on the screen, by turning off x/y coordinate and time validation
Unlock with one wide press at a specific spot on the screen, by turning off time validation and using absolute x/y mode
Unlocking with a simple double or triple tap anywhere on the screen, by turning off width validation and using relative x/y mode
Unlocking with a rhythm, by turning off x/y coordinate and width validation and using time only
Adjustable pattern entry timeout (so you don't have to wait for the normal Android screen timeout delay, which is usually at least 30 seconds)
Lockout mode
Can take effect at the boot animation
Locks the touchscreen, S-Pen, and disables USB data connections until the correct pattern is entered
Can also black the screen out. Besides obvious privacy reasons, it also has the potential to confuse/delay thieves.
Optionally disables the power and/or home button (three very fast power presses will always turn on)
When screen is on, power long-pressing is prevented
Option to automatically disable/restore lockout
When connected to USB
When connected to a defined safe WiFi SSID
Adjustable delay before relocking after the screen goes off
Tamper evident mode will flash the front LED when any attempt has been made to turn the screen on
Optionally block all LED activity while locked (to help give the appearance of a dead phone)
Optionally disables itself while on a call, then immediately relocks when hung up
Optional automatic home button press (so you always unlock to your home screen)
Optional delayed blackout restoration (when used with the automatic home button feature, this is so no one will see what app is in the foreground the instant your screen turns on)
Can automatically unlock for Touchwake
Option to coexist with Slide2Wake, Arc2Wake, Pull2Wake
Stem Gestures
A series of versatile touch gestures that are specially designed to be unintrusive. By existing within the kernel, the Stem engine is capable of blocking and restoring input events, allowing the gestures to be triggered and used without interfering with normal device usage. This iteration is a hybrid of previous Plasma kernel features "Arc2Wake" and "HomeUp".
Supported by Automatic Media Mode
Works in deep sleep
20+ customizable payloads delivered via VirtualKey engine
Tap2Repeat repeats last action when finger is lifted then put back down in the same place
Equal for right or left handed people
Gestures (some can have different screen-off and screen-on payloads)
High Left
High Right
Low Left
Low Right
Side Up Left
Side Up Right
Arc Spike Left
Arc Spike Right
Center Spike High
Center Spike Low
Center Spike Bottom
MultiButton
When enabled, pressing different combinations of buttons will yield up to 6 different payloads. This iteration is a version of the previous Plasma kernel feature the "Volume MultiKey."
16 customizable payloads delivered via VirtualKey engine
Combinations (each can have different screen-off and screen-on payloads)
Volume Up + Volume Down
Volume Down + Volume Up
Volume Up + Power
Volume Down + Power
Volume Up + Home
Volume Down + Home
Long-Press Mode
Supported by Automatic Media Mode
Combinations (each can have different screen-off and screen-on payloads)
Long-press Volume Up
Long-press Volume Down
Automatic Media Mode
Detects when music is playing, and overrides certain payloads with music-oriented ones instead (volume, track control, play/pause)
Allows for altered parameters in ZZMoove to prevent skipping, include when recording audio
Userspace Booster
Provides small boosts for common things, like the keyboard opening, files being transferred, incoming calls, packages being installed or updated, etc.
Adjustable frequency and core count boosts for:
New app starting
Scrolling in a list
Activity changes
Progress bar being shown (KitKat only)
S-Pen
Adjustable minimum pressure to help prevent errant input, especially when doing things like crossing t's or dotting i's.
Adjustable fixed pressure to effectively disable actual pressure input, to make writing easier for some people.
WorryFree mode that always disables the touchscreen and touchkeys while the S-Pen is out.
GPU
Adjustable minimum frequency while interacting
Adjustable minimum frequency while plugged-in
Nightmode
A very fast home button double-press will toggle nightmode (red screen)
Synapse
Set DPI to 640/480/320
Built-in support to apply the surround sound hack at 3 volume levels: stock, medium and loud
Changelog
v.1.00
Initial release
Installation
Download
Flash via recovery
Reboot
Optional: Install Synapse
Download
Plasma kernel 1.00 for Sprint Note 4 - KitKat (4.4.4)
Plasma kernel 1.00 for Sprint Note 4 - Lollipop (5.0.1)
Until I update this post, please see my replies in this thread for the latest versions (1.21 for CM-13, 1.20 for CM-12.1, and 1.17 for TouchWiz)
Known Issues
Lollipop (5.1.x)
Surround Sound mod untested
Donations
Developing Plasma kernel takes an enormous amount of time and effort. Features like MultiButton, PlasmaUnlock, and the Stem Gestures represent hundreds upon hundreds of hours of planning, testing, development, more testing, squashing bugs, and even more testing. If the functionality they offered were apps, each would be worth a few dollars in the store. But alas, they are merely free. If you find my work useful, consider helping your starving developer out and make a donation - it would be GREATLY appreciated! However, if you do, please understand that donations are reciprocation for all this existing work, and are not guarantees of support. It's not because I'm mean, it's because like all the other developers here, I do this in my free time, and sadly that is a very finite resource
Donate!​.
Credits
LoungeKatt (TwistedUmbrella), ZaneZam, AndreiLux, Faux123, Franciscofranco, Friedrich420, savoca, Yank555.lu, and many others.
A special thank you to bjrmd and everyone else who has helped test and support Plasma kernel on the Note 4
.
Source
Source code can be found on my github.​
XDA:DevDB Information
Plasma kernel, Kernel for the Sprint Samsung Galaxy Note 4
Contributors
ffolkes
Kernel Special Features:
Version Information
Status: Stable
Current Stable Version: 1.00
Stable Release Date: 2015-06-18
Created 2015-06-18
Last Updated 2015-11-25
Great to see you back, looking forward to trying it out!
Awsome great to see that you got this working with lp cant wait...
Sent from my SM-N910P using Tapatalk
Oe1 or ob7 fingers crosses
pbedard said:
Oe1 or ob7 fingers crosses
Click to expand...
Click to collapse
Works on my oe1!
Perfect for me- ob7--thanks.
Looking forward to the AOSP one for sure
Working well here on LP. Only issue I'm having, and I had it on the KK version as well and forgot to mention, is with smart stay. Proximity sensor isn't keeping the screen on like it should when looking at screen. Working on stock kernel, and another kernel I tried. Anyone else? Thanks for the update! I sure missed all the features of this kernel.
Sent from my SM-N910P using Tapatalk
Whats the securty thing always going off
See here
egodriver07 said:
Working well here on LP. Only issue I'm having, and I had it on the KK version as well and forgot to mention, is with smart stay. Proximity sensor isn't keeping the screen on like it should when looking at screen. Working on stock kernel, and another kernel I tried. Anyone else? Thanks for the update! I sure missed all the features of this kernel.
Click to expand...
Click to collapse
I've never used smart stay, but I will give it a try and see what's going on.
pbedard said:
See here
Click to expand...
Click to collapse
That is really weird. What ROM are you using? I've been using HybridX for KK and Notarized for LP and I have never seen a dialog like that before. When does it happen? When using Synapse?
Synapse never installed and im using the 0e1 stock rom
I am loving this kernel great job.
The settings inside synapse for this kernel is amazing. I had an antutu score around 40 but I'm sure that can be fixed once I get the hang of setting this up
OK, I love this kernal. The amount of options and tweaks are unbelievable. I loved this kernal on my note II and was disappointed when it fizzled out at 4.1.2
I have an issue with this build though. For some reason zzmove has never given me good results. It is good for battery life, but performance is bad. I could not find a good balance for this govenor on my Note II (AT&T) and my Note 4 doesn't like it either. I have tried many different variations of zzmove to no avail. It's a deal breaker on my phone.
Would you be absolutely opposed to using other govenors? Intelliactive and Alucard have worked the best for my phone (trltespr). Blueactive and Interactive Pro have also been popular on this device. Your choice of schedulers is great
Your work is much appriciated :thumbup:
Zzmove is giving me music skips while the screen is off. Anyone know what setup u should use to stop it
thatdudeaaron said:
Zzmove is giving me music skips while the screen is off. Anyone know what setup u should use to stop it
Click to expand...
Click to collapse
zmove scaling page---freq limit while screen off-- set to 2649
max freq while screen off and music plays--2649
min freq while screen off and music on--576
zmove hotplug page--max core while screen off--change to 2
my problem is that the music detection algorithm is not very accurate, so the "freq limit while screen off" is the setting that saves me.
TY
Kernel breaks proximity sensor for me. Running stick oe1 ROM. Any fix to this?
Oh well music still skips on zmoove governor
V12 turbo charged - Good Job ffolkes
Buckle Up Folks long post coming through.
For those that just want to get strait to the point Skip down to the Bold “Tweaking the governor” section.
This kernel has changed my opinion on what is possible with the note 4 from a fluidity stand point. I always thought that androids weakest points was scrolling performance, general fluidity, and speed, but this kernel along with the Noterized Rom with the Next Launcher 3d shell on top, makes my brothers iphone 6 plus seem sluggish.
I’ve been playing around with the lollipop version of this kernel before ffolkes officially released it (since version 18 and 18a). From my experiences with it, I have discovered the same thing that some of you have probably noticed: if left un-configured, it is painfully sluggish in some aspects but battery life is fantastic.
Unlike a lot of other kernels out there, I don’t believe that this kernel was meant to be left alone (ffolkes, please fee free to correct me if I am wrong on anything written in this post. This is your baby afterall, I am not the artist here). Honestly, there are so many options to tinker with, that it would be shame to simply leave it alone. This baby is a v12, turbo charged monster with a hidden Nitrous boost button just waiting to be pushed.
Some have asked for settings, So I am going to do my best share with you my experiences with tweaking this kernel thus far. Hopefully it will help someone.
A quick disclaimer with reference to my usage habits: I like to Glide. For me, my phone has to feel like the content on the screen is like a puck on an air hockey table or a hovercraft on water. I want no hard stops, as little friction as possible. I am obsessed with flicking things around on my screen and watching it glide to a slow, almost un-inhibited stop. The longer the glide the happier I am. My finger does not stay on the screen for more than half a second but If I do a full flick the content does not stop until 3 to 4 seconds later and it always a slow, gradual descent with no stutter or lag.
To achieve the above effect , 2 things need to happen. The application you are using has to be properly coded and configured, and the kernels governor needs to be tweaked.
Tweaking the applications:
Through my testing, I have found what I feel is a direct relationship between the applications dpi setting and scrolling/panning smoothness. How long it takes items to come to a stop after being panned or scrolled with a flick, seems to be directly related to the dpi. The lower the dpi, the longer the glide. I have narrowed my preference to three specific dpi settings:
345 – My personal favorite – you could set the entire rom dpi to this and get tablet mode for most apps and the text is still legible(to me), I could use this without exposed though you will have to user a different dialer and camera app due scaling issues.
380 – Text is much more legible (most will prefer this mode) and apps also tend to behave with much less stutter.
430 – Good Performance, Text is super legible but not to big but the air hockey glide effect only last about half a second.
Tweaking the governor:
Lets start with the touch-bootster
Sampling rate = 60000
Input Boost Punch Minimum Cores = 4
Input Boost Punch Frequency = 2649
Input boost Punch Cycles = 50
Input boost Up Threshold = 20%
Punch on Every Initial touch = enabled
Punch on All Touch Movements = enabled,
Punch on all S-Pen Movement = enabled,
Level 1 Batter Threshold & Master Switch = Disabled
For most, the above settings alone will remove almost all lag if you are using Noterized Rom or a Variant that uses it as a base ie Hybrid X (heck of a job also tx_dbs_tx). Just to let you know, with these settings, I can get 5 hours of web browsing along with and additional 40 to 60 minutes of web video streaming. If your video content is from the youtube or Netflix app, I can almost double the video streaming time when using Netflix, and almost triple it for google Youtube. I've gotten close to 8 hours of total onscreen time, even when pushing the touch-booster really hard with the above changes only.
To further squash out any lag related to general application load, change the following:
Down threshold While Screen On = 11%
Up Threshold while Screen On = 12%
Smooth Up threshold while screen on = 15%
Fast Scaling Up While Screen On = 4 Steps
Scale Blocking Cycles = Disabled
Scale Up Blocking = Disabled
By now if you still have lag then issue is either application specific, ROM specific, incorrect user settings or failed hardware. But if you still need more power and you don’t want an application to even think about stuttering, then go over to the zzmove hotplug page and change the following
*****Delays*****
Block Up Logic Cycles = Disabled
Stagger Up = unchecked
Block Down cycles = 5 cycles
Stagger Down = checked
*****CPU Core 2****
Up Block Multiplier = 0x(No delay)
Down Block Multiplier = 10x
Up Threshold = 10%
Down Threshold = 9%
Up Frequency Threshold = 422 MHz
Down Frequency Threshold = 345 MHz
*****CPU Core 3****
Up Block Multiplier = 0x(No delay)
Down Block Multiplier = 5x
Up Threshold = 15%
Down Threshold = 14%
Up Frequency Threshold = 652 MHz
Down Frequency Threshold = 576 MHz
*****CPU Core 4****
Up Block Multiplier = 0x(No delay)
Down Block Multiplier = 10x
Up Threshold = 20%
Down Threshold = 19%
Up Frequency Threshold = 806 MHz
Down Frequency Threshold = 729 MHz
God I hope by this point your still not lagging but if you are there the usual kernel lever tweaks that
1. include things like are things like:
2. enabling Dynamic Fsync,
3. disabling Error Correction,
4. Upping the GPU touch boost to 500, (very important for Noterized Rom or other variants that are fully Hardware accelerated(gpu rending forced + hardware acceleration) This is one reason I believe this rom can sometimes eat into batter life pretty quickly.
5. Increasing GPU Laziness to 8
6. Reducting the GPU ramp Up Threshold down to 300
7. Zram, Low Memory Killer, Frandom and all the other settings have pretty good guides out there to tweak accordingly.
Battery Life:
Tweaking battery life has to be done methodically. It should be based on each individually usage habits and should take into account the apps running in the background and available memory (low memory killer and Swapness should help out with this also)
Choose and Good Test Application - To start with I would find and use a good Application validate if there is lag and or stutter. This app should not be one the pushes the note4 to its max limit all the time, unless it is the primary app you use on the phone. Testing with such in app will have you tweaking your system to maximum performance all the time. At that point you could simply leave the settings that I gave you earlier as is and skip the rest this these sections. Those setting will get you maximum performance out of your phone when you need to running your hard-line application and still provide 4 to 5 hours of no screen time when you don't. when tweaked ffolkes version of zzmove can get you on-demand performance governor performance without the wasted power. You could just also switch to the standard performance or on-demand governor.
For the rest of us, when it comes to scrolling I would highly Recommend UC Browser(Can’t Sing it’s praises enough). Don’t just download the latest version. Not all versions are equall when it comes to scrolling performance and lag. I will include an APK in the post or link to their historical archives. There are three that I would recommend:
build dated 01/27/2015 - It is a web page eater. It is quick light and is stutter free if you are using a lollipop rom Based on Noterized. If on Kit-Kat it is not as smooth as the version listed below but still better than chrome, firefox or the Samsung browser, the new versions of dolphin might come close but still a distant second in scrolling performance.
build dated 06/04/2015 - about 5 to 10% slower on than the one above for java script performance but man is scrolling smooth on Noterized. If you guys remember the Old webkit browser on android 4.2.2, This one out does it and makes my brother want know how to get his iphone 6 to work like my Note 4 when it comes to website loading and smoothness. This version also has UC excellent Night mode with transparent background that makes things look even smoother when using dark themed wallpaper and has the added bonus of extending the notes battery life significantly. Keep in mind to achieve this performance, for me takes 345 dpi. 380 and 420 aren't bad either.
build dated 05/15/2015 - honorable mention goes to this build for its superb memory management. No crashes, hangs or forecloses with a variety of content for 2 weeks straight. remains snappy even though phone was never rebooted and memory never cleared. Was my go to until I started us plasma on lollipop and saw that I could have the best of both worlds and went back to the 01/27/build. the bruit force of the input booster will make anything that has a remote chance of being smooth, glide like butter.
The uc browser archives:
http://wap.ucweb.com/verlist/english_354/ucbrowser/145?uc_param_str=vepffrbiupla&from=U3-help&plang=
If using a web browser to determine lag and smoothness Desktop Mode mandatory for UC and the following Web Pages:
Yahoo.com – Stutter city because of the continuous loading of content ( you have to scroll for a good while, but once enough content has loaded you will see the limits of your browsers memory handling and allocation. This could also be a good benchmark for your io scheduler , and tcp congestion algorithm of choice.
Youtube.com – Same as above but content is heavier. Good test due to the fact that it will show you when you are not properly optimized, but reward you greatly if you are. You are either in the gutter or you’ve hit a strike.
Espn.com-Highly optimized well written code and template, should be smooth even though the content containers may load slowly. Again good test for tcp congestion. This site will also expose the performance delta between the 01/27 build of UC and the other builds mentioned.
Touch-Booster Battery Life - You need to tweak the touch booster settings to match how you interact with you screen. Some people flick there content always letting it glide and some people keep their fingers on the screen until they get to where they want to go. This alone will change how you optimize the setting for the touch booster to maximize battery life.
Using me for example, the settings listed in the touch-booster tweaks was custom tailored to me. Most of the time, I use my phone for web browsing, reading pdf files, and emails. As stated earlier, to interact with content on my screen, I flick on my screen and expect content to glide for as long as possible. On average, in UC browser (my browser of choice and the smoothest out there for scrolling performance) , even a light flick will last 1 to 2 seconds and if I flick content quickly enough, the content could glide along the screen for as long as 3 full seconds. Therefore I need my Input Punch boost to last 3 seconds just in case.
If My sampling rate is 60ms for the above stated situation, I need 50 cycles(Input boost Punch Cycles ) of the 60ms sampling rate to give me a total cycle time of 3,000ms, which of course we all know equals my 3 seconds. If I am someone who keeps my fingers the screen and rarely flicks then that’s a lot of wasted power for absolutely no reason at all.
To tweak touch-booster for , start with the settings I gave in the first section and reduce “Input Boost Punch Frequency ” until you begin to notice your first hint of lag on the above pages. One you experience lag increase the frequency by 2 steps from that point. Now reduce the number of active cores until you get lag again. Once you get lag, increase the core count by 1. Finally, decrease the power usage caused by the sampling rate by increasing the time between intervals by 5ms at a time. So from 60 to 65, then to 70. Once things start to lag, decrease the interval by 10ms
GPU Battery Life - In addition to the cpu touch-booster tweaks, flokes was even nice enough to include input based boosters for the gpu(freaking awesome by the way dude). He gave us the ability to under-clock the gpu to 166 when not in use (fingers off the screen) but giving us power for 1.5 seconds(hope this duration is tweakable in the future) of up to 800mhz. This is important for a Rom Like Notarized where gpu is doing most of the work all of time. The gpu is in use even for traditionally lite loads such as 2d work. I would recommend lowering the min frequency all the way down to 166 and capping the gpu somewhere between 266 to 300 if you are like and don't game much. if you get lag or stutter/jitter then increase the frequency one step at a time until the lag disappears from your application. You will get so much more mileage from steaming video like Netflix. The Adreno 420 is powerful enough to handle light loads without flexing its muscle, but will flex it anyways if not kept in check.
General Applications Performance and Battery Life - First you need to tweak the main up and down thresh hold for cpu load:
1. Increase the “Up Threshold while Screen On” by 10 until you notice your hint of lag in your application. 2. Once you noticed the lag or stutter decrease the “Up Threshold while Screen On” by units of 2% points until lag goes away.
3. Once you found you optimal number, increase the “Down Threshold while Screen On” number to a number 10 less than the “Up Threshold while Screen On”.
You can follow the same procedure listed above for the hot plug algorithm, Tweaking each individual cores up and down thresholds starting with core number 4. Once optimal threshold is set for core 4, test core 3 in the same manner then core 2. Once thresholds have been optimized, starting with the 4th increase the “Up Frequency Threshold” until you notice lag in your application. One you hit the lag frequency decrease your frequency step by 2 levels and then move on to the next core doing the same thing.
After achieving the optimal hot-plug and frequency thresholds for each core. You can then begin to explore power saving by adjusting the up and Down delays. Starting with Core 4 and working your way down, decrease “Down Block Multiplier ” in increments of 1 until lag is achieved. If no lag is achieved after getting to zero. Then your usage pattern is not effected by this and you can simply disable this feature for that core.
Normally I would not recommend introducing lag but from a power saving standpoint it also might be to your advantage to increase the “Up Block Multiplier ”. Starting with core 4 increase the number slowly until you begin to notice lag with you usage pattern. Do this for each core until you fine the optimal multiplier.
Other Power Tweaks – In my opinion remaining power tweaks can be done without effecting usage by much:
1. Sampling Rate Idle = 500ms – Decrease the number if you notice lag when try to interact with an application after having you finger off the screen for a while. I am not sure but I believe the input booster engine relies on this setting since it does not have a setting listed for poling in the governor(ffolkes correct me if I am wrong). If you notice that applications work great when you touch the screen and poorly when you don’t, you need to decrease the “Sampling Rate Idle Threshold(Frequency)” and/or “Sampling Rate Idle Threshold(load)” until its gone.
2. Sampling Rate Multiplier While Screen Off = 8x – The higher this number, the bigger the sampling interval when the screen is off. I love this feature. It’s given be great talk and music playback time when the screen is off. I don’t do it very much, but if I remember correctly I was getting less then 1 percent battery loss for an hours call with my sister(yeah she’s a talker).
Lastly, In my opinion, a good experience on the phone comes down to three pillars. The Rom it’s running on, the kernel, the Launcher, and then the Web browser. You already know about The Rom (Notarized), The Kernel(Plasma), and the browser Being UC browser. What I have not told you about is the Launcher. If you guys have not Tried Next Launcher 3D. Take it for a spin. If is not only full accelerated but it is full optimized for battery life. Even before I was using Plasma and the touch-booster. It was the only part of my note 4 I had never seen lag. The screen shot look Gimicky but when tweaked to your taste it can do a flat design like the other launchers with all the widgets and icon packs. The only difference is it does not slow down and does not eat your battery. Also no FC's. I am a stickler for smooth and this Launcher with Plasma and Notarized just plane burns.
Told you this was going to belong, but I am done. I would like to finish by Thanking Ffolkes for his hard work. This is not copy and past code folks. I have not even gotten talk about the rest of the settings in this thing like the gestures, multi-button and so on. This guy toils to bring a lot of these things to us. He's not just waiting for linux versions to do his releases. Considering the open source nature of android, I can’t state for sure that this is all his engineering but it sure looks like it. You tell me if you’ve seen this type of attention to detail and code command, in any other kernel. It’s not just him though I think SaintZ93 deserves more than a round of applause for fundamentally changing the base for all or our roms for the better. If Norterized is now base for our custom roms and I will accept no Less than Plasma for the kernel(People will, emulate, wait and see), Then the future looks Golden. Donate people. Think of it as taking the guy out to McDonald’s or for a pint of Beer and some fry’s. We all know he deserves at least that. Hope I am not breaking some type XDA rule with the length of this post.

Battery saving app / cpu control app

Hi to all, currently on N910C Stock Sammy Marshmallow 6.0.1, as much as I hate it (the theme, colours, bloatwares), one thing I appreciate it comes with is that, it is for sure stable, and it comes with permission setting (like finally.)
I can deal with all these themes bloatwares easily, am rooted anyway, but one thing annoy me a lot is that the power saving options. We are no longer able to control what we can in previous version (i.e. select only screen output and limit CPU usage), now it restrict background activity as soon as I activate power saving mode. I need that to be disable as I know that my emails won't sync automatically if I had it switched on, and email is quite important for me as for now.
So, I need alternatives. I hope to get some suggestions for application that can do power saving for me, or control my cpu frequency, like underclock. I've tried a few set cpu app, they all doesnt stay at the setting I put. Meaning I put my MHz to 1200, it later went back to 1900MHz again after awhile. So i need a really good recommendation, as long as I can push my battery life to maximum.
*P.S., make sure it is user friendly, I am not familiar with coding/technical stuff myself.
Thanks in advance,
Anyone can help me with this one?
Sent from my SM-N910C using XDA-Developers mobile app

[HELP] [KERNEL] Why there are 4 separate sections for schedtune.prefer_idle?

From my understanding, Kernels that have schedutil governor has a CPU frequency boosting feature which gives the CPU a push from the back to do a job faster than it was supposed to.
It does make the phone notably faster and smoother but if not configured properly the battery takes a hit.
Enabling schedtune.prefer_idle turns off that frequency boost of a running core and forces the workload on an idle core. But there seem to be 4 separate options to enable schedtune.prefer_idle and I have no idea what they are and how they are gonna affect the kernel after enabling/disabling
Those 4 options are :
• Foreground
• Background
• Real-Time
• Top App
Here are the pictures if you want to take a look.
https://imgur.com/a/sxuBvWR
https://imgur.com/a/8e4nuxj
Can someone tell me what each function does? Thanks in advance
@TrenchFullOfSlime can you help me out one more time if possible?
schedtune.prefer_idle appears to influence only one thing: whether a process will share time on an already-active core or wake up an idle core. The latter uses more power but gives the process more resources. CPU frequencies are determined by the _boost toggles, with schedtune.boost determining how aggressively the frequency is changed (accepted values are 0-100, so I guess it's an abstract scale hiding the actual size of the frequency steps). This apparently works by lying to the governor about how heavy a process is: https://lwn.net/Articles/706374/
https://forum.xda-developers.com/t/...-pixel-xl-and-eas-even-more-smoother.3528807/ suggests not going over 10.
https://forum.xda-developers.com/t/screen-on-time.3923963/page-9 suggests "turning off prefer.idle and enabling stune.boost reduced power use by 15% without affecting responsiveness" (paraphrased). Turning both on could increase responsiveness at the cost of greater power use, turning both off would do the opposite.
As for the different categories, they determine what triggers this behavior. You might prioritize performance for foreground apps, but battery efficiency for background apps. It can also be used to increase boot times: https://source.android.com/devices/tech/perf/boot-times
More information: https://www.fatalerrors.org/a/schedtune-learning-notes.html
TrenchFullOfSlime said:
schedtune.prefer_idle appears to influence only one thing: whether a process will share time on an already-active core or wake up an idle core. The latter uses more power but gives the process more resources. CPU frequencies are determined by the _boost toggles, with schedtune.boost determining how aggressively the frequency is changed (accepted values are 0-100, so I guess it's an abstract scale hiding the actual size of the frequency steps). This apparently works by lying to the governor about how heavy a process is: https://lwn.net/Articles/706374/
https://forum.xda-developers.com/t/...-pixel-xl-and-eas-even-more-smoother.3528807/ suggests not going over 10.
https://forum.xda-developers.com/t/screen-on-time.3923963/page-9 suggests "turning off prefer.idle and enabling stune.boost reduced power use by 15% without affecting responsiveness" (paraphrased). Turning both on could increase responsiveness at the cost of greater power use, turning both off would do the opposite.
As for the different categories, they determine what triggers this behavior. You might prioritize performance for foreground apps, but battery efficiency for background apps. It can also be used to increase boot times: https://source.android.com/devices/tech/perf/boot-times
More information: https://www.fatalerrors.org/a/schedtune-learning-notes.html
Click to expand...
Click to collapse
I don't know who you are, I don't know what you do but I feel like you are an angel! You went through all the troubles to get those links only to answer me which made me so happy.
If I'm being honest, the way you describe things is incredible. I didn't have to read a sentence twice. You can be a good writer or a teacher if you try.
Thank you so much

Categories

Resources