[G4 General] mattnin:
Sure, however I'm not responsible for loss of data, phone bricking, or anything else that may happen after using these settings. I have modified my phone such that it is working stable as of today. Tomorrow it may crash and I may have to adjust something, or add something I took away. I have spent a considerable amount of time messing with my phone and using all sorts of different tweaks. Right now I'm sitting at 47% battery remaining and a SOT of 4Hrs and 56m. I have been using Chrome heavily today pouring over the MSM8992 source code (yes fun stuff :cyclops:) and watching YouTube videos. I use manual brightness around the 35% setting. I hope these settings work for you (and anyone else that chooses to use them and also get great battery life).

I've been adjusting the governor quite a bit. My main phone usage is browsing websites and watching videos. These settings are optimized for doing just that. I don't have much else running on the phone. If you have lots of background tasks, or otherwise running other CPU heavy programs, these settings may not work for you. These settings also may lag the phone for some. I have spent a great deal of time adjusting the phone for battery life while making the phone snappy enough to do browsing and videos. There is a tradeoff. I can say as of my current setup the G4 will navigate through a webpage just fine without climbing over 633.6MHz. Watching videos doesn't tax the processor more than 768MHz and can run as efficient using only 480MHz. Youtube videos use between 633.6-768MHz while Twitch broadcasts use between 384-480MHz which is amazing to me. Your mileage may vary with different apps and a different resolution. So now onto my setup...

I'm currently running the CM 13 20160319 nightly. It shouldn't matter which nightly to run however. That was just the last time I updated CM. So if you choose to install the latest nightly, it shouldn't matter. I'm also running the phone at 1080p. I set it this way mainly because my vision is poor and using 1080p, it makes everything large. Also running at 2k I get the side benefit that the phone is marginally faster. I did test the phone at 1080p before any mods and I must say that battery difference was negligible. There was an increase in SOT but it was minor. However, if you're interested in copying my setup exactly, enter in terminal: (do not do this if you are running anything else but CM or a CM based build, things will break)

su
wm size 1080x1920

You'll likely have to adjust DPI after changing this. I suggest to use CM 13's DPI switcher under Settings -> Display & lights -> LCD Density, my density is set at 520dpi. You can also use terminal to adjust DPI.

If you wish to go back to your stock settings,

su
wm size reset

If you decide to run at 1080p, some things will break. I've only seen the Camera app break. I would try to launch the camera and I would get an error, "Gallery has stopped". I fixed the error by clearing the data and cache of Gallery and Camera, and also rebooting to TWRP and clearing cache and dalvik. The phone has been running great since and have yet to run into another problem related to 1080p.

I have also debloated CM 13 somewhat. Do not debloat these packages unless you have a replacement package. Here is the list of packages I've removed from CM 13 (so far). This list may not work great for everyone.

com.android.browser
com.android.calendar
com.android.email
com.android.exchange
com.android.galaxy4
com.android.inputmethod.latin
com.android.messaging
com.android.mms.service
com.android.nfc
com.android.noisefield
com.android.phasebeam
com.android.providers.calendar
com.android.smspush
com.android.wallpaper
com.android.wallpaper.holospiral
com.android.wallpaper.livepicker
com.cyanogenmod.eleven
com.cyanogenmod.lockclock
com.cyanogenmod.trebuchet
com.cyanogenmod.updater
com.cyanogenmod.wallpapers
com.svox.pico
org.cyanogenmod.audiofx

I'm not running Xposed, or SuperSu. I am running the [MENTION=5776465]genesixxbf3[/MENTION] Llama Sweet Kernel Uber4.9. I think using this kernel is important. It uses CPU hotplugging. This means it takes CPU cores offline while not in use. I have compared this kernel to the stock CM kernel and this kernel gives about an hour more SOT using the exact same governor settings. The only difference is hotplugging and GPU idle frequency. Genesixxbf3 said he was going to remove the hotplug in future kernel versions (likely due to instability). There may be compatibility issues using the Uber4.9 kernel and SuperSu and/or Xposed. You have been warned.

The only change I modified to the governor was to the Little CPU interactive governor and optionally to the Input Boost Frequency Core 1, so this setup is easy to do. The settings are below.

LITTLE

CPU Maximum Frequency is 1440MHz

CPU Minimum Frequency 384MHz

CPU Governor interactive

CPU Governor Tunables:

above_hispeed_delay (holding times as such because I want the CPU to stay at these frequencies if the load isn't too high)

above_hispeed_delay 20000 460000:80000 600000:200000 768000:100000 864000:80000 960000:60000 1248000:40000

boost 0

boostpulse_duration 0

go_hispeed_load 99

hispeed_freq 480000

max_freq_hysteresis 100000 (setting higher than normal because I don't want the CPU to ramp down and get stuck at a lower frequency and the subsequent long holding times during intermediate idle scenarios while under heavy CPU usage)

min_sample_time 40000 (short holding time for anything under 1440MHz)

target_loads (set generous load percentage to promote efficient 384-768MHz frequency usage for most tasks like webpage navigation and watching videos without ramping up to max_freq)

target_loads 50 460000:75 768000:99

timer_rate 20000 (a low setting for snappiness and responsiveness)

timer_slack 80000

for best battery, Disable "Input Boost Frequency Core 1". For overall snappier performance and minor increase in battery usage, set to 768MHz.

These kernel settings should work with any stock rooted G4 and kernel, not just Llama Sweet Kernel. You won't get the hotplug or 27MHz GPU benefit though.