Random disconnects from a USB Wifi dongle (ALFA AWUS036ACM) on RPi4

To improve the Wifi on my RPi4, I bought an ALFA AWUS036ACM USB Wifi dongle, based on very positive compatibility reviews…

After a few weird missing driver file issues (seemed like some of the standard driver files were missing from OSMC’s flavour of Debian), I was able to get the dongle recognised with kernel driver mt76x2u, as I believe it should be.

Everything works wonderfully, except that…

Every few days (or whenever there is a lot of traffic), the dongle disconnects, and my only option to get the wifi back, is to unplug/plug it back.

Google doesn’t come up with any indication that this is a common issue (seems to work perfectly fine, out-of-the-box for all RPi users out there), so I suspect there is something wrong with my driver/install/setup and/or OSMC, and I would really welcome any hint on how I can go about debugging/fixing this issue.

journalctl doesn’t show anything useful when the dongle disconnects (CTRL-EVENT-REGDOM-CHANGE init=BEACON_HINT type=UNKNOWN… but I am not sure whether this is the cause, or merely wpa_supplicant noticing that the dongle is no longer working).

Below, a few system outputs and logs:

root@framboise:~/openwrt# lsusb -vt
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 5000M
    ID 1d6b:0003 Linux Foundation 3.0 root hub
    |__ Port 2: Dev 2, If 0, Class=Hub, Driver=hub/4p, 5000M
        ID 05e3:0626 Genesys Logic, Inc. 
        |__ Port 1: Dev 5, If 0, Class=Vendor Specific Class, Driver=mt76x2u, 5000M
            ID 0e8d:7612 MediaTek Inc. MT7612U 802.11a/b/g/n/ac Wireless Adapter
[...]


root@framboise:~/openwrt# modinfo mt76x2u
filename:       /lib/modules/5.10.78-7-osmc/kernel/drivers/net/wireless/mediatek/mt76/mt76x2/mt76x2u.ko
license:        Dual BSD/GPL
author:         Lorenzo Bianconi <lorenzo.bianconi83@gmail.com>
firmware:       mt7662_rom_patch.bin
firmware:       mt7662.bin
srcversion:     034AC454D66FD385A67B135
alias:          usb:v045Ep02FEd*dc*dsc*dp*ic*isc*ip*în*
[...]
depends:        mt76x02-lib,mt76x2-common,mt76,mt76-usb,mac80211,mt76x02-usb
intree:         Y
name:           mt76x2u
vermagic:       5.10.78-7-osmc SMP preempt mod_unload modversions aarch64

When plugging the dongle:

Dec 18 11:43:49 framboise kernel: usb 2-2.1: new SuperSpeed Gen 1 USB device number 5 using xhci_hcd
Dec 18 11:43:49 framboise kernel: usb 2-2.1: New USB device found, idVendor=0e8d, idProduct=7612, bcdDevice= 1.00
Dec 18 11:43:49 framboise kernel: usb 2-2.1: New USB device strings: Mfr=2, Product=3, SerialNumber=4
Dec 18 11:43:49 framboise kernel: usb 2-2.1: Product: Wireless 
Dec 18 11:43:49 framboise kernel: usb 2-2.1: Manufacturer: MediaTek Inc.
Dec 18 11:43:49 framboise kernel: usb 2-2.1: SerialNumber: 000000000
Dec 18 11:43:49 framboise kernel: usb 2-2.1: reset SuperSpeed Gen 1 USB device number 5 using xhci_hcd
Dec 18 11:43:49 framboise kernel: mt76x2u 2-2.1:1.0: ASIC revision: 76120044
Dec 18 11:43:49 framboise kernel: mt76x2u 2-2.1:1.0: ROM patch build: 20141115060606a
Dec 18 11:43:49 framboise kernel: mt76x2u 2-2.1:1.0: Firmware Version: 0.0.00
Dec 18 11:43:49 framboise kernel: mt76x2u 2-2.1:1.0: Build: 1
Dec 18 11:43:49 framboise kernel: mt76x2u 2-2.1:1.0: Build Time: 201507311614____
Dec 18 11:43:50 framboise kernel: ieee80211 phy2: Selected rate control algorithm 'minstrel_ht'
 

Just before disconnecting:

Dec 18 10:26:54 framboise wpa_supplicant[282]: wlan1: CTRL-EVENT-REGDOM-CHANGE init=BEACON_HINT type=UNKNOWN
Dec 18 10:26:56 framboise wpa_supplicant[282]: wlan1: CTRL-EVENT-REGDOM-CHANGE init=BEACON_HINT type=UNKNOWN
[...]
Dec 18 10:27:08 framboise wpa_supplicant[282]: wlan1: CTRL-EVENT-BEACON-LOSS

No idea from partial logs.

It’s probably best contacting the manufacturer and making sure you are using a sufficient power supply.

Unfortunately manufacturer only offers limited support for Linux installs (and likely no support for exotic flavours like OSMC).

The dongle is plugged to a powered hub (and I tried multiple USB configuration to rule out this type of issue).

From conversations over at USB-Wifi Linux users’ GitHub repo, it sounds like the root of the problem is OSMC and older kernel… So I guess it’ll have to be a choice between functioning Wifi and OSMC :smiling_face_with_tear:

Standard advice seems to be upgrading firmware / kernel… But from what I can gather, the rpi-eeprom package has been disabled on OSMC…

Does that mean that the only option is to wait for new OSMC releases, or am I missing something?

eeprom is not related to kernel / bootloader.

We have a 5.15 kernel in the works, but that will come with Kodi v20.