Acer Aspire 5 a515-56-77SX Ubuntu 21.04 wifi not detected

This is my first question here, even if I've been lurking here for a long time.

I installed Ubuntu 21.04 next to windows 10 with hopes that a newer kernel would have better support for my problem. This was not the case.

  • I've disabled fastboot on windows 10 (in "power options").
  • I enabled the "Propietary drivers for devices (restricted)" sources when I installed.
  • I disabled secure boot.

Here is my system information:

$ uname -a
Linux aspire-A515-56 5.11.0-26-generic #28-Ubuntu SMP Thu Jul 15 19:27:01 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

Here are my specs for my network hardware.

$ sudo lshw -class network
  *-network                 
       description: Ethernet interface
       product: RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
       vendor: Realtek Semiconductor Co., Ltd.
       physical id: 0
       bus info: pci@0000:01:00.0
       logical name: enp1s0
       version: 15
       serial: 08:8f:c3:02:31:9e
       size: 1Gbit/s
       capacity: 1Gbit/s
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress msix bus_master cap_list ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation
       configuration: autonegotiation=on broadcast=yes driver=r8169 driverversion=5.11.0-26-generic duplex=full firmware=rtl8168h-2_0.0.2 02/26/15 ip=192.168.2.176 latency=0 link=yes multicast=yes port=twisted pair speed=1Gbit/s
       resources: irq:16 ioport:3000(size=256) memory:52004000-52004fff memory:52000000-52003fff
  *-network UNCLAIMED
       description: Network controller
       product: MEDIATEK Corp.
       vendor: MEDIATEK Corp.
       physical id: 0
       bus info: pci@0000:02:00.0
       version: 00
       width: 64 bits
       clock: 33MHz
       capabilities: pciexpress msi pm cap_list
       configuration: latency=0
       resources: iomemory:600-5ff iomemory:600-5ff iomemory:600-5ff memory:6003000000-60030fffff memory:6003100000-6003103fff memory:6003104000-6003104fff

And my rfkill feedback:

$ sudo rfkill list all
0: hci0: Bluetooth
    Soft blocked: no
    Hard blocked: no
1: acer-wireless: Wireless LAN
    Soft blocked: no
    Hard blocked: no
2: acer-bluetooth: Bluetooth
    Soft blocked: no
    Hard blocked: no

Thanks in advance for any insight that you can provide.

BTW: These are the sources I've looked into (and have not solved my problem):

  • good internal wifi card for new laptop (the installed one is not supported)
  • Ubuntu 20.04 does not have MediaTek driver MT7921 for WIFI & Bluetooth?
  • https://community.acer.com/en/discussion/624261/proper-drivers-in-ubuntu-for-acer-aspire-5-a515-56-53uu

The Mediatek 7921 is recognized in kernel versions 5.12 and newer. With a working internet connection by ethernet, tethering or whatever means possible, open a terminal and do:

wget https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.12.5/amd64/linux-headers-5.12.5-051205-generic_5.12.5-051205.202105190541_amd64.deb
wget https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.12.5/amd64/linux-headers-5.12.5-051205_5.12.5-051205.202105190541_all.deb
wget https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.12.5/amd64/linux-image-unsigned-5.12.5-051205-generic_5.12.5-051205.202105190541_amd64.deb
wget https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.12.5/amd64/linux-modules-5.12.5-051205-generic_5.12.5-051205.202105190541_amd64.deb
sudo dpkg -i linux*.deb

Reboot and your wireless should now be working. You may need to disable Secure Boot in the BIOS/EFI.