Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ZRAM settings has no effect on ZRAM #40

Open
pejakm opened this issue Apr 10, 2015 · 2 comments
Open

ZRAM settings has no effect on ZRAM #40

pejakm opened this issue Apr 10, 2015 · 2 comments

Comments

@pejakm
Copy link

pejakm commented Apr 10, 2015

Android 4.2.2, stock based (prestigio phone).

This is a quick fix for the script:

--- mounts2sd.sh.orig   2015-04-10 17:30:24.653286825 +0200
+++ mounts2sd.sh    2015-04-10 17:21:33.030236383 +0200
@@ -112,6 +112,7 @@ touch
 seq
 date
 swapon
+swapoff
 mkswap
 insmod
 readlink
@@ -974,6 +975,9 @@ ProcessMemory() {
                         fi

                     elif $_test -b /dev/block/zram0 || ( $_test -e /system/lib/modules/zram.ko && $_insmod /system/lib/modules/zram.ko ); then
+                        $_swapoff /dev/block/zram0;
+                        $_sleep 0.5;
+                        $_echo 1 > /sys/block/zram0/reset;
                         $_echo "$(($(($(($lMemory * $lSize)) / 100)) * 1024))" > /sys/block/zram0/disksize
                         lDevice=/dev/block/zram0 && $_mkswap $lDevice >/dev/null

You need to stop zram first, reset its value, then start it again with new value (this is what this patch do). However, UI still reports ZRAM as "disabled", apparently the app itself needs a fix.

@dbergloev
Copy link
Member

Did I not already to this in the script? I will add this when I get the time, but I actually want to remove most of the work from the script and have it be handled by the app itself. There is no reason for ZRAM to be handled by a startup script and the same goes for things like readahead and other things. I think the script should handle nothing more than handling the mount part as this needs to be done before the system boots. I just need to find a good way to have the app do all of the data transfers as this also should not be handled during boot, but instead during settings changes with a progressbar. But not sure that I will have time for this until after the summer.

The app however displays ZRAM status fine on my devices. But it would be great to have the RootFW library updated. The new version contains specific ZRAM/SWAP tools.

@pejakm
Copy link
Author

pejakm commented Apr 10, 2015

This is worked out nicely in Performance Control, but I prefer Mounts2SD more. Anyway, I'm really glad you haven't gave up on this project, I'm looking forward to further fixes and features. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants