Beryl 7 adguard failure

Hi Eli,

Thank you for sharing the saved logs. They are helpful, and we’re sorry for the repeated interruptions.

  1. The logs confirm that the router ran out of memory and terminated AdGuard Home.

    In our internal tests with the same two default lists, AdGuard Home normally used around 77 MiB. Reloading the lists, which also happens during list updates, temporarily increased this to 127–134 MiB. These results suggest that AdGuard Home’s temporary memory usage during list updates could still be triggering OOM, even with only the default lists enabled.

  2. ZRAM is enabled by default in v4.11, and v4.11 beta2 is now available. You can upgrade to use it without configuring ZRAM manually.

    If you mean this ZRAM guide, then yes: it stores swapped pages in compressed RAM and does not write swap data to the router’s internal flash.

  3. To use an SD card or USB drive for swap, follow the guide below. It creates a 256 MiB swap file on external storage and enables it automatically at startup. We verified this OpenWrt setup, including activation after reboot, on v4.11 beta2 with ext4 storage.

  4. The same Wi-Fi driver handles Wi-Fi 7 and older clients. At present, we cannot selectively unload its Wi-Fi 7 functionality when only older clients are connected. Thank you also for your feedback about adding more RAM to future hardware.

SD/USB swap setup

Use an ext4 drive mounted at /tmp/mountd/disk1_part1, with at least 300 MiB free. An SD card can be connected through a USB reader. The commands create a file without formatting the drive.

Important: Keep the drive connected while its swap file is active.

  1. Paste the following block into SSH to create the swap file and configure startup. It stops if the expected mount is absent or an existing swap setup would be overwritten.

    (
    set -e
    SWAP_DIR=/tmp/mountd/disk1_part1
    grep -qs " $SWAP_DIR ext4 " /proc/mounts || {
        echo "External ext4 storage is not mounted here; stop."
        exit 1
    }
    if [ -e "$SWAP_DIR/swapfile" ] || [ -L "$SWAP_DIR/swapfile" ]; then
        echo "swapfile already exists; stop."
        exit 1
    fi
    if uci -q get fstab.sd_swap >/dev/null ||
       [ -e /etc/init.d/zz-sd-swap ] || [ -L /etc/init.d/zz-sd-swap ]; then
        echo "Swap configuration already exists; stop."
        exit 1
    fi
    [ "$(df -k "$SWAP_DIR" | awk 'END {print $4}')" -ge 307200 ] || {
        echo "At least 300 MiB free is required; stop."
        exit 1
    }
    if ! dd if=/dev/zero of="$SWAP_DIR/swapfile" bs=1M count=256; then
        rm "$SWAP_DIR/swapfile"
        exit 1
    fi
    chmod 600 "$SWAP_DIR/swapfile"
    mkswap "$SWAP_DIR/swapfile"
    swapon -p 10 "$SWAP_DIR/swapfile"
    
    uci set fstab.sd_swap=swap
    uci set fstab.sd_swap.device="$SWAP_DIR/swapfile"
    uci set fstab.sd_swap.enabled='1'
    uci set fstab.sd_swap.priority='10'
    uci commit fstab
    
    INIT_TMP=$(mktemp /tmp/sd-swap.XXXXXX)
    cat > "$INIT_TMP" <<'EOF'
    #!/bin/sh /etc/rc.common
    START=99
    USE_PROCD=1
    start_service() {
        procd_open_instance
        procd_set_param command /bin/sh -c '
        for n in $(seq 1 60); do
            if grep -qs " /tmp/mountd/disk1_part1 ext4 " /proc/mounts; then
                exec /etc/init.d/fstab boot
            fi
            sleep 2
        done
        '
        procd_close_instance
    }
    EOF
    sh -n "$INIT_TMP"
    cp "$INIT_TMP" /etc/init.d/zz-sd-swap
    chmod 755 /etc/init.d/zz-sd-swap
    sh -n /etc/init.d/zz-sd-swap
    /etc/init.d/zz-sd-swap enable
    rm "$INIT_TMP"
    cat /proc/swaps
    )
    

    The startup helper waits for the drive to mount before enabling the fstab swap entry. ZRAM’s priority is 100, so it is preferred over the external file’s priority of 10.

  2. Reboot with the drive connected, wait about two minutes, then check:

    cat /proc/swaps
    

    You should see both /dev/zram0 and /tmp/mountd/disk1_part1/swapfile.

  3. To remove this setup, run the following commands. File removal proceeds only if swapoff succeeds.

    /etc/init.d/zz-sd-swap disable
    /etc/init.d/zz-sd-swap stop
    swapoff /tmp/mountd/disk1_part1/swapfile && {
        rm /etc/init.d/zz-sd-swap
        uci delete fstab.sd_swap
        uci commit fstab
        rm /tmp/mountd/disk1_part1/swapfile
    }