Mediatek 7961 driver linux

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.

Читайте также:  Можно установить linux ноутбук

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

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.

Читайте также:  Py to pyc linux

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.

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:

Читайте также:  Install morrowind on linux

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.

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:

Источник

Saved searches

Use saved searches to filter your results more quickly

You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session.

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[21.04] Mediatek 7961 wifi adapter not found with kernel 5.12 #159

[21.04] Mediatek 7961 wifi adapter not found with kernel 5.12 #159

Comments

How did you upgrade to 21.04? (Fresh install / Upgrade)

Related Application and/or Package Version (run apt policy $PACKAGE NAME ):

Issue/Bug Description:
I had problem with new laptop with Mediatek 7961 wifii adapter. I have installed popOs and i have changed Kernel to 5.12.x and IT works, but after reboot wifii does not work. My solutions is turn off and turn on the laptop, but i want to have wireless adapter after reboot too 🙂 bug exists in ubuntu 21.04

Steps to reproduce (if you know):
Reboot — wifii does not work. After turn off and then turn on, everything works as expected

Expected behavior:
Working wifii after reboot

Other Notes:

The text was updated successfully, but these errors were encountered:

Источник

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