After updating to 16.04, my Ralink network card keeps dropping my connection

Asked by Rusty

I recently upgraded from Ubuntu 14.04 to 16.04. Now, my wireless connection frequently drops out. This is a desktop computer, and I never make it sleep or hibernate it, so that is not related. Some basic info:

My card's info from ifconfig:

    wlan0 Link encap:Ethernet HWaddr 80:1f:02:0e:a0:8a
          inet addr:192.168.1.2 Bcast:192.168.1.255 Mask:255.255.255.0
          inet6 addr: fe80::821f:2ff:fe0e:a08a/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
          RX packets:196226 errors:0 dropped:0 overruns:0 frame:0
          TX packets:164881 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:210159487 (210.1 MB) TX bytes:40144724 (40.1 MB)

When my connection is working:

    $ iwconfig wlan0
    wlan0 IEEE 802.11bg ESSID:"Friendship"
          Mode:Managed Frequency:2.462 GHz Access Point: 00:1B:2F:5C:1D:04
          Bit Rate=11 Mb/s Tx-Power=20 dBm
          Retry short limit:7 RTS thr:off Fragment thr:off
          Power Management:on
          Link Quality=56/70 Signal level=-54 dBm
          Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
          Tx excessive retries:4 Invalid misc:89 Missed beacon:0

And when it is disconnected:

    $ iwconfig wlan0
    wlan0 IEEE 802.11bg ESSID:off/any
          Mode:Managed Access Point: Not-Associated Tx-Power=20 dBm
          Retry short limit:7 RTS thr:off Fragment thr:off
          Power Management:on

I typed 'dmesg | grep wlan0 ', and I see the following types of output:

    [159510.740549] wlan0: authenticate with 00:1b:2f:5c:1d:04
    [159510.755199] wlan0: send auth to 00:1b:2f:5c:1d:04 (try 1/3)
    [159510.959119] wlan0: send auth to 00:1b:2f:5c:1d:04 (try 2/3)
    [159511.163146] wlan0: send auth to 00:1b:2f:5c:1d:04 (try 3/3)
    [159511.367175] wlan0: authentication with 00:1b:2f:5c:1d:04 timed out
    [159519.496862] wlan0: authenticate with 00:1b:2f:5c:1d:04
    [159519.511637] wlan0: send auth to 00:1b:2f:5c:1d:04 (try 1/3)
    [159519.715544] wlan0: send auth to 00:1b:2f:5c:1d:04 (try 2/3)
    [159519.919580] wlan0: send auth to 00:1b:2f:5c:1d:04 (try 3/3)
    [159520.123588] wlan0: authentication with 00:1b:2f:5c:1d:04 timed out
    [159534.010547] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
    [159624.381071] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
    [159624.412877] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
    [159624.586221] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
    [159625.687907] wlan0: authenticate with 00:1b:2f:5c:1d:04
    [159625.696849] wlan0: send auth to 00:1b:2f:5c:1d:04 (try 1/3)
    [159625.698305] wlan0: authenticated
    [159625.698487] rt61pci 0000:05:05.0 wlan0: disabling HT/VHT due to WEP/TKIP use
    [159625.698493] rt61pci 0000:05:05.0 wlan0: disabling HT as WMM/QoS is not supported by the AP
    [159625.698497] rt61pci 0000:05:05.0 wlan0: disabling VHT as WMM/QoS is not supported by the AP
    [159625.700824] wlan0: associate with 00:1b:2f:5c:1d:04 (try 1/3)
    [159625.702853] wlan0: RX AssocResp from 00:1b:2f:5c:1d:04 (capab=0x431 status=0 aid=278)
    [159625.702916] wlan0: associated
    [159625.702969] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready

I don't understand much about these protocols, but it looks like when the card discovers that router doesn't support HT?, it disables it, and then it finally is able to authenticate. I also see a few lines like this in the output:

    [159383.276802] ieee80211 phy0: wlan0: No probe response from AP 00:1b:2f:5c:1d:04 after 500ms, disconnecting.

That may not be related at all. I don't really know.

My driver is rt61pci, based on the output of 'sudo lshw -class network':

  *-network
       description: Wireless interface
       product: RT2561/RT61 802.11g PCI
       vendor: Ralink corp.
       physical id: 5
       bus info: pci@0000:05:05.0
       logical name: wlan0
       version: 00
       serial: 80:1f:02:0e:a0:8a
       width: 32 bits
       clock: 33MHz
       capabilities: pm bus_master cap_list ethernet physical wireless
       configuration: broadcast=yes driver=rt61pci driverversion=4.4.0-47-generic firmware=0.8 ip=192.168.1.2 latency=64 link=no multicast=yes wireless=IEEE 802.11bg

