Mediatek 7921 linux driver debian

How to install driver for Wi-Fi Mediatek MT7921 and Mediatek MT7961 in Linux

This post will show you how to fix the problem with Mediatek MT7921 and Mediatek MT7961 Wi-Fi adapters not working, which you can find in the latest laptop models, such as ASUS ROG G15 and Asus TUF Gaming A15 FX506L-HN004.

We need the mt76 driver, which provides the following chipsets (source):

  • MT7610U 802.11a/b/g/n/ac 1T1R 2.4/5GHz USB Chip
  • MT7612/MT7662 802.11a/b/g/n/ac 2T2R 2.4/5GHz PCIe/USB Chip
  • MT7630E 802.11a/b/g/n 1T1R 2.4/5GHz PCIe Chip
  • MT7610E 802.11a/b/g/n/ac 1T1R 2.4/5GHz PCIe Chip
  • MT7603E 802.11b/g/n 2T2R 2.4GHz PCIe chip and MT7628 802.11b/g/n 2T2R 2.4GHz SoC Device (4.7+)
  • MT7615 802.11a/b/g/n/ac 4T4R 2.4/5GHz PCIe Chip (5.2+)
  • MT7622 802.11b/g/n 4T4R 2.4GHz SoC Device (5.7+)
  • MT7663 802.11a/b/g/n/ac 2T2R 2.4/5GHz PCIe/USB/SDIO Chip (5.8+)
  • MT7915 802.11a/b/g/n/ac/ax 4T4R 2.4/5GHz PCIe Chip (5.9+)
  • MT7921 802.11a/b/g/n/ac/ax 2T2R 2.4/5GHz PCIe Chip (5.12+)

MT7961 is not included in this list, but the kernel module for MT7921 is responsible for its operation.

You can see the numbers in brackets – they indicate the version of the kernel from which the driver is supported. Yes, the good news is that the driver is supported by the Linux kernel out of the box, so, in theory, the user doesn’t need to take any action – the Wi-Fi adapter should “just work”.

But the problem is that the Linux kernel from version 5.12 is relatively fresh and not as widespread in Linux distributions. For example, a preliminary version of the 5.15 kernel is already available at the time of writing, and the 5.14 kernel is already used in Arch Linux. But Ubuntu 21.04 uses the 5.11 kernel, so Linux Mint has an even older kernel.

There are 2 ways out of this situation:

  1. Wait until your distribution receives the latest kernel version (it may never happen, since only new versions of distributions will receive a new kernel)
  2. Install the latest kernel version yourself (there are some risks for the system)

So, you need to install kernel 5.12 or later – how to do this depends on your particular distribution. This tutorial will show you how to install the latest kernel in:

  • Ubuntu and distributions that are based on Ubuntu
  • Linux Mint
  • Debian (stable and testing)
  • Kali Linux

I have kernel 5.12 or later, but Mediatek MT7921 (Mediatek MT7961) not working or working with problems

If you already have a fresh kernel 5.12 or newer installed, but Wi-Fi adapters or Bluetooth are working with problems, then this section is for you.

The Mediatek MT7921 and Mediatek MT7961 chipsets require firmware, which, although available in the standard distribution repositories, is usually not installed by default.

Читайте также:  Sony vegas pro аналоги linux

On Ubuntu, Linux Mint and derivatives, run the following command:

sudo apt install linux-firmware

On Debian derivatives, run:

sudo apt install firmware-misc-nonfree

In Kali Linux, run the following command:

sudo apt install kali-linux-firmware

On Arch Linux, Manjaro, BlackArch and their derivatives, run the command:

sudo pacman -S linux-firmware

Kernel update warning

All subsequent sections show you how to update your kernel to the latest version. It should be remembered that due to the incompatibility of the kernel with programs (first of all, with proprietary drivers), you may encounter problems, including a black screen during boot.

In most cases, the problems encountered can be resolved without reinstalling the distribution. Start by going to the advanced options in the boot menu and boot with the previous version of the kernel. After completing the boot, remove the problematic kernel.

Proprietary graphics card drivers can cause problems, as older versions may not be compatible with the latest kernels without a patch. If you have proprietary video drivers installed, then seriously consider before following the instructions below. Also get ready, look for instructions on how to solve the problem when loading the distribution into a black screen.

