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-08-16 06:13

Re: Optimize your Nokia N900
 
Quote:

Originally Posted by evad (Post 786192)
What exactly do you mean? dsmetool way of restarting hildon-home? It works flawlessly for me, ie. I never loose widgets. Anyway, this is not what I only meant, I was referring to sp-endurance I mentioned in my other post.

But the code you provide makes the widgets go away instantly. That happens to you?

evad 2010-08-16 09:24

Re: Optimize your Nokia N900
 
Quote:

Originally Posted by JorgeFX (Post 787701)
But the code you provide makes the widgets go away instantly. That happens to you?

No, it doesn't. I think the key is to run it as user, not root.

1) sudo gainroot
2) su user
3) dsmetool -k /usr/bin/hildon-home && dsmetool -t /usr/bin/hildon-home
or probably even better:
3) dsmetool -k /usr/bin/hildon-home; sleep 3; dsmetool -t /usr/bin/hildon-home

Rob1n 2010-08-16 09:32

Re: Optimize your Nokia N900
 
Quote:

Originally Posted by evad (Post 787847)
No, it doesn't. I think the key is to run it as user, not root.

1) sudo gainroot
2) su user
3) dsmetool -k /usr/bin/hildon-home && dsmetool -t /usr/bin/hildon-home
or probably even better:
3) dsmetool -k /usr/bin/hildon-home; sleep 3; dsmetool -t /usr/bin/hildon-home

Why are you switching to root & then back to user? You can just run step 3 directly.

evad 2010-08-16 09:36

Re: Optimize your Nokia N900
 
Quote:

Originally Posted by Rob1n (Post 787857)
Why are you switching to root & then back to user? You can just run step 3 directly.

Yes, you're right. I'm so used to root, that I do nearly everything through it. :)

mangal_sk8erboy 2010-08-16 09:41

Re: Optimize your Nokia N900
 
hey guys i dont think this script works for me.
this is what it says.
/home/user # sh MyDocs/Optimizen900
: not foundmizen900: line 2:
Your Nokia N900 is being Optimized
: not foundmizen900: line 4:
: no process killed
: not foundmizen900: line 7:
: no process killed
: no process killeddexer
: not foundmizen900: line 11:
killall: cannot kill pid 3998: No such process
: no process killed
: not foundmizen900: line 14:
: no process killed
: no process killedlator
: no process killed
: no process killed-ui
: no process killed
: no process killedaging-ui
: no process killeder
: no process killed
: no process killedssbook
: not foundmizen900: line 25:
: no process killedktop
: no process killedtus-menu
: no process killed
: not foundmizen900: line 32:
: no process killed
: no process killedenderer
: not foundmizen900: line 36:
Your Nokia N900 is now Optimized!
/home/user #
/home/user #

dyu think my n900 is optimized?
does anyone know a fix for this?

MatMat 2010-08-17 00:46

Re: Optimize your Nokia N900
 
I runned the script and ALL my desktops widgets and shortcuts show together in one desktop. :mad:
SO, i have to reboot the phone.

I DONT RECOMMEND IT.

Not a good script.

JorgeFX 2010-08-17 03:37

Re: Optimize your Nokia N900
 
Quote:

Originally Posted by MatMat (Post 788755)
I runned the script and ALL my desktops widgets and shortcuts show together in one desktop. :mad:
SO, i have to reboot the phone.

I DONT RECOMMEND IT.

Not a good script.

Could you tell us please what version of the script did you use?

JorgeFX 2010-08-17 03:39

Re: Optimize your Nokia N900
 
Quote:

Originally Posted by mangal_sk8erboy (Post 787870)
hey guys i dont think this script works for me.
this is what it says.
/home/user # sh MyDocs/Optimizen900
: not foundmizen900: line 2:
Your Nokia N900 is being Optimized
.
.

: no process killedenderer
: not foundmizen900: line 36:
Your Nokia N900 is now Optimized!
/home/user #
/home/user #

dyu think my n900 is optimized?
does anyone know a fix for this?

I think there is a problem with the file you downloaded. The script isn't working, is not doing anything. What version did you use?

JorgeFX 2010-08-17 03:40

Re: Optimize your Nokia N900
 
Quote:

Originally Posted by evad (Post 787847)
No, it doesn't. I think the key is to run it as user, not root.

1) sudo gainroot
2) su user
3) dsmetool -k /usr/bin/hildon-home && dsmetool -t /usr/bin/hildon-home
or probably even better:
3) dsmetool -k /usr/bin/hildon-home; sleep 3; dsmetool -t /usr/bin/hildon-home

Let me test it for several times to see if it is stable. Thanks!;)

MatMat 2010-08-17 15:08

Re: Optimize your Nokia N900
 
Quote:

Originally Posted by JorgeFX (Post 788852)
Could you tell us please what version of the script did you use?

The zip that is in the first post in the first page, or should i browse and read all the 25 pages to look for the latest version of the script ? :D

I used the script in another n900 and nothing goes wrong in that other device, and both have PR1.2 installed.

peochiu 2010-08-17 15:50

Re: Optimize your Nokia N900
 
Quote:

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

This is the code of "OptimizeN900"

#!/bin/sh

echo Your Nokia N900 is being Optimized

#Refresh the Audio Process to avoid audio glitch
killall pulseaudio

#Refresh the Tracker process
killall trackerd
killall tracker-indexer

#Refresh the browser MicroB
killall browser browserd

#Refresh of the most common applications and UIs
killall Calendar
killall osso_calculator
killall camera-ui
killall rtcom-call-ui
killall modest
killall rtcom-messaging-ui
killall image-viewer
killall osso_notes
killall osso-addressbook

#Refresh the all UI Hildon, menus and bars.
killall hildon-desktop
killall hildon-status-menu
killall systemui
#NOTE: Killing the hildon-home process can erase all widgets and that is why it is disabled
#killall hildon-home

#Refresh other processes
killall tonegend
killall mafw-gst-renderer

echo Your Nokia N900 is now Optimized! ;)


--------
Will this script optimize N900?
I don't thinks so.

Process should be managed by operating system.
If you don't like a process
Just don't start it.
Not Kill it,unless it crashed.

mangal_sk8erboy 2010-08-17 19:04

Re: Optimize your Nokia N900
 
Quote:

Originally Posted by JorgeFX (Post 788854)
I think there is a problem with the file you downloaded. The script isn't working, is not doing anything. What version did you use?

the 1st one in the thread.
Optimizen900

mangal_sk8erboy 2010-08-17 19:21

Re: Optimize your Nokia N900
 
aha..wait up, does the whole phone spazz out for a second and then comes back to life ?
i think ive downloaded another version of optimizen900
it says "now your phone is EXTRA optimized"
ill check it out now..
il wait for a few days n see if it works.

yanness 2010-08-17 20:07

Re: Optimize your Nokia N900
 
Quote:

Originally Posted by noipv4 (Post 762801)
Before running Optimize. The N900 had become sluggish and audio was stuttering.

hi noipv4, i have noticed that you have really large swap. Could i know how did you make this happen and what are the benefits?

Cheers

RafaLL92 2010-08-17 20:40

Re: Optimize your Nokia N900
 
Quote:

Originally Posted by mangal_sk8erboy (Post 787870)
hey guys i dont think this script works for me.
this is what it says.
/home/user # sh MyDocs/Optimizen900
: not foundmizen900: line 2:
Your Nokia N900 is being Optimized
: not foundmizen900: line 4:
: no process killed
: not foundmizen900: line 7:
: no process killed
: no process killeddexer
: not foundmizen900: line 11:
killall: cannot kill pid 3998: No such process
: no process killed
: not foundmizen900: line 14:
: no process killed
: no process killedlator
: no process killed
: no process killed-ui
: no process killed
: no process killedaging-ui
: no process killeder
: no process killed
: no process killedssbook
: not foundmizen900: line 25:
: no process killedktop
: no process killedtus-menu
: no process killed
: not foundmizen900: line 32:
: no process killed
: no process killedenderer
: not foundmizen900: line 36:
Your Nokia N900 is now Optimized!
/home/user #
/home/user #

dyu think my n900 is optimized?
does anyone know a fix for this?

Same happens in my case meaning that the script does not seem to work for me...
What could I have done wrong?

Rob1n 2010-08-18 07:53

Re: Optimize your Nokia N900
 
Quote:

Originally Posted by RafaLL92 (Post 789754)
Same happens in my case meaning that the script does not seem to work for me...
What could I have done wrong?

As you're getting errors even before the first echo statement, I'd guess that you've saved the file in DOS format, not in UNIX format. You should be able to convert it using either sed/tr (either of the following two lines - the ^M is generated by pressing Ctrl-V followed by Ctrl-M):
Code:

tr -d '\r' < DOS_file > UNIX_file
sed 's/^M//' DOS_file > UNIX_file


nebel 2010-08-18 08:34

Re: Optimize your Nokia N900
 
I dont read through the whole threat, but why are you not sending HUP to the processes, instead of killing them and hoping they get restarted 'by it self' (watchdog?).

fpp 2010-08-18 11:43

Re: Optimize your Nokia N900
 
Quote:

Originally Posted by Rob1n (Post 787857)
Why are you switching to root & then back to user? You can just run step 3 directly.

One reason could be that dsmetool is not in the path when you run as plain "user" (you need to use /usr/sbin/dsmetool), but is found in the path after "su user" from root.

A third method could be to run "dsmetool --user=user" from root.

mangal_sk8erboy 2010-08-18 13:04

Re: Optimize your Nokia N900
 
Quote:

Originally Posted by yanness (Post 789728)
hi noipv4, i have noticed that you have really large swap. Could i know how did you make this happen and what are the benefits?

Cheers

i THINK he used a class 6 memory card and partitioned it as swap memory..
i would also like to know if its useful.

maurelio79 2010-08-18 14:19

Re: Optimize your Nokia N900
 
But a simple swapoff && swapon, could be give some performance in your opinion?
Regards.

evad 2010-08-18 15:51

Re: Optimize your Nokia N900
 
Quote:

Originally Posted by maurelio79 (Post 790548)
But a simple swapoff && swapon, could be give some performance in your opinion?
Regards.

Depends on current swap usage. Swapoff tries to shift swap contents to RAM, so whenever RAM gets overfilled by that, strange things might happen... I wouldn't generally recommend that.

fpp 2010-08-18 20:13

Re: Optimize your Nokia N900
 
Quote:

Originally Posted by evad (Post 787847)
No, it doesn't. I think the key is to run it as user, not root.

3) dsmetool -k /usr/bin/hildon-home; sleep 3; dsmetool -t /usr/bin/hildon-home

My most frequent issue is with hildon-desktop, over time it slowly ramps up its CPU usage and becomes a battery-killer. I haven't been able to determine the exact cause (widget?) yet.

In my tests, the command above has a positive effect in such cases, but doesn't completely correct the problem. On a hunch I tried the exact same idea, but with hildon-desktop instead of hildon-home, and up to now it has proved very effective...

RafaLL92 2010-08-18 20:25

Re: Optimize your Nokia N900
 
Quote:

Originally Posted by Rob1n (Post 790119)
As you're getting errors even before the first echo statement, I'd guess that you've saved the file in DOS format, not in UNIX format. You should be able to convert it using either sed/tr (either of the following two lines - the ^M is generated by pressing Ctrl-V followed by Ctrl-M):
Code:

tr -d '\r' < DOS_file > UNIX_file
sed 's/^M//' DOS_file > UNIX_file


Thanks a bunch! Instead of converting the script file on the device I used online dos2unix converter and transferred the file again onto the device - the script worked then :)
Thanks again!

JorgeFX 2010-08-20 13:12

Re: Optimize your Nokia N900
 
Quote:

Originally Posted by Rob1n (Post 790119)
As you're getting errors even before the first echo statement, I'd guess that you've saved the file in DOS format, not in UNIX format. You should be able to convert it using either sed/tr (either of the following two lines - the ^M is generated by pressing Ctrl-V followed by Ctrl-M):
Code:

tr -d '\r' < DOS_file > UNIX_file
sed 's/^M//' DOS_file > UNIX_file


This days another device give me the same problem when I try the script, and the solution was simpler, only open another file with Leafpad and paste all the script. Simpler :D

fadimck 2010-08-21 21:13

Re: Optimize your Nokia N900
 
Quote:

Originally Posted by JorgeFX (Post 760436)
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!;)

Thank you Sir

mauron85 2010-08-24 20:27

Re: Optimize your Nokia N900
 
Will it help somebody, if I'll create package in extras-devel?
Basically it will put shell script into /opt/usr/bin/ and create icon for it.

If so please suggest name for the package and icon in this poll:
https://spreadsheets.google.com/view...Q19ULVUxT1E6MQ

AlexV12 2010-08-25 09:13

Re: Optimize your Nokia N900
 
i'd like to make this into a Queen Beecon widget, however i can't get it to work.

If i start the widget and go to advanced, i testdrive the command (your file) and it works perfectly. However if i try to import "buffer to beecon"

i get this error:
Code:

(0x3eb7e8) QBW Import from ADB command buffer error g_key_file_load_from_data
anybody have a clue?

No!No!No!Yes! 2010-08-26 06:37

Re: Optimize your Nokia N900
 
Quote:

Originally Posted by AlexV12 (Post 797674)
i'd like to make this into a Queen Beecon widget, however i can't get it to work.

If i start the widget and go to advanced, i testdrive the command (your file) and it works perfectly. However if i try to import "buffer to beecon"

i get this error:
Code:

(0x3eb7e8) QBW Import from ADB command buffer error g_key_file_load_from_data
anybody have a clue?

Ciao,
Please post complete text you are trying to import and exact button your are pushing ... from the message code it seems you are pressing top left button for command import instead of top right button for instance/beecon.
Some other screenshot of the advanced dialog box might be useful as well.
Bye

F2thaK 2010-08-26 06:43

Re: Optimize your Nokia N900
 
Quote:

