[COLLECTION] Scripts&Explaination [06/07] - Galaxy S Advance I9070 General

This is a collection of echo scripts with optimized values for our janice (i9070&i9070P).
I will add an explanation for every tweak to make things clear.
BATTERY
Code:
[COLOR="Red"]deepest_state[/COLOR]: this allow you to set a sleep level. As far as I know, 3-4-5 states are available; major is the state, better your phone will sleep and so less battery draining (obviously while screen is off).
A tip: I think that 4 state is the best, it doesn't cause troubles on the contrary of the 5 level that may causes problems, but it is stable if using ONDEMAND as governor.
[COLOR="Blue"]echo "4" > /d/cpuidle/deepest_state;[/COLOR]
Code:
[COLOR="Red"]dirty_expire_centisecs[/COLOR]: In hundredths of a second, how old data must be to be written out next time a thread wakes to perform periodic writeback. As I know, permitted values are 100 to 5000, but if I'm wrong, don't esitate to correct me!
[COLOR="Blue"]echo "5000" > /proc/sys/vm/dirty_expire_centisecs;[/COLOR]
Code:
[COLOR="Red"]dirty_writeback_centisecs[/COLOR]: In hundredths of a second, how often threads should wake up to write data back out to disk.
[COLOR="Blue"]echo "5000" > /proc/sys/vm/dirty_writeback_centisecs;[/COLOR]
Code:
[COLOR="Red"]laptop_mode[/COLOR]: is a special page writeback strategy intended to optimize battery life by minimizing memory activity. My tip is to take it off.
[COLOR="Blue"]echo "0" > /proc/sys/vm/laptop_mode;[/COLOR]
Code:
[COLOR="Red"]max_ac_c[/COLOR]: Is a CoCore kernel feature that allow to edit the chargin' values. Safe values are among 100 to 700, put an higher value may damage your battery, instead putting lower value (400 for example) it will preserve battery life.
[COLOR="blue"]echo "400" > /sys/kernel/abb-charger/max_ac_c;[/COLOR]
PERFORMANCE
Code:
[COLOR="Red"]mali_l2_max_reads[/COLOR]: Set max reads that mali l2 can do.
[COLOR="Blue"]echo "48" > /sys/module/mali/parameters/mali_l2_max_reads;[/COLOR]
Code:
[COLOR="Red"]mali_debug_level[/COLOR]: Disabling it, you can gain some performance improvements.
[COLOR="Blue"]echo "0" > /sys/module/mali/parameters/mali_debug_level;[/COLOR]
Code:
[COLOR="Red"]fsync[/COLOR]: Fsync is an android capability that always writes data out to the memory preventing data loss. If you have a stable system, disable it and you'll have: more battery life, faster system. But be careful you may loose all of your data if your phone shuts down suddenly.
[COLOR="Blue"]echo "0" > /sys/kernel/fsync/mode;[/COLOR] // To enable (default)
[COLOR="Blue"]echo "1" > /sys/kernel/fsync/mode;[/COLOR] // To disable
[COLOR="Blue"]echo "2" > /sys/kernel/fsync/mode;[/COLOR] // Dynamic (writes data only when screen is off)
Code:
[COLOR="Red"]vfs_cache_pressure[/COLOR]: File system cache is really more important than the block cache above in dirty ratio and dirty background ratio, so we really want the kernel to use up much more of the RAM for file system cache, this will increase the performance of the system without sacrificing performance at the application level. Lower value is better (100 is the max), so for example:
[COLOR="Blue"]echo "10" > /proc/sys/vm/vfs_cache_pressure;[/COLOR]
Code:
[COLOR="red"]page-cluster[/COLOR]: This controls the number of pages which are written to swap in a single attempt.
It is a logarithmic value - setting it to zero means "1 page", setting it to 1 means "2 pages", setting it to 2 means "4 pages", etc.
[COLOR="Blue"]echo "3" > /proc/sys/vm/page-cluster;[/COLOR]
SD CARD
Code:
The default value of sd card cache is 128, but some various tests have estabilished that if you increase this value to 2048, you'll have improvements in write and read sd card operations.
[COLOR="Blue"]echo "2048" > /sys/devices/virtual/bdi/179:0/read_ahead_kb;
echo "2048" > /sys/devices/virtual/bdi/7:0/read_ahead_kb;
echo "2048" > /sys/devices/virtual/bdi/7:1/read_ahead_kb;
echo "2048" > /sys/devices/virtual/bdi/7:2/read_ahead_kb;
echo "2048" > /sys/devices/virtual/bdi/7:3/read_ahead_kb;
echo "2048" > /sys/devices/virtual/bdi/7:4/read_ahead_kb;
echo "2048" > /sys/devices/virtual/bdi/7:5/read_ahead_kb;
echo "2048" > /sys/devices/virtual/bdi/7:6/read_ahead_kb;
echo "2048" > /sys/devices/virtual/bdi/7:7/read_ahead_kb;
echo "2048" > /sys/devices/virtual/bdi/default/read_ahead_kb;[/COLOR]
Code:
[COLOR="Blue"]This should block charging when phone reaches 100% and recharge phone when is 50% (Thanks to [user=2855249]@bobfrantic[/user]).
THIS IS ONLY WORKING WITH COCORE KERNEL[/COLOR]
echo on > /sys/kernel/abb-fg/fg_cyc
echo dischar=100 > /sys/kernel/abb-fg/fg_cyc
echo rechar=50 > /sys/kernel/abb-fg/fg_cyc
I will add more tweaks, stay tuned guys

@hastalafiesta
No DL on OP?
---------- Post added at 02:56 AM ---------- Previous post was at 02:47 AM ----------
Do you have Purging of assets and kernel sampage merging enabled manually in AOSPA with this script? Or only KSM?
Thanks

coffeecore said:
@hastalafiesta
No DL on OP?
---------- Post added at 02:56 AM ---------- Previous post was at 02:47 AM ----------
Do you have Purging of assets and kernel sampage merging enabled manually in AOSPA with this script? Or only KSM?
Thanks
Click to expand...
Click to collapse
I will also add here a script. Nope both (ksm and purging of assets) disabled

Related

[How to] Improve battery life on GOT 2.2.1 with CM6

