janithcooray / lin_os_swap_mod

increases the SWAP memory by an additional 4GB or 8GB for Android 7.0 or above
GNU General Public License v3.0
78 stars 6 forks source link

Rebooting on LinOS 21 #27

Closed mfascioglu closed 3 weeks ago

mfascioglu commented 2 months ago

Swap creation complated and rebooted then swap is activated on boot. Device is opening successful but when writing some amount data on swap device is rebooting. I checked with Ram Truth app. Do you have any idea for this problem?

Device: Xperia XZ1 Rom: https://xdaforums.com/t/14-rom-lineageos-21-0-unofficial-1-0-2024-02-25.4659246/

janithcooray commented 1 month ago

Hi, Could you elaborate on what you meant by "writing some amount data". were you trying to open some apps assumeing it would get added to swap?

mfascioglu commented 1 month ago

Thanks for the reply.

Yes, Swap creation and swap activation is successfully. when device uses created swap file, device is rebooting. (When 1-2 MB of a 4 GB swap file is used.)

yeezylife commented 1 month ago

same here, keeps Rebooting on lineageOS-21.0 now I don't know how to fix it, can't open magisk and uninstall, it just reboot before I could do anything...help

yeezylife commented 1 month ago

OK this time it gives me enough time to uninstall before it reboot again...at least I can still use my phone...

yeezylife commented 1 month ago

v2.0-a6 BETA - 4096_60_99999.zip

doesn't reboot anymore, in fact I think it works fine

janithcooray commented 1 month ago

@yeezylife check if it's actually working or if its on fail safe mode

yeezylife commented 1 month ago

@yeezylife check if it's actually working or if its on fail safe mode

When I use this old phone to play hearthstone, it alway freeze. now it never freeze anymore...so I guess its working?..but maybe just the reboot after installation releases more RAM

and by the way in v2.0-b2 Beta(4096_60_99999.zip) SWAP_FILE_PRIOR is the same as the SWAPPINESS. shouldn't it be 99999?

Screenshot_20241025-092240_Trebuchet

yeezylife commented 1 month ago

how to 'check if it's actually working or if its on fail safe mode'? I can't find anything like android/data/swap/swapfile.log the module is showed enabled in magisk after reboot

yeezylife commented 1 month ago

clipboard

22

swaptotal: 0kb so it's not working at all?..

janithcooray commented 1 month ago

@yeezylife

go to adb shell as root and go

cat /data/swap/swapfile.log

this should show what happened. if its failing , then there's an incompatibility with the version of the swapon bin or it's non-existent at all. will you be able to contact me via email or telegram? it'll be handy if can send you custom configured zips to figure this out.

yeezylife commented 1 month ago

go to adb shell as root and go

cat /data/swap/swapfile.log

22

this should show what happened. if its failing , then there's an incompatibility with the version of the swapon bin or it's non-existent at all. will you be able to contact me via email or telegram? it'll be handy if can send you custom configured zips to figure this out.

I think you can just post a zip file in the comment...

yeezylife commented 1 month ago

333

OK I figured this out it returns "Fri Oct 25 11:40:38 CST 2024"

still don't know if it's failing or not, it's just a date

janithcooray commented 1 month ago

It's failing as it doesnt show the part where swap starts. i'll try adding more log data to the file so we can find out whats wrong. i'll link a debug release

janithcooray commented 1 month ago

@yeezylife check https://github.com/janithcooray/lin_os_swap_mod/releases/tag/v2.0-c-debug-1 be careful, this is a debug version. uninstall once you get the /data/swap/swapfile.log

yeezylife commented 1 month ago

OK I‘ll have a try..I just hope I'll still be able to use my phone after this..

yeezylife commented 1 month ago

PS E:\Program Files\adb> .\adb shell "su -c 'cat /data/swap/swapfile.log'" ----------BOOT--------- Sat Oct 26 13:05:01 CST 2024 : Checking if /system/bin/swapon Exists -

janithcooray commented 1 month ago

@yeezylife right, swapon file may be somewhere else, could you send me the link from where you downloaded this ROM

yeezylife commented 1 month ago

@yeezylife right, swapon file may be somewhere else, could you send me the link from where you downloaded this ROM

https://download.lineageos.org/devices/sagit/builds

lineageOS official site...

janithcooray commented 1 month ago

@yeezylife https://github.com/janithcooray/lin_os_swap_mod/releases/tag/v2.0-c-debug-2 see what happens with this one, it might actually start swap

yeezylife commented 1 month ago

PS E:\Program Files\adb> .\adb shell "su -c 'cat /data/swap/swapfile.log'" ----------BOOT--------- Sun Oct 27 15:39:49 CST 2024 : Checking if /system/bin/swapon Exists - Sun Oct 27 15:39:49 CST 2024 : File exists. - Sun Oct 27 15:39:49 CST 2024 : swapon exists. - Sun Oct 27 15:39:49 CST 2024 : sysctl exists. - Sun Oct 27 15:39:49 CST 2024 : whereis does not exist. -

janithcooray commented 4 weeks ago

@yeezylife thanks for the help, i will need some more assistnace to figure this out.

The swap bin is in the default path. not sure why it's not working at this point. Could you try this release. https://github.com/janithcooray/lin_os_swap_mod/releases/tag/v2.0-c-debug-3

Also could you see the output of the following on adb

swapon -v

or

swapon --version

and

ls -lah /data/swap/swapfile
yeezylife commented 4 weeks ago

PS E:\Program Files\adb> .\adb shell "su -c 'cat /data/swap/swapfile.log'" ----------BOOT--------- Sun Oct 27 18:15:24 CST 2024 : Checking if /system/bin/swapon Exists Sun Oct 27 18:15:24 CST 2024 : File exists. Sun Oct 27 18:15:24 CST 2024 : swapon exists. Sun Oct 27 18:15:24 CST 2024 : sysctl exists. Sun Oct 27 18:15:24 CST 2024 : whereis does not exist. Sun Oct 27 18:15:24 CST 2024 : Preparing to start.. Sun Oct 27 18:15:24 CST 2024 : setting swappiness.. Sun Oct 27 18:15:24 CST 2024 : [OK] setting swappiness.. Sun Oct 27 18:15:24 CST 2024 : Starting swap with auto priority Sun Oct 27 18:15:24 CST 2024 : No Errors Reported Sun Oct 27 18:15:24 CST 2024 : Free Mem - total

PS E:\Program Files\adb> .\adb shell free -m total used free shared buffers Mem: 3726 3595 130 17 48 -/+ buffers/cache: 3547 178 Swap: 3071 0 3071

it seems to work now

as for the following three oder on adb...

PS E:\Program Files\adb> .\adb shell swapon --version toybox 0.8.10-android

PS E:\Program Files\adb> .\adb shell "su -c 'ls -lah /data/swap/swapfile'" -rw-r--r-- 1 root root 3.0G 2024-10-27 18:06 /data/swap/swapfile (I set it in 3072mb in vars.sh)

yeezylife commented 4 weeks ago

now it starts to reboot.. as soon as it starts to use the swapfile

yeezylife commented 4 weeks ago

I guess I'll just give up ...hearthstone works now anyway..

janithcooray commented 4 weeks ago

@yeezylife thanks for your help. i will look for another way to debug this in the meantime. Sorry that this didnt work out for you

janithcooray commented 3 weeks ago

Marking as closed since fail safe will prevent reboot. It will instead disable the module function. If you encounter this issue please post on #33