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)

barzam 2010-09-04 15:51

Re: Finally got a real improvement on battery life
 
Just curious, why can't you just use the solution provided here?
http://talk.maemo.org/showpost.php?p...7&postcount=26

Harick 2010-09-04 16:53

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

Originally Posted by barzam (Post 807193)
Just curious, why can't you just use the solution provided here?
http://talk.maemo.org/showpost.php?p...7&postcount=26

actually, that didnt work for me =(

after reboot, doing a cat /proc/sys/vm/swappiness it gives 100 again

barzam 2010-09-04 16:57

Re: Finally got a real improvement on battery life
 
It worked for me, weird.

Have you double-checked that you didn't make any errors in your file?

Harick 2010-09-04 17:16

Re: Finally got a real improvement on battery life
 
it works

seems that i had the \r\n problem cause i made the file with leafpad and now cat /proc/sys/vm/swappiness gives 30 after reboot

thank you very much n.n

wonder if adding "echo 4 > /sys/class/i2c-adapter/i2c-2/2-0063/region" in the script would change my region settings aswell

shadowjk 2010-09-04 18:10

Re: Finally got a real improvement on battery life
 
Don't echo in to files in /etc. It replaces the file's contents and the OS might become unbootable.

As root, you can however do "echo 50 >/proc/sys/vm/swappiness" without the quotes, and it doesn't modify anything permanently, reducing the risk of doing anything that makes your device unbootable.

chaoscreater 2010-09-06 01:19

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.


care to share the script?

maxximuscool 2010-09-06 03:08

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

Originally Posted by chaoscreater (Post 808248)
care to share the script?

The script doesn't work without root access.
But I now just going the old way with Bash Script instead.
Bash script works great without hassle but Python scripts cannot modifying the file due to permission level too high.

If you want my Shell Script auto start, I'm happy to send it to you :) or upload it here

ryanl33x1511 2010-09-06 03:31

Re: Finally got a real improvement on battery life
 
please im still waiting on this...

lilboymonkey 2010-09-06 03:50

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

Originally Posted by egoshin (Post 806787)
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.



could you explain the instructions to do this, please?

maxximuscool 2010-09-06 03:50

Re: Finally got a real improvement on battery life
 
I'll upload it here then.

maxximuscool 2010-09-06 03:51

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

Originally Posted by lilboymonkey (Post 808314)
could you explain the instructions to do this, please?

Don't worry I'll zip it and put it in the directory branch, all you need to do is via a computer and paste it in. Merge it with the existing folder and reboot. Done!

maxximuscool 2010-09-06 03:58

Re: Finally got a real improvement on battery life
 
2 Attachment(s)
Here is the file.
Extract it and keep it inside
"etc" folder
I set the value to 15. So far so good, been using my N900 all day since morning until now and my battery still saying 83%

paste it into your N900 root.

Xterminal:
root
chmod +x /etc/event.d/custom_swappiness

lilboymonkey 2010-09-06 03:59

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

Originally Posted by maxximuscool (Post 808318)
Here is the file.
Extract it and keep it inside
"etc" folder
I set the value to 15. So far so good, been using my N900 all day since morning until now and my battery still saying 83%

paste it into your N900 root.

Xterminal:
root
chmod +x /etc/event.d/custom_swappiness

greatly appreciate it! thanks a bunch!

jonchew 2010-09-06 06:02

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

Originally Posted by maxximuscool (Post 808318)
Here is the file.
Extract it and keep it inside
"etc" folder
I set the value to 15. So far so good, been using my N900 all day since morning until now and my battery still saying 83%

paste it into your N900 root.

Xterminal:
root
chmod +x /etc/event.d/custom_swappiness

can i do this over the N900 via xterminal? i mean by making a new directory event.d inside /etc and moving custom_swappiness file inside the event.d folder? :)

matts76 2010-09-06 06:51

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

Originally Posted by jonchew (Post 808370)
can i do this over the N900 via xterminal? i mean by making a new directory event.d inside /etc and moving custom_swappiness file inside the event.d folder? :)

I have a similar question, i only have an n900 (no computer) but im not great with cmd line, i much prefer using a file manager currently filebox, i would like to use that but i would just like clarify once ive extracted the file where to put it, do i just paste it in ect/event.d, or do i need to modify something first, or am i way off track?

Thanks

Matt

maxximuscool 2010-09-06 23:15

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

Originally Posted by jonchew (Post 808370)
can i do this over the N900 via xterminal? i mean by making a new directory event.d inside /etc and moving custom_swappiness file inside the event.d folder? :)

yes you can. Move the file to event.d folder

Xterminal:
root
mv /path/to/custom_swappiness /etc/event.d

Done!

====

I got to say, first time ever!! Since I've got my N900, that I haven't been charging it last night.
My battery still 36% after 1Day and 10hours

This surely is an improvement. The downside is the RAM usage is about 30MB higher than before but less SWAP usage (77MB).


