TMavica's Avatar
Posts: 2,021 | Thanked: 1,060 times | Joined on Apr 2010 @ Hong Kong
#41
swapon with count 2097152, the phone got unresponsive, but if set 1048756, then is fine for me...
__________________
The Glorious Lady T.Mavica
Twitter https://twitter.com/TMavica
 
death_jax's Avatar
Posts: 326 | Thanked: 122 times | Joined on Sep 2012 @ Italy
#42
Originally Posted by thedead1440 View Post
No no you don't need any packages... All these are system commands...

also if you read what you downloaded you would know they are bash scripts so you either leave them without any file extension or rename them to .sh
Yes, I know that are bash scripts, for this reason I ask if I should rename them before chmod (but why aren't directly in .sh instead of .txt? ).. however, mkswap and swapon/swapoff aren't recognized (are not found)..

EDIT: They are /sbin/mkswap, /sbin/swapon and /sbin/swapoff..

Last edited by death_jax; 2012-09-23 at 10:02.
 
TMavica's Avatar
Posts: 2,021 | Thanked: 1,060 times | Joined on Apr 2010 @ Hong Kong
#43
Originally Posted by death_jax View Post
Yes, I know that are bash scripts, for this reason I ask if I should rename them before chmod (but why aren't directly in .sh instead of .txt? ).. however, mkswap and swapon/swapoff aren't recognized (are not found)..
/sbin/swapon, /sbin/swapoff, /sbin/mkswap
__________________
The Glorious Lady T.Mavica
Twitter https://twitter.com/TMavica
 
death_jax's Avatar
Posts: 326 | Thanked: 122 times | Joined on Sep 2012 @ Italy
#44
Originally Posted by TMavica View Post
/sbin/swapon, /sbin/swapoff, /sbin/mkswap
We wrote at the same time

PS: Ok, now the only problem is sudo installation.
Didn't I can create swap file only from devel-su root user?

Last edited by death_jax; 2012-09-23 at 10:07.
 
Moderator | Posts: 6,215 | Thanked: 6,402 times | Joined on Nov 2011
#45
devel-su is sufficient...
 
death_jax's Avatar
Posts: 326 | Thanked: 122 times | Joined on Sep 2012 @ Italy
#46
Originally Posted by thedead1440 View Post
devel-su is sufficient...
Ok perfect, at work to swap now

PS: My "real" swap (that is in ram) is always free (255 of 255 MB).. I think that the extra swap doesn't change the speed for me

PS2: How can I add /sbin/mkswap, /sbin/swapon and /sbin/swapoff to system var, because the scripts uses mkswap, swapon and swapoff instead of that described above?

EDIT: Until solution for PS2 request, I edited scripts with /sbin/ before swapon/swapoff command and now works.. in fact drop cache show me 2303 of 2303 MB free

Last edited by death_jax; 2012-09-23 at 10:38.
 
Moderator | Posts: 6,215 | Thanked: 6,402 times | Joined on Nov 2011
#47
see when you do the swap part yourself u need to use it with /sbin but once you copied the script to /etc you don't need to use /sbin the system works this way
 
death_jax's Avatar
Posts: 326 | Thanked: 122 times | Joined on Sep 2012 @ Italy
#48
Originally Posted by thedead1440 View Post
see when you do the swap part yourself u need to use it with /sbin but once you copied the script to /etc you don't need to use /sbin the system works this way
Ok, this should be true with swap-add.conf, but doesn't work with setswap0 and rmswap0 because when I run one of them show me swapon or swapoff: not found.
Only if I modify them with /sbin/ before, they works.

Last edited by death_jax; 2012-09-23 at 12:11.
 
Moderator | Posts: 6,215 | Thanked: 6,402 times | Joined on Nov 2011
#49
Yes correct...The setswap0 and rmswap0 are not copied into etc so that's why you need to use /sbin

For swap-add.conf its in /etc so no need the /sbin

Also I personally find it easier to swapon/off on-demand instead of using the setswap0 and rmswap0 files as the file too is 1 line of command and to run the sh script you also need to type one line of command...

Ofcourse you can also do it in such a way that create 2 .desktop files that do swapon/off...the exec can be /sbin/swapon(off) and you are set
 
death_jax's Avatar
Posts: 326 | Thanked: 122 times | Joined on Sep 2012 @ Italy
#50
Originally Posted by thedead1440 View Post
Yes correct...The setswap0 and rmswap0 are not copied into etc so that's why you need to use /sbin

For swap-add.conf its in /etc so no need the /sbin

Also I personally find it easier to swapon/off on-demand instead of using the setswap0 and rmswap0 files as the file too is 1 line of command and to run the sh script you also need to type one line of command...

Ofcourse you can also do it in such a way that create 2 .desktop files that do swapon/off...the exec can be /sbin/swapon(off) and you are set
Yes, It's an idea

PS: But why swapon/swapoff scripts in firts post are incorrect? It would be better correct them for who want to try this tweak?
 
Reply

Thread Tools

 
Forum Jump


All times are GMT. The time now is 22:11.