Score:0

Wifi disconnects randomly after several hours (18.04)

cn flag
SEU

I have a laptop with a broadcom network card. I keep it always powered and have some background processes. I SSH into it and daily the network disconnects at random times. I have to go to the laptop and click on the wifi and connect it manually.

03:00.0 Network controller: Broadcom Inc. and subsidiaries BCM4313 802.11bgn Wireless Network Adapter (rev 01)

My release information is:

Description:    Ubuntu 18.04.3 LTS
Release:        18.04

Any suggestions on what I should look for to solve this?

I am fine with a work around where I reboot through crontab when the network is not available (and hope that fixes it) or restart the network manager.

waltinator avatar
it flag
Look at the logs! `sudo journalctl -b 0 -u NetworkManager`. Read `man journalctl`.
guiverc avatar
cn flag
If your system is still reporting itself at 18.04.3, you are well behind on security fixes & updates; refer https://fridge.ubuntu.com/2020/02/12/ubuntu-18-04-4-lts-released/ and you'll see when 18.04.4 ISO was released; installed systems having updated awhile before that actual ISO release date. A fully upgraded system will report itself as 18.04.6 currently. FYI: You didn't say which kernel stack you're using on your *unstated* desktop or server install; the other stack choice maybe an easy *fix*.
Score:1
in flag

This is often the result of the power saving feature in Ubuntu. You can disable this for the WiFi device by editing a file and restarting the network manager.

Here's how:

  1. Open Terminal (if it's not already open)

  2. Edit the default-wifi-powersave-on.conf file:

    sudo vi /etc/NetworkManager/conf.d/default-wifi-powersave-on.conf
    

    Note: Feel free to use any text editor of your choice. Be sure to open it with sudo, though.

    You will see the file contents look like this:

    [connection]
    wifi.powersave = 3
    
  3. Replace 3 with 2, then save the file.

    Definition of Values:

    Value What It Means
    0 Use the default value
    1 Do not change existing setting(s)
    2 Disable powersave feature
    3 Enable powersave feature
  4. Restart the network manager:

    sudo service network-manager restart
    

    Alternatively, you could restart the entire system.

This should prevent the device from disconnecting from the network when the system believes it is idle.

icenov avatar
in flag
I was having this problem on Ubuntu 20.04 running on Macbook Air with Broadcom wifi. Nothing worked except this! Wifi would connect normally, but during ssh or rsync with long sessions (more than 30 sec) it would disconnect. You Sir are a lifesaver!
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.