WIFI/BT failing on RG Cube XX - possible fix

I have an RG Cube XX that I ordered somewhat recently (past few months) which worked fine with Funky Jacaranda but on Andromeda the Wifi and Bluetooth both fail.

Tried a fresh install to a different sdcard and the problem persisted.

Exported diagnostic logs from both Funky Jacaranda and Andromeda and uploaded them to codex and it generated several bash scripts that collected logs then eventually fixed the issue. It appears to be a timing/race condition with trying to initialize both Bluetooth and WiFi at the same time during boot.

I feel kind of icky using an LLM to generate the error report and temporary fix but it did fix it and I’m not an expert on Linux drivers - and I’m guessing it might be a hardware revision/timing issue that other people just aren’t encountering on their devices.

The diagnostic .log files as well as a startup script to be placed in MUOS/init/99-wireless-retry.sh are at the link below. I ensured configuration → advanced → user init scripts was enabled and rebooted and it seems to have fixed the issue for me.


Title: RGCUBE-H RTL8821CS Wi-Fi and Bluetooth fail during Andromeda boot but recover after delayed module reload

Device: Anbernic RGCUBE-H
muOS version: 2606.0 Andromeda, build db2a3bd0
Kernel: 4.9.170 #29
Wireless chipset/driver: RTL8821CS SDIO, driver v5.5.1_32758.20190403_COEX20180712-3232

Summary

Wi-Fi and Bluetooth fail to initialize automatically on Andromeda. The same device works correctly with 2601.0 Jacaranda.

The problem is reproducible on two different microSD cards, including a new name-brand card. However, both radios work correctly if the RTL8821CS module is cleanly unloaded, allowed to power down, and loaded again after boot.

This appears to be a startup timing, ordering, or concurrency regression rather than a hardware, firmware, SD-card, or driver-compatibility problem.

Steps to reproduce

  1. Perform a clean installation of Andromeda on an RGCUBE-H.

  2. Complete the initial setup and boot normally.

  3. Open the network and Bluetooth settings.

Actual result

  • No wlan0 interface is created.

  • The internal RTL8821CS does not enumerate as mmc2:0001.

  • No Bluetooth hci0 adapter is created.

  • Wi-Fi and Bluetooth are both reported as unavailable.

During the failed boot, 8821cs starts at approximately 3.8–4.0 seconds. The SDIO controller reports CMD52 and repeated CMD5 timeouts, then powers the card off.

The module remains listed as loaded even though no SDIO device or network interface exists:

8821cs ... Live ... (F)

The (F) marker corresponds to the modprobe -f path used by the network startup script.

Expected result

The RTL8821CS should enumerate automatically during startup, create wlan0, and allow the Bluetooth service to create hci0.

Successful recovery test

The following recovery sequence works reliably after the failed boot:

  1. Stop Bluetooth initialization.

  2. Unload 8821cs.

  3. Wait five seconds.

  4. Load 8821cs normally, without -f.

  5. Start the normal Bluetooth service.

After the delayed, non-forced reload:

mmc2: new ultra high speed DDR50 SDIO card at address 0001

Both Wi-Fi interfaces are created:

wlan0
wlan1

Starting the installed Bluetooth service afterward also succeeds:

/opt/muos/script/init/S75bluetooth.sh start

The resulting adapter is healthy:

hci0: Type: Primary  Bus: UART
UP RUNNING
Manufacturer: Realtek Semiconductor Corporation

rtk_hciattach and bluetoothd both remain running, and Wi-Fi and Bluetooth function normally.

A user-init workaround that performs this delayed, serialized recovery also works across reboot.

Additional findings

  • The driver’s vermagic matches the running kernel:
4.9.170 SMP preempt mod_unload modversions aarch64
  • The module contains a __versions section.

  • A normal, non-forced modprobe 8821cs succeeds after the delay.

  • The same kernel, driver, firmware, device tree, and physical hardware work once initialization is retried.

  • Bluetooth firmware files are present.

  • Replacing the removable microSD card does not change the behavior.

  • Jacaranda initializes Wi-Fi successfully on the same device.

Suspected cause

Andromeda moved network module loading earlier and made network startup asynchronous. The Bluetooth startup service can also call the network loader.

It appears possible for the initial RTL8821CS SDIO probe to fail while the hardware is still settling or while network and Bluetooth initialization overlap. The module is then left loaded but unbound. Subsequent calls see the loaded module and incorrectly treat initialization as successful, even though neither mmc2:0001 nor wlan0 exists.

The forced module load may not be the direct cause, but it appears unnecessary because the module matches the running kernel.

Suggested fix

  • Serialize RTL8821CS module and power operations between network and Bluetooth startup.

  • Avoid modprobe -f when the module matches the kernel.

  • Do not treat “module loaded” as proof that the device initialized.

  • Require mmc2:0001 and/or wlan0 to appear before returning success.

  • If enumeration times out, unload the module, wait for the power rail and SDIO controller to settle, and retry.

  • Start rtl_btlpm and rtk_hciattach only after the shared wireless device has initialized successfully.

Diagnostic files available

  • dmesg__2026_10_29__18_10_16.log

  • network_report_2026-10-29_18-11-12.txt

  • bluetooth_report_2026-10-29_18-11-15.txt

  • boot_services_report_2026-10-29_18-11-08.txt

  • sysdiag.txt

  • wireless_deep_report_2026-10-29_18-18-47.txt

  • wireless_delayed_retry_report_2026-10-29_18-18-53.txt

  • wireless-startup-workaround.log

This has been extensively researched, please see the following:

Unfortunately it does boil down to weird mSD combinations and silicon lottery. We have done additional testing for 2612 Supernova and have yet to see a single report mentioning network connection failures (same for 2606 Andromeda) so hopefully this will fix any issues you may be having.