maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Maemo 5 / Fremantle (https://talk.maemo.org/forumdisplay.php?f=40)
-   -   Optimize your Nokia N900 (https://talk.maemo.org/showthread.php?t=58935)

JorgeFX 2010-07-22 08:10

Optimize your Nokia N900
 
2 Attachment(s)
Hi everyone:D this time I'm posting what I think is a possible SOLUTION to the anoying problem the Nokia N900 has after 2, 3 or 4 days of continuos use causing the device to slows down till a point we just have to reboot.

I wrote a script the refresh several processes like if you are rebooting your N900 but it does not reboot it or causes sudden battery drain like what happens when you reboot the N900.;)

Just open the X-Terminal and run as ROOT:
sh OptimizeN900


I have been testing it and updating it for several weeks and this could be the final script:)

Please be aware that the screen will show weird stuff but it is normal because the ALL UIs and Hildon are restarting.

Here you can see a screenshot from my own N900 running perfectly well after almost 6 days:)
Attachment 12334

Please tell me if that help you, I hope it does. GOD Bless You ALL!:D

xxxxts 2010-07-22 08:16

Re: Optimize your Nokia N900
 
I will be watching...

James_Littler 2010-07-22 08:30

Re: Optimize your Nokia N900
 
So using alarmed or similar we could trigger this at a time we're normally asleep and have it all done automatically?

dana.s 2010-07-22 08:33

Re: Optimize your Nokia N900
 
could you paste the code please

pantera1989 2010-07-22 08:38

Re: Optimize your Nokia N900
 
I was wondering when someone would do something like this. Good work :)

JorgeFX 2010-07-22 08:41

Re: Optimize your Nokia N900
 
Quote:

Originally Posted by dana.s (Post 760415)
could you paste the code please

The code is a little long to paste here. That is why I uploaded it on a zip;)

JorgeFX 2010-07-22 08:42

Re: Optimize your Nokia N900
 
Quote:

Originally Posted by pantera1989 (Post 760422)
I was wondering when someone would do something like this. Good work :)

Thanks! :D

Chrome 2010-07-22 08:42

Re: Optimize your Nokia N900
 
Where should i place the script? in opt or MyDocs?

ossipena 2010-07-22 08:46

Re: Optimize your Nokia N900
 
Quote:

Originally Posted by Chrome (Post 760428)
Where should i place the script? in opt or MyDocs?

you probably can't run it from mydocs....

JorgeFX 2010-07-22 08:48

Re: Optimize your Nokia N900
 
Quote:

Originally Posted by James_Littler (Post 760410)
So using alarmed or similar we could trigger this at a time we're normally asleep and have it all done automatically?

Well, I normally use it only when I feel that the OS is getting slow but in general YES, you only have to add an event with this command:

sudo sh OptimizeN900

And you can setup this to run every day overnight. Please, try it and tell us your experiences. Thanks!;)

JorgeFX 2010-07-22 08:49

Re: Optimize your Nokia N900
 
Quote:

Originally Posted by Chrome (Post 760428)
Where should i place the script? in opt or MyDocs?

Anywhere, I made a folder in MyDocs called MyScripts

Chrome 2010-07-22 08:51

Re: Optimize your Nokia N900
 
can i rename it to "o" and write sh o to trigger it?

JorgeFX 2010-07-22 08:53

Re: Optimize your Nokia N900
 
Quote:

Originally Posted by Chrome (Post 760441)
can i rename it to "o" and write sh o to trigger it?

Yes, the name is irrelevant. Remember to do it as ROOT;)

jerryfreak 2010-07-22 08:55

Re: Optimize your Nokia N900
 
so does this need to be run after every reboot? if the n900 was up for awhile how often would you run it?

Chrome 2010-07-22 08:56

Re: Optimize your Nokia N900
 
I put it in MyDocs and ran "sh OptimizeN900" as root, it says: sh: can't open OptimizeN900

jupacabra 2010-07-22 08:57

Re: Optimize your Nokia N900
 
okay downloaded the zip (on my computer), now my problem is where should I put it on my n900? is copying the script to the n900 internal memory would do?

JorgeFX 2010-07-22 09:00

Re: Optimize your Nokia N900
 
Quote:

Originally Posted by jerryfreak (Post 760447)
so does this need to be run after every reboot? if the n900 was up for awhile how often would you run it?

No, rebooting is what we are trying to avoid. I first run it after 2 days of use and then maybe 1 or 2 times by day depending on what I do on the device. If I only use SMS and calls, without internet, I may not need it that day because those tasks do not take much ram like browsing

Flandry 2010-07-22 09:02