The device seems snappier and better transitions

itsANDREW 2010-09-06 23:25

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

Originally Posted by maxximuscool (Post 809047)
yes you can. Move the file to event.d folder

Xterminal:
root
mv /path/to/custom_swappiness /etc/event.d

Done!

====

I got to say, first time ever!! Since I've got my N900, that I haven't been charging it last night.
My battery still 36% after 1Day and 10hours

This surely is an improvement. The downside is the RAM usage is about 30MB higher than before but less SWAP usage (77MB).


The device seems snappier and better transitions

So I can basically do this from my N900 as long as I download the file you uploaded onto the N900, and follow these commands above?

humble 2010-09-07 01:08

Re: Finally got a real improvement on battery life
 
this is a really good thread to wiki-nize:)

is it?

I'v never went through a whole day(plus connected..not using Wifi and a few phone tasks) with 72 batt left

is it just me or does wine(N900 or everything) gets better in time:D

lilboymonkey 2010-09-07 01:36

Re: Finally got a real improvement on battery life
 
So far it still seems like my battery does drain, not as much as before, but still noticeable. Overnight I was at maybe 75%, when I woke up it was down to 30%. =\

Viny 2010-09-07 01:44

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

Originally Posted by maxximuscool (Post 809047)
yes you can. Move the file to event.d folder

Xterminal:
root
mv /path/to/custom_swappiness /etc/event.d

Done!

====

I got to say, first time ever!! Since I've got my N900, that I haven't been charging it last night.
My battery still 36% after 1Day and 10hours

This surely is an improvement. The downside is the RAM usage is about 30MB higher than before but less SWAP usage (77MB).


The device seems snappier and better transitions

hey thanks but i am still having a hard time and winscp doesnt seem to work with my n900 even though i have enterd the correct logins.

i was wondering if u can post some clearer instructions on how to do it step by step (on what to do first, up to last) if possible, it would help alot.

thanks!

ryanl33x1511 2010-09-07 03:20

Re: Finally got a real improvement on battery life
 
just put it in etc folder then thats it ?it will automatic start everytime restart the device ? do i need to do anything else?

Quote:

Originally Posted by maxximuscool (Post 809047)
yes you can. Move the file to event.d folder

Xterminal:
root
mv /path/to/custom_swappiness /etc/event.d

Done!

====

I got to say, first time ever!! Since I've got my N900, that I haven't been charging it last night.
My battery still 36% after 1Day and 10hours

This surely is an improvement. The downside is the RAM usage is about 30MB higher than before but less SWAP usage (77MB).


The device seems snappier and better transitions


SoFlaLude 2010-09-07 03:45

Re: Finally got a real improvement on battery life
 
I went ahead and did this change a couple days ago, directly in my N900 as prescribed early in the thread (used Leafpad). Absolutely stunned at the change in phone's battery life! I keep the brightness usually at 60%, turn off the WiFi whenever I'm not using it, keep the GPS off, Bluetooth off, overclocked to 850Mhz using Ideal voltage... and this has had the greatest impact at increasing battery life thus far. On top of that, as others have pointed out, responsiveness of active apps (usually have up to 6 MicroB windows open) has improved.

I keep loving the optimizations that keep being posted! :D Not so much the fact that Nokia didn't seem to do any of this themselves, or that some things don't work quite like they should... but this community has been amazing at improving this device.

lilboymonkey 2010-09-07 03:56

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

Originally Posted by SoFlaLude (Post 809183)
I went ahead and did this change a couple days ago, directly in my N900 as prescribed early in the thread (used Leafpad). Absolutely stunned at the change in phone's battery life! I keep the brightness usually at 60%, turn off the WiFi whenever I'm not using it, keep the GPS off, Bluetooth off, overclocked to 850Mhz using Ideal voltage... and this has had the greatest impact at increasing battery life thus far. On top of that, as others have pointed out, responsiveness of active apps (usually have up to 6 MicroB windows open) has improved.

I keep loving the optimizations that keep being posted! :D Not so much the fact that Nokia didn't seem to do any of this themselves, or that some things don't work quite like they should... but this community has been amazing at improving this device.

whats your battery life so far?

jonchew 2010-09-07 04:27

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

Originally Posted by maxximuscool (Post 809047)
yes you can. Move the file to event.d folder

Xterminal:
root
mv /path/to/custom_swappiness /etc/event.d

Done!

====

I got to say, first time ever!! Since I've got my N900, that I haven't been charging it last night.
My battery still 36% after 1Day and 10hours

This surely is an improvement. The downside is the RAM usage is about 30MB higher than before but less SWAP usage (77MB).


The device seems snappier and better transitions


This is good news! can you check my steps below if im doing it right in xterm:

1. sudo gainroot
2. cp /home/user/MyDocs/custom_swappiness /etc/event.d/
3. root or sudo root?
4. chmod +x /etc/event.d/custom_swappiness

