0

(Newbie) Ubuntu 20.04

My wireless network just won't stay online. The signal is strong and the wifi worked fine on Windows and Linux, but neither of the 2 versions of Ubuntu that I've tried (21.04 + 20.04) will maintain connection.

After screwing up by attempting to update with an unstable connection, I ended up freshly reinstalling it today, but it's dropping offline more frequently every time I reinstall (every minute now). To reinstate connection I need to switch the wifi off for a few seconds and back on again. It won't reconnect by itself.

All I have to work with is the basics that Ubuntu came with because I can't stay online long enough to download or update anything.

From what info I could find between forums, I suspect that my computer is one of the unlucky ones that Ubuntu's network manager just doesn't get along with.

I think I may need an alternative network manager, but downloading anything isn't an option.

ipv6 is off, I always make sure it's off after every OS installation because Virgin media (internet provider) doesn't support it. The modem is too far to run an ethernet cable, but the wifi repeater gives it a good signal.

I've been searching the web for answers all day and I haven't been able to find a solution that'll work in my situation. Please help!

1
  • Look at the logs! sudo journalctl -b 0 -u NetworkManager. Read man journalctl.
    – waltinator
    Commented May 21, 2021 at 22:52

2 Answers 2

1

Your wireless may be dropping because of power management; that is, the feature where the card partially powers down to save battery power during periods of inactivity and then, ideally, powers back up seamlessly when activity resumes. Let's disable power saving to see if it helps. From the terminal:

sudo sed -i 's/3/2/' /etc/NetworkManager/conf.d/*

Your wireless may be dropping because the channel to which it was connected has suddenly changed.

Please check the settings in the router. WPA2-AES is preferred; not any WPA and WPA2 mixed mode and certainly not TKIP. Second, if your router is capable of N speeds, you may have better connectivity with a channel width of 20 MHz in the 2.4 GHz band instead of automatic 20/40 MHz, although it is likely to affect N speeds. I recommend a fixed channel, either 1, 6 or 11, rather than automatic channel selection. Also, be certain the router is not set to use N speeds only; auto B, G and N is preferred.

Your wireless may be dropping because there are two wireless access points with the same name and password. This is typical when you have a 2.4 gHz segment and a 5 gHz segment of the same router. Your wireless may be roaming, looking for a better connection. If this is the case, I suggest that you rename the access points; something like myrouter2.4 and myrouter5.

After making these changes, reboot the router.

Next, I recommend that your regulatory domain be set explicitly. Check yours:

sudo iw reg get

If you get 00, that is a one-size-maybe-fits-all setting. Find yours here: http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2 Then set it temporarily:

sudo iw reg set IS

Of course, substitute your country code if not Iceland. Set it permanently:

sudo nano /etc/default/crda

Change the last line to read:

REGDOMAIN=IS

Proofread carefully, save and close the text editor.

Is there any improvement?

5
  • Thank you, I gave it a try and still no improvement. Diagnostics came up with some of the following, but I don't understand how it works (written as notes because copy/paste isn't an option with unstable connection): activation: beginning transaction (timeout in 45 seconds) (reason -4) Reason: 'ssid-not-found' Wifi disabled by killswitch (reason -3)
    – AWinters
    Commented May 22, 2021 at 13:24
  • Wifi disabled by killswitch is pretty easy to understand and fix. Where did you find these messages? dmesg ? I suggest that you run: sudo dmesg | grep -e wl -e etwork > dmesg.txt Ideally, run this after a reboot and before you have done any other remedial steps. Find the new text file dmesg.txt and transfer it on a USB key to another computer and post it here and give us the link: paste.ubuntu.com
    – chili555
    Commented May 22, 2021 at 15:04
  • It was from journalctl as a reply on this thread suggested. I've just tried the script you provided and "command not found".
    – AWinters
    Commented May 22, 2021 at 16:12
  • Did you realized that it is one long command? It got line wrapped in my comment. As one long command, it works flawlessly.
    – chili555
    Commented May 22, 2021 at 19:46
  • I didn't get that far, but the wifi was fixed on the next restart, so it seems your initial suggestion actually did work! Thank you.
    – AWinters
    Commented May 23, 2021 at 17:01
-1

I just forgot the network and reconnect to it after entering my password and everything is working properly.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .