Apps (particularly Android apps) have been crashing due to low memory, typically with only 6 apps open (2-3 native + 2-3 Android). Normally an Android app goes unresponsive and eventually dies. Usually closing a few apps will enable it to restart sucessfully.
Two options:
- Change the zram settings to increase proportion of zram usage
- Add a swap file/partition
I’ve been investigating changing the zram settings, I can’t find any info on this since Sailfish 2.x, I’m running Sailfish 4.x and everything is different so I dont know where this is configured anymore.
As a quick and dirty I tried adding a swapfile using swapon and everything is running much more smoothly:
dd if=/dev/zero of=/swapfile bs=1M count=1024
chmod 600 /swapfile
mkswap /swapfile
swapon /swapfile
However, I tried adding this to fstab:
/swapfile none swap defaults 0 0
But it completely barfed on reboot and I had to go into recovery mode and revert fstab
Before:
free -m
total used free shared buff/cache available
Mem: 3556 2948 39 51 567 549
Swap: 1023 848 175
After:
free -m
total used free shared buff/cache available
Mem: 3556 2827 44 35 683 745
Swap: 2047 806 1313