Easily Enable MediaTek M7902 WiFi and Bluetooth Drivers on Ubuntu 24.04

Easily Enable MediaTek M7902 WiFi and Bluetooth Drivers on Ubuntu 24.04

2 Min Read

Last month, we mentioned that the Mediatek MT7902 WiFi 6E and Bluetooth 5.x chipset has received drivers in the mainline Linux and is expected to be part of the Linux 7.0 release.

MT7902 wireless modules are common in many Windows laptops, but users have been requesting Linux drivers for almost two years. One option is to wait for the drivers to be included in your distribution. However, a user named “hmtheyboy154” decided not to wait and backported the drivers to Linux 6.6 through 6.19. I own an ASUS Vivobook 16 and tested it on Ubuntu 24.04, though it should work on other Linux distributions as well.

Note that this approach only works with the PCIe driver, so if you have an SDIO module, you’ll need to find another solution. My Ubuntu 24.04 laptop uses an MT7902 PCIe module (AW-XB552NF):

I could install the driver in four steps:

git clone https://github.com/hmtheboy154/mt7902 cd mt7902/ make -j8 sudo make install

You can optionally install the firmware, although it might already be part of your distribution:

sudo make install_fw

Afterward, you could reboot your laptop, but I used modprobe instead:

sudo modprobe mt7902e

I could then enable WiFi on Ubuntu 24.04 and connect to my access point.

The kernel log should look like this:

[1014428.026033] wlo1: deauthenticating from 3c:cd:57:f5:af:91 by local choice (Reason: 3=DEAUTH_LEAVING) [1014439.871042] mt7902e 0000:02:00.0: ASIC revision: 79020000 [1014439.966746] mt7902e 0000:02:00.0: HW/SW Version: 0x8a108a10, Build Time: 20251212032046a [1014439.988460] mt7902e 0000:02:00.0: WM Firmware Version: ____000000, Build Time: 20251212032127 [1014440.940270] mt7902e 0000:02:00.0 wlo1: renamed from wlan0 [1014443.452779] wlo1: authenticate with 3c:cd:57:f5:af:91 (local address=10:68:38:3a:0d:da) [1014443.452797] wlo1: send auth to 3c:cd:57:f5:af:91 (try 1/3) [1014443.467182] wlo1: authenticated [1014443.468008] wlo1: associate with 3c:cd:57:f5:af:91 (try 1/3) [1014443.507278] wlo1: RX AssocResp from 3c:cd:57:f5:af:91 (capab=0x511 status=0 aid=3) [1014443.543479] wlo1: associated [1014443.545773] wlo1: Limiting TX power to 27 (30 - 3) dBm as advertised by 3c:cd:57:f5:af:91

I performed a quick iperf3 test with 5 GHz WiFi, about 2 meters from a Xiaomi Mi Router AX6000.

  • Download
    jaufranc@CNX-LAPTOP-5:~$ iperf3 -t 60 -c 192.168.31.12 -i 10 -R Connecting to host 192.168.31.12, port 5201 Reverse mode, remote host 192.168.31.12 is sending [ 5] local 192.168.31.152 port 41870 connected to 192.168.31.12 port 5201 [ ID] Interval Transfer Bitrate [ 5] 0.00-10.01 sec 528 MBytes 443 Mbits/sec [ 5] 10.01-20.01 sec 530 MBytes 444 Mbits/sec [ 5] 20.01

You might also like