1

For some reason, my laptop's wireless connection randomly disconnects from time to time. It may suddenly disconnect when I'm editing a Google Docs file, when I'm cleaning my files or when I've walked away and the laptop is idle; it just seems to randomly disconnect all the time. This can greatly vary from a minute or so after booting to a few hours later. Rebooting usually fixes the problem and connects me back. I'm running Lubuntu 14.10.

As soon as it disconnects, the network indicator doesn't change. Clicking on it still brings up a list of all the nearby networks. If I ask it to disconnect from the network, the indicator icon will change to a "Wifi not connected" icon, however it will still display the networks nearby. If I click to reconnect to my Wi-fi network, it will not reconnect, and the indicator icon will not change. After a while it will change to saying "Wireless is disabled" and won't display the nearby networks. It will stay like this until I reboot. I haven't tested to see if it is still searching for networks and displaying them or if it still remembers the names and displays them. Also, as soon as it disconnects, I'm not sure if the actual OS realises that it has disconnected or whether it is just the indicator which doesn't change.

This doens't occur when I'm actively using the internet. (e.g. Downloading a file, streaming a video)

I originally thought this was due to the new wireless modem I bought, as my phone (Nexus 5) also experienceds a similar problem. (The Wi-Fi would disconnect without showing an exclamation mark symbol (the ! indicates there's a wifi connection but no internet). I can turn wifi off and connect to cellular data, then re-enable wifi and it'll be fine. This only happens when my phone is connected to the 2.4Ghz network though) I then realised it was only my two devices which experience this problem, and maybe the two problems are not linked. I also think this because when I do sudo iwlist scan after it disconnects, it says:

wlan0     Interface doesn't support scanning : Network is down

I have put the full output of sudo iwlist scan and iwconfig on Pastebin if this helps.

I also ran the Wi-Fi Diagnosis tool and put the result on Pastebin as well.

Here's the syslog before I disabled the N protocol.

I disabled the N protocol as @shaddy suggested but the Wi-Fi still disconnected. I put some of the contents of /var/log/syslog here.

Disabling 802.11n on my laptop and on the router didn't help at all.

Bentley Carr
  • 1,317
  • 1
  • 13
  • 23

2 Answers2

1

Edit: This seemed to increase the time it takes before it disconnects, but it will still eventually disconnect. :-(

When I run:

sudo ifconfig wlan0 down
sudo rmmod ath5k
sudo modprobe ath5k nohwcrypt=1
sudo ifconfig wlan0 up

The wifi will not disconnect until I reboot.

To make this permanent by adding options ath5k nohwcrypt=1 to /etc/modprobe.d/ath5k.conf.

I then added ath5k to /etc/modules.


Source: here

Bentley Carr
  • 1,317
  • 1
  • 13
  • 23
0

iwlwifi driver has some problems with 802.11n protocol and some Intel wireless cards.

The solution is to disable the N protocol and go with probably slower but more reliable variants of the 802.11 protocol.

You can achieve this by executing:

sudo sh -c 'echo "options iwlwifi 11n_disable=1" >> /etc/modprobe.d/iwlwifi.conf'

And reboot.

Please let me know if that works for you. If it does not work, please include contents of /var/log/syslog in your post.

Edit: @Yharooer , ok I see disabling N protocol did not work for you. You can try disabling IPv6 following the directions from this question How to disable IPv6 in Ubuntu 14.04? , reboot and then if it does disconnects you again, please can you upload again the output of this command:

cat /var/log/syslog | grep Network
Sh1d0w
  • 1,348
  • Thanks for taking interest. I did as you suggested and put the contents of syslog here: http://pastebin.com/gAKpE6uV. I couldn't upload the whole thing, but I uploaded everything taken from approx half an hour ago. – Bentley Carr Apr 07 '15 at 05:09
  • 1
    @Yharooer I have edited the answer, can you follow the directions – Sh1d0w Apr 07 '15 at 05:29
  • I've followed the instructions. No disconnections so far; I'll keep using my computer normally and I'll mark this as an answer in a few days if it doesn't disconnect. Thanks for your help! – Bentley Carr Apr 07 '15 at 06:17
  • Sorry, nope, it disconnected again. Here's the syslog: http://pastebin.com/gkeyQi91 – Bentley Carr Apr 07 '15 at 06:28
  • @Yharooer can you login into the configuration panel of your router and search for the wifi settings. There should be setting for disabling 802.11 n somewhere. If you tell me the brand of your router I can help you find it. I'm thinking the problem is not in the ubuntu itself, since your mobile phone experience the same problem. – Sh1d0w Apr 07 '15 at 08:00
  • It's a NETGEAR Nighthawk R7000. The only settings I can seem to find which may be relevant are "Up to 54, 289 or 600Mbps". Does this change anything? Right now it's set on "Up to 289Mbps". The settings seem to refer to "2.4GHz b/g/n" without any setting to change it. – Bentley Carr Apr 07 '15 at 08:26
  • I've set it to "Up to 54Mbps for now". I've also set my phone to connect to the 5GHz network and I'll see what happens. – Bentley Carr Apr 07 '15 at 08:51
  • Sorry, I thought I already commented on this yesterday, but it seems that I didn't. My phone isn't disconnecting whenever I use the 5Ghz network but disabling 802.11n on my laptop didn't help at all. For some reason these disconnections don't occur on any other devices I have which are connecting to the 2.4Ghz network though. – Bentley Carr Apr 08 '15 at 07:43