maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Maemo 5 / Fremantle (https://talk.maemo.org/forumdisplay.php?f=40)
-   -   Finally got a real improvement on battery life (https://talk.maemo.org/showthread.php?t=61679)

ivnvir 2010-09-03 21:47

Finally got a real improvement on battery life
 
I know that's kinda of known, but since it's a compilation from various posts, I would like to make one with the tips:

I'm getting a great battery life with these tricks:
1) Change swappiness and page-cluster to the minimum you're comfortable with (mine is 15 and 1, respectivelly);
2) Disable indexer watching and indexer on battery.

The resources:

1)http://talk.maemo.org/showthread.php...ght=swappiness (edit /etc/init.d/rcS)
2)install tracker-cfg and read the help, configure as your needs

Hope that helps more people ;)

maxximuscool 2010-09-03 21:52

Re: Finally got a real improvement on battery life
 
How much improve? mine last over 24hours, and on wifi almost all day long.

ivnvir 2010-09-03 22:08

Re: Finally got a real improvement on battery life
 
My device has more than 25gb of music and 5gb of photos...
Got a 30% or so improvement

maxximuscool 2010-09-03 22:19

Re: Finally got a real improvement on battery life
 
Quote:

Originally Posted by ivnvir (Post 806674)
My device has more than 25gb of music and 5gb of photos...
Got a 30% or so improvement

how long does it last? I can easily get more than 24hours with normal usage.

etuoyo 2010-09-03 22:37

Re: Finally got a real improvement on battery life
 
I have terrible battery life with chat on. Will this make a difference or is this one of those things that prolongs the battery as long as you don't use the device as intended always on device?

mr_xzibit 2010-09-03 22:49

Re: Finally got a real improvement on battery life
 
how do you edit and save the rcS file using midnight commander? i can locate it edit it but when i click save and it says i cant save?

Venemo 2010-09-03 22:55

Re: Finally got a real improvement on battery life
 
Quote:

Originally Posted by etuoyo (Post 806690)
I have terrible battery life with chat on. Will this make a difference or is this one of those things that prolongs the battery as long as you don't use the device as intended always on device?

It will.
Less swappiness = less swapping = less use of eMMC.

maxximuscool 2010-09-03 23:03

Re: Finally got a real improvement on battery life
 
I'm implimenting this with my small python script :)
My script has:

Radio Region change to world wide, vlaue 4
Swappiness level to 30

The script will automatically start up and activate those setting every reboot. So no need to touch rCS file.

Which avoiding people from breaking their device.

maxximuscool 2010-09-03 23:06

Re: Finally got a real improvement on battery life
 
I'm interested to know if this has an impact on video recording frame rate and stuttering problem occured before configuration to swappiness

Venemo 2010-09-03 23:15

Re: Finally got a real improvement on battery life
 
Quote:

Originally Posted by ivnvir (Post 806659)
1) Change swappiness

Been there, done that.

Quote:

Originally Posted by ivnvir (Post 806659)
and page-cluster to the minimum you're comfortable with

Not sure. Could you please give some explanation about this?

Quote:

Originally Posted by ivnvir (Post 806659)
2) Disable indexer watching and indexer on battery.

And this too?

Thanks!

ryanl33x1511 2010-09-03 23:21

Re: Finally got a real improvement on battery life
 
Quote:

Originally Posted by maxximuscool (Post 806713)
I'm interested to know if this has an impact on video recording frame rate and stuttering problem occured before configuration to swappiness

can you test video frame with ur script ? any change public the script ?

maxximuscool 2010-09-03 23:27

Re: Finally got a real improvement on battery life
 
Quote:

Originally Posted by ryanl33x1511 (Post 806725)
can you test video frame with ur script ? any change public the script ?

Yes sure. It is open source after all :)
I somehow get a good transition of UI after a few hack.
If you want my transition and the script then you'd get the same experience :)
I'll have to test my script before hand it over to you. Just PM me and I'll send it to you :)

maxx

mr_xzibit 2010-09-03 23:27

Re: Finally got a real improvement on battery life
 
Quote:

Originally Posted by maxximuscool (Post 806711)
I'm implimenting this with my small python script :)
My script has:

Radio Region change to world wide, vlaue 4
Swappiness level to 30

The script will automatically start up and activate those setting every reboot. So no need to touch rCS file.

Which avoiding people from breaking their device.


