Enabling MediaTek M7902 WiFi and Bluetooth drivers on Ubuntu 24.04 the easy way

Last month, we noted that Mediatek MT7902 WiFi 6E and Bluetooth 5.x chipset finally got drivers in mainline Linux, and should be part of the Linux 7.0 release.

MT7902 wireless modules are used in many Windows laptops, but users have been asking for the Linux drivers for almost two years now. One method is to wait for the drivers to find their way into your distribution, but “hmtheyboy154” didn’t feel like waiting and backported the drivers to Linux 6.6 to 6.19. Since I own one of those laptops, namely the ASUS Vivobook 16, I gave it a try on Ubuntu 24.04, but it should work on other Linux distributions as well.

Mediatek MT7902 Linux

Note that this method only works with the PCIe driver, so if you own an SDIO module, you’d need to work out another solution. My Ubuntu 24.04 laptop is indeed using an MT7902 PCIe module (AW-XB552NF):


I could install the driver in four steps:


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


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


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

MediaTek MT7902 Ubuntu 24.04 WiFi

The kernel log should look something like that:


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

  • Download
  • Upload

About 400-450 Mbps in either direction, which should be fine with a link speed of 600 Mbps, plus my ISP only supports 300 Mbps uploads/downloads.

MT7902 Linux Link Speed

I also tried Bluetooth, but it didn’t work for me at first, as I couldn’t enable it in the settings. I eventually noticed it just requires a different branch on the same GitHub repo:


I could then enable Bluetooth, pair my smartphone to the laptop, and transfer a file from my Android phone to the laptop.

MT7902 Linux Bluetooth

Note that the btusb and btmtk modules conflict with btusb_mt7902, so I had to remove them, or I would get the error:


To do that permanently, create the file /etc/modprobe.d/blacklist_btusb.conf with:


It took a long while to get WiFi and Bluetooth support on Linux for MT7902 modules, but it’s now easy enough to install on Ubuntu 24.04 without waiting for the official release.

Share this:
FacebookTwitterHacker NewsSlashdotRedditLinkedInPinterestFlipboardMeWeLineEmailShare

Support CNX Software! Donate via cryptocurrencies, become a Patron on Patreon, or purchase goods on Amazon or Aliexpress. We also use affiliate links in articles to earn commissions if you make a purchase after clicking on those links.

Radxa Orion O6 Armv9 mini-ITX motherboard

14 Replies to “Enabling MediaTek M7902 WiFi and Bluetooth drivers on Ubuntu 24.04 the easy way”

  1. Fails at my setup with error message:

    “~/mt7902$ sudo modprobe mt7902e
    modprobe: ERROR: could not insert ‘mt7902e’: Key was rejected by service”

    1. You may want to disable Secure Boot in the BIOS. That’s the easiest way.
      If you need to keep Secure Boot, you’d need to self-sign the module. Something like that (i haven’t tried):

  2. at first it worked but suddenlt the connection drop and now it isn’t connecting with any wifi network. Always showing authentication failure. Bluetooth is working properly. Faced no error during installation both wifi and bluetooth

    1. I had an issue after running apt dist-upgrade, which updated the kernel.
      A quick solution is to rebuild the driver for the new kernel.
      A better solution is to enable DKMS from the source directory:

      Content of dkms:

        1. I’ve just noticed Bluetooth indeed stopped working on my system since I didn’t do the DKMS part.

          I haven’t tried it yet, but you can follow a similar method by replacing mt7902 with btusb_mt7902.

          1. Yeah ive updated to the kernel 7.0 and wifi worked fine with the dkms but i had to recompile the bluetooth manually

  3. i cant get past ERROR: could not insert ‘btusb_mt7902’: Exec format error. could you maybe explain it to me more in depth

    1. You need to do something like that:

      Or just add them to the blacklist as explained in the article and reboot.

  4. It worked perfectly thank you a looooot!!!! For anyone being on a custom kernel like the cachyos one, you will have to add ‘CC=clang LLVM=1’ at the end of each ‘make’ command so it compiles properly for the kernel ^^

Leave a Reply

Your email address will not be published. Required fields are marked *

Boardcon MINI1126B-P AI vision system-on-module wit Rockchip RV1126B-P SoC
Boardcon MINI1126B-P AI vision system-on-module wit Rockchip RV1126B-P SoC