It's as the title says, when I use the desktop GUI tool to connect to WiFi, I end up with my WiFi disconnecting and reconnecting every couple of minutes.
Here's part of the output from the syslog via dmesg
:
[ 4057.718731] wlan0: deauthenticating from xx:xx:xx:xx:fa:80 by local choice (Reason: 2=PREV_AUTH_NOT_VALID)
[ 4063.163118] wlan0: authenticate with xx:xx:xx:xx:fa:80
[ 4063.215966] wlan0: send auth to xx:xx:xx:xx:fa:80 (try 1/3)
[ 4063.218028] wlan0: authenticated
[ 4063.227742] wlan0: associate with xx:xx:xx:xx:fa:80 (try 1/3)
[ 4063.231665] wlan0: RX AssocResp from xx:xx:xx:xx:fa:80 (capab=0x411 status=0 aid=4)
[ 4063.235835] wlan0: associated
[ 4063.236153] ath: EEPROM regdomain: 0x8348
[ 4063.236165] ath: EEPROM indicates we should expect a country code
[ 4063.236173] ath: doing EEPROM country->regdmn map search
[ 4063.236178] ath: country maps to regdmn code: 0x3a
[ 4063.236183] ath: Country alpha2 being used: US
[ 4063.236188] ath: Regpair used: 0x3a
[ 4063.236193] ath: regdomain 0x8348 dynamically updated by country element
[ 4140.174715] wlan0: deauthenticating from xx:xx:xx:xx:fa:80 by local choice (Reason: 2=PREV_AUTH_NOT_VALID)
[ 4145.654878] wlan0: authenticate with xx:xx:xx:xx:fa:80
[ 4145.707746] wlan0: send auth to xx:xx:xx:xx:fa:80 (try 1/3)
[ 4145.711686] wlan0: authenticated
[ 4145.717005] wlan0: associate with xx:xx:xx:xx:fa:80 (try 1/3)
[ 4145.720996] wlan0: RX AssocResp from xx:xx:xx:xx:fa:80 (capab=0x411 status=0 aid=3)
[ 4145.726610] wlan0: associated
[ 4145.726950] ath: EEPROM regdomain: 0x8348
[ 4145.726963] ath: EEPROM indicates we should expect a country code
[ 4145.726969] ath: doing EEPROM country->regdmn map search
[ 4145.726973] ath: country maps to regdmn code: 0x3a
[ 4145.726977] ath: Country alpha2 being used: US
[ 4145.726980] ath: Regpair used: 0x3a
[ 4145.726984] ath: regdomain 0x8348 dynamically updated by country element
[ 4221.796363] wlan0: deauthenticating from xx:xx:xx:xx:fa:80 by local choice (Reason: 2=PREV_AUTH_NOT_VALID)
[ 4227.236738] wlan0: authenticate with xx:xx:xx:xx:fa:80
[ 4227.288859] wlan0: send auth to xx:xx:xx:xx:fa:80 (try 1/3)
[ 4227.291345] wlan0: authenticated
[ 4227.299135] wlan0: associate with xx:xx:xx:xx:fa:80 (try 1/3)
[ 4227.307388] wlan0: RX AssocResp from xx:xx:xx:xx:fa:80 (capab=0x411 status=0 aid=3)
[ 4227.311607] wlan0: associated
[ 4227.312000] ath: EEPROM regdomain: 0x8348
[ 4227.312014] ath: EEPROM indicates we should expect a country code
[ 4227.312022] ath: doing EEPROM country->regdmn map search
[ 4227.312028] ath: country maps to regdmn code: 0x3a
[ 4227.312033] ath: Country alpha2 being used: US
[ 4227.312038] ath: Regpair used: 0x3a
[ 4227.312043] ath: regdomain 0x8348 dynamically updated by country element
[ 4314.140165] wlan0: deauthenticating from xx:xx:xx:xx:fa:80 by local choice (Reason: 2=PREV_AUTH_NOT_VALID)
[ 4319.613859] wlan0: authenticate with xx:xx:xx:xx:fa:80
[ 4319.663466] wlan0: send auth to xx:xx:xx:xx:fa:80 (try 1/3)
[ 4319.665869] wlan0: authenticated
[ 4319.669931] wlan0: associate with xx:xx:xx:xx:fa:80 (try 1/3)
[ 4319.674287] wlan0: RX AssocResp from xx:xx:xx:xx:fa:80 (capab=0x411 status=0 aid=3)
[ 4319.678976] wlan0: associated
[ 4319.679346] ath: EEPROM regdomain: 0x8348
[ 4319.679360] ath: EEPROM indicates we should expect a country code
[ 4319.679368] ath: doing EEPROM country->regdmn map search
[ 4319.679373] ath: country maps to regdmn code: 0x3a
[ 4319.679379] ath: Country alpha2 being used: US
[ 4319.679384] ath: Regpair used: 0x3a
[ 4319.679388] ath: regdomain 0x8348 dynamically updated by country element
[ 4460.160571] wlan0: deauthenticating from xx:xx:xx:xx:fa:80 by local choice (Reason: 2=PREV_AUTH_NOT_VALID)
[ 4465.650191] wlan0: authenticate with xx:xx:xx:xx:fa:80
[ 4465.704961] wlan0: send auth to xx:xx:xx:xx:fa:80 (try 1/3)
[ 4465.707455] wlan0: authenticated
[ 4465.715265] wlan0: associate with xx:xx:xx:xx:fa:80 (try 1/3)
[ 4465.725113] wlan0: RX AssocResp from xx:xx:xx:xx:fa:80 (capab=0x411 status=0 aid=3)
[ 4465.730581] wlan0: associated
[ 4465.730962] ath: EEPROM regdomain: 0x8348
[ 4465.730976] ath: EEPROM indicates we should expect a country code
[ 4465.730983] ath: doing EEPROM country->regdmn map search
[ 4465.730989] ath: country maps to regdmn code: 0x3a
[ 4465.730994] ath: Country alpha2 being used: US
[ 4465.730999] ath: Regpair used: 0x3a
[ 4465.731005] ath: regdomain 0x8348 dynamically updated by country element
In the time that it does remain connected, I am able to access the network, but the speed is terrible and I suspect it's dropping most of the packets.
To help with troubleshooting, I decided to bypass NetworkManager and manually connect to the WiFi myself:
user@ubuntu:~$ sudo systemctl disable wpa_supplicant
Removed /etc/systemd/system/multi-user.target.wants/wpa_supplicant.service.
Removed /etc/systemd/system/dbus-fi.w1.wpa_supplicant1.service.
user@ubuntu:~$ sudo systemctl stop wpa_supplicant
user@ubuntu:~$ sudo systemctl mask wpa_supplicant
Created symlink /etc/systemd/system/wpa_supplicant.service -> /dev/null.
user@ubuntu:~$ wpa_passphrase NetworkSSID NetworkPassword >prodwifi.wpa
user@ubuntu:~$ sudo wpa_supplicant -i wlan0 -c prodwifi.wpa
Successfully initialized wpa_supplicant
wlan0: SME: Trying to authenticate with xx:xx:xx:xx:fa:80 (SSID='NetworkSSID' freq=2412 MHz)
wlan0: Trying to associate with xx:xx:xx:xx:fa:80 (SSID='NetworkSSID' freq=2412 MHz)
wlan0: Associated with xx:xx:xx:xx:fa:80
wlan0: CTRL-EVENT-SUBNET-STATUS-UPDATE status=0
wlan0: CTRL-EVENT-REGDOM-CHANGE init=COUNTRY_IE type=COUNTRY alpha2=US
wlan0: WPA: Key negotiation completed with xx:xx:xx:xx:fa:80 [PTK=CCMP GTK=CCMP]
wlan0: CTRL-EVENT-CONNECTED - Connection to xx:xx:xx:xx:fa:80 completed [id=0 id_str=]
wlan0: WPA: Group rekeying completed with xx:xx:xx:xx:fa:80 [GTK=CCMP]
In a separate terminal, I then run sudo dhclient -v wlan0
to obtain an IP on the interface.
So far I haven't had any issues with it running like this, over the last hour it hasn't disconnected or deauthenticated even once. Network performance is good - I downloaded a test file at over 3Mb/s.
This seems to indicate that the issue lies somewhere with NetworkManager. Given the messages in the syslog about deauthenticating by "local choice" and the PREV_AUTH_NOT_VALID text, it seems that NetworkManager is explicitly deciding to deauthenticate from the network, I just don't understand why.
Can anyone please provide insight as to why this is happening and how I can address the issue?