First, I would like to thank the GOT team, kabaldan and others for getting the Froyo on our milestone earlier than expected!
Based on what some other members said, here's what I concluded on how to improve the battery life:
1. Just to mention I'm overclocked at 800mhz with 52vsel
2. I have deleted ADWLauncher.apk and replaced it with Launcherpro (this doesnt have an effect on battery, it's just that I like this launcher because it's more faster and more responsive)
3. I also deleted CMstats.apk from /system/app
4. I have disabled "location" from setting-->location and security settings-->my location ... both "use wireless" and "use gps" are disabled
! This seems to have the most important effect on the battery!
5. Just to mention I'm also using the "Conservative governor" with SetCpu
Hope's this help you as it does to me!
the only thing i did that i really noticed battery improvemts was on set cpu create a profile for screen off with 250/250 speeds usually i had 250/500 and my phone wouldn´t last a day with the new froyo roms but at 250/250 screen off i can easily get to a day, day and a half
my tabe
Code:
#!/system/bin/sh
insmod /system/lib/modules/overclock.ko
echo 56 > /proc/overclock/max_vsel
echo 1000000 > /proc/overclock/max_rate
#echo "5 1000000000 56" > /proc/overclock/mpu_opps
echo "4 750000000 42" > /proc/overclock/mpu_opps
echo "3 500000000 30" > /proc/overclock/mpu_opps
echo "2 250000000 20" > /proc/overclock/mpu_opps
#echo "1 125000000 20" > /proc/overclock/mpu_opps
#echo "0 1000000" > /proc/overclock/freq_table
echo "1 750000" > /proc/overclock/freq_table
echo "2 500000" > /proc/overclock/freq_table
echo "3 250000" > /proc/overclock/freq_table
insmod /system/lib/modules/cpufreq_interactive.ko
echo interactive > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
#insmod /system/lib/modules/cpufreq_conservative.ko
#echo conservative > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
#echo 125000 > /sys/devices/system/cpu/cpu0/cpufreq/conservative/sampling_rate
#echo 25 > /sys/devices/system/cpu/cpu0/cpufreq/conservative/freq_step
work great no random reboots,
Im using in setCPU, screen off profile 500/250mhz
and "toggle 2g" auto manage 2g/3g
2g when sleep
sleep dealy 2min - when screen off
have disabled wireless and gps in "location"
but for 10h sleep mode battery life -20%

[Q] Ultimate Batterysaving by underclocking/undervolting

I mainly use my xt720 for phone calls, internet browsing/chatting, music,.. not any cpu intensive stuffs. My main concern for my phone is battery. Currently, these are the 2 things I have done to possibly prolong my battery charge:
1) Milestone overclock --> running at 720mhz @ 40vsel
2) setCPU --> set minimum to 150mhz (maximum remains at 720mhz)
Am I doing right?
Another question is, when I set it to run at 720mhz @ 40vsel, will the phone still use 40vsel at 150mhz when idling/screen off? or does the phone itself bring the vsel lower during 150mhz idling time? if not, are there possible ways to undervolt at each individual cpu speed level?
thank you for your help, any suggestion is appreciated
my save mode script use 125/28~350/32
but it has no perfomance problem for base work and call
dateno1 said:
my save mode script use 125/28~350/32
but it has no perfomance problem for base work and call
Click to expand...
Click to collapse
thanks for the reply!
do you mind telling me what the "save mode script" is? is that part of milestone overclock or SetCPU? Please give future steps
I think i finally figured it out... PLEASE let me know if I'm doing anything wrong
1) setCPU --> minimum to 125mhz, max. to 720mhz
2) created "oc-settings" file with the following lines:
#!/system/bin/sh
echo 40 > /proc/overclock/max_vsel
echo 720000 > /proc/overclock/max_rate
echo 1 125000000 12 > /proc/overclock/mpu_opps
echo 2 250000000 26 > /proc/overclock/mpu_opps
echo 3 400000000 30 > /proc/overclock/mpu_opps
echo 4 600000000 34 > /proc/overclock/mpu_opps
echo 5 720000000 40 > /proc/overclock/mpu_opps
echo 0 720000 > /proc/overclock/freq_table
echo 1 600000 > /proc/overclock/freq_table
echo 2 400000 > /proc/overclock/freq_table
echo 3 250000 > /proc/overclock/freq_table
echo 4 125000 > /proc/overclock/freq_table
Click to expand...
Click to collapse
I rebooted the phone and checked the "/proc/overclock/mpu_opps" file and the frequency/vsel values have been updated to the ones above.
If I am doing it correctly, then everytime the phone reboots, I would have the following frequency/vsel:
125mhz - 12vsel
250mhz - 26vsel
400mhz - 30vsel
600mhz - 34vsel
720mhz - 40vsel
Please let me know if I did it correctly. I cannot find a way to verify whether I have successfully set these vsels into each frequency, and SetCPU does not seem to display vsel values.
Also, in setCPU, where it tells you the time spent in each frequency, it still lists the frequency as 125,250,500,550,720.

[MOD][NOV.11] ★Script for perfomance★

