Wifi gets disconnected automatically

16,014

Solution 1

First, 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 also have better luck with 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. In some cases, auto B and G may also be helpful. 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:

gksudo gedit /etc/default/crda

Use nano or kate or leafpad if you don't have the text editor gedit. Change the last line to read:

REGDOMAIN=IS

Proofread carefully, save and close the text editor.

Next, I'd set IPv6 to Ignore in Network Manager: http://docs.fedoraproject.org/en-US/Fedora/18/html/Installation_Guide/images/netconfig/network-connections-ipv6-ignore.png This example is for ethernet, but you want wireless.

If these changes do not help, please try:

sudo -i
echo "options rt2800pci nohwcrypt=Y"  >  /etc/modprobe.d/rt2800pci.conf
modprobe -r rt2800pci && modprobe rt2800pci
exit

If these changes are still not helpful, let's compile the newest version of the driver. Download this package to your desktop: https://www.kernel.org/pub/linux/kernel/projects/backports/2015/11/15/backports-20151115.tar.gz Right-click it and select 'Extract Here.' Now, back to the terminal:

sudo apt-get install linux-headers-generic build-essential
cd ~/Desktop/backports-20151115
make defconfig-wifi
make
sudo make install

Reboot, unload ndiswrapper and tell us if there is any improvement.

sudo modprobe -r ndiswrapper
sudo modprobe rt2800pci

If these changes are helpful, remove ndiswrapper:

sudo apt-get purge ndiswrapper-utils-1.9
sudo apt-get purge ndiswrapper

The native driver rt2800pci may be blacklisted. Please check:

sudo gedit /etc/modprobe.d/blacklist.conf

If it is, remove the line blacklist rt2800pci, save and close the text editor.

Also, you have compiled the driver for your currently running kernel only. When Update Manager installs a newer linux-image, after the requested reboot, recompile:

cd ~/Desktop/backports-20151115
make clean
make defconfig-wifi
make
sudo make install 

Please retain the file and these instructions for that time.

Solution 2

I had similar experiences with another Ralink network interface. The problem is Linux's wireless driver support, which is not very good. You can try a different kernel and you might be lucky, but there is no guarantee that it will fix the problem. I had best experience with Intel wifi cards, they seem to be more stable.

Share:
16,014

Related videos on Youtube

mr_azad
Author by

mr_azad

Updated on September 18, 2022

Comments

  • mr_azad
    mr_azad over 1 year

    I am using Ubuntu 14.04 LTS and recently I had problem with my wifi card RT3290 Wireless 802.11n 1T/1R PCIe. Then I found this answer which leads me to This second solution. The second solution solved my problem.

    But after some time I find my wifi is getting disconnected automatically, and if I disable and then enable internet after some time from the menu bar it works again. Now it has become practically impossible to use internet via wifi in Ubuntu. I found This bug and this Post, but neither of them has an answer.

    • MadMrCrazy
      MadMrCrazy over 8 years
      In the bios is there a WiFi sleep function?
    • mr_azad
      mr_azad over 8 years
      No the BIOS setting are fine. I have windows installed too in the same computer. For windows wifi works fine.
    • Rifaz Nahiyan
      Rifaz Nahiyan over 8 years
      Not a fix to the problem but certainly can make it less painful. Instead of using the mouse to turn off and then turn on Networking, you can use service network-manager restart with root permissions. I have been facing the same problem with my Intel 7260 wireless card but the frequency of the problem has decreased recently.
    • mr_azad
      mr_azad over 8 years
      thanks man.. I hope if will reduce the effort.. @RifazNahiyan
    • Miguel Garcia
      Miguel Garcia over 8 years
      well I had similar issues and this post is what did the trick for me hope it helps you good luck
  • mr_azad
    mr_azad over 8 years
    Oh Thank you bro. but I have bought the laptop already, and I can not change the wifi card.. by the way do you have any solution for the problem ..
  • antiguru
    antiguru over 8 years
    I was able to switch to Ethernet... You could try to use ndiswrapper to run the Windows driver in Linux, it used to be the standard way of enabling wifi years ago. See help.ubuntu.com/community/WifiDocs/Driver/Ndiswrapper for an introduction. It might not be ideal, but could work.
  • mr_azad
    mr_azad over 8 years
    If it possible I would give you more thumbs up.. Thanks again main............... :D
  • chili555
    chili555 over 8 years
    Please see my edit above in a few minutes.
  • mr_azad
    mr_azad over 8 years
    Oh but I do not have blacklist rt2800pci in the file.. and for me just after I changed the router setting, the problem was gone ........ :),, and now every time I restart my computer I have to use sudo modprobe rt2800pci to turn on the wifi..
  • chili555
    chili555 over 8 years
    It must be blacklisted somewhere. May I see: ls /etc/modprobe.d Thanks.
  • mr_azad
    mr_azad over 8 years
    Hey @chili555 could you please check chat.stackexchange.com/rooms/31589/…