Owners of old distributions should be especially careful – it is strongly recommended to update the kernel only on the latest OS versions.

This instruction has been tested on distributions:

Ubuntu and Linux Mint installed kernel 5.14, and Kali Linux installed kernel 5.13. All distributions booted and worked fine.

Another very likely problem that you may encounter if you install the latest kernel is the problem with unresolved dependencies and, as a result, the inability to use the apt package manager to update and install programs. If you are faced with a situation where, after successfully installing a new kernel, you cannot update packages using apt, then try installing the previous versions of the kernel that suit you, and uninstall the versions that cause dependency problems. Remember that it is impossible to remove the kernel you booted with – boot your computer with any other version of the kernel before uninstalling.

Wi-Fi Mediatek MT7921 and Mediatek MT7961 not working in Ubuntu and Linux Mint (SOLVED)

For Ubuntu, there is a repository of compiled kernels of all versions, including the most recent, so installation is not particularly difficult — you do not need to compile the Linux kernel. Moreover, there are tools, including those with a graphical interface, to install any kernels.

Since Linux Mint is based on Ubuntu, this guide is fully applicable to Linux Mint distributions, except for LMDE. For LMDE (Linux Mint Debian Edition) see the following section on Debian and derivatives, respectively.

If you prefer a graphical interface then use Mainline:

sudo apt-add-repository -y ppa:cappelikan/ppa sudo apt update sudo apt install mainline mainline-gtk

In this tutorial, I will show you how to install the latest kernel on Ubuntu 21.04 using the ubuntu-mainline-kernel.sh command line utility.

Checking the current kernel version:

The kernel is version 5.11, and we need at least 5.12.

Читайте также:  Hcxpcaptool kali linux установка

Download and install the ubuntu-mainline-kernel.sh script:

wget https://raw.githubusercontent.com/pimlie/ubuntu-mainline-kernel.sh/master/ubuntu-mainline-kernel.sh sudo install ubuntu-mainline-kernel.sh /usr/local/bin/

We check which version of the kernel is the latest:

To display a list of available kernels versions for installation, run the command:

sudo ubuntu-mainline-kernel.sh -r

For example, we want to install the kernel version v5.12.11, then the command is as follows (you do not need to specify the “v” prefix):

sudo ubuntu-mainline-kernel.sh -i 5.12.11

Attention: tests have shown that to solve the problem with the Mediatek MT7921 (Mediatek MT7961) drivers, it is recommended to install the kernel version 5.12.11, since the 5.14 kernel, although it installs normally, subsequently brings problems with unresolved dependencies when using the apt package manager.

If you want to install the latest version at the moment, then run the following command:

sudo ubuntu-mainline-kernel.sh -i

You will be asked if you want to continue, type “y”:

Latest version is: v5.14.6, continue? (y/N)

The program has exited – a restart is required for the changes to take effect.

Check the kernel version again:

By default, your system will boot with the latest kernel, if you want to change this, then go to advanced boot options

and select the version you want from the installed kernels.

Don’t forget to install the firmware files:

sudo apt install linux-firmware

The same instruction was tested on Linux Mint 20.2.

As you can see, the kernel has been updated successfully and Linux Mint is running.

Wi-Fi Mediatek MT7921 and Mediatek MT7961 not working in Debian, Kali Linux (SOLVED)

This section should be suitable for all variations and derivatives of Debian, for example:

Let’s check the current kernel version:

In order not to compile the kernel from scratch, we will use the kernels of the XanMod Kernel project.

To install the latest kernel version, just run the following commands:

echo 'deb http://deb.xanmod.org releases main' | sudo tee /etc/apt/sources.list.d/xanmod-kernel.list wget -qO - https://dl.xanmod.org/gpg.key | sudo apt-key --keyring /etc/apt/trusted.gpg.d/xanmod-kernel.gpg add - sudo apt update && sudo apt install linux-xanmod

Wait for the update to complete and reboot.

Let’s check the kernel version again:

inux HackWare-Kali 5.13.19-xanmod1 #0~git20210919.7960459 SMP PREEMPT Sun Sep 19 13:46:36 UTC 2021 x86_64 GNU/Linux

