Poll: Delet the values from the speedpatch?
Poll Options
Delet the values from the speedpatch?

Reply
Thread Tools
Posts: 856 | Thanked: 1,681 times | Joined on Apr 2010 @ Aleppo ,Syria
#291
i use kernel-power v47 because i see it is the most responsive one
to the patch
also it has injection wireless modules
 

The Following User Says Thank You to karam For This Useful Post:
Posts: 34 | Thanked: 50 times | Joined on Jun 2010
#292
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.
 

The Following 4 Users Say Thank You to thingonaspring For This Useful Post:
Posts: 182 | Thanked: 40 times | Joined on Apr 2010 @ Seatle, WA
#293
@karam one more question, where does your swap reside emmc or microsd??
 
Posts: 856 | Thanked: 1,681 times | Joined on Apr 2010 @ Aleppo ,Syria
#294
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
 
Posts: 856 | Thanked: 1,681 times | Joined on Apr 2010 @ Aleppo ,Syria
#295
@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's Avatar
Posts: 335 | Thanked: 51 times | Joined on May 2010
#296
Originally Posted by locolyric View Post
did you forgot to key in the command as root?

/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?
__________________
Best Regard,

CasTTeLLo
 
Posts: 856 | Thanked: 1,681 times | Joined on Apr 2010 @ Aleppo ,Syria
#297
That is normal
No problems with it


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

The Following User Says Thank You to karam For This Useful Post:
Posts: 195 | Thanked: 96 times | Joined on May 2011
#298
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
 

The Following User Says Thank You to Seker_94 For This Useful Post:
Posts: 34 | Thanked: 50 times | Joined on Jun 2010
#299
Attaching patch.tar.gz for karam.
Attached Files
File Type: gz patch.tar.gz (3.3 KB, 97 views)
 

The Following 2 Users Say Thank You to thingonaspring For This Useful Post:
Posts: 856 | Thanked: 1,681 times | Joined on Apr 2010 @ Aleppo ,Syria
#300
HUGE Update every one
Read the first post

Thanks to thingonaspring
Oh and thingonaspring i modified it a bit
 

The Following 2 Users Say Thank You to karam For This Useful Post:
Reply

Tags
autobrick, awesome-script, do no install, f***epitaph, install it now, perfect_ n900, script-a-brick, very safe


 
Forum Jump


All times are GMT. The time now is 16:43.