What's new
DroidForums.net | Android Forum & News

This is a sample guest message. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

[Tutorial]Sysctl and you, A guide to better preformance and battery life.

I believe Rummy updated the toolbox to fix the bug. I was wondering if anyone has played around with the numbers through Liberty settings sysctl configuration, and if so could someone post the numbers that they have found to better battery life? Thanks
 
Just changed the Sysctl settings to the recommended values.

To be honest, the scripts went over my head, but I hope this helps, because in 1.0, I had awesome battery life, but 1.5 seems to be draining faster.
 
I changed mine to the seting manualy and it have me:

#sysctl -a | grep um
kernel.core_pattern = |/system/bin/coredump %e %p %t
sysctl: error reading key 'net.ipv4.route.flush': Permission denied
vm.oom_dump_tasks = 0
vm.block_dump = 0
fs.suid_dumpable = 0
net.netfilter.nf_conntrack_checksum = 1
net.ipv4.route.redirect_number = 9
net.ipv4.netfilter.ip_conntrack_checksum = 1
net.ipv4.conf.all.medium_id = 0
net.ipv4.conf.default.medium_id = 0
net.ipv4.conf.lo.medium_id = 0
net.ipv4.conf.usb0.medium_id = 0
net.ipv4.conf.sit0.medium_id = 0
net.ipv4.conf.ip6tnl0.medium_id = 0
net.ipv4.conf.ifb0.medium_id = 0
net.ipv4.conf.ifb1.medium_id = 0
net.ipv4.conf.tiwlan0.medium_id = 0
sysctl: error reading key 'net.ipv6.route.flush': Permission denied

The tut said to delete the backup so I did, now that I put it back to original manual I stilll get the exact same errors. What can I do?
 
Liberty Toolbox didn't work for me either and I even went to the market to install. I ended up having to go into terminal emulation and editing the files using vi. Had to look up how to use that again! :)

Thanks, Jboxen! Also, really liked the blog you linked in your post.

Care to explain what you did via Terminal? I'll update the OP with it in case others want to go that route.
 
I believe Rummy updated the toolbox to fix the bug. I was wondering if anyone has played around with the numbers through Liberty settings sysctl configuration, and if so could someone post the numbers that they have found to better battery life? Thanks

He did but the update works for some and doesn't work for others. Also these values have shown an increase in battery life for myself and other users on the thread in the D2 section.
 
I believe Rummy updated the toolbox to fix the bug. I was wondering if anyone has played around with the numbers through Liberty settings sysctl configuration, and if so could someone post the numbers that they have found to better battery life? Thanks

He did but the update works for some and doesn't work for others. Also these values have shown an increase in battery life for myself and other users on the thread in the D2 section.

For those without root explorer, here's what I did to edit the values

1) First enable sysctl from liberty settings
2) Open liberty toolbox -> liberty mods -> build properties -> file editor -> open the init.d.conf -> change sysctl value to 1 and save
4) Go to liberty tweaks -> miscellaneous -> mount system read/write
5) Go to settings -> liberty settings -> sysctl settings, change the values here.
6) Open sysctl config app and change the settings there to the same values. Not sure if this is necessary but I did it anyway.
7) Open terminal emulator and type "sysctl -p" (output should confirm whether you've done step 4&5 correctly)
8) Settings should stay after reboot
 
What is the outcome of doing these things? A clear set of directions would be great. When everyone starts adding different ways its hard to pick which to follow. I updated liberty toolbox and it works. Now what?

Sent from my DROIDX using DroidForums App
 
Liberty Toolbox didn't work for me either and I even went to the market to install. I ended up having to go into terminal emulation and editing the files using vi. Had to look up how to use that again! :)

Thanks, Jboxen! Also, really liked the blog you linked in your post.

Care to explain what you did via Terminal? I'll update the OP with it in case others want to go that route.

After mounting the system RW, going in to terminal emulation, at the prompt:

vi /data/liberty/init.d.conf

Now, vi is an old school text editor so you have to maneuver around using the following keys because we have no cursor keys in droid:

j = move cursor down one line
k = move cursor up one line
h = move cursor right one character
l = mover cursor left one character

Right now you are in vi's command mode. This allows you to move around and issue commands like save, undo, quit, etc.

Find the line that says:

SYSCTRL=0

Move the cursor so it is sitting right on top of 0 and press r which means to replace the character underneath the cursor and type 1.

Save the file and quit back to the prompt by typing :wq (you will actually see this command typed at the bottom of the editor)

Once back at the prompt, to edit the other config file:

vi /etc/sysctrl.conf

If was easier for me to delete all the lines in there and type everything in so typing dd deletes one line at a time.

Once all the lines are deleted, press i which means start inserting at the cursor. This puts you into edit mode in vi. Type in the following lines as detailed by Jboxen in his post:

vm.swappiness = 0
vm.min_free_kbytes = 4096
vm.dirty_ratio = 90
vm.dirty_background_ratio = 70
vm.vfs_cache_pressure = 1
vm.panic_on_oom = 2
vm.oom_kill_allocating_task = 1
kernel.panic = 5
kernel.shmmax = 2268435456
kernel.shmall = 16777216

Once you are done, we need to get back into command mode by press ESC. Since the keyboard doesn't support the ESC key, we need to change a setting in terminal emulation. Hit the menu button | Preferences | Control key. I changed mine to be Vol Down. Pressing Vol Down and then 1, gets me back to command mode. Type in :wq to save and quit.

After that reboot, go back into terminal emulation, check your work by typing:

sysctl -a | grep vm

If you screw up editing your files at any point and want to abandon your changes in vi, press ESC (in my settings it's Vol Down and then "1"), and type in ":q!" (minus quotes obviously)

Damn, the instructions were longer to type out than I thought!

Anyways, you can find more info on vi commands here.
 
Back
Top