Re: Optimize your Nokia N900
 
Quote:

Originally Posted by JorgeFX (Post 760426)
The code is a little long to paste here. That is why I uploaded it on a zip;)

Could you please give a summary of what it's doing?

Quote:

Originally Posted by Chrome (Post 760449)
I put it in MyDocs and ran "sh OptimizeN900" as root, it says: sh: can't open OptimizeN900

sh MyDocs/OptimizeN900

JorgeFX 2010-07-22 09:02

Re: Optimize your Nokia N900
 
Quote:

Originally Posted by jupacabra (Post 760451)
okay downloaded the zip (on my computer), now my problem is where should I put it on my n900? is copying the script to the n900 internal memory would do?

Look at this:
http://talk.maemo.org/showpost.php?p...7&postcount=11 ;)

Chrome 2010-07-22 09:04

Re: Optimize your Nokia N900
 
Quote:

Originally Posted by Flandry (Post 760455)
sh MyDocs/OptimizeN900

I think there is a place where i can run it directly without cding, Opt maybe?

D4rKlar 2010-07-22 09:04

Re: Optimize your Nokia N900
 
I was looking for something like this!

Reading this thread http://talk.maemo.org/showthread.php?t=41205 they mention the command

# echo 3 > /proc/sys/vm/drop_caches

....which frees the pagecache, dentries and inodes. Would that be a useful addition to the script?

Kind Regards,
D4rKlar

ossipena 2010-07-22 09:05

Re: Optimize your Nokia N900
 
1 Attachment(s)
copy this to /usr/share/applications/hildon/

with filename [anything goes].desktop

(and copy the optimize script to /opt/)

JorgeFX 2010-07-22 09:08

Re: Optimize your Nokia N900
 
Quote:

Originally Posted by Flandry (Post 760455)
Could you please give a summary of what it's doing?

If you open the script with an editor you could see that this:

-Refresh the Audio Process to avoid audio glitch
-Refresh the Tracker process
-Refresh the browser MicroB
-Refresh of the most common applications and UIs
-Refresh the all UI Hildon, menus and bars.
-Refresh other processes

I'm testing some new processes but I think this script is mature already:)

Flandry 2010-07-22 09:11

Re: Optimize your Nokia N900
 
Quote:

Originally Posted by Chrome (Post 760461)
I think there is a place where i can run it directly without cding, Opt maybe?

That isn't cding, it's just specifying a location. If you are looking for the "home" directory, it's /home/user AKA ~. Then it would just be sh OptimizeN900

Or, you can put it in /opt and use ossipena's desktop entry to click it from the desktop. :)

Quote:

Originally Posted by D4rKlar (Post 760462)
I was looking for something like this!

Reading this thread http://talk.maemo.org/showthread.php?t=41205 they mention the command

# echo 3 > /proc/sys/vm/drop_caches

....which frees the pagecache, dentries and inodes. Would that be a useful addition to the script?

Kind Regards,
D4rKlar

If you read on in this thread, you'll see that it's not really a useful thing to do per se.

JorgeFX 2010-07-22 09:13

Re: Optimize your Nokia N900
 
Quote:

Originally Posted by D4rKlar (Post 760462)
I was looking for something like this!

Reading this thread http://talk.maemo.org/showthread.php?t=41205 they mention the command

# echo 3 > /proc/sys/vm/drop_caches

....which frees the pagecache, dentries and inodes. Would that be a useful addition to the script?

Kind Regards,
D4rKlar

I'm testing that too, but I'm working on a different script to TWEAK the N900 and that command is something I used but it does not have much effect on the system without other commands. In a few days maybe I could post the other script. But remember, this is for Optimize the N900 when you have several hours/days of use and the device is getting slow. The other script is meant to run one time only;)

Flandry 2010-07-22 09:14

Re: Optimize your Nokia N900
 
Quote:

Originally Posted by JorgeFX (Post 760468)
If you open the script with an editor you could see that this:

-Refresh the Audio Process to avoid audio glitch
-Refresh the Tracker process
-Refresh the browser MicroB
-Refresh of the most common applications and UIs
-Refresh the all UI Hildon, menus and bars.
-Refresh other processes

I'm testing some new processes but I think this script is mature already:)

Really appreciate you working on this. I guess what i'm really asking (as i'm fairly trusting) is: what, if any, side effects does the script cause?

JorgeFX 2010-07-22 09:19

Re: Optimize your Nokia N900
 
Quote:

Originally Posted by ossipena (Post 760464)
copy this to /usr/share/applications/hildon/

with filename [anything goes].desktop

