From c8f7a53f99e2d2d2b4d07d9b0a4be6c9a123114c Mon Sep 17 00:00:00 2001 From: Botspot <54716352+Botspot@users.noreply.github.com> Date: Sun, 3 Nov 2024 15:05:24 -0600 Subject: [PATCH] More RAM: show sysctl values as before, suppress sysctl missing warning --- apps/More RAM/install | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/More RAM/install b/apps/More RAM/install index c03feb5bfa..b31626929b 100755 --- a/apps/More RAM/install +++ b/apps/More RAM/install @@ -239,14 +239,14 @@ if [ "$(awk '/MemTotal/ {print $2}' /proc/meminfo)" -lt $((2*1024*1024)) ];then echo 'vm.swappiness=100 vm.vfs_cache_pressure=500 vm.dirty_background_ratio=1 -vm.dirty_ratio=50' | sudo tee /etc/sysctl.d/zram.conf >/dev/null +vm.dirty_ratio=50' | sudo tee /etc/sysctl.d/zram.conf else #otherwise only maximize swappiness - echo 'vm.swappiness=100' | sudo tee /etc/sysctl.d/zram.conf >/dev/null + echo 'vm.swappiness=100' | sudo tee /etc/sysctl.d/zram.conf fi #this script used to add lines to /etc/sysctl.conf, which is not guaranteed to exist. Remove those lines if found. -sudo sed -i '/^vm\.swappiness=100$/d ; /^vm\.vfs_cache_pressure=500$/d ; /^vm\.dirty_background_ratio=1$/d ; /^vm\.dirty_ratio=50$/d' /etc/sysctl.conf +sudo sed -i '/^vm\.swappiness=100$/d ; /^vm\.vfs_cache_pressure=500$/d ; /^vm\.dirty_background_ratio=1$/d ; /^vm\.dirty_ratio=50$/d' /etc/sysctl.conf 2>/dev/null echo status_green "ZRAM should now be set up. Consider rebooting your device."