COMPCACHE for UD *2.5.0*!! [Instructions] Updated 12/16/10

Hey guys. Recently flashes r3d urban theme and can't seem to get compcache Workin. I tried reflashing kernel and ramzswap but it says. File does not exsist in emulator. Any suggestions?
 
The proper solution - as I'd posted before:

Use Root Explorer to find the files in /system/bin - set to R/W - and "open in text editor".

Or... I've attached the scripts to place in /system/bin - you'll need to set proper permissions: User, RWE; Group, RE; Others, RE

Perhaps someone can place in an installable zip.

which files are we looking for in /system/bin (when you talk about "find the files")

Ive copied your two scripts into this directory also, chmod them in terminal and then ran with same issues:


modprobe: chdir(/lib/modules): No such file or directory
Failed to open dev/block/ramzswap0:
No such file or directory
swapon:can't stat '/dev/block/ramzswap0 no such file or directory

I can tell from your output that the scripts were not replaced. I used "insmod" to load the module - not "modprobe".

And the file I posted is not a zip that's installable from recovery... it only contains two files for you to move to your driod.

Make a backup of your system.. in case it gets fubar'd.

Unzip the two files - either transfer to your SDCard - or unzip them on your droid.

Use Root Explorer from the market - navigate to /system/bin. Press the R/W (read/write) button in Root Explorer.

Delete these two files (press and hold on the filename): compcache and handle_compcache.

From the zip I posted - copy or move those same edited two files to /system/bin - and set permissions as in post 162.

Then.. navigate to /etc/init.d - "open in text editor" 20userinit.

Change the last line from:
/system/bin/compcache start to
/system/bin/handle_compcache

I guess I really need to make an installable zip.

Hope that helps..
 
Thanks Chipster, I followed exactly as you said and it works with my P3 kernel.
thanks anuraj1 for your help as well.
 
Chipster,
I replace the two files you posted and then change the last line in etc/init.d/20userinit to /system/bin/handle_compcache.
You said in a earlier post that if you wanted compcache not to start on boot that you should place a # in front of the line "compcache start"
Can you also do that with the line "handle_compcache"
note: swap is working...replaced last line in etc/init.d/20userinit with "handle_compcache". the "compcache start" no longer exists. Is that the way it's done ???
Running Sholes_Sapphire 7x250 1100IV kernal
 
Last edited:
Chipster,
I replace the two files you posted and then change the last line in etc/init.d/20userinit to /system/bin/handle_compcache.
You said in a earlier post that if you wanted compcache not to start on boot that you should place a # in front of the line "compcache start"
Can you also do that with the line "handle_compcache"
note: swap is working...replaced last line in etc/init.d/20userinit with "handle_compcache". the "compcache start" no longer exists. Is that the way it's done ???
Running Sholes_Sapphire 7x250 1100IV kernal

When you use the modified scripts - you don't need "comcache start". By placing a "#" at the beginning of the line - the command is ignored by the interpreter (it's treated as a "comment").

But keep the "handle_compcache" statement. Then use the UD Settings GUI to enable or disable. If disabled - the "handle_compcache" script will stop compcache.

What happens when disabled... There's a file that the UD Settings writes to - "persist.service.compcache". UD Settings writes the percent you select in the GUI to that file - and "0" if disabled. The "handle_compcache" script reads that file - if it reads "0" - it turns off compcache. If it reads anything else - it set compcache to that percent of RAM.

The default that BD uses - "compcache start" - will always start compcache at the default 18% (assuming you can get it to start at all). The UD Settings are completely ignored.

So keep the "/system/bin/handle_compcache" at the end of 20userinint. And you'll have full control through the GUI.

You're welcome to compare my edits to the stock scripts. The stock "handle_compcache" is just wrong for our D1s - and doesn't work. My edits make it work as intended. Likewise - the original "compcache" script has errors in its coding as well. I corrected that - and it was also corrected in the zip on the OP - but v25 also doesn't call insmod properly (we have to call it explicitly through busybox - this wasn't a problem in UD23).
 
Chipster,
I replace the two files you posted and then change the last line in etc/init.d/20userinit to /system/bin/handle_compcache.
You said in a earlier post that if you wanted compcache not to start on boot that you should place a # in front of the line "compcache start"
Can you also do that with the line "handle_compcache"
note: swap is working...replaced last line in etc/init.d/20userinit with "handle_compcache". the "compcache start" no longer exists. Is that the way it's done ???
Running Sholes_Sapphire 7x250 1100IV kernal

When you use the modified scripts - you don't need "comcache start". By placing a "#" at the beginning of the line - the command is ignored by the interpreter (it's treated as a "comment").

But keep the "handle_compcache" statement. Then use the UD Settings GUI to enable or disable. If disabled - the "handle_compcache" script will stop compcache.

What happens when disabled... There's a file that the UD Settings writes to - "persist.service.compcache". UD Settings writes the percent you select in the GUI to that file - and "0" if disabled. The "handle_compcache" script reads that file - if it reads "0" - it turns off compcache. If it reads anything else - it set compcache to that percent of RAM.

The default that BD uses - "compcache start" - will always start compcache at the default 18% (assuming you can get it to start at all). The UD Settings are completely ignored.

So keep the "/system/bin/handle_compcache" at the end of 20userinint. And you'll have full control through the GUI.

You're welcome to compare my edits to the stock scripts. The stock "handle_compcache" is just wrong for our D1s - and doesn't work. My edits make it work as intended. Likewise - the original "compcache" script has errors in its coding as well. I corrected that - and it was also corrected in the zip on the OP - but v25 also doesn't call insmod properly (we have to call it explicitly through busybox - this wasn't a problem in UD23).
Well everything works just as you've said at least on my D1 with UD 2.5
But yesterday I switched Roms to BB1.6.0 only because I was having such bad battery drainage with UD and thought I would try another rom. I really don't know why UDs roms drain my battery but Ive had BB1.6 running since 9:00 this morning and I'm at 70%. With UD i would be charging or replacing battery by now. Anyhow I've noticed with this rom ther is no "handle-compcache file in the system>bin. Just woundering if we can use the same proceedure with any rom ???it also does not have the 20userinit file....so the main question is I know I can add the 20userinit folder or file after I find it somewhere, but what about the two other scripts that you wrote, just add them also ?????
To get compcache to work on any rom. Providing you use a compcache inabled kernal of course.
 
Last edited:
@segdof49

Handle_Compcache is on the UD ROM to read the UD Settings > Performance > Compcache RAM Usage interface.

The interface writes the RAM percent (or "0" if disabled) to a file. That file is read by handle_compcache which adds the RAM percent to the compcache start command.

Unfamiliar with BB - but if it has custom settings for Compcache - it may well have a file which contains those settings. If not - then there is no use for handle_compcache.

The question may be better handled in a BB thread by BB users.
 
Chipster i've tried everything in your post from installing the compache and handle compache scripts..renaming int...re installing busy box..but everytime i check info on set cpu my swap total and swap free are reading zero? I'm using slayher's compache kernels and i'm pretty sure i had it working till i updated set cpu this morning. Is there something i can try in terminal to see if i installed it right?
 
Is compcache enabled by default on the kernel it comes with? It says its on 18% by default
 
The proper solution - as I'd posted before:

Use Root Explorer to find the files in /system/bin - set to R/W - and "open in text editor".

Or... I've attached the scripts to place in /system/bin - you'll need to set proper permissions: User, RWE; Group, RE; Others, RE

Perhaps someone can place in an installable zip.

which files are we looking for in /system/bin (when you talk about "find the files")

Ive copied your two scripts into this directory also, chmod them in terminal and then ran with same issues:


modprobe: chdir(/lib/modules): No such file or directory
Failed to open dev/block/ramzswap0:
No such file or directory
swapon:can't stat '/dev/block/ramzswap0 no such file or directory

I can tell from your output that the scripts were not replaced. I used "insmod" to load the module - not "modprobe".

And the file I posted is not a zip that's installable from recovery... it only contains two files for you to move to your driod.

Make a backup of your system.. in case it gets fubar'd.

Unzip the two files - either transfer to your SDCard - or unzip them on your droid.

Use Root Explorer from the market - navigate to /system/bin. Press the R/W (read/write) button in Root Explorer.

Delete these two files (press and hold on the filename): compcache and handle_compcache.

From the zip I posted - copy or move those same edited two files to /system/bin - and set permissions as in post 162.

Then.. navigate to /etc/init.d - "open in text editor" 20userinit.

Change the last line from:
/system/bin/compcache start to
/system/bin/handle_compcache

I guess I really need to make an installable zip.

Hope that helps..
Thanks Chipster, This worked perfectly!
 
Is compcache enabled by default on the kernel it comes with? It says its on 18% by default

No. The kernel doesn't actually enable compcache - you need the added module specific to the kernel.

If you install the proper Slayher kernel - or the P3 kernel and the ramzswap file module - it simply assures the files you need are on the Droid. But that doesn't mean it actually loads and starts swapping on next boot. (Actually - it will try - but only because BD added a compcache start command to an init file).

To actually start compache, you need to issue the proper commands to set up the swap area in RAM, load the ramzswap module, and start the swap control. All this is done through the compache script.

If the swap size isn't specified by "compache start", then it will default to 18%.

If you do as I propose - the "handle_compcache" script appends the size selected in the GUI to the "compcache start" command.
 
Chipster i've tried everything in your post from installing the compache and handle compache scripts..renaming int...re installing busy box..but everytime i check info on set cpu my swap total and swap free are reading zero? I'm using slayher's compache kernels and i'm pretty sure i had it working till i updated set cpu this morning. Is there something i can try in terminal to see if i installed it right?

Remember - you need a Slayher kernel (or P3 with added module). If Slayher, install v1.6 first - then (if you choose) the LFY version.

The Slayher LFY kernels don't appear to have the ramzswap module in the installable zip. But the 1.6 kernel does. Installing the LFY version over 1.6 - it will happily use the module that 1.6 left behind.

Now.. in terminal type:
su
/system/bin/handle_compcache

Note the output..

Then try:
compcache start

And note the output.

Let us know what problems it complains of.

Also.. use Root Explorer (or other file manager) - drill down through /system/lib/modules - and verify the file "ramzswap.ko" is there.
 
I found an app called swapper 2 what is the difference between compcache and it?
 
Back
Top