lilboymonkey 2010-09-07 14:22

Re: Finally got a real improvement on battery life
 
My battery life doesn't seem to be improving, should I just reflash emmc or?

Mr_Ryde 2010-09-07 14:43

Re: Finally got a real improvement on battery life
 
After reading this thread a few days ago I changed Swappiness to 15 and Page cluster to 1.

My setup:

Overclock 500-1000 on ULV. on V40 Kernel.
GSM only when not using internet or when accessing internet via wifi.
Battery Indexing Disabled using Tracker-cfg.
Battery is original that I have had since early march.

Standard use for me is some mild sms and calling. Some photos using fcamera, about 90 minutes of Angry Birds. Some internet browsing approx 1 hour (wifi) so far and the updating of weather and email over wifi once every few hours. Maybe an hour of listening to music.

It is now 46 hours after a full charge (reading in beecon snippet was 97%) AND I HAVE 35% REMAINING!!!

This is just outstanding. Plus there are the other benefits described such as snappy switching of desktops etc etc

@ Lilboymonkey - don't reflash your emmc. I have never done this and my phone works great. Have reflashed software twice. 1st to upgrade to PR1.2 and the other just to reload some apps after a huge clearout.

THIS IS KEY - if you have a bunch of dev apps and widgets then these changes will not really effect you much as those things eat battery :)

Ciao :)

msa 2010-09-07 14:46

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

Originally Posted by maxximuscool (Post 809047)
This surely is an improvement. The downside is the RAM usage is about 30MB higher than before but less SWAP usage (77MB).

what do you mean?
is it 77mb befor or after?

my ram-usage is always around 130-180 mb, even on idle. how did you achieve this?

lilboymonkey 2010-09-07 14:49

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

Originally Posted by Mr_Ryde (Post 809582)
After reading this thread a few days ago I changed Swappiness to 15 and Page cluster to 1.

My setup:

Overclock 500-1000 on ULV. on V40 Kernel.
GSM only when not using internet or when accessing internet via wifi.
Battery Indexing Disabled using Tracker-cfg.

Standard use for me is some mild sms and calling. Some photos using fcamera, about 90 minutes of Angry Birds. Some internet browsing approx 1 hour (wifi) so far and the updating of weather and email over wifi once every few hours.

It is now 46 hours after a full charge (reading in beecon snippet was 97%) AND I HAVE 35% REMAINING!!!

This is just outstanding. Plus there are the other benefits described such as snappy switching of desktops etc etc

@ Lilboymonkey - don't reflash your emmc. I have never done this and my phone works great. Have reflashed twice. 1st to upgrade to PR1.2 and the other just to reload some apps after a huge clearout.

THIS IS KEY - if you have a bunch of dev apps and widgets then these changes will not really effect you much as those things eat battery :)

Ciao :)

So I should just reflash then?

Mr_Ryde 2010-09-07 14:56

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

Originally Posted by lilboymonkey (Post 809595)
So I should just reflash then?

If you have recently uninstalled a sh&t load of apps from dev and fancy starting with a clean slate then yes I think it will be beneficial.

lilboymonkey 2010-09-07 15:02

Re: Finally got a real improvement on battery life
 
I actually tried to install Nitdroid but it didn't work out. I had good battery life beforehand, and then after attempting Nitdroid my battery life went to crap. Guess I'll reflash later on then when I get back home.

IINexusII 2010-09-07 15:09

Re: Finally got a real improvement on battery life
 
swap to 15 and page cluster to 1.

no problems so far. smooth playback in media player and SiB using ideal kernel settings 500-900

Viny 2010-09-08 04:30

Re: Finally got a real improvement on battery life
 
how do you change page cluster ?

petrelli 2010-09-08 08:34

Re: Finally got a real improvement on battery life
 
Any instructions for indexing? Which problems can be expected by disabling it? I mean, which function has the indexing option at all??

CormacB 2010-09-08 09:32

Re: Finally got a real improvement on battery life
 
I've been trying swappiness at 30 for the last couple of days and I have to say it is one of the best changes you can make to your N900. It is up there with overclocking for improved experience.
100 is a really stupid default for a device like this.

I haven't touched page cluster because I am not convinced of the reason for changing it.

debernardis 2010-09-08 09:44

Re: Finally got a real improvement on battery life
 
When I try swappiness as low as 30 I get stuttering in music player.
Then I tried 60.
This morning my n900 rebooted without external action and got stuck in a reboot loop. I had to reflash rootfs and optfs through backupmenu. And that's it.

CormacB 2010-09-08 12:27

Re: Finally got a real improvement on battery life
 
It is extremely unlikely that swappiness had anything to do with your problem. It just adjusts when the kernel decides to swap pages to disk. Nothing that would even crash the phone, let alone change anything permanently.


All times are GMT. The time now is 06:28.

vBulletin® Version 3.8.8