hello,
i been testing some options, to speed up our sensation.
i had great results on android 2.3.4 (sense 3.0)
not so great on android 2.3.5, on bench tests, but on UI i cant tell the difference.
if you can improve this, be my guest
opinions are welcome
GOOD PERFORMANCE AND GOOD BATTERY LIFE
Code:
#!/system/bin/sh
echo 1 > /sys/devices/system/cpu/cpufreq/ondemand/io_is_busy
echo 5 > /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor
echo 100000 > /proc/sys/kernel/sched_rt_period_us
echo 95000 > /proc/sys/kernel/sched_rt_runtime_us
echo 0 > /proc/sys/vm/swappiness
echo 10 > /proc/sys/vm/dirty_ratio
echo 4 > /proc/sys/vm/dirty_background_ratio
echo 4096 > /proc/sys/vm/min_free_kbytes
echo 5 > /proc/sys/vm/vfs_cache_pressure
echo 0 > /proc/sys/vm/oom_kill_allocating_task
echo 0 > /proc/sys/vm/laptop_mode
echo 0 > /proc/sys/vm/panic_on_oom
echo 0 > /proc/sys/kernel/tainted
echo 3 > /proc/sys/vm/drop_caches
echo 3 > /proc/sys/vm/page-cluster
echo 10 > /proc/sys/fs/lease-break-time
echo 1 > /proc/sys/vm/overcommit_memory
echo 100 > /proc/sys/vm/overcommit_ratio
echo 500 > /proc/sys/vm/dirty_expire_centisecs
echo 1000 > /proc/sys/vm/dirty_writeback_centisecs
echo 10000000 > /proc/sys/kernel/sched_latency_ns
echo 0 > /proc/sys/kernel/sched_wakeup_granularity_ns
echo 2000000 > /proc/sys/kernel/sched_min_granularity_ns
echo 725000 > /proc/sys/kernel/sched_shares_ratelimit
MAXIMUM PERFORMANCE
Code:
#!/system/bin/sh
echo 20000 > /sys/devices/system/cpu/cpu0/cpufreq/ondemand/sampling_rate
echo 60 > /sys/devices/system/cpu/cpu0/cpufreq/ondemand/up_threshold
echo 1 > /sys/devices/system/cpu/cpufreq/ondemand/io_is_busy
echo 5 > /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor
echo 100000 > /proc/sys/kernel/sched_rt_period_us
echo 95000 > /proc/sys/kernel/sched_rt_runtime_us
echo 0 > /proc/sys/vm/swappiness
echo 10 > /proc/sys/vm/dirty_ratio
echo 4 > /proc/sys/vm/dirty_background_ratio
echo 4096 > /proc/sys/vm/min_free_kbytes
echo 5 > /proc/sys/vm/vfs_cache_pressure
echo 0 > /proc/sys/vm/oom_kill_allocating_task
echo 0 > /proc/sys/vm/laptop_mode
echo 0 > /proc/sys/vm/panic_on_oom
echo 0 > /proc/sys/kernel/tainted
echo 3 > /proc/sys/vm/drop_caches
echo 3 > /proc/sys/vm/page-cluster
echo 10 > /proc/sys/fs/lease-break-time
echo 1 > /proc/sys/vm/overcommit_memory
echo 100 > /proc/sys/vm/overcommit_ratio
echo 200 > /proc/sys/vm/dirty_expire_centisecs
echo 500 > /proc/sys/vm/dirty_writeback_centisecs
echo 10000000 > /proc/sys/kernel/sched_latency_ns
echo 0 > /proc/sys/kernel/sched_wakeup_granularity_ns
echo 2000000 > /proc/sys/kernel/sched_min_granularity_ns
echo 725000 > /proc/sys/kernel/sched_shares_ratelimit
EDIT:14-10-2011
added "echo 10 > /proc/sys/fs/lease-break-time"
EDIT:08-10-2011
change "echo 1000000 > /proc/sys/kernel/sched_latency_ns" to "echo 10000000 > /proc/sys/kernel/sched_latency_ns"
change "echo 100000 > /proc/sys/kernel/sched_min_granularity_ns" to "echo 2000000 > /proc/sys/kernel/sched_min_granularity_ns"
MAN
Code:
[SIZE="3"][U]sampling_down_factor[/U]:
this parameter controls the rate at which the
kernel makes a decision on when to decrease the frequency while running
at top speed. When set to 1 (the default) decisions to reevaluate load
are made at the same interval regardless of current clock speed. But
when set to greater than 1 (e.g. 100) it acts as a multiplier for the
scheduling interval for reevaluating load when the CPU is at its top
speed due to high load. This improves performance by reducing the overhead
of load evaluation and helping the CPU stay at its top speed when truly
busy, rather than shifting back and forth in speed. This tunable has no
effect on behavior at lower speeds/lower CPU loads.
sampling_down_factor merge time
1 (default) 1 minute and 59 seconds.
20 1 minute and 47 seconds.
100 1 minute and 29 seconds.
150 1 minute and 24 seconds.
200 1 minute and 22 seconds.
300 1 minute and 20 seconds.
500 1 minute and 12 seconds.
1500 1 minute and 7 seconds.[/SIZE]
Code:
[SIZE="3"]
[U]swappiness[/U]:
parameter controls the tendency of the kernel to move processes out of
hysical memory and onto the swap disk. Because disks are much slower than
RAM, this can lead to slower response times for system and applications if
rocesses are too aggressively moved out of memory.
swappiness can have a value of between 0 and 100
swappiness=0 tells the kernel to avoid swapping processes out of physical
memory for as long as possible
swappiness=100 tells the kernel to aggressively swap processes out of
physical memory and move them to swap cache
[/SIZE]
Code:
[SIZE="3"]
[U]dirty_ratio[/U]:
Contains, as a percentage of total system memory,
the number of pages at which a process which is generating
disk writes will itself start writing out dirty data.
Lower the amount of unwritten write cache to reduce lags
when a huge write is required
[SIZE="2"][I][COLOR="Red"]Lower the amount of unwritten write cache to reduce lags when a huge write is required.[/COLOR][/I][/SIZE]
[/SIZE]
Code:
[SIZE="3"]
[U]sched_rt_period_us[/U]: (Real-Time group scheduling)
The scheduling period that is equivalent to 100% CPU bandwidth[/SIZE]
Code:
[SIZE="3"]
[U]
sched_rt_runtime_us[/U]: (Real-Time group scheduling)
A global limit on how much time realtime scheduling may use. Even without
CONFIG_RT_GROUP_SCHED enabled, this will limit time reserved to realtime
processes. With CONFIG_RT_GROUP_SCHED it signifies the total bandwidth
available to all realtime groups.
* Time is specified in us because the interface is s32. This gives an
operating range from 1us to about 35 minutes.
* sched_rt_period_us takes values from 1 to INT_MAX.
* sched_rt_runtime_us takes values from -1 to (INT_MAX - 1).
* A run time of -1 specifies runtime == period, ie. no limit.[/SIZE]
Code:
[SIZE="3"]
[U]laptop_mode[/U]:
When laptop mode is enabled, the Linux will try to be smart about when
to do disk I/O. It gives as much time as possible to be in a low
power state.
If mode is disabled if value is set to zero (0). To enable mode use non
zero value such as 5.
[/SIZE]
Code:
[SIZE="3"]
[U]oom_kill_allocating_task[/U]:
This enables or disables killing the OOM-triggering task in
out-of-memory situations.
If this is set to zero, the OOM killer will scan through the entire tasklist
and select a task based on heuristics to kill. This normally selects a
rogue memory-hogging task that frees up a large amount of memory
when killed.
If this is set to non-zero, the OOM killer simply kills the task that
triggered the out-of-memory condition. This avoids the expensive tasklist
scan.
If panic_on_oom is selected, it takes precedence over whatever value is
used in oom_kill_allocating_task.
The default value is 0.
[/SIZE]
Code:
[SIZE="3"]
[U]panic_on_oom[/U]:
This enables or disables panic on out-of-memory feature.
1 the kernel panics when out-of-memory happens.
0 the kernel will kill some rogue process, by calling oom_kill().
Usually, oom_killer can kill rogue processes and system will survive.
If you want to panic the system rather than killing rogue processes, set
this to 1.
The default value is 0.
[/SIZE]
Code:
[SIZE="3"]
[U]drop_caches[/U]:
Will cause the kernel to drop clean caches, dentries and inodes from
memory, causing that memory to become free.
1 to free pagecache
2 to free dentries and inodes
3 to free pagecache, dentries and inodes
As this is a non-destructive operation, and dirty objects are not
freeable, the user should run "sync" first in order to make sure all
cached objects are freed.
[/SIZE]
Code:
[SIZE="3"]
[U]vfs_cache_pressure[/U]:
Controls the tendency of the kernel to reclaim the memory which is used for
caching of directory and inode objects.
At the default value of vfs_cache_pressure = 100 the kernel will attempt
to reclaim dentries and inodes at a "fair" rate with respect to pagecache
and swapcache reclaim. Decreasing vfs_cache_pressure causes the kernel
to prefer to retain dentry and inode caches. Increasing vfs_cache_pressure
beyond 100 causes the kernel to prefer to reclaim dentries and inodes.
[/SIZE]
Code:
[SIZE="3"]
[U]page-cluster[/U]:
controls the number of pages which are written to swap in a single attempt.
The swap I/O size.
It is a logarithmic value
0 means "1 page"
1 means "2 pages"
2 means "4 pages"
3 means "8 pages"
The default value is three (eight pages at a time).
There may be some small benefits in tuning this to a different value
if your workload is swap-intensive.
[/SIZE]
Code:
[SIZE="3"]
[U]min_free_kbytes[/U]:
This is used to force the Linux VM to keep a minimum number of kilobytes
free. The VM uses this number to compute a pages_min value for each
lowmem zone in the system. Each lowmem zone gets a number of reserved
free pages based proportionally on its size
[SIZE="2"][I][COLOR="Red"]Increase minimum free memory, in theory this should make the kernel less likely to
suddenly run out of memory[/COLOR][/I][/SIZE]
[/SIZE]
Code:
[SIZE="3"]
[U]overcommit_memory[/U]:
Controls overcommit of system memory, possibly allowing processes to
allocate (but not use) more memory than is actually available.
0 Heuristic overcommit handling. Obvious overcommits of
address space are refused. Used for a typical system.
It ensures a seriously wild allocation fails while allowing
overcommit to reduce swap usage. root is allowed to allocate
slighly more memory in this mode. This is the default.
1 Always overcommit. Appropriate for some scientific applications.
2 Don't overcommit. The total address space commit for the system
is not permitted to exceed swap plus a configurable percentage
(default is 50) of physical RAM. Depending on the percentage
you use, in most situations this means a process will not be
killed while attempting to use already-allocated memory but
will receive errors on memory allocation as appropriate.
[/SIZE]
Code:
[SIZE="3"]
[U]overcommit_ratio[/U]:
Percentage of physical memory size to include in overcommit calculations.
Memory allocation limit = swapspace + physmem * (overcommit_ratio / 100)
swapspace = total size of all swap areas
physmem = size of physical memory in system
[/SIZE]
Code:
[SIZE="3"]
[U]dirty_expire_centisecs[/U]:
This tunable is used to define when dirty data is old enough to be
eligible for writeout by the pdflush daemons. It is expressed in 100'ths
of a second. Data which has been dirty in memory for longer than this
interval will be written out next time a pdflush daemon wakes up.
[/SIZE]
Code:
[SIZE="3"]
[U]dirty_writeback_centisecs[/U]:
The pdflush writeback daemons will periodically wake up and write "old"
data out to disk. This tunable expresses the interval between those
wakeups, in 100'ths of a second.
Setting this to zero disables periodic writeback altogether.
[/SIZE]
Code:
[SIZE="3"]
[U]dirty_background_ratio[/U]:
Contains, as a percentage of total system memory, the number of pages
at which the pdflush background writeback daemon will start writing
out dirty data.
[/SIZE]
Code:
[SIZE="3"]
[U]tainted[/U]:
Non-zero if the kernel has been tainted. Numeric values, which can
be ORed together:
1 a module with a non-GPL license has been loaded, this includes
modules with no license (set by modutils and module-init-tools)
2 a module was force loaded by insmod -f (set by modutils and
module-init-tools)
4 unsafe SMP processors: SMP with CPUs not designed for SMP
8 a module was force unloaded by rmmod -f (set by modutils and
module-init-tools)
16 a machine check exception has occurred
32 system has hit bad_page
[/SIZE]
Code:
[SIZE="3"]
[U]up_threshold[/U]:
this means it will increase the CPU speed when utilization is above x%
percentage values (1 to 100)
[/SIZE]
Code:
[SIZE="3"]
[U]sampling_rate[/U]:
This is how often you want the kernel to look at the CPU usage and to
make decisions on what to do about the frequency. Typically this is set
to values of around '10000' or more. If you wanted to set the sampling
rate to 1 second you would set it to 1000000.
This is measured in microseconds (one millionth of a second).
[/SIZE]
Code:
[SIZE="3"]
[U]lease-break-time[/U]:
This file specifies the grace period (in seconds) that the kernel grants
to a process holding a file lease after it has sent a signal to that
process notifying it that another process is waiting to open the file.
If the lease holder does not remove or downgrade the lease within
this grace period, the kernel forcibly breaks the lease.
[/SIZE]
do you think that it will work with lower end diveces?\
like the htc hero and magic?
stroobach said:
do you think that it will work with lower end diveces?\
like the htc hero and magic?
Click to expand...
Click to collapse
yes, will work ON ALL ANDROID devices
vladnosferatu said:
yes, will work ON ALL ANDROID devices
Click to expand...
Click to collapse
aight i will test this right away
what extantion do i need to save this?
and i suppose it should go into the init.d folder?
(using C++ ofc)
stroobach said:
aight i will test this right away
what extantion do i need to save this?
and i suppose it should go into the init.d folder?
Click to expand...
Click to collapse
yes,
or you can run with a script runner app
i mean with C++.. do i need to save it as a .js file or something else?
stroobach said:
i mean with C++.. do i need to save it as a .js file or something else?
Click to expand...
Click to collapse
no this is a bash script
you can save it "script.sh" or just "script"
than do chmod 755 script
change "echo 1000000 > /proc/sys/kernel/sched_latency_ns" to "echo 10000000 > /proc/sys/kernel/sched_latency_ns"
change "echo 100000 > /proc/sys/kernel/sched_min_granularity_ns" to "echo 2000000 > /proc/sys/kernel/sched_min_granularity_ns"
the MAN is incomplete,
i will update all settings
nice post, if I can suggest... there is a little gain by remounting some partitions without noatime & nodiratime, for ex:
Code:
## NEL DUBBIO ROOT e SYSTEM RIMONTATE IN RW
mount -o remount,rw,noatime /;
mount -o remount,rw,noatime /system;
## RIMONTIAMO LE PARTIZIONI SENZA ATIME, NORELATIME E' UTILIZZATO DA ALCUNE APP
for MountPoint in `mount|cut -d " " -f3`
do
mount -o remount,noatime,nodiratime $MountPoint;
done
and also this below can be used even if I don't know what are real advantages, anyway it doesn't hurt
Code:
## QUESTI NON SONO DISCHI RIGIDI, MEGLIO SPECIFICARE
for Block in /sys/block/*
do
echo deadline > $Block/queue/scheduler;
echo 0 > $Block/queue/rotational;
echo 4 > $Block/queue/iosched/writes_starved;
done
suiller said:
nice post, if I can suggest... there is a little gain by remounting some partitions without noatime & nodiratime, for ex:
Code:
## NEL DUBBIO ROOT e SYSTEM RIMONTATE IN RW
mount -o remount,rw,noatime /;
mount -o remount,rw,noatime /system;
## RIMONTIAMO LE PARTIZIONI SENZA ATIME, NORELATIME E' UTILIZZATO DA ALCUNE APP
for MountPoint in `mount|cut -d " " -f3`
do
mount -o remount,noatime,nodiratime $MountPoint;
done
and also this below can be used even if I don't know what are real advantages, anyway it doesn't hurt
Code:
## QUESTI NON SONO DISCHI RIGIDI, MEGLIO SPECIFICARE
for Block in /sys/block/*
do
echo deadline > $Block/queue/scheduler;
echo 0 > $Block/queue/rotational;
echo 4 > $Block/queue/iosched/writes_starved;
done
Click to expand...
Click to collapse
thanks
can you translate the comments to english ?
Thanks very much!
sure friend
Code:
## JUST IN CASE... ROOT and SYSTEM REMOUNT AS ReadWrite
mount -o remount,rw,noatime /;
mount -o remount,rw,noatime /system;
## REMOUNT ALL PARTITIONS WITHOUT ATIME, NORELATIME IS USED BY SOME APPs
for MountPoint in `mount|cut -d " " -f3`
do
mount -o remount,noatime,nodiratime $MountPoint;
done
Code:
## THESE ARE NOT PHYSICAL HardDrive
for Block in /sys/block/*
do
echo deadline > $Block/queue/scheduler;
echo 0 > $Block/queue/rotational;
echo 4 > $Block/queue/iosched/writes_starved;
done
Anyway I have some doubts about touching vm parts
For ex cache pressure can make the device sluggish after some time
While I think that modifing kernel timings can be a good idea even if I used a different approuch by using different configs between wakeup & sleeping
Sent from my HTC Desire using Tapatalk
added script:
GOOD PERFORMANCE AND GOOD BATTERY LIFE
Thanks
is it work with custom kernel like faux 0.2.4r
can i use it like this :
init.post_boot.sh
#!/system/bin/shtarget=`getprop ro.board.platform`case "$target" in "msm8660")
echo 50000 > /sys/devices/system/cpu/cpu0/cpufreq/IntelliDemand/sampling_rate
echo 90 > /sys/devices/system/cpu/cpu0/cpufreq/IntelliDemand/up_threshold
echo 1 > /sys/devices/system/cpu/cpufreq/IntelliDemand/io_is_busy
echo 5 > /sys/devices/system/cpu/cpufreq/IntelliDemand/sampling_down_factor
echo 192000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
echo 100000 > /proc/sys/kernel/sched_rt_period_us
echo 95000 > /proc/sys/kernel/sched_rt_runtime_us
echo 0 > /proc/sys/vm/swappiness
echo 10 > /proc/sys/vm/dirty_ratio
echo 4 > /proc/sys/vm/dirty_background_ratio
echo 4096 > /proc/sys/vm/min_free_kbytes
echo 5 > /proc/sys/vm/vfs_cache_pressure
echo 0 > /proc/sys/vm/oom_kill_allocating_task
echo 0 > /proc/sys/vm/laptop_mode
echo 0 > /proc/sys/vm/panic_on_oom
echo 0 > /proc/sys/kernel/tainted
echo 3 > /proc/sys/vm/drop_caches
echo 3 > /proc/sys/vm/page-cluster
echo 10 > /proc/sys/fs/lease-break-time
echo 1 > /proc/sys/vm/overcommit_memory
echo 100 > /proc/sys/vm/overcommit_ratio
echo 500 > /proc/sys/vm/dirty_expire_centisecs
echo 1000 > /proc/sys/vm/dirty_writeback_centisecs
echo 10000000 > /proc/sys/kernel/sched_latency_ns
echo 0 > /proc/sys/kernel/sched_wakeup_granularity_ns
echo 2000000 > /proc/sys/kernel/sched_min_granularity_ns
echo 725000 > /proc/sys/kernel/sched_shares_ratelimit
chown system /sys/devices/system/cpu/cpu0/cpufreq/IntelliDemand/sampling_rate
chown system /sys/devices/system/cpu/cpu0/online
chown system /sys/devices/system/cpu/cpu1/online
chown system /sys/power/perflock
;;
esac
i changed ondemand to IntelliDemand because faux use this Governor .
is it right what i did???????
mamdouhn said:
Thanks
is it work with custom kernel like faux 0.2.4r
can i use it like this :
init.post_boot.sh
#!/system/bin/shtarget=`getprop ro.board.platform`case "$target" in "msm8660")
echo 50000 > /sys/devices/system/cpu/cpu0/cpufreq/IntelliDemand/sampling_rate
echo 90 > /sys/devices/system/cpu/cpu0/cpufreq/IntelliDemand/up_threshold
echo 1 > /sys/devices/system/cpu/cpufreq/IntelliDemand/io_is_busy
echo 5 > /sys/devices/system/cpu/cpufreq/IntelliDemand/sampling_down_factor
echo 192000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
echo 100000 > /proc/sys/kernel/sched_rt_period_us
echo 95000 > /proc/sys/kernel/sched_rt_runtime_us
echo 0 > /proc/sys/vm/swappiness
echo 10 > /proc/sys/vm/dirty_ratio
echo 4 > /proc/sys/vm/dirty_background_ratio
echo 4096 > /proc/sys/vm/min_free_kbytes
echo 5 > /proc/sys/vm/vfs_cache_pressure
echo 0 > /proc/sys/vm/oom_kill_allocating_task
echo 0 > /proc/sys/vm/laptop_mode
echo 0 > /proc/sys/vm/panic_on_oom
echo 0 > /proc/sys/kernel/tainted
echo 3 > /proc/sys/vm/drop_caches
echo 3 > /proc/sys/vm/page-cluster
echo 10 > /proc/sys/fs/lease-break-time
echo 1 > /proc/sys/vm/overcommit_memory
echo 100 > /proc/sys/vm/overcommit_ratio
echo 500 > /proc/sys/vm/dirty_expire_centisecs
echo 1000 > /proc/sys/vm/dirty_writeback_centisecs
echo 10000000 > /proc/sys/kernel/sched_latency_ns
echo 0 > /proc/sys/kernel/sched_wakeup_granularity_ns
echo 2000000 > /proc/sys/kernel/sched_min_granularity_ns
echo 725000 > /proc/sys/kernel/sched_shares_ratelimit
chown system /sys/devices/system/cpu/cpu0/cpufreq/IntelliDemand/sampling_rate
chown system /sys/devices/system/cpu/cpu0/online
chown system /sys/devices/system/cpu/cpu1/online
chown system /sys/power/perflock
;;
esac
i changed ondemand to IntelliDemand because faux use this Governor .
is it right what i did???????
Click to expand...
Click to collapse
Why do you chown system /sys/devices/system/cpu/cpu0/cpufreq/IntelliDemand/sampling_rate ? You also don't need chown system /sys/power/perflock since it's gone with custom kernels.
mike1986. said:
Why do you chown system /sys/devices/system/cpu/cpu0/cpufreq/IntelliDemand/sampling_rate ? You also don't need chown system /sys/power/perflock since it's gone with custom kernels.
Click to expand...
Click to collapse
Thanks mike do i need to delete something else???
#!/system/bin/sh
target=`getprop ro.board.platform`case "$target" in"msm8660"
echo 50000 > /sys/devices/system/cpu/cpu0/cpufreq/IntelliDemand/sampling_rate
echo 90 > /sys/devices/system/cpu/cpu0/cpufreq/IntelliDemand/up_threshold
echo 1 > /sys/devices/system/cpu/cpufreq/IntelliDemand/io_is_busy
echo 5 > /sys/devices/system/cpu/cpufreq/IntelliDemand/sampling_down_factor
echo 192000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
echo 100000 > /proc/sys/kernel/sched_rt_period_us
echo 95000 > /proc/sys/kernel/sched_rt_runtime_us
echo 0 > /proc/sys/vm/swappiness
echo 10 > /proc/sys/vm/dirty_ratio
echo 4 > /proc/sys/vm/dirty_background_ratio
echo 4096 > /proc/sys/vm/min_free_kbytes
echo 5 > /proc/sys/vm/vfs_cache_pressure
echo 0 > /proc/sys/vm/oom_kill_allocating_task
echo 0 > /proc/sys/vm/laptop_mode
echo 0 > /proc/sys/vm/panic_on_oom
echo 0 > /proc/sys/kernel/tainted
echo 3 > /proc/sys/vm/drop_caches
echo 3 > /proc/sys/vm/page-cluster
echo 10 > /proc/sys/fs/lease-break-time
echo 1 > /proc/sys/vm/overcommit_memory
echo 100 > /proc/sys/vm/overcommit_ratio
echo 500 > /proc/sys/vm/dirty_expire_centisecs
echo 1000 > /proc/sys/vm/dirty_writeback_centisecs
echo 10000000 > /proc/sys/kernel/sched_latency_ns
echo 0 > /proc/sys/kernel/sched_wakeup_granularity_ns
echo 2000000 > /proc/sys/kernel/sched_min_granularity_ns
echo 725000 > /proc/sys/kernel/sched_shares_ratelimit
chown system /sys/devices/system/cpu/cpu0/online
chown system /sys/devices/system/cpu/cpu1/online
;;
esac
mamdouhn said:
Thanks mike do i need to delete something else???
Click to expand...
Click to collapse
Well it depends. Ton of the settings in both scripts are useless because they set already default values. f.g. laptop_mode is 0 by default and you don't need to set it in separate script.
mike1986. said:
Well it depends. Ton of the settings in both scripts are useless because they set already default values. f.g. laptop_mode is 0 by default and you don't need to set it in separate script.
Click to expand...
Click to collapse
can you give to me a good script to use with faux kernel 2.4r and Europe 1.45.401.2 Base - Android 2.3.4 // Sense 3.0 please??????

Galaxy tab 4 7" t230nu Intro.Tips n Ideas

Hey everyone! My name is Kori. So i have been homeless for awhile.Been usinf 2 lg motions as my enertainment.Watching video and typing was annoying on such small screens.
About new years i got a few extra bucks and ended up buying a Samsung Galaxy tab 4 7".
This thing was possessed with Demon Scripts. 2 minutes after my first boot i get notifications the phone cant see my eyes. Every time i touched the phone or even thought about it Power Manager,SSRM and DVFS get twitchy and bump my cpu_minfreq to max.
Chargin my battery isnt always possible when your "Camping" So i began Un-Development.
Then noticing Low Volume ,Weird Wifi and several other problems
My wifi would drop or data transfer would drop. I found that when connected with low signal icould run file in /system/bin called oem_iptables_init.sh would g3t me a data flow again. Then i noticed there seemed to be 2 sets of wifi and bluetooth drivers.
Anyways heres the bulk.
I have removed almost ALL the junk i dont need.
Selinux disabled. Knox is disabled
telephony is all gone. All but the jar and odex in frame"though i removed all permissions to the odex.
Nvm is gone and doesnt load. That means all rf reductionstables as well.
Csc is gone
nothing loads from /NVM , /etc/tel or /system/csc
removed Enterprise SSRM Dvfs has been cut out. Turned off all motion .palm swipe,air motion,smart stay and whatever else
Also managed to Stop several services that are useless to me
So nothing THERE IS NOTHING IN CONTROL OF MY CPUS EXCEPT FOR MY INIT.D SCRIPTS.AHhhhh
i have None of the original apps such as
touchwiz home,keyboard.camera,gallery,Lets say everything¡
All thats left from stock is like google play 'and its apps',settings,mtp,vpn,kies,bluetooth,cert installerand a few others
I mean completley stripped
i have a ton of apps on my phone including 5 or 6 social apps and 2 messenger apps. After a bootup phone idles on one cpu core on st 312 with about 700 to 650 mb of free ram
yes,i unlocked the Hotplug feature.And drastically changed the load balancing to the cores.
This allows the phone to Turn On and Off cpu cores as it needs. Saving battery life with great performance.
I have managed to Increase Volume also.Woooooo
Battery is way better now ,much better wifi. Tons of room in system for my apps. I control my phone now not Google Samsung Selinux Knox Enterprise NVM SSRM DVFS MPDCand all the others.
I have cool init.d setup i made with basically 7 init.d setups or profiles to choose from to exe at boot as well as 6 profiles you can run in realtime. Also 2 sysctl profiles to choose to boit from or exe in realtime.
Also i have tons of init.d settings for this tab i like.
Gettin tired of typing So i will be back with several How tos for you.
but here is something to play with
unlock hotplug
/sys/devices/system/cpu/hotplug/lock change to zero
This the current setup i have Though i think i need a few adjustments in load balancing
But it nice. Lets cpu idle and perform o cpu0 only but keeps a second core close to Help
Keeping the other 2 cores off until really needed
echo "0" > /sys/devices/system/cpu/hotplug/lock
echo "312000" > /sys/devices/system/cpu/hotplug/bound_freq
echo "10" > /sys/devices/system/cpu/hotplug/load_h0
echo "40" > /sys/devices/system/cpu/hotplug/load_h1
echo "70" > /sys/devices/system/cpu/hotplug/load_h2
echo "16" > /sys/devices/system/cpu/hotplug/load_l1
echo "35" > /sys/devices/system/cpu/hotplug/load_l2
echo "50" > /sys/devices/system/cpu/hotplug/load_l3
using this as Governor settings
chmod 666 /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
echo "ondemand" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
chmod 444 /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
#chmod 777 /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate
#echo "990000" > /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate
chmod 777 /sys/devices/system/cpu/cpufreq/ondemand/up_threshold
echo "85" > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold
chmod 777 /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor
echo "1" > /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor
Aslo keeping the cores limited to 1066 mhz max.
chmod 666 /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
echo "1066000" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
chmod 444 /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
Alright going 10-7
Over
Anyone else try it out?? Just wondering if you really can remove all that, and everything work.
Sent from my SM-T230NU using XDA-Developers mobile app

Xperia XZ dual - phone idle, google play services, android OS battery consumption

Hi All,
Do you know when Sony will issue a SW update to solve the high battery consumption of (phone idle, google play services, and android OS) processes.
I am on Nougat, 39.2.A.0.442
Thanks,
well they are kind of slow in getting updates on time...only issue i wish they fix is battery drainage...phone idle consumed 1050 mah of battery in 2 days, why Sony?is system doing something from behind that we dont know or what LOL.im also on latest Nougat .442
I debloated my phone on fw 442, build.prop and init.qcom.post_boot.sh tweaks and get 8-10 hrs SOT [without any cpu profile or underclock or vm tweaks!]
Without all of that, can get 5-6 hrs SOT too. (1-2 hrs play Clash Royal on LTE or 3G)
My Galaxy S6 get 4-5 hr on marshmallow and 5-6 on Lollipop.
I think for a LCD panel, not any problems at Sony battery consuming!
Can you share details about power usage for google play services? This is google fault not sony software!
---------- Post added at 07:03 PM ---------- Previous post was at 06:42 PM ----------
If you on stock fw without root check:
1- In Settings>Location click on 3dots menu an select "scan" then check wifi and blutooth scan is off?
2- don't use vibration at all (notifications and calls. touching display, keyboards, dialling, etc)
3- turn off auto-sync
4- turn off trust agent if do not use smart locks
5- turn off auto update for play store and firmware
6- check which app use data in background (and manage restriction for each of them)
7- at Settings>google>nearby, click on gear icon and turn of "nearby links" and "device ready to setup"
8- turn off "double touch to wake up" (optional)
i have the same issue on my Dual Sim Sony Xperia XZ. 8hrs idle and lost 15%. its same every day. Shame Sony!!! Its your flagship device.....
mzeshanhakeem said:
i have the same issue on my Dual Sim Sony Xperia XZ. 8hrs idle and lost 15%. its same every day. Shame Sony!!! Its your flagship device.....
Click to expand...
Click to collapse
It's easy to blame Sony when a simple change in your settings can make a huge difference in power consumption while the phone is idle.
Maybe you should check this rom if sony's stock software doesn't satisfy you https://forum.xda-developers.com/xperia-xz/development/duality-rom-legendary-battery-beta-t3574300
I'm on my way to 11h of SoT with moderate use, play services together to idle struggle to get to 20% after two days.
GenomeX said:
I debloated my phone on fw 442, build.prop and init.qcom.post_boot.sh tweaks and get 8-10 hrs SOT [without any cpu profile or underclock or vm tweaks!]
Without all of that, can get 5-6 hrs SOT too. (1-2 hrs play Clash Royal on LTE or 3G)
My Galaxy S6 get 4-5 hr on marshmallow and 5-6 on Lollipop.
I think for a LCD panel, not any problems at Sony battery consuming!
Can you share details about power usage for google play services? This is google fault not sony software!
---------- Post added at 07:03 PM ---------- Previous post was at 06:42 PM ----------
If you on stock fw without root check:
1- In Settings>Location click on 3dots menu an select "scan" then check wifi and blutooth scan is off?
2- don't use vibration at all (notifications and calls. touching display, keyboards, dialling, etc)
3- turn off auto-sync
4- turn off trust agent if do not use smart locks
5- turn off auto update for play store and firmware
6- check which app use data in background (and manage restriction for each of them)
7- at Settings>google>nearby, click on gear icon and turn of "nearby links" and "device ready to setup"
8- turn off "double touch to wake up" (optional)
Click to expand...
Click to collapse
Thanks alot... I did most of that, will monitor and let you know
Dears... and did you ever notice some cut in the notification sounds? especially whatsapp? ... random behaviour
Thanks,
for rooted user follow this tutrial for fix battery drain at android 7.0 fw...
open /system/etc/init.qcom.post_boot.sh and find this (method for msm8996)
Code:
case "$target" in
"msm8996")
# disable thermal bcl hotplug to switch governor
add red line:
Code:
echo 0 > /sys/module/msm_thermal/core_control/enabled
[COLOR="Red"]echo N > /sys/module/msm_thermal/parameters/enabled[/COLOR]
and
Code:
# Enable Adaptive LMK
echo 1 > /sys/module/lowmemorykiller/parameters/enable_adaptive_lmk
echo 81250 > /sys/module/lowmemorykiller/parameters/vmpressure_file_min
[COLOR="red"] # Configure virtual memory for battery drain
echo 500 > /proc/sys/vm/dirty_expire_centisecs
echo 3000 > /proc/sys/vm/dirty_writeback_centisecs
echo 100 > /proc/sys/vm/vfs_cache_pressure[/COLOR]
now find
Code:
echo 90 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/go_hispeed_load
and change like this:
Code:
echo [COLOR="red"]100[/COLOR] > /sys/devices/system/cpu/cpu0/cpufreq/interactive/go_hispeed_load
above # online cpu2
add this:
Code:
[COLOR="red"]echo 1 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/fast_ramp_down[/COLOR]
# online CPU2
above # Override with SOMC tuning parameters for governor
add this:
Code:
[COLOR="red"] echo 1 > /sys/devices/system/cpu/cpu2/cpufreq/interactive/fast_ramp_down
# Disable touch-boost
echo 0 > /sys/module/msm_performance/parameters/touchboost[/COLOR]
# Override with SOMC tuning parameters for governor
now re-enable hotplug
Code:
# re-enable thermal and BCL hotplug
echo 1 > /sys/module/msm_thermal/core_control/enabled
[COLOR="red"] echo Y > /sys/module/msm_thermal/parameters/enabled[/COLOR]
==============================================================
now let's go to edit build.prop
end of the file add this:
Code:
#
# CUSTOM_BUILD_PROPERTIES
#
ro.ril.power_collapse=1
ro.ril.disable.power.collapse=0
ro.ril.fast.dormancy.rule=0
pm.sleep_mode=1
power.saving.mode=1
wifi.supplicant_scan_interval=180
windowsmgr.max_events_per_sec=90
persist.sys.scrollingcache=3
ro.media.enc.jpeg.quality=100
persist.sys.purgeable_assets=1
reboot and enjoy
GenomeX said:
for rooted user follow this tutrial for fix battery drain at android 7.0 fw...
open /system/etc/init.qcom.post_boot.sh and find this (method for msm8996)
Code:
case "$target" in
"msm8996")
# disable thermal bcl hotplug to switch governor
add red line:
Code:
echo 0 > /sys/module/msm_thermal/core_control/enabled
[COLOR="Red"]echo N > /sys/module/msm_thermal/parameters/enabled[/COLOR]
and
Code:
# Enable Adaptive LMK
echo 1 > /sys/module/lowmemorykiller/parameters/enable_adaptive_lmk
echo 81250 > /sys/module/lowmemorykiller/parameters/vmpressure_file_min
[COLOR="red"] # Configure virtual memory for battery drain
echo 500 > /proc/sys/vm/dirty_expire_centisecs
echo 3000 > /proc/sys/vm/dirty_writeback_centisecs
echo 100 > /proc/sys/vm/vfs_cache_pressure[/COLOR]
now find
Code:
echo 90 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/go_hispeed_load
and change like this:
Code:
echo [COLOR="red"]100[/COLOR] > /sys/devices/system/cpu/cpu0/cpufreq/interactive/go_hispeed_load
above # online cpu2
add this:
Code:
[COLOR="red"]echo 1 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/fast_ramp_down[/COLOR]
# online CPU2
above # Override with SOMC tuning parameters for governor
add this:
Code:
[COLOR="red"] echo 1 > /sys/devices/system/cpu/cpu2/cpufreq/interactive/fast_ramp_down
# Disable touch-boost
echo 0 > /sys/module/msm_performance/parameters/touchboost[/COLOR]
# Override with SOMC tuning parameters for governor
now re-enable hotplug
Code:
# re-enable thermal and BCL hotplug
echo 1 > /sys/module/msm_thermal/core_control/enabled
[COLOR="red"] echo Y > /sys/module/msm_thermal/parameters/enabled[/COLOR]
==============================================================
now let's go to edit build.prop
end of the file add this:
Code:
#
# CUSTOM_BUILD_PROPERTIES
#
ro.ril.power_collapse=1
ro.ril.disable.power.collapse=0
ro.ril.fast.dormancy.rule=0
pm.sleep_mode=1
power.saving.mode=1
wifi.supplicant_scan_interval=180
windowsmgr.max_events_per_sec=90
persist.sys.scrollingcache=3
ro.media.enc.jpeg.quality=100
persist.sys.purgeable_assets=1
reboot and enjoy
Click to expand...
Click to collapse
nice to see that...looks like im going for root soon Thanks
GenomeX said:
for rooted user follow this tutrial for fix battery drain at android 7.0 fw...
open /system/etc/init.qcom.post_boot.sh and find this (method for msm8996)
Code:
case "$target" in
"msm8996")
# disable thermal bcl hotplug to switch governor
add red line:
Code:
echo 0 > /sys/module/msm_thermal/core_control/enabled
[COLOR="Red"]echo N > /sys/module/msm_thermal/parameters/enabled[/COLOR]
and
Code:
# Enable Adaptive LMK
echo 1 > /sys/module/lowmemorykiller/parameters/enable_adaptive_lmk
echo 81250 > /sys/module/lowmemorykiller/parameters/vmpressure_file_min
[COLOR="red"] # Configure virtual memory for battery drain
echo 500 > /proc/sys/vm/dirty_expire_centisecs
echo 3000 > /proc/sys/vm/dirty_writeback_centisecs
echo 100 > /proc/sys/vm/vfs_cache_pressure[/COLOR]
now find
Code:
echo 90 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/go_hispeed_load
and change like this:
Code:
echo [COLOR="red"]100[/COLOR] > /sys/devices/system/cpu/cpu0/cpufreq/interactive/go_hispeed_load
above # online cpu2
add this:
Code:
[COLOR="red"]echo 1 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/fast_ramp_down[/COLOR]
# online CPU2
above # Override with SOMC tuning parameters for governor
add this:
Code:
[COLOR="red"] echo 1 > /sys/devices/system/cpu/cpu2/cpufreq/interactive/fast_ramp_down
# Disable touch-boost
echo 0 > /sys/module/msm_performance/parameters/touchboost[/COLOR]
# Override with SOMC tuning parameters for governor
now re-enable hotplug
Code:
# re-enable thermal and BCL hotplug
echo 1 > /sys/module/msm_thermal/core_control/enabled
[COLOR="red"] echo Y > /sys/module/msm_thermal/parameters/enabled[/COLOR]
==============================================================
now let's go to edit build.prop
end of the file add this:
Code:
#
# CUSTOM_BUILD_PROPERTIES
#
ro.ril.power_collapse=1
ro.ril.disable.power.collapse=0
ro.ril.fast.dormancy.rule=0
pm.sleep_mode=1
power.saving.mode=1
wifi.supplicant_scan_interval=180
windowsmgr.max_events_per_sec=90
persist.sys.scrollingcache=3
ro.media.enc.jpeg.quality=100
persist.sys.purgeable_assets=1
reboot and enjoy
Click to expand...
Click to collapse
I do this thing but the result is the same at before. I must wait some cycle of charge? I copy the files on pc and i do this things there and then i replace those files in their directory
djgigi94 said:
I do this thing but the result is the same at before. I must wait some cycle of charge? I copy the files on pc and i do this things there and then i replace those files in their directory
Click to expand...
Click to collapse
Maybe one of your third-party app call google play services.
Reboot to safe mode and see is the problem still alive.
When writing this comment, I am on 67% battery and Play Services only drain 3%, android system only 7%!
I get 2hr sot (%36 drain)
play Asphalt8 for 45min (set on hi-graphic)
surface web with chrome for 30min
telegram for 10min
Instagram for 10min
7min call with SIM1 (gsm) and my SIM2 is on LTE when use social networking and web browsing.
I think this is where good battery life for a flagship smartphone with same useage.
I never problem with Standby; (becuse i use my phone always LOL)
Try (okey try if i can LOL) to change my useage and live the phone alone for few hours (really hard job for a internet lover you know) and share with you: is phone idle really a problem or not?
You can see i have not any battery drain problem with 7.0 firmware
http://uupload.ir/files/m6hi__20170406_065247.jpg
I use my phone from 100-95 (4G network) before sleep, after wakeup drain only 1%, 8hrs idle. (the 4G network was on)
** consider i debloated my phone too. Maybe some Sony or third-party apps may the real problem, not fault of play services or android 7.0 or kernel codes! (Pixel, HTC10, Moto Z, are normal with 7.x. Deep customized android firmware like Xperia X, XZ and Galaxy S6,S7 have issue)
*** use cpu monitoring apps to find cpu deep sleeping work correct and whiche services wakeup processor in background.
the strange thing here... after some days of phone usage, the phone seems to learn my usage. now battery takes hell of time before it drains! which is good
I don't see the point of having to turn off some settings in order to get by 5-6 hours of SOT...you shouldn't have to do that with phones in 2017.
I wish I could root my Japanese XZ, but I'd lost my mobile payments and that is too valuable.

Categories

Resources