(and copy the optimize script to /opt/)

I wanted to add and button to the systemui like we add a reboot button but I have not tried it yet

JorgeFX 2010-07-22 09:23

Re: Optimize your Nokia N900
 
Quote:

Originally Posted by Flandry (Post 760482)
Really appreciate you working on this. I guess what i'm really asking (as i'm fairly trusting) is: what, if any, side effects does the script cause?

Thanks!:D After weeks of testing I can honestly and happily say that I have not seen side effects on more than 20days. Before, I had some freezes but I have been testing and testing and testing and testing and I think this is it:)

ossipena 2010-07-22 09:31

Re: Optimize your Nokia N900
 
Quote:

Originally Posted by Chrome (Post 760472)
Should i restart after doing this? because nothing happened :D

what about trying to browse the application menu or add shortcut to desktop? (it only adds a shortcut to menu)

ossipena 2010-07-22 09:33

Re: Optimize your Nokia N900
 
Quote:

Originally Posted by JorgeFX (Post 760485)
I wanted to add and button to the systemui like we add a reboot button but I have not tried it yet

with it you can add the shortcut to desktop, systemui is probably somewhat harder thing to do.

so concider that a quick and dirty patch to ease the usage a little.

JorgeFX 2010-07-22 09:38

Re: Optimize your Nokia N900
 
@ossipena, I have consider that, but that was something I had in my mind to make and app in the future that adds the button to the systemui and everything else. Meanwhile, I'm fine with running it from the X-Terminal because it is not needed so often

animest4r 2010-07-22 09:48

Re: Optimize your Nokia N900
 
Quote:

Originally Posted by Flandry (Post 760455)
Could you please give a summary of what it's doing?



sh MyDocs/OptimizeN900

it doesn't work for me either!
i made a folder in my N900 (internal memory) called MyDocs and i copied the attached OptimizeN900 file inside MyDocs folder.
Opened X-Terminal and typed sh MyDocs/OptimizeN900 but it says "Cant open MyDocs/OptimizeN900"

what did i do wrong? please help me...

JorgeFX 2010-07-22 09:52

Re: Optimize your Nokia N900
 
Quote:

Originally Posted by animest4r (Post 760515)
it doesn't work for me either!
i made a folder in my N900 (internal memory) called MyDocs and i copied the attached OptimizeN900 file inside MyDocs folder.
Opened X-Terminal and typed sh MyDocs/OptimizeN900 but it says "Cant open MyDocs/OptimizeN900"

what did i do wrong? please help me...

One question... Did you guys unzip the script?? :rolleyes:

geneven 2010-07-22 09:55

Re: Optimize your Nokia N900
 
This sounds really cool, but unfortunately I reboot naturally whenever I switch batteries so I guess I wouldn't benefit.

JorgeFX 2010-07-22 09:57

Re: Optimize your Nokia N900
 
@geneven, In the future maybe I will post some tips to make the battery last for more than 15hrs of normal use, and then you can try the script;)

ossipena 2010-07-22 09:58

Re: Optimize your Nokia N900
 
try

cd MyDocs
sh OptimizeN900

instead.
there isn't such
"MyDocs/OptimizeN900"
-file or directory either......

please learn to use xterm before you ask silly questions. and use the tab

filologen 2010-07-22 09:58

Re: Optimize your Nokia N900
 
Quote:

Originally Posted by animest4r (Post 760515)
it doesn't work for me either!
i made a folder in my N900 (internal memory) called MyDocs and i copied the attached OptimizeN900 file inside MyDocs folder.
Opened X-Terminal and typed sh MyDocs/OptimizeN900 but it says "Cant open MyDocs/OptimizeN900"

what did i do wrong? please help me...

You cannot put it under MyDocs, since that is a FAT32 partition, put it somewhere under /opt in order to be able to execute the script.

JorgeFX 2010-07-22 10:01

Re: Optimize your Nokia N900
 
Quote:

Originally Posted by filologen (Post 760529)
You cannot put it under MyDocs, since that is a FAT32 partition, put it somewhere under /opt in order to be able to execute the script.

Yes you can. Look at this:
http://talk.maemo.org/showpost.php?p...7&postcount=11 ;)

jupacabra 2010-07-22 10:03

Re: Optimize your Nokia N900
 
Quote:

Originally Posted by JorgeFX (Post 760457)

oops sorry honest mistake... there was only a single page on the thread when I made the post... so I totally missed it.

JorgeFX 2010-07-22 10:07

Re: Optimize your Nokia N900
 
@jupacabra, don't worry, be happy:p


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

vBulletin® Version 3.8.8