nice. will this be easy to install?

ktchiu 2010-09-03 23:28

Re: Finally got a real improvement on battery life
 
I changed the swappiness to 30 and page-cluster to 1. From what I can tell, I no longer get the slowdowns in freezes in micob that I used to have. The conversations app seems to start up faster too.

Psycho 2010-09-03 23:29

Re: Finally got a real improvement on battery life
 
Quote:

Originally Posted by Venemo (Post 806719)
Been there, done that.



Not sure. Could you please give some explanation about this?



And this too?

Thanks!

you can find swappines and page cluster in the rcS file in;
/etc/init.d/rcS

and search for swappines and Page-cluster.. they are next together..

but be carefull dont brick ur phone ;)

gr

Psycho 2010-09-03 23:47

Re: Finally got a real improvement on battery life
 
ok, im trying it too..
things ive did..
a small work-around;

1.
Install SSH server

2.
copy rcS file by typing in terminal; cp /etc/init.d/rcS /home/user/MyDocs/

3.
open the file using SSH with 4 example notepad++ (or whatever you want:D , dont use notepad)

4.
search by using ctrl+F the keyword; swappiness and change value 100 in 30.. and same thing for 'page-cluster' and change the value from 4 to 1

5.
save the rcS file and copy it back to MyDocs using SSH

6.
copy the rcS file back by typing "cp /home/user/MyDocs/rcS /etc/init.d/rcS" in terminal

7.
Check if the file have the exec permissions by typing;
ls -al /etc/init.d/rcS
will show rwxr-xr-x
(look at the 3 x)

8.
If so, ur done reboot ur phone..

p.s. allways be root at terminal..and do it at own risk ;)

You can check the values by typing;
cat /proc/sys/vm/swappiness
or
cat /proc/sys/vm/page-cluster


greets

Harick 2010-09-03 23:50

Re: Finally got a real improvement on battery life
 
im sorry, im a new but, why not just

vi /etc/init.d/rcS

to edit the file?

Psycho 2010-09-03 23:55

Re: Finally got a real improvement on battery life
 
Quote:

Originally Posted by Harick (Post 806747)
im sorry, im a new but, why not just

vi /etc/init.d/rcS

to edit the file?

Have u ever used vi editor ? i hate that editor.. so im using my own editor at my laptop.. witouth doing mistakes ;) i dont want to brick my phone..

scribbles 2010-09-03 23:58

Re: Finally got a real improvement on battery life
 
Good info guys, I'm gonna try this out when I get home... Anything to increase battery life even though I carry an extra battery with me everyday. I get jealous when one of my co-workers who has a Nexus One shows off the battery life of his modded ROM when after almost 8hrs he's @80%+. All I can do is shake my head in disbelief :rolleyes: :eek:

scribbles 2010-09-03 23:59

Re: Finally got a real improvement on battery life
 
Quote:

Originally Posted by Psycho (Post 806750)
Have u ever used vi editor ? i hate that editor.. so im using my own editor at my laptop.. witouth doing mistakes ;) i dont want to brick my phone..

Leafpad works well also....

Psycho 2010-09-03 23:59

Re: Finally got a real improvement on battery life
 
yehh.. i hate it too.. !!
i hate the sound of 'empty battery' of my phone every night.. so lets see if this works.. :D

Psycho 2010-09-04 00:00

Re: Finally got a real improvement on battery life
 
Quote:

Originally Posted by scribbles (Post 806755)
Leafpad works well also....

you can use whatever u want. :D

ivnvir 2010-09-04 00:08

Re: Finally got a real improvement on battery life
 
Quote:

how long does it last? I can easily get more than 24hours with normal usage
it lasted for about 48h...

Quote:

I have terrible battery life with chat on. Will this make a difference or is this one of those things that prolongs the battery as long as you don't use the device as intended always on device?
for what ive seen in a little test, pidgin eats less battery...

Quote:

how do you edit and save the rcS file using midnight commander? i can locate it edit it but when i click save and it says i cant save?
try it being root, i use leafpad from terminal...

Quote:

Not sure. Could you please give some explanation about this?

Originally Posted by ivnvir View Post

2) Disable indexer watching and indexer on battery.

And this too?
indexer runs everytime it thinks it needs to, and unfortunatelly, most of the time it shouldnt... so it spents battery.. theres also the thumbnails maker, wich eats processor and therefore battery...

