Powersave CPU Manager
Automatically manages you cpu no matter what you use, ie. setcpu, cpumaster, virtuous_oc. This will automatically underclock your cpu and change the governor when your battery reaches a specified level. Kind of like powersave mode in settings.
You don't need to do anything to make it happen its all automated. By default it sets the governor to conservative and underclocks to 702000 then depending on whats installed it restarts virtuous_oc or changes back the governor to ondemand and the cpu back to stock (1188000).
These settings can be edited at:
/system/etc/init.d/74-virtuous for virtuous users
/system/etc/init.d/75-pcm for stock users
/system/etc/init.d/76-pcmapk for apk users (setcpu)
The lines are commented so editing should be easy enough in root explorer, if not lmk i will help out.
You will have to restart setcpu or whatever apk after your battery reaches the threshold. It works with setcpu, cpumaster, cputuner, and overclock widget.
Once you battery gets above the threshold it will restart virtuous oc or change the gov and cpu freq to whatever you specify in the script. It checks the battery level every minute.
The virtuous oc attachment includes virtuous oc this can be flashed right over my flashable oc daemon. It can be used with roms that include virtuous oc as well.
Download the zip you need:
Virtuous_OC-PCM = Virtuous_OC and PCM
PCM = PCM Stand alone Auto sets default cpu frequency use without setcpu or virtuous
PCMAPK = PCM for use with some apk's that control cpu (setcpu)
Please report any bugs here.
How to edit settings:
This is virtuous_oc version but they are all about the same.
Edit the lines in red to adjust settings, this is labeled actual script will look a little different.
Code:
#!/system/bin/sh
#PowerSave CPU Manager Virtuous
#smokin1337
SLEEP=60
(
while : ; do
#Powersave Threshold Default-25
CAP=[color=red]25[/color] [color=blue]<<-- This is the battery percent where the powersave settings will be applied, change the number in red.[/color]
LEVEL=`cat /sys/class/power_supply/battery/capacity`
if [ "$LEVEL" -lt "$CAP" ]; then
pkill virtuous_oc
#Powersave Governor
echo [color=red]conservative[/color] > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor [color=blue]<<-- Edit this to the governor you want it to be set to in powersave mode. ie. powersave, conservative, ondemand, userspace, etc.[/color]
#Powersave CPU Frequency
echo [color=red]702000[/color] > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq [color=blue]<<-- Edit this to set the cpu frequency for powersave mode ie. underclock. [/color]
else
/system/xbin/virtuous_oc
fi
sleep $SLEEP
done
) &
In the stand alone version (75-pcm) there is also a setting for your default governor when not in powersave. This will be your default setting.
Your rom MUST support init.d, this is a script.
Thank you!
I will try it now.
Does this work with the kernel in the 2.08.651.2 release?
Is this a Terminal-based app or an actual app? If Terminal, what command invokes it?
Also, you say whatever CPU management tool we use doesn't matter, does that also mean I can just toss SetCPU altogether?
Yes it works with the new kernel. It gets installed to init.d so it runs by itself when you boot the phone. You dont need to run it in a terminal.
It works with setcpu, you need the pcmapk version. What it does is shutdown setcpu when your battery gets low and underclocks your cpu to save battery. You just have to run setcpu again when your battery gets charged.
I'm interested in this mod but I don't understand what i have to do. Do I download all 3? I don't want to use any apk. to help. Do any of those downloads manage everything alone. PLEASE HELP...thank you and sorry for the noob ???s.
abreuw83 said:
I'm interested in this mod but I don't understand what i have to do. Do I download all 3? I don't want to use any apk. to help. Do any of those downloads manage everything alone. PLEASE HELP...thank you and sorry for the noob ???s.
Click to expand...
Click to collapse
Yes the PCM-signed.zip will manage it without any apk or virtuous oc. Just flash it as is. Sorry about the explanation of it i didnt know how far to go.
Wow...thanks for the quick response. Thank you for your work.
not trying to be a **** here but whats the point of this being used with setcpu since setcpu seems to already do what you are describing here. profiles set up right will underclock and change govenor when battery gets to level X.
Now for the others it seems to be helpful for those that like profiles being used.
Honestly i havent used setcpu. But your right it works well by itself, and really good with virtuous oc. I use it personally with virtuous oc and it helps alot saving juice.
Gonna try this out. I don't want to overclock, I just want to underclock in order to save juice.
Please help me understand it a little more, I already use virtuous oc, I've been running the pcm version with virtuous oc the last dew days and notice a huge lag when phone reaches 20%, how can i give it a bit more juice? I think whatever you set it to when battery is low is too slow..
How does virtuous oc work together with pcm?
Also is the version for the virtuous OC-PCM in this thread the same as in the other thread (virtuous OC thread)?
3vo fre3vo'd
Anyone can help with this please ^^^^
3vo fre3vo'd
my phone after installing virtuos OC-PCM kept rebooting spiral how can I remove it from recovery.. thank you...please fast ...
drZuheir said:
my phone after installing virtuos OC-PCM kept rebooting spiral how can I remove it from recovery.. thank you...please fast ...
Click to expand...
Click to collapse
Download the uninstaller file in the thread related to it. But by now im pretty sure you fixed it. Is it stable yet?
Edit: This is stable but it doesn't save juice and my OC isn't completely stable.
Related
EASY ENGLISH: Differences between this module and the others:
- allows to set max CPU freq when screen is off (to save battery),
- allows to set starting CPU freq when phone awakes (to speed up awake process),
- allows set/change almost all aspects of governor (to suite needs),
- should be a bit more responsive when parameters are well chosen.
Note: Don't use DSP Manager when this governor is enabled (it consumes more CPU then player itself). When screen goes off - sound will be distorted. Use player with equalizer build-in instead.
Governor have some predefinied values - more info in "Available settings".
Start:
The goal was bring 'smartass' governor to work with X8 and also make some improvements.
What Is A CPUFreq Governor?
==============================
Most cpufreq drivers (in fact, all except one, longrun) or even most
cpu frequency scaling algorithms only offer the CPU to be set to one
frequency. In order to offer dynamic frequency scaling, the cpufreq
core must be able to tell these drivers of a "target frequency". So
these specific drivers will be transformed to offer a "->target"
call instead of the existing "->setpolicy" call. For "longrun", all
stays the same, though.
How to decide what frequency within the CPUfreq policy should be used?
That's done using "cpufreq governors". Two are already in this patch
-- they're the already existing "powersave" and "performance" which
set the frequency statically to the lowest or highest frequency,
respectively. At least two more such governors will be ready for
addition in the near future, but likely many more as there are various
different theories and models about dynamic frequency scaling
around. Using such a generic interface as cpufreq offers to scaling
governors, these can be tested extensively, and the best one can be
selected for each specific use.
Click to expand...
Click to collapse
SMARTASS GOVERNOR - is based on the concept of the interactive governor.
I have always agreed that in theory the way interactive works - by taking over the idle loop - is very attractive. I have never managed to tweak it so it would behave decently in real life. Smartass is a complete rewrite of the code plus more. I think its a success. Performance is on par with the "old" minmax and I think smartass is a bit more responsive. Battery life is hard to quantify precisely but it does spend much more time at the lower frequencies.
Smartass will also cap the max frequency when sleeping to 245Mhz (or if your min frequency is higher than 245 - why?! - it will cap it to your min frequency). Lets take for example the 600/245 kernel, it will sleep at 245. No need for sleep profiles any more!
Click to expand...
Click to collapse
Info:
- information about governors is here,
- more information about 'smartass' governor is here,
- how different governors work is explained here: [Q] SetCPU governors (explained).
Prerequisites:
- X8,
- Baseband x15
- desire to replace SetCPU - when used only for 'ScreenOff' profile.
Manual installation:
- push ax8_smartass.ko to /system/lib/modules
- run the following command
Code:
insmod /system/lib/modules/ax8_smartass.ko
echo "smartass" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
Available settings:
Note: there is no need to add following commands without changed value. The values are already implemented in module.
- up_rate_us:
The minimum amount of time to spend at a frequency before we can ramp up.
Default value:
Code:
echo "24000" > /sys/devices/system/cpu/cpu0/cpufreq/smartass/up_rate_us
- down_rate_us:
The minimum amount of time to spend at a frequency before we can ramp down. Default value:
Code:
echo "49000" > /sys/devices/system/cpu/cpu0/cpufreq/smartass/down_rate_us
- up_min_freq:
When ramping up frequency with no idle cycles jump to at least this frequency.
Zero disables. Set a very high value to jump to policy max freqeuncy.
Code:
echo "0" > /sys/devices/system/cpu/cpu0/cpufreq/smartass/up_min_freq
- sleep_max_freq:
When sleep_max_freq>0 the frequency when suspended will be capped by this frequency. Also will wake up at max frequency of policy to minimize wakeup issues.
Set sleep_max_freq=0 to disable this behavior.
Default value:
Code:
echo "122880" > /sys/devices/system/cpu/cpu0/cpufreq/smartass/sleep_max_freq
- sleep_wakeup_freq:
The frequency to set when waking up from sleep.
When sleep_max_freq=0 this will have no effect.
Default value:
Code:
echo "600000" > /sys/devices/system/cpu/cpu0/cpufreq/smartass/sleep_wakeup_freq
- awake_min_freq: When awake_min_freq>0 the frequency when not suspended will not go below this frequency.
Set awake_min_freq=0 to disable this behavior.
Default value:
Code:
echo "0" > /sys/devices/system/cpu/cpu0/cpufreq/smartass/awake_min_freq
- sample_rate_jiffies:
Sampling rate, I highly recommend to leave it at 2.
- ramp_up_step:
Freqeuncy delta when ramping up.
zero disables and causes to always jump straight to max frequency.
Default value:
Code:
echo "220000" > /sys/devices/system/cpu/cpu0/cpufreq/smartass/ramp_up_step
- ramp_down_step:
Freqeuncy delta when ramping down.
zero disables and will calculate ramp down according to load heuristic.
Default value:
Code:
echo "160000" > /sys/devices/system/cpu/cpu0/cpufreq/smartass/ramp_down_step
- max_cpu_load:
CPU freq will be increased if measured load > max_cpu_load.
Default value:
Code:
echo "75" > /sys/devices/system/cpu/cpu0/cpufreq/smartass/max_cpu_load
- min_cpu_load: CPU freq will be decreased if measured load < min_cpu_load.
Default value:
Code:
echo "25" > /sys/devices/system/cpu/cpu0/cpufreq/smartass/min_cpu_load
- sleep_rate_us: Sleep rate when screen is off
Code:
echo "500000" > /sys/devices/system/cpu/cpu0/cpufreq/smartass/sleep_rate_us
Release history:
v002:
- sleep_max_freq set to 122880 - more battery saving,
- sleep_wakeup_freq set to 600000 - faster wake up,
- ramp_down_step set to 160000 - to slow down decreasing CPU freq,
- when screen is off - governor acts like its 'conservative' version, just checks CPU loads using 500ms rate,
- added sleep_rate_us parameter - sleep rate when screen is off can be changed using this parameter.
v001:
- just initial version fixed to work with X8.
Sources at: GitHub
Very nice Andy! Apparently we found ourselves a new Module Man
i don't really know what this is all about, its some kind of an AI for cpu governor?
i like the kuyadroid setting(its use native cm setting not setcpu), so its gonna be an setup on cm setting?
Downloading to make some tests
As I can see it is a custom CPU governors, like one "Do it yourself"
Maybe now some people stop complaining about battery life in every ROM. Thx AnDyX
biscoitu said:
Downloading to make some tests
As I can see it is a custom CPU governors, like one "Do it yourself"
Click to expand...
Click to collapse
It is rather - get abandoned project ('erasmux') and refresh it . I tried to resolve one of annoying issue:
12. Using smartass the CPU frequency does go above 352Mhz (with screen off)
Intentional to keep standby battery life under control.
13. Using smartass the CPU frequency is always at its max (or always at 352Mhz when screen is off)
See "Monitoring the CPU frequency" in the "Advanced subjects".
Click to expand...
Click to collapse
I will test it now and I let know how it compares to 'ondemand' tomorrow.
so in plain english(sorry im a noob) this changes the CPU freq scaling behavior? does it improve preformance?
Aashrey99 said:
so in plain english(sorry im a noob) this changes the CPU freq scaling behavior? does it improve preformance?
Click to expand...
Click to collapse
I will add better explanation soon.
Nice module AnDyX I'm gonna check it. Did you have to hijack many calls?
doixanh said:
Nice module AnDyX I'm gonna check it. Did you have to hijack many calls?
Click to expand...
Click to collapse
Only two
But your:
Code:
kallsyms_lookup_name_ax = (void*) OFS_KALLSYMS_LOOKUP_NAME;
is irreplaceable
AndyX...Is this an AI SetCPU??....when we push it to out phone..it will auto config or we config ourself?
lukewong01 said:
AndyX...Is this an AI SetCPU??....when we push it to out phone..it will auto config or we config ourself?
Click to expand...
Click to collapse
Module has predefinied value - I changed info and explained this in main post.
Well this is an instant success!!!!! My stock SE 2.1 is much more responsive now. Menus are smoother and apps start up faster and dont lag much.
I haven't tested it on any custom ROM yet, but i'll do that today. Will report back soon.
Thanks for the awesome module!
AnDyX said:
Module has predefinied value - I changed info and explained this in main post.
Click to expand...
Click to collapse
hmm...i just have 1 question on my mind...i just wanna know we need to customize the value ourself or just push it to our phone and insmod and thats it?
lukewong01 said:
hmm...i just have 1 question on my mind...i just wanna know we need to customize the value ourself or just push it to our phone and insmod and thats it?
Click to expand...
Click to collapse
Just push - module has predefined values as standing in 1st post, after that you can tweak it if you want and share opinion.
khartaras said:
Very nice Andy! Apparently we found ourselves a new Module Man
Click to expand...
Click to collapse
yeah, that's the first thing that came to my mind when i noticed this thread. when doixanh focused on improving his rom, there is a new module-star rising up
thanks, andyx! i haven't tried it yet, but i'll sure test it in a few days. actually, i came up with a simmiliar idea, but i have no programming/scripting/whatever skills (ability to write a "hello world" prog in pascal doesn't count, does it? LOL)
Does this module has conflict with the other modules if i push it or it will work with itself? I mean if this is safe in all ROM without conflicts from racht or dx modules?
i have one question: if i reboot my x8, will i have to insmod it again ??? or can i add these 2 lines in hwconfig ??? thanks for reply
deedii said:
Does this module has conflict with the other modules if i push it or it will work with itself? I mean if this is safe in all ROM without conflicts from racht or dx modules?
Click to expand...
Click to collapse
This module adds completely new functionality, so should work in all ROM-s.
Oh thanks much andyx.x0x0
this thing works well! applications start quickly and everything runs smoothly. Thank you very much for all your modules AnDyX. You're doing really useful and necessary moduls and I'm use all your modules.
Good job!
Hey guys!
Wanted to bounce a question off of all of you,
I have Uruk 1.0 installed, with Urukconfig 1.1.0, I also have SetCPU installed.
I'm looking to find the 'best' config to optimize my CPU governing....
SetCPU seems to take longer to 'set' due to SU permissions, but 'runs' just fine after booting - the system is nice and snappy, but there seems to be some slight bugs in it.... sometimes it wipes my settings out of it, especially after a reboot, but it is intermittant.
CPUGovernor in Urukconfig works well no matter how I cut it, but I am unsure how to set the scaling of the CPU.
One thing I did notice, between the two governors, if I have them both 'running' SetCPU reports 'interactive' scaling, while urukconfig reports 'ondemand' scaling... I think they might not like playing nice with each other, but don't quote me on that.
Any suggestions or comments?
wokker666 said:
CPUGovernor in Urukconfig works well no matter how I cut it, but I am unsure how to set the scaling of the CPU.
Click to expand...
Click to collapse
I figured this out, go into /etc/uruk.conf and edit the cpugovernor file.
wokker666 said:
SetCPU seems to take longer to 'set' due to SU permissions, but 'runs' just fine after booting - the system is nice and snappy, but there seems to be some slight bugs in it.... sometimes it wipes my settings out of it, especially after a reboot, but it is intermittant.
Click to expand...
Click to collapse
I think I may have 'fixed' this problem (I'm not sure though, I really hope I'm not screwing things up...)
I went into /sys/devices/system/cpu/cpu0/cpufreq and edited cpuinfo_min_freq to my desired 600000 (default 300000) and rebooted.
There seems to be no issues, SetCPU is now keeping my settings.
EDIT: Even after setting the cpu speeds manually, even making them read only permissions, the system resets them on reboot, seems like a fix described in this thread http://forum.xda-developers.com/showthread.php?t=1169625 may do the trick.
EDIT2 Between the script I wrote and killing SU to SetCPU, the system is no longer rewriting the cpu_min/max_freq - Thanks arpruss!
wokker666 said:
One thing I did notice, between the two governors, if I have them both 'running' SetCPU reports 'interactive' scaling, while urukconfig reports 'ondemand' scaling... I think they might not like playing nice with each other, but don't quote me on that.
Click to expand...
Click to collapse
I can say, with the changes I implemented editing both the cpugovernor and cpuinfo_min_freq files, my system is most definitly running in interactive mode, but urukconfig still reports the mode as 'ondemand' - pretty sure it's not reporting correctly.
Im still open to thoughts on this, I would really like to hear what some of the seniors around here have to say
Cool, great info. What did you change in the cpugovernor file? Have you tried to change the Max freq yet? I'd love to get uruk to 1.2
bug splat said:
Cool, great info. What did you change in the cpugovernor file? Have you tried to change the Max freq yet? I'd love to get uruk to 1.2
Click to expand...
Click to collapse
I set my desired min / max cpu speeds, and set the governor to interactive mode (seems to be a bit peppier than ondemand)
Unfortunately the only way to overclock is a kernel capable of it, then setting everything appropriately. Uruk 0.7 has an OC kernel - try it out
wokker666 said:
I set my desired min / max cpu speeds, and set the governor to interactive mode (seems to be a bit peppier than ondemand)
Unfortunately the only way to overclock is a kernel capable of it, then setting everything appropriately. Uruk 0.7 has an OC kernel - try it out
Click to expand...
Click to collapse
ok, gotcha.
Yeah, I was afraid you says 0.7 was the only way. I was hoping you found a way on 1.0. I used to be on 0.7 with OC and I might go back.
I have been testing different SetCPU settings on my I9100G and been running AnTuTu Benchmark. Here are the results:
hotplug - 6153
ondemand - 3739
conservative - 3830
performance - 4066
SetCPU not installed - 4964
Does that even make any sense? Shouldn't I have the best performance with the performance setting?
Not surely.... This may be different for any situation... It depends on the kernel, voltages and so on... I thinks that it's normal!
Sent from my Galaxy SII powered by CheckRom
Would anyone know what are the default kernel settings?
It's strange because when I disable SetCPU I am getting a worse performance again, but from what I can see in system files, the SetCPU settings are still here.
EDIT:
Actually some more tests:
hotplug - 6036
conservative - 5834
ondemand - 5740
performance - 5058
I might have forgot to tick the "Enable" thing in SetCPU with some of the first tests :/
_AnAkIn_ said:
Would anyone know what are the default kernel settings?
It's strange because when I disable SetCPU I am getting a worse performance again, but from what I can see in system files, the SetCPU settings are still here.
EDIT:
Actually some more tests:
hotplug - 6036
conservative - 5834
ondemand - 5740
performance - 5058
I might have forgot to tick the "Enable" thing in SetCPU with some of the first tests :/
Click to expand...
Click to collapse
Wich rom/kernel are you runing?
_AnAkIn_ said:
I have been testing different SetCPU settings on my I9100G and been running AnTuTu Benchmark. Here are the results:
hotplug - 6153
ondemand - 3739
conservative - 3830
performance - 4066
SetCPU not installed - 4964
Does that even make any sense? Shouldn't I have the best performance with the performance setting?
Click to expand...
Click to collapse
And what values you get on glbenchmark?
TerraSilent 1.3.5
{
"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"
}
After a lot of testing I can release it
Well sorry for the /data partition, I don't know why, but it's stuck at RFS. I format it, I tried everything, everytime you relaunch the recovery and try to mount the partition, it mount it as RFS and wipe it out.
I advice you to let it as RFS or, change it to ext4 when you are sure you won't need to do further change in it from the recovery.
Click to expand...
Click to collapse
THIS IS ONLY FOR THE INTL AND USA VERSION OF THE GALAXY PLAYER 4.0 (YP-G1).
The kernel is based on the R3 version of Klin1344.
Current features :
All features of R3 of Klin Kernel (see below)
Battery life improvement using the patch of Entropy512
Jhash3
Optimized CFS (process scheduler)
A lot of memory tweak
TinyRCU
New Governor created for the kernel (based on smartassV2) : TerraSilent (I recommend you to use it)
CleanCache (using zCache) (see below for explanation)
zRam (see below for explanation)
Updated crc32 algorithm (that is quite used everywhere in the kernel)
Using optimized Sha1 algorithm
Lzma compressed initramfs
Swap enabled
New Boot logo (same image (but bigger) as the one in the begin of the Thread)
Feature Coming from based kernel :
V(R), BFQ, SIO Scheduler
OC to 1.2GHz
ClockWorkMod (recovery)
interactiveX, smartassV2, ondemandX, and the default governors.
Netarchy/coolbho3ks SoD patch from Entropy512's source (allows you to use screen off profiles of under 800Mhz)
Ext4 support
Voodoo Sound
etc ... see http://forum.xda-developers.com/showthread.php?t=1601773
Changelog
Version 1.3.5
[RECOVERY] Optimization of the recovery with better use of the busybox
[RECOVERY] Can save the /dbdata partition in nandroid
[USA] Added VOODOO FM
Version 1.3
[CHANGE] Zram built-in not a module anymore
[BUSYBOX] Updated busybox to last version 1.20.1 meaning any init.d script will be launched with that version.
Version 1.2
[MAJOR BUG FIX]Corrected a bug with the recovery that wasn't able to mount correctly the /data partition, it was leading to a complete wipe of data when applying ZIP that needed that partition to be mounted
[OPTIMIZATION]Using LZO Compression for ZRam also, after some test, I discover that Snappy compression is not really optimized on our device.
Feature Explanation :
faux123 said:
CleanCache (via ZCache backend)
ZCACHE is a new technology I introduced to Sensation Kernel. ZCACHE is a compressed cache similar to ZRAM but the similarity ends there. ZCache is meant to provide as many "cleancache" pages (non-dirty or untouched "virgin" memory) to apps that request for new memory. CleanCache is very easy to allocate and no additional penalty are required to hand them out, so having more CleanCache pages will improve performance. Under heavy memory pressure, often times the kernel will NOT have enough CleanCache pages, so the kernel has to do EXTRA work to reclaim dirty cache pages and clean them for the new apps that's requesting for them. The described process creates a performance hit for the kernel and the app, so the idea is to use compression to create more CleanCache pages available for use. Of course there's a penalty to pay for using compression, but the trade-off between compression penalty and the penalty for reclaiming dirty cache pages and allocating them after cleaning is smaller for compression, so in the end, CleanCache should add more performance.
Source : http://forum.xda-developers.com/showthread.php?t=1359951
Click to expand...
Click to collapse
faux123 said:
ZRAM (aka CompCache aka RAMZSwap)
ZRAM is an updated version formally known as CompCache and RAMZSwap. It was originally designed for 2.6.38.xx kernels, I have backported to our 2.6.35.xx kernel. ZRAM allows real-time compression of memory objects in RAM thus reducing memory pressure for the Linux kernel and can keep more apps in memory longer (more apps in RAM == better performance, less fetching from slower MMC or SDCard). Compression, however, is not Free. Some CPU cycles are required to do the compress/decompression, so there's a slight penalty for it. The original CompCache / RAMZSwap required a user space binary to control its behavior which adds additional penalty to performance, but the new version ZRAM eliminated the need for a separate dedicated daemon, thus reducing the overhead and increased performance from the old CompCache by 20%. Therefore, with the newer implementation of ZRAM interface, the performance penalty is almost negligible.
Source : http://forum.xda-developers.com/showthread.php?t=1359951
Click to expand...
Click to collapse
Dark_Balor said:
TerraSilent Governor
TerraSilent is completely based on the SmartAssV2 kernel with some improvement for the battery. When you are putting your device on sleeping/suspend, it's changing the frequency to 100Mz (if you set a minimum higher then that, it will be used instead) to avoid using too much battery when not needed, you can still listen to music without any lag. (if you experience some lag just change the minimum to 200Mhz).
It also less aggressive on ramp up the frequency, instead of always trying to reach the ideal frequency (400Mhz by default, I'll explain for tweaker all they can change if they want) it will try under frequency first (200Mhz if you were at 100Mhz before). Meaning using less battery.
By default when the load >= 85%, it will ramp up the frequency and if its lower than 35, ramp down it to an new frequency calculated using the current load.
Click to expand...
Click to collapse
How to tweak/activate special features
By default zCache and zRam are disabled because they can be unstable depending on the device.
By example, I don't have problem with zCache but with zRam yes, and Klin the exact opposite. The better is to try for your device and then choose which one you want, the 2 or none.
zCache :
To activate zCache, you only need to put a script in your init.d directory (in etc) or using ScriptManager to launch that line on boot :
Code:
insmod /lib/modules/zcache.ko
zRam:
To activate zRam, you only need to put a script in your init.d directory (in etc) or using ScriptManager to launch theses lines on boot :
Code:
mkswap /dev/block/zram0
swapon /dev/block/zram0
Changing by script the governator to TerraSilent
if you don't want to use (but I recommend noFrill Cpu to do that) an application to change the governator, you just need to do :
Code:
echo terrasilent > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
Tweaking TerraSilent
in /sys/devices/system/cpu/cpufreq/terrasilent you'll find these files :
Code:
debug_mask --> for debug (possible value 0(disabled),1,2,4)
up_rate_us --> µs to wait before ramp up
down_rate_us --> µs to wait before ramp down
sleep_ideal_freq --> Freq used when sleeping/suspend
sleep_wakeup_freq --> Freq use when waking up
awake_ideal_freq --> Freq ideal for daily usage
sample_rate_jiffies --> DON'T TOUCH UNLESS YOU KNOW WHAT YOU ARE DOING
ramp_up_step --> step used when ramp up in Hz (to calcule the new frequency) (0 = maximum freq will be used when ramp up)
ramp_down_step --> step used when ramp down in Hz (to calcule the new frequency) (0 = using heuristic to found the best new lowered freq)
max_cpu_load --> max load that trigger the freq change for ramp up
min_cpu_load --> min load that trigger the freq change for ramp down
Where you can put your own values. (You have to do that after every boot, the best is to create a script that change the governor to TerraSilent, and set the wanted values)
FAQ
How to create a script
With ScriptManager it's easy, just push the menu button -> New -> Script
Put the script lines you want
Menu -> save
That's done
Manually : create a file name my-script.sh
put as first line :
Code:
#! /system/bin/sh
and then what you want your script to do.
Don't forget to do a
Code:
chmod +x my-script.sh
to make it executable.
Download (ODIN PACKAGES) :
http://www.mediafire.com/?cf9aw48dnmiqi
Source Code
Kernel : https://github.com/Belphemur/Galaxy-Player-4.0-Kernel
Initramfs : https://github.com/Belphemur/initramfs_yp-g1
If you love my work, don't hesitate to click the thanks button
Thanks to
Steve for the first modded kernel of our device
Klin1344 for continuing, improving the work of Steves and testing my kernel for the USA version.
Entropy512 for the battery patch, and a lot of other tweak
Faux123 for all the patch he have backported to the 2.6.35 kernel (zCache, zRam, etc ...)
THanks for your hard work in this kernel. You certainly know more about linux kernels than me.
But for some reason now enabling zram causes crashing and reboots but zcache does not. Oh well, at least one of them works!
klin1344 said:
THanks for your hard work in this kernel. You certainly know more about linux kernels than me.
But for some reason now enabling zram causes crashing and reboots but zcache does not. Oh well, at least one of them works!
Click to expand...
Click to collapse
I'm a Computer Sciences Student, and I already compile some kernel for my server, my computer ^^
It just my first kernel for an ARM device.
Thanks for your work the Kernel fixed the error i had with R2 and R3 ( the CPU speed was at 800MHz while the screen is off and music is on. SetCPU Profile dosent works too)
Sry for my bad english
Sent from my Nexus S using XDA
ChaosChris said:
Thanks for your work the Kernel fixed the error i had with R2 and R3 ( the CPU speed was at 800MHz while the screen is off and music is on. SetCPU Profile dosent works too)
Sry for my bad english
Sent from my Nexus S using XDA
Click to expand...
Click to collapse
I just flashed, but it still runs at 800mhz constantly while playing music with the stock player!
I am using the terraslilent governor.
Sent using Tapatalk
ChaosChris said:
Thanks for your work the Kernel fixed the error i had with R2 and R3 ( the CPU speed was at 800MHz while the screen is off and music is on. SetCPU Profile dosent works too)
Sry for my bad english
Sent from my Nexus S using XDA
Click to expand...
Click to collapse
I'm sure this is a stupid question, but I don't know the answer and the only way to learn is to ask, but how do you tell what the CPU is running at with music playing and screen off?
CPU spy (search for it on the market).
My theory is that the music player is programed to run at the max CPU speed available, which is 100mhz (I think) with the stock kernal. So, when you up the Max frequency to 800mhz, than the music player runs at that. What I still don't get, though, is 1; why doesn't your terrasilent governor solve the problem for me like it did for others, and 2; why does flashing the stock kernal not solve the issue?
Anyway, I'm not entirely sure that it really is running at 800mhz, as I let it play music overnight for 8 1/2 hours, and it only drained 30% battery from 70% to 40%. That makes about 4% per hour, which seems alot lower than I would expect a device running at 800mhz constantly would get. What do you guys think?
Sent using Tapatalk
iJimaniac said:
CPU spy (search for it on the market).
My theory is that the music player is programed to run at the max CPU speed available, which is 100mhz (I think) with the stock kernal. So, when you up the Max frequency to 800mhz, than the music player runs at that. What I still don't get, though, is 1; why doesn't your terrasilent governor solve the problem for me like it did for others, and 2; why does flashing the stock kernal not solve the issue?
Anyway, I'm not entirely sure that it really is running at 800mhz, as I let it play music overnight for 8 1/2 hours, and it only drained 30% battery from 70% to 40%. That makes about 4% per hour, which seems alot lower than I would expect a device running at 800mhz constantly would get. What do you guys think?
Sent using Tapatalk
Click to expand...
Click to collapse
After a lot of testing, I'm sure the application is wrong (or disabling the early suspend state).
When suspended the device have a freq of 100Mhz, you can check it with this command :
Code:
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq
using adb when the device is suspended. You'll see it's 100Mhz (or the min you set if the min above 100Mhz)
The other test you can do is checking the time in state
Code:
cat /sys/devices/system/cpu/cpu0/cpufreq/stats/time_in_state
You'll see that is passing more time in 100Mhz and 400Mhz then every other states.
(for the stats SetCpu or NoFrillCpu can read it for you)
Well, setcpu says the same as cpuspy: constantly 800mhz. However, I just ran it for 1 hour, from 100%, and it drained 4%. While I used to get around 2% per hour, this still seems fairly low consumption to actually be at 800mhz. I guess I will just live with it.
One more question; is there a way I could "undo" the SoD patch, or whatever would be causing this? I thought it would be as simple as flashing stock kernal, but not so. Would a flash of a stock kernal AND factoryfs.rfs do the trick?
Actually two more questions, lol; you realize that this is only happening with the stock music app; all other apps work fine. (Just not sure if I actually made that clear)
Sent using Tapatalk
got the kernel loaded up and since my primary use of my player is music playback i've used nofrills to underclock my cpu to max out at 400 mhtz, my question is can I and if so what app to use, to under volt my cpu to maximize my battery life?
daniel644 said:
got the kernel loaded up and since my primary use of my player is music playback i've used nofrills to underclock my cpu to max out at 400 mhtz, my question is can I and if so what app to use, to under volt my cpu to maximize my battery life?
Click to expand...
Click to collapse
Voltage control (free) will let you UV
iJimaniac said:
Well, setcpu says the same as cpuspy: constantly 800mhz. However, I just ran it for 1 hour, from 100%, and it drained 4%. While I used to get around 2% per hour, this still seems fairly low consumption to actually be at 800mhz. I guess I will just live with it.
One more question; is there a way I could "undo" the SoD patch, or whatever would be causing this? I thought it would be as simple as flashing stock kernal, but not so. Would a flash of a stock kernal AND factoryfs.rfs do the trick?
Actually two more questions, lol; you realize that this is only happening with the stock music app; all other apps work fine. (Just not sure if I actually made that clear)
Sent using Tapatalk
Click to expand...
Click to collapse
I have the governor set to smartassv2 and my cycles through. It was at 800 mhz for about 35% of the time. I'm using PlayerPro with the DSP pack and voodoo sound, though, and not stock.
Yeah, just something wrong with the stock player. Oh well, I'm going to buy poweramp since I just tried the trial and now the stock player seems pathetic anyway I love the lockscreen controls!
Sent using Tapatalk
iJimaniac said:
Yeah, just something wrong with the stock player. Oh well, I'm going to buy poweramp since I just tried the trial and now the stock player seems pathetic anyway I love the lockscreen controls!
Sent using Tapatalk
Click to expand...
Click to collapse
Quick off topic question... Can you get Poweramp's settings to stick? Such as to not show the rating, EQ, etc (the look and feel settings). I like Poweramp a little better (sounds about same as PlayerPro with DSP) but the settings being wonky bothers me.
Hmm, I don't remember and my trial is up. I don't think there was a problem (that I noticed).
Sent using Tapatalk
indyssee said:
Quick off topic question... Can you get Poweramp's settings to stick? Such as to not show the rating, EQ, etc (the look and feel settings). I like Poweramp a little better (sounds about same as PlayerPro with DSP) but the settings being wonky bothers me.
Click to expand...
Click to collapse
YES, under settings / Look and feel, just go in and set the things you don't want to see to Hidden.
daniel644 said:
YES, under settings / Look and feel, just go in and set the things you don't want to see to Hidden.
Click to expand...
Click to collapse
That's my point, it just ignores everything and doesn't change anything. I've tried all different ways to get them to stick. Doesn't work on my phone, either.
indyssee said:
That's my point, it just ignores everything and doesn't change anything. I've tried all different ways to get them to stick. Doesn't work on my phone, either.
Click to expand...
Click to collapse
Have you tried unistalling rebooting then reinstalling? Are you on a custom ROM?
Any suggestions for a boot loop that doesn't involve wiping data?
rozelle25 said:
Any suggestions for a boot loop that doesn't involve wiping data?
Click to expand...
Click to collapse
NOPE, bootloops are caused by conflicting files and the ONLY way to solve is to WIPE.
You could try to get into Download Mode and flash back to the ROM/Kernel you where on before your flash that caused the bootloop.
THIS THREAD IS MOST LIKELY DEAD SINCE I MOVED IT INTO THE MAIN LG G3 DEVELOPMENT PAGE!!
NEW LINK http://forum.xda-developers.com/lg-g3/development/kernel-settings-nebulakernel-rev10-2-1-t3258520
USE AT YOUR OWN RISK!! MIGHT NOT WORK FOR ALL G3!!
MAKE BACKUP OF YOUR DEVICE BEFORE USING THESE FILES!!!
Please Do not change or mod these settings or re-release them! If you do i will hunt you down and murder your favorite pet and turn them into a nice steak or i'll just have to hunt you down and ding dong ditch your house > [That was a joke......]
This thread is for setting i made for the LG G3 Verizon Wireless (vs985)
These settings are to be used with SetCPU and Trickster Mod (You'll need Trickster Mod donate pack to restore the Trickster Mod backup settings)
These settings .zip are not flashable. You will need to unzip the pack ON DEVICE.
PACK includes:
SetCPU profiles:
Multimedia - Other, Multimedia - Photos, Multimedia - Music, Multimedia - Video, Multimedia - Camera, Emulator- MyBoy!, Social, Google Chrome, GPS Navigation and Maps [ACTIVE], Phone/Contacts, HIGH TEMP!! 170+oF+!!, Games (HD-Large), Games (HD-Small), Charging (AC/USB), Screen Off, Everyday Use. Those are the profiles in the SetCPU pack. They are still being tweaked! Every Profile is different and might have different governors and I/O Schedulers
Trickster Mod Setting: EXTREME Undervolting, On_demand Governor tweaking, minfree_Control (RAM Management), 1512 i/o fiops BOST SDCARD AND INTERNAL STORAGE,Sound controls and some other awesome things! They are still being tweaked!
Install directions for these files:
1. Download the .zip file from this page
2. Unzip pack
3. Put the LG G3 CM12.x NebulaKernel 10.3-T2 [1.0] [3.03GHz].setcpu.json in the root of your onboard SD card partition. SetCPU will find the files on its own when you go and restore it
4. Put the LG G3 (vs985) CM12.1 NebulaKernel 10.3-T2 3.03GHz [11-21-2015] file in the tm_profiles folder in the onboard SD card partition.
Then go into Trickster Mod and touch restore and select the latest version of the files
5. Change your DPI to 350 because it will make the 1440p display look beautiful and perfect and like it should look! For some reason i cant get the system to change the resolution to 1080p anymore. I guess something in CM12.1 messed that up but what ever!
6. ENJOY THESE FILES and you're instantly AWESOME LG G3!
I do not take ANY credit AT ALL for the making of the kernel! I did not build the KERNEL! All credit goes to @Eliminater74 !
These settings ONLY work on the NebulaKernel 10.3-T2l! If you use the Trickster Mod Settings on any other kernel the device will crash and boot loop These settings have only been tested on The Verizon LG G3 model. I do not know if they work on any other model because i do not own them
DOWNLOAD THIS BADASS KERNEL FROM THIS BADASS DEV!
Kernel link: http://forum.xda-developers.com/lg-g3/development/kernel-nebulakernel-rev6-5-build20150715-t3161768
GeekBench scores!
1. Single-Core: 1010 | Multi-Core: 3177
2. Single-Core: 1080 | Multi-Core: 3255
3. Single-Core: 1060 | Multi-Core: 3300
4. Single-Core: 1070 | Multi-Core: 2433
DO NOT DOWNLOAD AND USE [V1.0 STABLE-RELEASE] IT IS NOT STABLE OR USABLE FOR DAILY USE! USE THE NEWEST VERSION AVAILABLE
CHANGELOG
11-21-2015: [V1.0 STABLE-RELEASE]
1. Release of Pack! YAY!!!
2. I had to make some voltage changed to the 3.03GHz step for it to be stable for me! I have to raise the voltage up from 1225 to 1228. So far it's been very stable! Everything is undervolted beautifully!
3. Most of the Governor settings and SetCPU profiles are ported from the Jedi Kernel settings pack but with minor changes like adding per profile I/O Schedulers
11-22-2015: [V1.1 STABLE]
1. SetCPU: I changed Everyday Use MAX cpu freq from 3GHz down to 2.88GHz because 3GHz isn't stable yet. I'm still working on the voltage for it.
2. Trickster Mod: Tweaked voltages to make the device more stable. They aren't perfect yet!
3. Trickster Mod: Tweaking the OnDemand governor for get the highest performance from the 801 CPU.
4. Trickster Mod: Changed GPU governor from Simple-ondemand to msm-adreno-tz because i seem to get better performance with that!
5. If anyone can tell me how to export/backup Kernel Adiutor settings that would be awesome!
11-23-2015: [V1.2 STABLE]
1. SetCPU: Changed Max freq on charging AC/USB from the lower 2.4 to the higher 2.4GHz
2. SetCPU: Changed Max freq on Camera profile to 2419 and changed the governor to ondemand. For better 4K recording.
3. SetCPU: Changed Max Freq on Multimedia-Other to 1574
4. SetCPU: Multimedia-Music Max freq from 1958 to 2265
5. SetCPU: Multimedia-Video Max Freq from 1728 to 1958
6. SetCPU: Google Chrome Max freq from 1958 to 2268 (this profile only supports Chrome Beta)
7. SetCPU: Phone, Contacts Max freq from 806 down to 729 (Trying to see if i can get lower temps in phone calls)
8. Trickster Mod: Changed GPU freq from 657MHz up to 700MHz (This might not work for all! It works PERFECTLY for me!)
9. Trickster Mod: Not sure if this in the today's build but i made some sound settings changes! You might want to change them to your liking!)
10. Trickster Mod: Tweaked some voltages! Trying to have them as low as possible but keeping full stability!
11. These updates will most likely be uploaded everyday!
11-26-2015: [V1.3 STABLE]
1. Trickster Mod: I Tweaked the voltages! I haven't had any crashes unless i try to lower the voltages! So i might have found the perfect voltages for this phone!
2. Trickster Mod: I changed the hotplug from MPDecision to MSM MPDecision because i am getting better proformance with that hotplug. I put a picture of the settings i used in the newest post! Please see them to change your settings in Kernel Adiutor.
3. Trickster Mod: You will need to change the CPU governor Settings manually to the tweaked ones. Change them to 0.2. If you see BS Logic.....Well it speaks for itself! DONT USE IT! IT'S GARBAGE!
4. Trickster Mod: I tweaked the GPU settings See newest post for what to change them to in Kernel Adiutor.
5. SetCPU: I added a low Battery profile today! It will enable when your battery drops before 19% because Android tells you that your battery is low at 15% it's to catch it before it Starts its BS lol
6. SetCPU: I reorganized the profiles! I put screen off on the top of everything else so when you are playing music you can the Screen Off profile enables to save battery life and so on.
7. SetCPU: I also tweaked some profiles but i forget what i did or to what. I've been busy lately so i forgot.
8. I changed my DPI from 330 to 350 and i've been getting WAY better proformance! So that's awesome
9. I got 3 1/2 hours of SOT.
10. I also changed my kernel from the testing version to the more stable version but these settings work on both. You will need to use the stable kernel that supports the 3GHz CPU OC and the 700MHz GPU OC for them to work!
11. Also happy thanksgiving to my fellow Americans and belated happy thanksgiving to my Canadian friends which i have very little about you friends in either! -______-
12. I changed the names to some of the files and the .zip pack
Please report back after updating!
If you encounter any device crashing please tell me
Thanks
new update!
new update!
new update! Happy Thanksgiving!
This is a thread post that goes alongside with the newest version V1.3 STABLE from 11-26-2015.
These are things that you have to set manually yourself!
In the first picture of the Hotplug settings please make sure the minimum cores online is set to one! That was a mistake i made before taking the screenshot! I was scrolling and must have dragged it to 4 somehow
Woooow thanks hermano
mataflakitas said:
Woooow thanks hermano
Click to expand...
Click to collapse
For what?
For thread ...
mataflakitas said:
For thread ...
Click to expand...
Click to collapse
Thanks! I work hard on this stuff to help people get the most out of their devices using awesome kernels!
MaddMaxx636 said:
THIS THREAD IS MOST LIKELY DEAD SINCE I MOVED IT INTO THE MAIN LG G3 DEVELOPMENT PAGE!!
NEW LINK http://forum.xda-developers.com/lg-g3/development/kernel-settings-nebulakernel-rev10-2-1-t3258520
Click to expand...
Click to collapse
As this is what the OP has stated, there's no need to keep both open.
Please use the thread linked above for any further conversation.
Thread closed.