Won't connect to WiFi randomly

WiFi would not connect after sleep, or on boot.
I had this issue on two different laptops with different WLAN cards, so it is not driver, or HW issue.

In most cases, WiFi would connect automatically without any issues.
But sometimes (after prolonged sleep, or sometimes even on freshly booted system) WiFi wouldn’t connect. If you try to connect WiFi manually in menu, it will try to connect, say “Configuring Interface” , and it won’t connect.
In most cases simple reboot will fix the problem, but this is annoying. Sometimes it will connect automatically withing 5-10 minutes.

What should I check? I use NetworkManager.

Next time try as root:

netconfig update -f

Does it work?

I have tried, didn’t work.
I also tried resetting NetworkManager, didn’t work either.

What should I check next time, when this happens?

Well, it doesn’t want to do it again…

Well, happened again, I have tried this, and looks like it helped…


nmcli c delete <SSID>
sudo systemctl restart NetworkManager

You may restart “wpa_supplicant”. That reconnects without restarting NetworkManager.

Thanks for suggestion, I will try next time it glitches again.

By the way, it failed to connect after prolonged hibernation (aprox. 10 hours).

Well, resetting only wpa_suppl. didn’t help.
But resetting NetworkManager twice helped… Weird issue, I guess NetworkManager should be resetted on every startup to prevent such problems

There can be an issue related to returning from sleep (or hibernation) because the system assumes it’s simply resuming an existing User session so won’t automatically do all that happens when a system boots or a User logs in.

This can be easily resolved by manually restarting your network services (wpa_supplicant and Network Manager only likely won’t be enough) because the problem is more basic at the system level. Run the following command, and your connection will be re-made, taking only the time for your AP to respond.

systemctl restart network

It may be worth submitting a bug to https://bugzilla.opensuse.org, someone may find the issue worth fixing.
Be sure to include the Desktop and its version, that’d be important since nowadays “sleep” and “hibernate” typically is managed by it and not by the systemd Units.

TSU

The thing is that it sometimes happens even on “cold” boot.

I will try this next time it will happen.
Interesting fact: Broadcom WiFi won’t connect more often, while on Atheros WiFi it is relatively rare.

It may be worth submitting a bug to https://bugzilla.opensuse.org, someone may find the issue worth fixing.Be sure to include the Desktop and its version, that’d be important since nowadays “sleep” and “hibernate” typically is managed by it and not by the systemd Units.

It is worth submitting a bug, since I’m apparently not alone. But I’d like to include some logs, since they might help, but I don’t have understanding of networking, and I have no idea where can I find these logs.
Also I believe that this issue is not openSUSE specific. Other distributions seem to have similar issues.