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
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...
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.
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!
What you could also test - I read that it helped on some laptops with wlan problems after waking up:
Open a terminal and enter
sudo nano /etc/default/grub
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"
Press ctrl+o to save the file, enter to confirm, then press ctrl+x to exit the editor
Run sudo update-grub
Reboot and test.
If it doesn't help repeat the steps and remove the added term instead.
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.
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.
I think you fixed it!!! 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.
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.
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.
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.
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: