LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   A few wifi problems, both with wpa_supplicant/dhcpcd and NetworkManager (https://www.linuxquestions.org/questions/slackware-14/a-few-wifi-problems-both-with-wpa_supplicant-dhcpcd-and-networkmanager-4175550706/)

theactionindex 08-13-2015 03:37 PM

A few wifi problems, both with wpa_supplicant/dhcpcd and NetworkManager
 
So, I just recently built a desktop after having only laptops for about 7 years, and I couldn't be happier. I had a few rocky moments but managed to get past of them but the one that is causing me the most trouble/headache is getting wireless to work.

I am on Slackware 14.1, this has happened on 2 different installs (long story) but I have had problems on both. The first time I had used a combination of wpa_supplicant and then using dhcpcd, and this one I selected network manager as my default on this install - but either way I am having a hard time keeping a stable connection, or connecting at all.

To give a little more background, my wifi is set up with WPA2 Personal (AES encryption). A lot of the times on booting up, it will not start. A very slight temporary fix is deleting /var/run/wpa_supplicant right after logging in (a fix I found on another thread), it works great for a while, if it works at all and disconnects, but I can only do that once (and that is right when I boot up). Other times, it just tries to connect constantly without doing anything. If it connects, the connection lasts maybe 10 minutes to a few hours.

My dmesg from the time it happened last (from boot to when it disconnected):
Code:

[  15.768913] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[  15.776164] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[  19.401017] wlan0: authenticate with 1c:af:f7:d7:2a:53
[  19.411498] wlan0: send auth to 1c:af:f7:d7:2a:53 (try 1/3)
[  19.413328] wlan0: authenticated
[  19.414392] wlan0: associate with 1c:af:f7:d7:2a:53 (try 1/3)
[  19.418520] wlan0: RX AssocResp from 1c:af:f7:d7:2a:53 (capab=0x431 status=0 aid=9)
[  19.418595] wlan0: associated
[  19.418610] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
[ 3104.711726] cfg80211: Calling CRDA to update world regulatory domain
[ 3104.743850] cfg80211: World regulatory domain updated:
[ 3104.743854] cfg80211:  (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
[ 3104.743855] cfg80211:  (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[ 3104.743857] cfg80211:  (2457000 KHz - 2482000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
[ 3104.743858] cfg80211:  (2474000 KHz - 2494000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
[ 3104.743859] cfg80211:  (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[ 3104.743861] cfg80211:  (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[ 3106.578588] wlan0: authenticate with 1c:af:f7:d7:2a:53
[ 3106.587710] wlan0: send auth to 1c:af:f7:d7:2a:53 (try 1/3)
[ 3106.689827] wlan0: send auth to 1c:af:f7:d7:2a:53 (try 2/3)
[ 3106.794787] wlan0: authenticated
[ 3106.795771] wlan0: associate with 1c:af:f7:d7:2a:53 (try 1/3)
[ 3106.909344] wlan0: associate with 1c:af:f7:d7:2a:53 (try 2/3)
[ 3107.063567] wlan0: associate with 1c:af:f7:d7:2a:53 (try 3/3)
[ 3107.097763] wlan0: association with 1c:af:f7:d7:2a:53 timed out
[ 3116.154795] wlan0: authenticate with 1c:af:f7:d7:2a:53
[ 3116.165490] wlan0: direct probe to 1c:af:f7:d7:2a:53 (try 1/3)
[ 3116.366154] wlan0: direct probe to 1c:af:f7:d7:2a:53 (try 2/3)
[ 3116.567014] wlan0: send auth to 1c:af:f7:d7:2a:53 (try 3/3)
[ 3116.569432] wlan0: authenticated
[ 3116.569949] wlan0: associate with 1c:af:f7:d7:2a:53 (try 1/3)
[ 3116.785864] wlan0: associate with 1c:af:f7:d7:2a:53 (try 2/3)
[ 3116.961742] wlan0: associate with 1c:af:f7:d7:2a:53 (try 3/3)
[ 3116.970755] wlan0: RX AssocResp from 1c:af:f7:d7:2a:53 (capab=0x431 status=0 aid=9)
[ 3116.970820] wlan0: associated
[ 3123.712626] cfg80211: Calling CRDA to update world regulatory domain
[ 3123.732358] cfg80211: World regulatory domain updated:
[ 3123.732360] cfg80211:  (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
[ 3123.732362] cfg80211:  (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[ 3123.732363] cfg80211:  (2457000 KHz - 2482000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
[ 3123.732365] cfg80211:  (2474000 KHz - 2494000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
[ 3123.732366] cfg80211:  (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[ 3123.732367] cfg80211:  (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)

And it repeats over and over again.

If it doesnt do that, it gives random errors (unfortunately, don't have any of these saved to my log) but it will authenticate and deauthenticates immediately after and gives error codes 2 or 3. Next time that happens, I'll post it right after

I'm at my wits end, I haven't had this much trouble with wifi on linux in years. I'd appreciate any help, and will provide more information if necessary (may have left something out or worded things weird). Thank you!

Didier Spaier 08-13-2015 05:28 PM

Maybe this has something top do with the network adapter or its driver? What gives this command:
Code:

lspci -knn|grep -A3 Network
Maybe also using some option when loading the module could help. To know the available parameters:
Code:

modinfo <driver_name>|grep "^parm:"

theactionindex 08-13-2015 05:34 PM

Quote:

Originally Posted by Didier Spaier (Post 5405420)
Maybe this has something top do with the network adapter or its driver? What gives this command:
Code:

lspci -knn|grep -A3 Network
Maybe also using some option when loading the module could help. To know the available parameters:
Code:

modinfo <driver_name>|grep "^parm:"



Code:

root@neal:~# lspci -knn|grep -A3 Network
05:00.0 Network controller [0280]: Atheros Communications Inc. AR9300 Wireless LAN adaptor [168c:0030] (rev 01)
        Subsystem: Atheros Communications Inc. Device [168c:3112]
        Kernel driver in use: ath9k
        Kernel modules: ath9k
root@neal:~# modinfo ath9k|grep "^parm:"
parm:          debug:Debugging mask (uint)
parm:          nohwcrypt:Disable hardware encryption (int)
parm:          blink:Enable LED blink on activity (int)
parm:          btcoex_enable:Enable wifi-BT coexistence (int)
parm:          enable_diversity:Enable Antenna diversity for AR9565 (int)


Ztcoracat 08-13-2015 08:28 PM

Hi & Welcome to Linux Questions.

Congrads on your Slackware installation!

I too have WPA and had the exact same thing going on with the wifi as you did.
The wireless connection would stay up for maybe 10 min's and than crash to the point where I couldn't see my network and had to reboot.

Organilly when I first opened the /etc/wpa_supplicant.conf file in nano I only had these 2 arguments.
Code:

ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=root

I added the 16 lines from the Slackware documentation and since a complete shutdown (waited a few min's) and a fresh reboot I haven't had anymore trouble with the wireless.
http://docs.slackware.com/slackbook:wifi

Code:

bash-4.2# cat /etc/wpa_supplicant.conf
ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=root

#Added all 16 lines on Aug 5th

# This line enables the use of wpa_cli which is used by rc.wireless
# if possible (to check for successful association)
ctrl_interface=/var/run/wpa_supplicant
# By default, only root (group 0) may use wpa_cli
ctrl_interface_group=0
eapol_version=1
ap_scan=1
fast_reauth=1
#country=US

# WPA protected network, supply your own ESSID and WPAPSK here:
network={
 scan_ssid=1
 ssid="Put the name of your network here" 
 key_mgmt=WPA-PSK
 psk="Put your passphrase that your ISP gave you here."
}
bash-4.2#

During my installation I told the installer to use Network Manager.
The first time I installed Slackware dhcp didn't work and I didn't configure wicd.

-::-Include the quotes on either side of your ssid= and on your psk=.-::-

Editing that config file worked for me.
Hope it does the same for you.

If not you could disable network manager and configure wicd.

ReaperX7 08-14-2015 12:08 AM

You also could try switching the client used by NetworkManager.

Edit /etc/NetworkManager/NetworkManager.conf to use

Code:

dhcp=dhclient
rather than

Code:

dhcp=dhcpcd
A few problems between NetworkManager and dhcpcd have been noted as of recent.

allend 08-14-2015 05:01 AM

I suggest you interrogate /var/log/messages for output from NetworkManager while connecting as well as /var/log/syslog for errors.

theactionindex 08-21-2015 01:15 PM

Hello everyone! I do have some updates. I apologize for being silent. Over time, things have gotten more stable - I am getting speeds that are more consistent and it can connect better.

I took both ReaperX7's advice, as well as Ztcoracat's. I modified my wpa_supplicant.conf to everything that was listed there, and used dhclient instead of dhcpcd.

I do sometimes get the errors I had before (such as wlan0 deauthenticating w/ error number 2 or 3) but it hasn't happened in 5 days, and after a reboot.

Thanks for the help guys, if I have issues with this again, I'll post back!

---------- Post added 08-21-15 at 02:16 PM ----------

Hello everyone! I do have some updates. I apologize for being silent. Over time, things have gotten more stable - I am getting speeds that are more consistent and it can connect better.

I took both ReaperX7's advice, as well as Ztcoracat's. I modified my wpa_supplicant.conf to everything that was listed there, and used dhclient instead of dhcpcd.

I do sometimes get the errors I had before (such as wlan0 deauthenticating w/ error number 2 or 3) but it hasn't happened in 5 days, and after a reboot.

Thanks for the help guys, if I have issues with this again, I'll post back!

Ztcoracat 08-21-2015 05:03 PM

Your Welcome-

Glad to hear that your wifi connection is running better for you.
Thanks for the update-;)


All times are GMT -5. The time now is 08:40 PM.