Ubuntu – Wifi constantly disconnects, and have bad recption when it’s on ubuntu 16.10

16.10driversdual-bootnetworking

I have a HP-Pavilion-11-x360-PC dual boot: win 8.1 & ubuntu 16.10 for a few months now.
My wi-fi on ubuntu has very bad recpetion (at home and at the university, on several networks). I don't have this problem on windows 8.1.

My hardware details:
from this command:

sudo lshw -c network
 *-network                 
   description: Wireless interface
   product: RT3290 Wireless 802.11n 1T/1R PCIe
   vendor: Ralink corp.
   physical id: 0
   bus info: pci@0000:02:00.0
   logical name: wlp2s0f0
   version: 00
   serial: *I deleted*
   width: 32 bits
   clock: 33MHz
   capabilities: pm msi pciexpress bus_master cap_list ethernet physical wireless
   configuration: broadcast=yes driver=rt2800pci driverversion=4.8.0-34-generic firmware=0.37 ip=10.0.0.4 latency=0 link=yes multicast=yes wireless=IEEE 802.11
   resources: irq:17 memory:90710000-9071ffff

I have tried these steps:

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

that were suggested here, because of the same wifi driver.
which weren't so successful.
They produced this repeated output:

$HOME/backports-4.4.2-1/drivers/bcma/driver_gpio.c: In function ‘bcma_gpio_init’:
$HOME/backports-4.4.2-1/drivers/bcma/driver_gpio.c:191:6: error: ‘struct gpio_chip’ has no member named ‘dev’

It didn't work at all. I will post full output if needed, don't want to be too tedious.

Also, if I restart my computer, and load the windows OS, then the wi-fi might not work on windows as well (it will not recognize any networks at all). I would have to shutdown the computer, and turn it on again.

Another problem that I have is that the computer will sometimes freeze, and then I have to turn it off manually, so it will work again. I had this problem a few times on my windows OS, and I'm not sure what's the cause of this.

Another bugging problem is that when I switch the OSes every time the clock is two hours back or forward (I'm on UTC+2 so I see why it's a two hours difference). Is there any way to fix this small bugging thing?

Thanks in advance for your help.

Edit:
The output of iwconfig wlp2s0f0 was:

wlp2s0f0  IEEE 802.11  ESSID:"someNetworkName"  
      Mode:Managed  Frequency:2.437 GHz  Access Point: **:**:**:**:**:**   
      Bit Rate=18 Mb/s   Tx-Power=20 dBm   
      Retry short limit:7   RTS thr:off   Fragment thr:off
      Power Management:on
      Link Quality=20/70  Signal level=-90 dBm  
      Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
      Tx excessive retries:0  Invalid misc:4   Missed beacon:0

At the request of ThisIsNotAnId I did these two commands:

sudo iwconfig wlp2s0f0 txpower auto

sudo iwconfig wlp2s0f0 rts 2347B

and now the output of iwconfig wlp2s0f0 is:

wlp2s0f0  IEEE 802.11  ESSID:"someNetworkName"  
          Mode:Managed  Frequency:2.437 GHz  Access Point: **:**:**:**:**:**    
          Bit Rate=18 Mb/s   Tx-Power=20 dBm   
          Retry short limit:7   RTS thr=2347 B   Fragment thr:off
          Power Management:on
          Link Quality=30/70  Signal level=-80 dBm  
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:101  Invalid misc:31   Missed beacon:0

I checked it a few more times while editing, and noticed that Tx excessive retries is incrementing, and is now at Tx excessive retries:556.
I'm not sure what's the meaning of this, but it caught my attention.

Best Answer

Can you try the following. This is based on an Ubuntu Guide for getting the module ndiswrapper working on your system which will allow you to use windows drivers for your wifi card. I will summarize the steps here for your specific card.

Go to synaptic package manager, and install package ndisgtk. If you can't access internet from your computer, download the .deb package from here from another computer, copy to your computer, and install manually (amd64 for a 64 bit computer).

Download the windows driver from http://www.mediatek.com/products/broadbandWifi/rt3290 (Download link). Move the downloaded archive into your home folder. Create another folder named "RT3290 Driver" and place the archive in there. Extract inside this new folder. Once extracted, you should have a folder named "Disk1".

Turn wifi off. Remove all the wireless connections you have added before through network manager. That is, delete them.

I will assume you have gedit installed, or that you know how to open the text editor you do have installed from the terminal. In which case replace gedit with the command to open your editor. Run

sudo cp /etc/modprobe.d/blacklist.conf ~/blacklist_backup.conf
sudo gedit /etc/modprobe.d/blacklist.conf

This will open up that file in gedit. Go to the end of the file and add these two lines:

#Custom Blacklist
blacklist rt2800pci

Save, close, close terminal. Reboot.

Open ndisgtk, look under System > Administration > Windows Wireless Drivers. Alternatively, run gksudo ndisgtk & from a terminal.

Once open, click "Install New Driver". A dialog box will pop-up asking you to select the driver file. Navigate to the windows driver folder you extracted earlier. I'm going to assume you have a 64 bit Ubuntu installation (to check, in a terminal run uname -m. x86_64 = 64 bit, x86 = 32 bit). In your home folder > RT3290 Driver > Disk1 > drivers > Win8 > x64 > netr28x.inf

To check if everything went right, I'm going to refer you to section 3.6.2.1 of the Ubuntu Docs.

Enable your wifi if disabled, open a terminal and run

sudo depmod -a
sudo modprobe ndiswrapper

Your wifi should now be active. If it's not, reboot your computer and see if helps. If that doesn't help, remove the driver you installed using ndisgtk again and install the win7 driver and reboot and see if that helps. As a final resort, there's another driver you could try.

Then, add your wifi connection just like you did the first time.

Post back with any questions, errors, or worries you may have.

If successful, make the changes permanent by running the following on a terminal

sudo gedit /etc/modules

And adding the line ndiswrapper at the end. Save, close, close terminal.

Here's a smiley face: ?

Related Question