ill post my config, but its nothing final, still testing it!

ivnvir 2010-09-04 00:16

Re: Finally got a real improvement on battery life
 
4 Attachment(s)
here are my tracker-cfg config, as I said, its not final, I'm still testing what's better

egoshin 2010-09-04 00:50

Re: Finally got a real improvement on battery life
 
Quote:

Originally Posted by ktchiu (Post 806734)
I changed the swappiness to 30 and page-cluster to 1. From what I can tell, I no longer get the slowdowns in freezes in micob that I used to have. The conversations app seems to start up faster too.

Changing page-cluster from 5 to any lower value may cause some problems - it is assumed that eMMC cluster size is 128KB (page-cluster=5). That means eMMC chip writes only by 128KB blocks. So, if you write less than 128KB it may READ 128KB "sector", then replace some portion of it and write 128KB ---> slower speed and flash wear increase.

However, I am saying "may" because if eMMC chip is smart enough it can combine the multiple short sequential writes to a single 128KB in some buffer. Unfortunately, I don't know the specs of eMMC chip.

egoshin 2010-09-04 00:52

Re: Finally got a real improvement on battery life
 
To anybody, who wants changing swappiness or rcS, I repeat here -

I highly recommend to anybody who wants to change rcS - instead of that just create a file /etc/event.d/somename with following lines:

Code:


# my somename fix

start on started rcS-late

script
      echo 30 > /proc/sys/vm/swappiness
end script

... and insert any another wished lines after "echo 30" and before "end script"

This would not corrupt your N900 in case of problem and it allows the next Nokia OTA upgrade.

ivnvir 2010-09-04 01:04

Re: Finally got a real improvement on battery life
 
My thumbnailerd is running.. even with BatteryIndex set to true.. this proccess is EVIL!
Anyone know how to REALLY disable it? I have all thumbs done.. NO NEED TO REDO IT HELL! This really pisses me off, f*kin overengineering :/

SSLMM 2010-09-04 01:59

Re: Finally got a real improvement on battery life
 
Quote:

Originally Posted by ivnvir (Post 806793)
My thumbnailerd is running.. even with BatteryIndex set to true.. this proccess is EVIL!
Anyone know how to REALLY disable it? I have all thumbs done.. NO NEED TO REDO IT HELL! This really pisses me off, f*kin overengineering :/

I don't know for sure but maybe if you disable "enable thumbnails" in tracker, doesn't that do the trick? :rolleyes:

Thanks for all this info ;)
Obrigado :p

Viny 2010-09-04 02:14

Re: Finally got a real improvement on battery life
 
Hello guys this seems nice and i would like to try it out, but i cant seem to figure out how,

if someone would please post step by step, on exactly how to do these both, it would be apreciated alot. thanks.!

etuoyo 2010-09-04 08:04

Re: Finally got a real improvement on battery life
 
Oh no!!!Copied the rcs file using winsp, modified the swappiness, cluter thing to 15 and 1, copied the file back and replaced the original. Changed the indexer settings as shown above. Switched off my device, changed the battery, switched it on. Nokia white screen shows for a few seconds and then device switches off again. Tried it five times and happens again and again. So I have now officially bricked my device.

And my usb port is faulty so I cannot even reflash the device. So I now have a dead device.

tswindell 2010-09-04 08:39

Re: Finally got a real improvement on battery life
 
If you want IM on all the time and you don't want to eat your battery up, install the 2G/3G switcher applet and set it to 2G when you're not using the internet for anything else. Will save a lot of battery power.

Monniman 2010-09-04 11:04

Re: Finally got a real improvement on battery life
 
I changed swappiness from 60 to 30 and cluster-size from 5 to 1 and the device won´t get pass the 5 dots. Just keeps loading something... Maybe the cluster change causes a KP or something? Actually the phone got into a reboot loop just now. hmm weird. Could be a power-kernel problem with the settings?

eitama 2010-09-04 11:18

Re: Finally got a real improvement on battery life
 
Quote:

Originally Posted by etuoyo (Post 806916)
Oh no!!!Copied the rcs file using winsp, modified the swappiness, cluter thing to 15 and 1, copied the file back and replaced the original. Changed the indexer settings as shown above. Switched off my device, changed the battery, switched it on. Nokia white screen shows for a few seconds and then device switches off again. Tried it five times and happens again and again. So I have now officially bricked my device.

