Setup the MediaTek mt7921k Wi-Fi 6 Wireless Adapter on Debian

This guide is based on Debian Bullseye and the test is done on the ZimaBoard N3450 (x86) via the PCIe x4 to m.2/ngff adapter. However, it should work for other Debian releases. You are welcome to try and share the feedback.

1. Update the Sources List

You are going to install some packages that are belong to the non-free & testing repository. Before proceed with the installation, it is advised to check and update the /etc/apt/sources.list file:

sudo nano /etc/apt/sources.list

Make sure the non-free & testing repository is added to the file. If you are not sure how to modify it, you can use my example below:

deb bullseye main contrib non-free
deb-src bullseye main contrib non-free

deb bullseye-security main contrib non-free
deb-src bullseye-security main contrib non-free

deb bullseye-updates main contrib non-free
deb-src bullseye-updates main contrib non-free

# Testing
deb testing main contrib non-free
deb-src testing main contrib non-free

2. Driver for MT7921k

The dirver & firmware for the Mediatek MT7921 series (MT7921 & MT7921K) are available in the firmware-misc-nonfree package. You just need to install it with apt

sudo apt install firmware-misc-nonfree

After the package is installed, you should see the driver for the mt7921k available in /lib/firmware/mediatek directory. Use this command to check

ls /lib/firmware/mediatek

If you can’t find these 3 files, there is something wrong with the installation, please try again. Else, it is good to proceed.


3. Kernel

Debian Bullseye stable is having linux kernel 5.10.140-1. However, this kernel version is not compatible with the mt7921k driver. In order for it to work, you will need the linux-kernel 5.19.0-2-amd64. It is available in the testing repo which we already added in the beginning.

You can install it with the below commands:

apt-cache search linux-image

A list of available linux kernel will show up. Continue to install the 5.19.0-2-amd64 kernel by:

sudo apt install linux-image-5.19.0-2-amd64

After that, reboot the PC

4. Checking

Run the lspci -v command and you should see the adapter up and running with kernel modules mt7921e

01:00.0 Network controller: MEDIATEK Corp. Device 0608
        Subsystem: MEDIATEK Corp. Device 0608
        Flags: bus master, fast devsel, latency 0, IRQ 128
        Memory at 91400000 (64-bit, prefetchable) [size=1M]
        Memory at 91500000 (64-bit, prefetchable) [size=16K]
        Memory at 91504000 (64-bit, prefetchable) [size=4K]
        Capabilities: <access denied>
        Kernel driver in use: mt7921e
        Kernel modules: mt7921e

This means everything is working as expected. Now, you can establish the wireless connection with the network manager package that you are using. For this part, I won’t go too deep into it.

Let’s have a final check before finish the post:

nmcli device wifi list

Here, I use the nmcli command to scan the available WiFi networks nearby. The mt7921k adapter is working great!

Good luck!

Notify of
Newest Most Voted
Inline Feedbacks
View all comments
1 year ago

thx for the guide 🙂

8 months ago

Thanks! Finally got it working. Some people are just better at writing concise and functional instructions. You’re definitely one of’em. :-)))