How to enable swapping on S805 m201d?

  • I would like to enable swapping for the LibreELEC because AmLogic S805 TV Box has only 512 Mb RAM and freezes on the YouTube browsing.

    What I do:

    1) Set the build options to:

    1. SWAP_SUPPORT="yes"
    3. SWAPFILESIZE="256"

    and the Linux kernel options to:

    1. CONFIG_SWAP=y
    2. FRONTSWAP=y
    4. MTD_SWAP=n
    5. ZCACHE=y

    2) Compile and create the developer release image, install the image to the SD Card and boot it.

    3) Customise the swap configuration file:

    1. #cp /etc/swap.conf /storage/.config/
    2. #sed -i 's/SWAP_ENABLED="no"/SWAP_ENABLED="yes"/' /storage/.config/swap.conf

    and create the file /storage/.config/ with contents:

    1. #!/bin/sh
    2. sysctl -qw vm.swappiness=40

    But after all the swapping does not work:

    What is my mistake?

  • Hmm. Just tried on my S905x (LibreELEC (wrxtasy-kszaq): (S912.arm)
    ) and it doesn't work.

    My guess is that swapping was NOT enabled in the kernel - for these devices it was not necessary (oodles of RAM).

    If you *really* need swap then you are doing something beyond the concept of LE or just doing too much for your box.

  • edjalmo : Thank you. I've did the same things on the S805 Box, but unsuccessfully.

    Iridium: You're right, swapping was not enabled in the kernel. Therefore I've rebuilt the kernel with the swapping support. And Linux creates the swap-file during booting process. But it doesn't use it in its work...