maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Maemo 5 / Fremantle (https://talk.maemo.org/forumdisplay.php?f=40)
-   -   [ANNOUNCE] Speed Patch + Battery Patch + Tweaks --> Everything Needed To Have A Perfect N900 (https://talk.maemo.org/showthread.php?t=73315)

karam 2011-06-17 09:37

Re: [ANNOUNCE] Script + Tweaks To Speed UP N900
 
i use kernel-power v47 because i see it is the most responsive one
to the patch
also it has injection wireless modules

thingonaspring 2011-06-17 15:16

Re: [ANNOUNCE] Script + Tweaks To Speed UP N900
 
Hi Guys,

I've tidied up the cgroup patch a lot. It's now a self-contained script, it no longer needs bash and it's a bit more effective when you run things from x-terminal (previously you had to run bash before anything in x-term would be cgrouped).

Code:

#!/bin/sh

if [ $USER != root ]; then
  echo "Error: you need to run this script as root."
  echo "Exiting..."
  exit 0
fi
     
mkdir /usr/local/sbin >/dev/null 2>&1
cat <<_EOF >/usr/local/sbin/cgroup_clean       
#!/bin/sh
if [ "$*" != "/user" ]; then
  rmdir /dev/cgroup/cpu/$*
fi
_EOF
chmod u+x /usr/local/sbin/cgroup_clean

cat <<_EOF >/etc/event.d/speedpatch
description "speedpatch"

console none

start on MOUNTS_OK
stop on stopping xomap

script
    mkdir -p /dev/cgroup/cpu
    mount -t cgroup cgroup /dev/cgroup/cpu -o cpu,memory
    mkdir -m 0777 /dev/cgroup/cpu/user
    echo "/usr/local/sbin/cgroup_clean" > /dev/cgroup/cpu/release_agent
    echo "1" > /dev/cgroup/cpu/user/notify_on_release
end script
_EOF

if [ `cat /home/user/.profile |grep /dev/cgroup |wc -l` -eq 0 ] ; then
  cat <<_EOF >>/home/user/.profile
  if [ "\$PS1" ] ; then
    mkdir -p -m 0700 /dev/cgroup/cpu/user/\$\$ 
    echo \$\$ > /dev/cgroup/cpu/user/\$\$/tasks
    echo "1" > /dev/cgroup/cpu/user/\$\$/notify_on_release
  fi
_EOF
fi

echo Patch complete, reboot to enable

To apply this, cut+paste the code into a file named "patchit.sh", chmod u+x on the file, then run it as root "./patchit.sh".

If you've applied the original cgroup patch, then you should remove the 4 cgroup lines from rc.local too. It probably won't hurt to have rc.local with the old patch enabled, it's just tidier to get rid of it. If you've got nothing other than cgroup in /etc/rc.local, then it's safe to remove the file entirely.

Usual disclaimer - use the patch at your own risk, I take no responsibility for anything bad that happens in your life.

mehulrajput 2011-06-17 15:51

Re: [ANNOUNCE] Script + Tweaks To Speed UP N900
 
@karam one more question, where does your swap reside emmc or microsd??

karam 2011-06-18 13:06

Re: [ANNOUNCE] Script + Tweaks To Speed UP N900
 
Thank you thingonaspring
i just can't test anything right now
can somebody test it and tell the result please

make sure if you have already applied the patch (the one in the first post) remove it before applieng the new one

karam 2011-06-18 13:55

Re: [ANNOUNCE] Script + Tweaks To Speed UP N900
 
@mehulrajput

actually emmc
cause i don't have microsd

But i edited the swap to have 1 gb swap inside emmc

used gparted with backupmenu (complicated)

but even before doing this i had a great n900 with the tweaks and the patch

CasTTeLLo 2011-06-18 16:54

Re: [ANNOUNCE] Script + Tweaks To Speed UP N900
 
Quote:

Originally Posted by locolyric (Post 1025518)
did you forgot to key in the command as root?


Quote:

/home/user # /etc/rc.local
mount: mounting cgroup on /dev/cgroup/cpu failed: Device or resource busy
mkdir: cannot create directory '/dev/cgroup/cpu/user': File exists
me oso got the same error after trying to update the patch....what next?

karam 2011-06-18 16:59

Re: [ANNOUNCE] Script + Tweaks To Speed UP N900
 
That is normal :)
No problems with it


PS : i said this over the 30 pages about 30 times ;)

Seker_94 2011-06-18 17:00

Re: [ANNOUNCE] Script + Tweaks To Speed UP N900
 
actually yes it is normal

that happened once with me
but as long as i have /dev/cgroup that means the patch is done correctly

thingonaspring 2011-06-18 22:37

Re: [ANNOUNCE] Script + Tweaks To Speed UP N900
 
1 Attachment(s)
Attaching patch.tar.gz for karam.

karam 2011-06-18 23:33

Re: [ANNOUNCE] Script + Tweaks To Speed UP N900 (HUGE UPDATE)!!!!!!!!!!! NOW Easy Apply
 
HUGE Update every one
Read the first post :)

Thanks to thingonaspring
Oh and thingonaspring i modified it a bit


All times are GMT. The time now is 13:20.

vBulletin® Version 3.8.8