And my usb port is faulty so I cannot even reflash the device. So I now have a dead device.

Probably \r\n instead of \n...
Thats a good reason to go buy yourself a Galaxy S though (;

etuoyo 2010-09-04 11:25

Re: Finally got a real improvement on battery life
 
Quote:

Originally Posted by eitama (Post 807014)
Probably \r\n instead of \n...
Thats a good reason to go buy yourself a Galaxy S though (;

What does that bolded part mean?

Would love it if Nokia replaced my bricked device with a galaxy epic. Or better still a galaxy tab :)

eitama 2010-09-04 11:47

Re: Finally got a real improvement on battery life
 
Quote:

Originally Posted by etuoyo (Post 807019)
What does that bolded part mean?

Would love it if Nokia replaced my bricked device with a galaxy epic. Or better still a galaxy tab :)

Hehe, The bolded part...

Text / Ascii characthers, like the ones inside rcS file you edited are stored in files, when you enter 5 lines into that file, the editor you are using automatically adds special chars at the end of each line that are interperted as end of lines, or new-lines.
Pressing the Enter key actually does that, you press enter, the application adds \n (linux) \r\n (windows)

Code:

1234
abcde
1234
abcde

In the above peace of "code" there are 4 lines, each of the 1st 3 lines end with an invisible new-line char.
Linux uses \n (0xA in hexa) and windows uses \r\n (0xD0xA).
When you copied the file over winscp, and opened it on WINDOWS with some editor, the editor probably change all the \n occurrences to \r\n occurrences. Then you copied it back to the N900,
the n900 is trying to read that file, and says to himself "WTF??? what the hell is this \r\n, this is not for me... i'll reboot."

Why does linux use \n and not \r\n? the same answer for the question : "why does windows use \r\n and not \n?"...

Why does N900 fail to read that? cause it's linux.
Next time, use VI. :)

For further reading about this... Wikipedia

I'm sure Nokia will be pleased to give you a samsung galaxy s, or tab, right after they give me one :)

ivnvir 2010-09-04 12:36

Re: Finally got a real improvement on battery life
 
Quote:

Originally Posted by etuoyo (Post 806916)
Oh no!!!Copied the rcs file using winsp, modified the swappiness, cluter thing to 15 and 1, copied the file back and replaced the original. Changed the indexer settings as shown above. Switched off my device, changed the battery, switched it on. Nokia white screen shows for a few seconds and then device switches off again. Tried it five times and happens again and again. So I have now officially bricked my device.

And my usb port is faulty so I cannot even reflash the device. So I now have a dead device.

I believe you screwdup the encoding of the file... edit it in the phone, it's very easy, you'll replace 100 to 10 or so, and 5 to 1 on the swapiness and page-cluster, it VERY EASY!

Install leafpad and you're ready...

etuoyo 2010-09-04 12:57

Re: Finally got a real improvement on battery life
 
Quote:

Originally Posted by ivnvir (Post 807066)
I believe you screwdup the encoding of the file... edit it in the phone, it's very easy, you'll replace 100 to 10 or so, and 5 to 1 on the swapiness and page-cluster, it VERY EASY!

Install leafpad and you're ready...

Thanks. I have learnt my lesson now. Unfortunately I have learnt it to late. I have now bricked the device and my usb port is faulty so I can't reflash.

ivnvir 2010-09-04 12:59

Re: Finally got a real improvement on battery life
 
Quote:

Originally Posted by etuoyo (Post 807088)
Thanks. I have learnt my lesson now. Unfortunately I have learnt it to late. I have now bricked the device and my usb port is faulty so I can't reflash.

:(
Sorry if it's, indirectly, my fault... I haven't put the step by step tutorial, just hints...
Hope you get your usb back, then will be easy to get it back!

Psycho 2010-09-04 15:36

Re: Finally got a real improvement on battery life
 
hmmm i changed it back to 100.. the reason ??

-after using a day, black screen
-couldnt use Navigation for some reason ? it hangs all the time
-and my battery drained the same speed as usual..

thats my opinion ;)

gr

maxximuscool 2010-09-04 15:47

Re: Finally got a real improvement on battery life
 
I've tried to do it via Python but so far unsucessful, due to the file is strictly unmodifiable by python.

I try echo it through python but failed badly.

Anyone give me some advise on how to get this work with python at start up?


All times are GMT. The time now is 02:55.

vBulletin® Version 3.8.8