The most reliable method is to use a dedicated Magisk module that runs a script at startup to turn off swap and zRAM. :

This is common. Some kernels have a init script that re-initializes ZRAM after Magisk service scripts run. To fix this, use late_start service mode (as shown above) or increase the sleep timer to sleep 10 .

on Android via is a common project for "power users" who believe that the CPU overhead required to compress and decompress RAM data isn't worth the extra virtual memory, especially on modern devices with 8GB or 12GB of physical RAM.