Originally Posted by mauron85 (Post 797193)
Will it help somebody, if I'll create package in extras-devel?
Basically it will put shell script into /opt/usr/bin/ and create icon for it.

If so please suggest name for the package and icon in this poll:
https://spreadsheets.google.com/view...Q19ULVUxT1E6MQ


ive done this (for myself) just havent made a deb....

JorgeFX 2010-08-27 04:29

Re: Optimize your Nokia N900
 
Waoo:eek: I'm surprised to see that you are thinking of making and package to the extras-devel. It makes me real happy:)

chaoscreater 2010-09-01 01:41

Re: Optimize your Nokia N900
 
great thread JorgeFX, but maybe you should update your first post with other helpful suggestions or methods such as a desktop shortcut solution mentioned by someone on page 3??

Crom 2010-09-04 17:39

Re: Optimize your Nokia N900
 
Will there be a package in devel or testing soon, or is there a step by step guide for linux noobs on how to install and use?
This is just what we need for the n900.

humble 2010-09-05 02:34

Re: Optimize your Nokia N900
 
1 Attachment(s)
I got so tired of waiting:rolleyes:..(during that time) I researched all kinds of ways to make debs(hour's upon hour's) and found a quick hack and slash way... Anyway here try this out works for me and should for you:D

# write the README file
cat > usr/share/doc/OptimizeN900-Packaged/README <<END
This package provides JorgeFX OptimizeN900 script and ossipena desktop file for the N900.
It put's OptimizeN900 script in /opt/, optimize-n900.desktop in /usr/share/applications/hildon/ and gives a shortcut.

Thank you guys!

END

EDIT:Please use new deb.. post #275:)

bakuur 2010-09-06 00:46

Re: Optimize your Nokia N900
 
Quote:

Originally Posted by Crom (Post 807258)
Will there be a package in devel or testing soon, or is there a step by step guide for linux noobs on how to install and use?
This is just what we need for the n900.

if you'd like just simply place it in your MyDocs
and open the terminal and run this command

Code:

sudo sh /home/user/MyDocs/OptimizeN900
and by the way the N900 is casesensitive
as for that it worked for me
if you want to make a widget out of it then just follow the steps in this tutorial http://talk.maemo.org/showthread.php?t=61709

discard the first step and just simply put a different title and change the command up there instead of the one provided in the tutorial

humble 2010-09-06 03:27

Re: Optimize your Nokia N900
 
1 Attachment(s)
This is a minor update (from 0.1 to 0.2)

I

-Added "md5sums" check to the deb (the experts say I should)

-Change script's name from OptimizeN900.sh to OptimizeN900

-Put script in /usr/local/bin/ (instead of) /opt/

Now from terminal just type root then OptimizeN900 (it's case sensitive)
and it should run (make sure you have rootsh installed)

Btw.. The shortcut still works and you don't have to uninstall the first one(it removes it self)

Edit: 2morrow will add depends.. (Rootsh) well later 2day:D

ryanl33x1511 2010-09-06 05:21

Re: Optimize your Nokia N900
 
im good with the 1st version for now. click on shortcut run fine with me.

humble 2010-09-06 12:26

Re: Optimize your Nokia N900
 
Quote:

Originally Posted by ryanl33x1511 (Post 808350)
im good with the 1st version for now. click on shortcut run fine with me.

Thanks,

So it was a good idea to leave the first one up there:)

Well 0.2 is for those who would like to see the script in progress from a simple "root" "OptimizeN900".
It beats "root" "cd /opt" "OptimizeN900.sh" by one command:D

humble 2010-09-11 16:12

Re: Optimize your Nokia N900
 
For those who D/L vr 0.4 please I urge you to delete iT. I fould out that it does not install on a fresh flashed device:(.. Working out the kinks.. Will repost when truly ready sorry for the inconvenience:o

humble 2010-09-11 18:10

Re: Optimize your Nokia N900
 
Ok all is fixed;) version 0.5 with a new spin

Notice: I will not do a next release until i can(or someone can help me) fix the issue of the icon not showing up on installation

Quickfix: Just run the script once and for the shortcut switch themes back and forth

I try to edit my post-installation script "postinst"
With This
Quote:

#!/bin/sh
gtk-update-icon-cache -f /usr/share/icons/hicolor
but no cigar

Option: killall hildon-home #NOTE: Killing the hildon-home process can erase all widgets and that is why it is disabled.... I know we don't want that to happen

And still accepting suggestions,ideas,.png's on icon(48x48).
And still wanna upload(pm that info please)i read the wiki but a bit confused still.

thanks

les_garten 2010-09-11 19:03

Re: Optimize your Nokia N900
 
No matter what I do, your Icon does not show up?

Which is strange, because when I create a desktop file my Icons show up??


All times are GMT. The time now is 03:00.

vBulletin® Version 3.8.8