If for some reason the GRUB menu has not been updated, then run the command:

Don’t forget to install the firmware files:

sudo apt install firmware-misc-nonfree

How to recover Linux after installing the kernel

If your computer boots with a black screen, freezes, or something doesn’t work after updating the kernel, reboot and select Advanced options for your distribution from the GRUB menu:

Then select the previous kernel version and press Enter:

Regardless of the reason, you need to boot with the previous version of the kernel if you want to remove the latest kernel. This is because you cannot remove the kernel that is currently in use.

If you do not see the GRUB2 menu, press and hold the Shift key or press the Esc key repeatedly (this may vary depending on BIOS or UEFI boot and the version of Ubuntu/Linux Mint you are using) while booting GRUB. The Grub menu should appear allowing you to select a previous kernel version.

Читайте также:  Установить kali linux live

After booting the previous kernel, you can remove the faulty kernel. ubuntu-mainline-kernel.sh allows you to remove kernels installed from the Ubuntu kernel PPA.

With ubuntu-mainline-kernel.sh you can remove the kernel version by running:

sudo ubuntu-mainline-kernel.sh -u VERSION

Where VERSION is the kernel version, for example 5.14. You can also use this utility with -u without specifying a version, in which case the tool will list up to 10 kernel versions and ask you which one you want to remove. It’s worth noting that ubuntu-mainline-kernel.sh will not show official Ubuntu kernels in this list.

To remove the XanMod kernel in Debian and derivatives run the commands:

sudo apt remove linux-xanmod sudo apt remove `sudo apt show linux-xanmod | grep Depends | sed 's/,//' | awk ''`

If this was not done automatically, then update your GRUB settings:

Источник

Mediatek MT7921 Driver Linux Installation

Hi! The Tutorial shows you Step-by-step How to Install Ralink/MediaTek MT7921 Wireless Driver in GNU+Linux Distributions.

And to make use of the Latest MediaTek MT76 Driver on Linux it’s enough to dispose of an Updated Linux Kernel.

Especially relevant: this Driver is suplied from Linux 4.19 but some important Connection Issues has been fixed only starting from the 5.4.1 Kernel release.

Auto Draft

How to Update MediaTek MT7921 Driver in Linux

Showing Ads here is the best solution I found for not embarassing somebody about participating in a #%$Foundation^.

«When the Last Tree has been cut down, the Last Fish caught, the Last River poisoned, only then will we realize that One Cannot Eat Money.»

«No usable Computer exists today with completely Open Software and Hardware (as much as some companies want to Market themselves as such).»

Follow Us

The GNU/Linux Free Software Phylosophy

GNU/Linux Logo

Steve Jobs’ Last Words

Steve Jobs Last Words in the Darkness

«Being a Winner in a Free Computing OS Mission means to adopt a Commercial like Strategy. Transcending Duality in Oneness and so dispensing both Free and Non Free Software. Cause evangelizing Freedom in a Non Free World is like keeping a Trojan Horse. Hallelujah!»

«Using the Money just for buying Stuff and Not Supporting the Free Gift Philosophy is a sign of a Selfish and Narrow Mind.»

What can Save the World from a Blind and Quick Self-destruction.
The Immediate and Humble Mass Conversion to the Spiritual Way!
Because Earth & Nature has been Ravaged without Pity by the Wild and Selfish mass Competition to Win and Shown that U’re someone Better because you got a Lot of fla$hY Power$$$.

«Taking care if somebody is liking, following, or buying is just a serious hidrance on the priceless Way of Creative Freedom.»

Credits

Ganesha

Everlasting Glory to God, Jesus Christ, The Holy Spirit, Ganesha, Shiva, Vishnu, Krisna, Laozi, Buddha, Bodhidharma, Ma Gcig, Hakuin, Ikkyu, Nagarjuna, Tilopa, Naropa, Milarepa, Suhrawardi, St Dismas, St Francesco, St Teresa, St John, St Filippo, Eckehart. All The Holy Divinities, Avatars, Saints, Mystics, and True Spiritual Masters. Because they are in the Eternal Light of Truth & Delight Enlightening a World of Darkness, Nescience, Blindness, Uneasiness and Falsehood!

Источник

Оцените статью
Adblock
detector