3

Question

I am running Ubuntu 25.10 (Plucky Puffin) on a laptop using the MediaTek MT7902 Wi-Fi card. Out of the box, the wireless interface is not detected.

Hardware Details: lspci -nnk | grep -A 3 Network output:

02:00.0 Network controller [0280]: MEDIATEK Corp. Device [14c3:7902]
    Subsystem: AzureWave Device [1a3b:5520]
    Kernel modules: mt7902

Despite the module being listed, the device is shown as UNCLAIMED.

Symptoms and Attempted Fixes:

  1. Secure Boot Conflict: When I try to manually load the driver via sudo modprobe mt7902, I receive: modprobe: ERROR: could not insert 'mt7902': Key was rejected by service

  2. Kernel Instability: On some boots, the system hangs or triggers a kernel panic during the hardware probe phase.

  3. Firmware Logs: dmesg shows Loading of unsigned module is rejected and sometimes fails to locate specific .bin firmware files for the gen4 architecture.

How can I safely install a working driver for the MT7902 on Ubuntu 25.10 without causing boot loops or kernel panics?

1
  • 1
    Please clarify details in your post as release is unclear. You mention 25.10 (questing), specifically give the release codename of 25.04 (plucky) and actually take the question about oracular or 24.10 - what release is the question about? (details are well put out by release details don't match; like AI which often gets release/timing details incorrect - is this a real question, if so about what Ubuntu release?) Commented Feb 24 at 7:17

1 Answer 1

5

The MediaTek MT7902 (14c3:7902) is a "soft MAC" device that lacks stable support in the mainline 6.17 kernel.

Follow these steps to install the functional out-of-tree driver and fix the binding/suspend issues.

  1. Prerequisites & safety

    You must disable Secure Boot in your BIOS/UEFI. If you do not, the kernel will reject this unsigned module.

    Install the necessary build tools:

    sudo apt update
    sudo apt install build-essential dkms git linux-headers-$(uname -r)
    
  2. Prevent boot panics (blacklist)

    The stock mt7921e driver often conflicts with this hardware. Blacklist both the stock and the new driver temporarily to ensure a clean environment:

    echo "blacklist mt7902" | sudo tee /etc/modprobe.d/blacklist-mt7902.conf
    echo "blacklist mt7921e" | sudo tee -a /etc/modprobe.d/blacklist-mt7902.conf
    sudo update-initramfs -u
    sudo reboot
    
  3. Build and install via DKMS

    Using DKMS ensures the driver is rebuilt automatically when Ubuntu updates your kernel.

    git clone https://github.com/hmtheboy154/gen4-mt7902.git
    cd gen4-mt7902
    sudo cp -r . /usr/src/mt7902-1.0
    sudo dkms add -m mt7902 -v 1.0
    sudo dkms build -m mt7902 -v 1.0
    sudo dkms install -m mt7902 -v 1.0
    sudo make install_fw
    sudo depmod -a
    
  4. Force driver binding

    On some hardware (like the AW-XB552NF), the PCI device has a driver_override that blocks the driver from claiming it. You must manually clear the override and bind the device.

    Note: Replace 0000:02:00.0 with your actual PCI address from lspci.

    sudo modprobe cfg80211
    sudo modprobe mt7902
    echo "" | sudo tee /sys/bus/pci/devices/0000:02:00.0/driver_override
    echo "0000:02:00.0" | sudo tee /sys/bus/pci/drivers/wlan/bind
    

    Your WiFi should now appear in nmcli device.

  5. Fix suspend/resume panics

    The MT7902 driver can panic the kernel during sleep. To fix this, create a script to unload the driver before suspend:

    Create the file: sudo nano /lib/systemd/system-sleep/rmmod-mt7902

    Paste the following:

    #!/bin/sh
    case "$1" in
      pre)
        modprobe -r mt7902 2>/dev/null || true
        ;;
    esac
    

    Make it executable: sudo chmod +x /lib/systemd/system-sleep/rmmod-mt7902

    Note: You may need to re-run the Step 4 commands after waking from sleep to re-bind the device.

  6. Recovery path

    If the system hangs at boot, enter the GRUB menu (hold Shift), press 'e' to edit your boot entry, and append modprobe.blacklist=mt7902 to the linux line. This will allow you to boot and troubleshoot.

    Limitations:

    • 5 GHz: May be unstable on some access points. 2.4 GHz is generally preferred for this driver.

    • WPA3: Known to be broken with iwd; stick to wpa_supplicant (default in Ubuntu).

1
  • Please return to this webpage in another 24 hours and click the gray checkmark beside your answer to mark it as accepted. Commented Feb 24 at 5:08

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.