Giter Club home page Giter Club logo

lin_os_swap_mod's People

Contributors

animesh-does-code avatar janithcooray avatar palpitace avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

lin_os_swap_mod's Issues

Any update for module?

Hi, actually I liked your module and wanted to know if there will be update for it? thx

how to reduce the swap size to 2 gb?

module working fine on my redmi 10c with cherish os, i use the swapped ram to boot some games on skyline emulator (the app crash without it). the rom already come with 2gb on the swap partition, and the total of 6gb is too much for me.
2 additional gb is probably enough, i prefer to have a bit more of storage tbh.

Why choose swap and not zram?

This is not an issue, i have only some questions.
Why you prefer to use swap and not zram? Why we should use swap and not zram? Is better zram or swap? For battery is better zram or swap?
There is not a clear answer in the net.

Thanks

Not using swap

Samsung A51 device with rom lineage os uses a very small amount of swap, in the amount of several megabytes, while there is 10 gigs (2 gigs system + 8 gigs swap magisk) of memory!

Swap file priority is 0 after selecting Yes on 'Set swap priority over ZRAM?'

I have installed the module of 4GB swap file and have selected yes(volume up) when I was asked for setting swpa priority over ZRAM.
But when I run the command "cat /proc/swaps" in terminal after installing module, there it is shown that it's priority is zero and is 0 is being used from it rather only ZRAM is being used, I am attaching the screenshot of terminal.
But in the module, in customize.sh file it is written that when selecting Yes in choosing priority, it must be set to priority 1 rather than 0 which is showing in my case. This is my understanding and pardon me if I don't know if it is like that.
And one more question it says 'Setting swappiness to 99' but in next line it says vm.swappiness=75. Does this mean that swappiness is actually setting to 75 or it just shows 75 when swappiness is 99?
Screenshot_20240125-201514_Termux
Screenshot_20240125-201743_MiXplorer

Clarify language in readme and script

The readme and script both have language that seems to indicate that the script will increase (add to) the current swapfile size by the selected size.

In the readme, it says "...enables or increases the SWAP memory..."

This Magisk module enables or increases the SWAP memory by an additional 4GB or 8GB for Android 7.0 or above. It should also work with AOSP based ROMs, but it has only been tested on Lineage OS, ASOP and EVOX.

and in the script it says Vol Up += 8GB and Vol Down += 4GB, as if it's adding to and setting the swapfile size with common C programming operators.
ui_print " Vol Up += 8GB"
ui_print " Vol Down += 4GB"

However, this is not true. Reading into the source, volume up and down changes SWAP_BIN_SIZE to specific values, which are not changed, and are instead directly used to set the size of the new swapfile.

if $VKSEL; then
ui_print " Using 8GB"
SWAP_BIN_SIZE=8192
else
ui_print " Using 4GB"
SWAP_BIN_SIZE=4096
fi

ui_print "- Crating a swapfile of $SWAP_BIN_SIZE MB"
ui_print " This can take a minute or two"
cd /data/swap && dd if=/dev/zero of=swapfile bs=1048576 count=$SWAP_BIN_SIZE
ui_print "- Empty File for Swap of size $SWAP_BIN_SIZE MB Created!!"
cd /data/swap && mkswap swapfile
ui_print "- Making Swapfile!!!"

It's possible this language is used in other places too (like descriptions in module repos). In all cases it should be rephrased to more clearly state that the module creates a swapfile with a size of either 4GB or 8GB.


If I'm wrong and the module is actually supposed to add more swap, then language should still be clarified in the module.prop, which conflicts with the aforementioned descriptions, implying that it allows you to change the swap size (as in replace the current value), which is a narrower meaning than is currently presented.

description=Enable / Change Swap config for Android 7+

Please fix typos in customize.sh

  • In the line ui_print "- Crating a swpafile of $SWAP_BIN_SIZE MB", "Crating" should be corrected to "Creating", and "swpafile" to "swapfile".

  • In the line ui_print "- Please keep the screen on during installtion", "installtion" should be corrected to "installation".

Multiple questions about the usage

Hey, I have some questions regarding how to use it. Question 1: Would this also work on Pixel Experience?

Question 2: What do I need to flash, the lin_os_swapmod or the swapfile_mod?

Question 3: If I disable and remove the module would everything return to the way it was configured before or would it permanently change things on my Phone? I want to see if it works on my Phone, but I don't want to risk breaking my current ROM Installation, as I could disable the Magisk Module incase it boot loops, but I want to be sure that this would actually work.

Swap priority

Is there a way to manually set the value of priority of the the swap, because whatever value I choose the swap always get more priority than the zram

"Set Swap Priority above Zram?"
I chose "yes" and the priority of zram will be at -3 and swap at -2
Screenshot_20240418-131412

I chose "no" and it zram say -2 with swap on 0
Screenshot_20240418-192425

No matter what I choose, the swap is still prioritized over zram

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.