modinfo shows me this:

$ modinfo rt61pci | grep description

    description: Ralink RT61 PCI & PCMCIA Wireless LAN driver.

When things go down, I type 'sudo service network-manager restart', and it usually fails. When I do this, I can see try 1/3, 2/3 and 3/3 are added again to the dmesg log. Sometimes, it works. Or, I can just wait, and it will eventually connect again on its own.

I checked /etc/modprobe.d/, and there's nothing in there for rt61pci. I do see a iwlwifi.conf file, but I don't think I've ever had an Intel wireless card installed.

I need help with this. I don't really know enough to debug this on my own. By reading other threads, I've gotten this far, but I don't know where to go from here.

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
Mark Rijckenberg
Solved:
Last query:
Last reply:
Revision history for this message
Mark Rijckenberg (markrijckenberg) said :
#1

The following procedure applies to all supported releases of Ubuntu that are NOT End of Life (EOL) in the following table:

https://wiki.ubuntu.com/Releases

Please first connect your network card to the wireless router using an ethernet cable (also known as a LAN cable) and apply all updates.

In order to gather essential troubleshooting information about your wireless card, please follow this procedure:

Step 1

In the Ubuntu Terminal console , make sure that unlimited scrolling is enabled:

click on Edit > Profiles > "Default" profile > Scrolling. Choose "Unlimited" as scrolling option. Click Close and Close again.

If you are using the Gnome interface, open the Terminal console via "Applications->Accessories->Terminal"

If you are using the Unity interface (default graphical user interface in Ubuntu), use the 'search' function on the dash. Or you can click on the 'More Apps' button, click on the 'See more results' by the installed section, and find it in that list of applications. A third way, available after you click on the 'More Apps' button, is to go to the search bar, and see that the far right end of it says 'All Applications'. You then click on that, and you'll see the full list. Then you can go to Accessories > Terminal after that.

So the methods in Unity are:

Press CTRL-ALT-T key combination.

Dash > Search for Terminal

Dash > More Apps > 'See More Results' > Terminal

Dash > More Apps > Accessories > Terminal

Step 2

Please copy-paste the following diagnostic command from the

https://help.ubuntu.com/community/WirelessTroubleshootingProcedure

website using a web browser (like Google Chromium or Mozilla Firefox) into the Linux Terminal. The command STARTS with the word sudo and ENDS with the word lsmod. So please copy-paste the ENTIRE diagnostic command below from the web browser into a Terminal, press <enter>, then enter password when sudo asks for password, then press enter again.

Tip: If you have a wheel mouse or 3 button mouse you do not need to type commands into the Terminal. Highlight the diagnostic command written on the page. Move your cursor anywhere in the Terminal and press the wheel or middle button. Automatic Copy and paste! No spelling mistakes! No Typos! No other errors!

sudo apt-get update; sudo apt-get install usbutils pciutils hwinfo grep rfkill; sudo lshw -C network; rfkill list; sudo iwlist scan | grep -Ei 'chan|ssid'; cat /etc/network/interfaces; cat /etc/lsb-release; lspci -nnk | grep -iA2 net; lsusb; nmcli nm status; sudo lshw -short; uname -a; sudo updatedb; dmesg | grep -E '02:00|80211|acx|at76|ath|b43|bcm|brcm|CX|eth|ipw|ireless|irmware|isl|lbtf|orinoco|ndiswrapper|NPE|ound|p54|prism|rror|rtl|RTL|rt2|RT2|rt3|RT3|rt5|RT5|rt6|RT6|rt7|RT7|usb|witch|wl';sudo dmidecode|grep -E 'anufact|roduct|erial|elease'; iwconfig; grep -E '80211|acx|at76|ath|b43|bcm|brcm|CX|eth|ipw|irmware|isl|lbtf|orinoco|ndiswrapper|NPE|p54|prism|rtl|rt2|rt3|rt6|rt7|wmi|witch|wl' /etc/modprobe.d/*; cat /var/lib/NetworkManager/NetworkManager.state; sudo hwinfo --netcard ; ps -aux|grep -E 'wpa|icd|etwork'; netstat -rn ; cat /etc/resolv.conf; ls -lia /boot; grep tmpfs /etc/fstab; ubuntu-support-status; sudo update-pciids; sudo update-usbids; sudo lsmod

Step 3

Please do NOT attempt to send any attachment(s). Please copy/paste the full terminal output at this location:

https://answers.launchpad.net/ubuntu/+question/404248

The troubleshooters at Launchpad need to see the full Terminal output from running the above diagnostic command.

Step 4

Please also specify the exact model and make of your PC (if known)

Please also specify the name of the wireless access point that you are trying to connect to (not the model/make of your router).

Revision history for this message
Rusty (uigrad) said :
#2

I tried doing this before leaving for work this morning. I let it run for 20 minutes, and it wasn't showing any progress of finishing, so I left.

I'll try to stop at home over my lunch hour and give the output (assuming that it finished).

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#4

Try:

echo "options rt61pci nohwcrypt=1" | sudo tee /etc/modprobe.d/rt61pcifix.conf > /dev/null

sudo modprobe -r rt61pci

sudo modprobe rt61pci

Revision history for this message
Best Mark Rijckenberg (markrijckenberg) said :
#5

Please first try actionparsnip's suggestion.

If it does not help, then I suggest doing 2 things:

1) Turn off wifi powermanagement using the suggestions here:

https://ubuntuforums.org/showthread.php?t=2333291&page=2

There are several methods described there. Only one of them may the right one for you.

2) There is a lot of wireless interference with other wireless routers which
are transmitting on the same channel (channel 6 and 11).

Please log into the homepage of your wireless router using a working,
wired Internet connection and using a web browser.

Then change the wireless transmission channel on your wireless router to channel
3.

Also force the router to use Wireless-G speeds (54 Mbps) to stabilize
the connection.

Then reboot the router and reboot your PC.

Then retest wireless.

Revision history for this message
Rusty (uigrad) said :
#6

Ha! I should change to a different channel, thanks for the suggestion! When I first set this up, there were no other wireless networks in the area, so 11 worked great.

I'll be home in a couple hours, and hopefully the suggestion from actionparsnip is what I need. I know that the other traffic is not main cause. My wife and I connect to this same router with many other different devices, and they all work. It's just this one desktop running Ubuntu that doesn't, and it did until I updated to 16.

Revision history for this message
Rusty (uigrad) said :
#7

Unfortunately, the changes suggested by actionparsnip did not work. I restarted the network (sudo service network-manager restart) and it found my wireless network almost immediately. Shortly after that, it went down again.

The output of dmesg | grep wlan0 still looks like this:

[247384.026192] wlan0: authentication with 00:1b:2f:5c:1d:04 timed out
[247395.588192] wlan0: authenticate with 00:1b:2f:5c:1d:04
[247395.766855] wlan0: send auth to 00:1b:2f:5c:1d:04 (try 1/3)
[247395.768241] wlan0: authenticated
[247395.768421] rt61pci 0000:05:05.0 wlan0: disabling HT/VHT due to WEP/TKIP use
[247395.768426] rt61pci 0000:05:05.0 wlan0: disabling HT as WMM/QoS is not supported by the AP
[247395.768429] rt61pci 0000:05:05.0 wlan0: disabling VHT as WMM/QoS is not supported by the AP
[247395.770703] wlan0: associate with 00:1b:2f:5c:1d:04 (try 1/3)
[247395.974729] wlan0: associate with 00:1b:2f:5c:1d:04 (try 2/3)
[247396.178763] wlan0: associate with 00:1b:2f:5c:1d:04 (try 3/3)
[247396.382754] wlan0: association with 00:1b:2f:5c:1d:04 timed out
[247407.952669] wlan0: authenticate with 00:1b:2f:5c:1d:04
[247408.083402] wlan0: send auth to 00:1b:2f:5c:1d:04 (try 1/3)
[247408.133761] wlan0: authenticated
[247408.134130] rt61pci 0000:05:05.0 wlan0: disabling HT/VHT due to WEP/TKIP use
[247408.134143] rt61pci 0000:05:05.0 wlan0: disabling HT as WMM/QoS is not supported by the AP
[247408.134152] rt61pci 0000:05:05.0 wlan0: disabling VHT as WMM/QoS is not supported by the AP
[247408.135313] wlan0: associate with 00:1b:2f:5c:1d:04 (try 1/3)
[247408.339312] wlan0: associate with 00:1b:2f:5c:1d:04 (try 2/3)
[247408.543330] wlan0: associate with 00:1b:2f:5c:1d:04 (try 3/3)
[247408.747340] wlan0: association with 00:1b:2f:5c:1d:04 timed out
[247419.985050] wlan0: authenticate with 00:1b:2f:5c:1d:04
[247419.999912] wlan0: send auth to 00:1b:2f:5c:1d:04 (try 1/3)
[247420.203900] wlan0: send auth to 00:1b:2f:5c:1d:04 (try 2/3)
[247420.407870] wlan0: send auth to 00:1b:2f:5c:1d:04 (try 3/3)
[247420.579615] wlan0: authenticated
[247420.580082] rt61pci 0000:05:05.0 wlan0: disabling HT/VHT due to WEP/TKIP use
[247420.580098] rt61pci 0000:05:05.0 wlan0: disabling HT as WMM/QoS is not supported by the AP
[247420.580105] rt61pci 0000:05:05.0 wlan0: disabling VHT as WMM/QoS is not supported by the AP
[247420.583871] wlan0: associate with 00:1b:2f:5c:1d:04 (try 1/3)
[247420.787908] wlan0: associate with 00:1b:2f:5c:1d:04 (try 2/3)
[247420.991907] wlan0: associate with 00:1b:2f:5c:1d:04 (try 3/3)
[247421.195906] wlan0: association with 00:1b:2f:5c:1d:04 timed out
[247432.761932] wlan0: authenticate with 00:1b:2f:5c:1d:04
[247432.776488] wlan0: send auth to 00:1b:2f:5c:1d:04 (try 1/3)
[247432.980453] wlan0: send auth to 00:1b:2f:5c:1d:04 (try 2/3)
[247433.184476] wlan0: send auth to 00:1b:2f:5c:1d:04 (try 3/3)
[247433.388488] wlan0: authentication with 00:1b:2f:5c:1d:04 timed out
[247444.490814] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready

Revision history for this message
Mark Rijckenberg (markrijckenberg) said :
#8

So did you try ALL my suggestions (Turning off wifi powermanagement and changing channel to channel 3) ?

Revision history for this message
Rusty (uigrad) said :
#9

Sorry, no I didn't. I just turned off power management. Here's the current output of iwconfig:

lo no wireless extensions.

wlan0 IEEE 802.11bg ESSID:"Friendship"
          Mode:Managed Frequency:2.422 GHz Access Point: 00:1B:2F:5C:1D:04
          Bit Rate=54 Mb/s Tx-Power=20 dBm
          Retry short limit:7 RTS thr:off Fragment thr:off
          Power Management:off
          Link Quality=62/70 Signal level=-48 dBm
          Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
          Tx excessive retries:0 Invalid misc:46 Missed beacon:0

eth0 no wireless extensions.

I changed my channel to 3.

I updated my Wireless router to use "G only" instead of "G and B".

I'll let you know fairly soon if that worked.

By the way, after following the suggested procedure from actionparsnip, my success rate in connecting went way down. It seems that once I would lose a connection, it would never be made again. I also began getting messages like this in my dmesg:

[306577.589431] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[306577.621324] ieee80211 phy0: rt61pci_wait_bbp_ready: Error - BBP register access failed, aborting
[306577.621340] ieee80211 phy0: rt61pci_set_device_state: Error - Device failed to enter state 4 (-5)
[306577.626121] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[306577.680236] r8169 0000:02:00.0 eth0: link down
[306577.680284] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[306577.757220] ieee80211 phy0: rt61pci_wait_bbp_ready: Error - BBP register access failed, aborting
[306577.757226] ieee80211 phy0: rt61pci_set_device_state: Error - Device failed to enter state 4 (-5)
[306577.789318] ieee80211 phy0: rt61pci_wait_bbp_ready: Error - BBP register access failed, aborting
[306577.789326] ieee80211 phy0: rt61pci_set_device_state: Error - Device failed to enter state 4 (-5)

So, I deleted the modprobe file that I had created, and removed and added my pci device (using the modprobe commands he gave). Things are back to normal (my wife is down about 25% of the time). After making the changes you suggested, things seem to be ok, at least for a couple minutes, but that isn't too surprising. If I go 2 hours without any outages, I'll mark this as closed.

Revision history for this message
Rusty (uigrad) said :
#10

It seems to have worked! I think it was turning off power management that did it! Thank you so much!

Revision history for this message
Rusty (uigrad) said :
#11

Thanks Mark Rijckenberg, that solved my question.