WiFi Issues Across Distros

Update: It appears this issue has resolved. I've automated the solution for MT7922 wifi cards, and included additional instructions for others to fix their mediatek drivers if they aren't the same model. Thank you so much for all of your help!

Original post:

From Ubuntu to Cachy to here, I am consistently getting wifi issues across all distros. The main one here and in others is all wifi networks slowly disappearing after the lid is closed and reopened until eventually there is no wifi at all. I feel I have tried everything. I tried using iwd instead of wpa_supplicant with some success, but it always leads to this eventually. I tried disabling powersaving in many different ways, using pcie_aspm=off and wifi.powersave=2 in their respective files. I've tried a wide range of scripts, tinkered with BIOS settings, installed mediatek firmware packages, nothing fixes it. It's been about a week since I got this laptop and I've been spending nearly all of my time fighting the wifi card. My BIOS doesn't have a fast boot disable option.

I would rather throw away the money I spent on this than use windows. It is reproduced by repeatedly suspending the system, usually while playing a video online. Eventually, all wifi connections disappear, and it fails to discover any until a full reboot. If there's anyone that can help, I would be very grateful, but time is running out, and I may have to return it before the warranty ends.

Some details:
Zorin OS 18 Core
HP HP OmniBook X Flip Laptop 14-fk0xxx

lspci -nnk | grep -A3 -Ei 'network|wireless' pcilib: Error reading /sys/bus/pci/devices/0000:00:08.3/label: Operation not permitted 62:00.0 Network controller [0280]: MEDIATEK Corp. MT7922 802.11ax PCI Express Wireless Network Adapter [14c3:0616] (rev 02) DeviceName: WLAN Subsystem: MEDIATEK Corp. MT7922 802.11ax PCI Express Wireless Network Adapter [14c3:223c] Kernel driver in use: mt7921e Kernel modules: mt7921e 63:00.0 Display controller [0380]: Advanced Micro Devices, Inc. [AMD/ATI] Device [1002:1114] (rev c3)

Does it help to run these commands after suspend?

sudo modprobe -r mt7921e
sudo modprobe mt7921e
sudo systemctl restart NetworkManager 
2 Likes

That restored it! Interesting. Maybe I could automate that in a script to run when the suspend ends. I had an old USB wifi adapter lying around, and it never goes out when the mediatek one dies. Definitely some fault with the card...

2 Likes

When you only need this line you can also create an entry at startup applications with this command.

2 Likes

You are so much more useful than the damn Ubuntu forum people, lol. Thank you! I'll tinker more with this tomorrow. It's like 7 AM for me and I still haven't slept.

3 Likes

After thinking about I believe adding to startup doesn't work and you'll need a script.

2 Likes

Yeah, I was testing it out after to see if the fix would last the life of the session, but after three or four suspends the wifi goes out again. So a startup launch would only temporarily fix it. I'll see what GPT can cook up tomorrow, lol. I'll keep you posted. Thanks again! :slight_smile:

1 Like

You can try it with this guide:

2 Likes

What you could also test - I read that it helped on some laptops with wlan problems after waking up:

  1. Open a terminal and enter
sudo nano /etc/default/grub
  1. Find the line beginning with GRUB_CMDLINE_LINUX_DEFAULT.
    Add mem_sleep_default=deep within the quotes so that it looks so: GRUB_CMDLINE_LINUX_DEFAULT="quiet splash mem_sleep_default=deep"
  2. Press ctrl+o to save the file, enter to confirm, then press ctrl+x to exit the editor
  3. Run sudo update-grub
  4. Reboot and test.

If it doesn't help repeat the steps and remove the added term instead.

2 Likes

I wonder if this may also help: Firmware upgrade for Mediatek MT7922 Wifi chip - Support and Help - Ubuntu Community Hub

3 Likes

For reasons unknown, this seems to have broken the wifi card entirely even after I remove the files and reboot. I followed the instructions to a T. Very odd. Thanks for the suggestion though.

Edit: I fixed it, I put the files under a folder when the kernel expected them outside the folder. Wifi is back working. I'll test to see if this fixed it.

1 Like

So far, about 15 suspends without any wifi issue! I'm hesitant to get my hopes up, since this is often an inconsistent issue, but this looks very good.

1 Like

I think you fixed it!!! :smiley: I'm going to wait until the end of today to mark it as the answer, just to be super sure the issue doesn't return. But I've suspended it probably like 30 times now, no issue.

1 Like

Okay, so the wifi no longer dies thanks to @zabadabadoo, but it disconnected and reconnected once randomly. I recall this being an issue on Ubuntu in addition to it dying sometimes. Trying wifi.powersave=2 in /etc/NetworkManager/conf.d/wifi-powersave.conf. Hopefully that'll smooth out the remaining bug.

1 Like

Update: WiFi is fully fixed now. Thank you all!

4 Likes

It is with great sadness that I report the problem has returned. Will have to go with plan B, script that runs after suspending ends. @zabadabadoo I'll try @Forpli's grub edit first.

2 Likes

Unfortunately this seems to have made it a bit worse. I'll just go with plan B tomorrow and do the script after suspending ends. I will defeat this wifi card. It's personal now, lol.

1 Like

I've made a fix that applies to all WiFi cards that face this same issue. May this be the end of it. Thanks all!

Update:

I ultimately resolved this by replacing the WiFi card in my Omnibook. I forgot to have my uninstall script reset the wifi.powersave line. If you decide to do the same and want to change it back to normal type the following into your terminal:

sudo nano /etc/NetworkManager/conf.d/wifi-powersave.conf

Arrow down to "wifi.powersave=2", and change it to a 3.

Ctrl + o then press enter to save, ctrl + x to exit.

If you have an AMD laptop, I would highly recommend this card as a replacement: Amazon.com: EDUP WiFi 7 Card AXE6500 M.2 2230 Wi-Fi 7 Wireless Network Card for Laptop, Bluetooth 5.4 Tri-Band 6G/5G/2.4Ghz OFDMA 802.11be, Compatible with Intel/AMD Windows 11 (64-Bit) and Linux Kernel 6.7+ : Electronics

Intel AXE and Broadcom Wifi Cards have been the best OOTB experience, as someone with several pcs and wifi cards and an absolute laptop tinkerer.

2 Likes