Score:0

how can i ensure ubuntu wireless reconnects when there is a network

us flag

Have checked multiple posts but none seems to give an idea as to why this is happening.. I have multiple ubuntu devices

  1. Laptop running Ubuntu 20.04 off a permanent live USB
  2. Mini cpu running Ubuntu 18.04 with a usb wifi dongle

Have encountered the following situations

  1. Laptop disconnects from wireless network, maybe because the router is overloaded or probably just a random disconnect. However, there are times the laptop isn't able to connect after said event, even by attempting to join the network manually, but my handphone which is on the same network is working just fine. The only way to go around it is to turn off the wifi and re-enable it.
  • The network configuration is managed by Network Manager GUI, using dynamic IP
  1. Mini cpu running Ubuntu gets disconnected, at random times of the days, which i assume the same random disconnect. The device isn't able to connect after said event and remains disconnected. Removing and re-plugging in the usb wifi dongle resolves it immediately.
  • The network configuration is managed by networkd (through netplan), using a static IP

I've seen posts suggesting to turn off power saving settings, but the mini cpus are running on plugged in power, so i don't really think thats the issue?

I've seen posts suggesting band switching issue, to fix the channel on the 2.4Ghz band if you have dual band network, but thats just a workaround. Truthfully haven't tried it, but since other devices work fine... it should be a ubuntu underlying issue no?

I've seen posts suggesting Ipv6 being the culprit as well, my IPv6 config is disabled on the router.

Expected behavior is for the wifi to reconnect itself once the wifi is available again, without having to disable/enable wifi nor remove/re-plug the usb wifi dongle.

Anyone encountered said scenario and found solution to it?

guiverc avatar
cn flag
To explore networking issues I create a simple bash script that sends single echo request (`ping`) at interval. If reply received a counter is subtracted; if failed counter is added (sound played, eg. `paplay` etc; date/time message written to log etc).. If counter is beyond threshold a script is called that causes actions to occur (restarting networking locally or remotely etc) etc... Your issue maybe interference between access point & Ubuntu device (microwave, fridge or faulty device coming on etc) so other devices working proves little unless they are in same spot & used at same time etc..
belgeran avatar
us flag
@guiverc mm but even with interference, it doesn't make sense that the disable/enable of wifi or removal/plug in of dongle immediately resolves the issue? the observation would then be that the interference might have happened earlier which resulted in the disconnect, but why wouldn't the devices reconnect without said actions?
guiverc avatar
cn flag
I'm not a good one to advise with wifi; I don't support or use it. I'd likely grab a tool that explores for RFI signals (strength meter) looking for faulty devices like I mentioned (*I've had issues before with those thus the mention of them even though its somewhat rare* etc), but if software are your systems using the same kernel? ie. a 18.04 HWE will use the same kernel stack as 20.04 GA but you didn't provide specifics.. I'd likely explore other kernels too.. but here I'm only guessing and you'll likely get better details from others if patient :)
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.