# Incredibly slow 5 GHz wifi performance



## thunderburd (Dec 21, 2017)

I have a Lenovo ThinkPad X230 with the Centrino Advanced-N 6205 card. I've got FreeBSD 12.0-CURRENT installed and I can successfully connect to my home WiFi on the 5 GHz band. However, I'm noticing that there is a significant performance hit to my Internet speeds.

When I had a Linux distro installed I could usually achieve about 160 Mbps down over WiFi. According to fast.com I can only average about 63 Mbps down. However, if I test my download speeds with an Ethernet cable I can achieve 230 Mbps down (according to fast.com). 

Is there a step I missed when I configured my WiFi card? I tried scouring through iwn() but couldn't find anything.

Here is my /boot/loader.conf:


```
kern.vt.fb.default_mode="1366x768"
hw.pci.do_power_nodriver=3
drm.i915.enable_rc6=7

hw.psm.synaptics_support=1
hw.psm.trackpoint_support=1

mmc_load="YES"
mmcsd_load="YES"
sdhci_load="YES"
coretemp_load="YES"
tmpfs_load="YES"
aio_load="YES"
libiconv_load="YES"
libmchain_load="YES"
cd9660_iconv_load="YES"
msdosfs_iconv_load="YES"

snd_driver_load="YES"
fuse_load="YES"
```

Along with /etc/rc.conf:


```
defaultrouter="192.168.1.1"
sshd_enable="YES"
powerdxx_enable="YES"
powerdxx_flags="-a hiadaptive -b adaptive -i 75 -r 85 -p 500"
performance_cx_lower="Cmax"
economy_cx_lowest="Cmax"

dumpdev="NO"
kld_list="/boot/modules/i915kms.ko"
hald_enable="YES"
dbus_enable="YES"
moused_enable="YES"
moused_flags="-VH -A 1.1 -T 4"


wlans_iwn0="wlan0"
create_args_wlan0="country US regdomain FCC"
ifconfig_wlan0="WPA DHCP"

ntpd_enable="YES"
ntpd_flags="-g"
smartd_enable="YES"

sendmail_enable="NONE"
sendmail_msp_queue_enable="NO"
sendmail_outbound_enable="NO"
sendmail_submit_enable="NO"

linux_enable="YES"

musicpd_enable="YES"
fusefs_enable="YES"
autofs_enable="YES"
```

And finally, /etc/wpa_supplicant.conf:


```
ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=wheel

network={
   ssid=###
   priority=1
   psk=###
}
```


----------



## scottro (Dec 21, 2017)

A lot of cards in Free (and the other)BSD's don't support 802.11ac.  I know that my Intel 7260 doesn't, and so the best I get is an occasional 11MB, (only in CURRENT) but more commonly, in CURRENT and RELEASE around 2-3MB vs 30-50 in Linux.
I'm not familiar with that card. Does ifconfig iwn0 show something like 802.11a or other, indicating that you won't get Linux type speeds?   (Mine is iwm0, and the OpenBSD page explicitly states it won't achieve 802.11.ac, though the FreeBSD man page doesn't.  I don't know if the iwn0 is further along than iwm0, though)

The OpenBSD man page, however, does have


> *CAVEATS*
> 802.11n operation is currently limited to data rates MCS 0 to MCS 7.


----------



## Phishfry (Dec 21, 2017)

Good to see throughput numbers for comparison. I get 7 Megabytes/sec max on my all-FreeBSD wireless network.
This is with Atheros on both ends and a good 35ft. away from the FreeBSD WAP.

I am sure that Linux does offer higher speeds, but I like the familiarity of FreeBSD.
If you are the benchmarking type FreeBSD wireless is not for you. It is slower than Linux.

I have considered putting OpenWRT on my WAP but I like a congruent network. I have only one Linux box on my network.
If Zoneminder worked better I would have none.


----------



## Snurg (Dec 22, 2017)

Phishfry said:


> ... OpenWRT ...


Maybe a good idea because of Krack Attack.


----------



## scottro (Dec 22, 2017)

I _think_ (but don't have a card to test) that Atheros is one of the best supported cards under FreeBSD.


----------



## thunderburd (Dec 22, 2017)

scottro said:


> A lot of cards in Free (and the other)BSD's don't support 802.11ac.  I know that my Intel 7260 doesn't, and so the best I get is an occasional 11MB, (only in CURRENT) but more commonly, in CURRENT and RELEASE around 2-3MB vs 30-50 in Linux.
> I'm not familiar with that card. Does ifconfig iwn0 show something like 802.11a or other, indicating that you won't get Linux type speeds?   (Mine is iwm0, and the OpenBSD page explicitly states it won't achieve 802.11.ac, though the FreeBSD man page doesn't.  I don't know if the iwn0 is further along than iwm0, though)
> 
> The OpenBSD man page, however, does have



When I run `ifconfig wlan0` (the interface I created for `iwn0`), it shows it's working in 802.11na mode.

That's a bummer that throughput still hasn't been increased, though it thankfully isn't a deal-breaker. I'll ensure to just plug in with an Ethernet cable if I'm downloading something large and need the bandwidth. I just wanted to ensure I utilizing the most I could since I'm really enjoying FreeBSD as a workstation OS.


----------



## thunderburd (Dec 22, 2017)

scottro said:


> I _think_ (but don't have a card to test) that Atheros is one of the best supported cards under FreeBSD.



I'll have to look into that and see if there's an Atheros card that isn't blacklisted on the BIOS. If so, I might consider picking one up and seeing if there's a significant performance increase.


----------



## scottro (Dec 22, 2017)

But, just glancing through stuff posted about it, I'm not sure that it gives 802.11ac either or if they were just working on it first (before Intel)  Looks like it's on the todo list. 

http://adrianchadd.blogspot.com/2017/04/bringing-up-80211ac-on-freebsd.html


----------



## rhsbsd (Dec 22, 2017)

The Chinese made Atheros 8279 aka AR5B97 is less than lack luster. Tried and tested. Save your money. I installed hard wire connection as well. Not to detract from O.P's subject but I need to `pkill -9 wpa_supplicant` and `ifconfig wlan0 destroy` in order to stop zillions of these:
	
	



```
09/15/17 07:38:49 AM   my.namespace   kernel   Sep 15 07:38:49 my.namespace wpa_supplicant[3517]: ioctl[SIOCS80211, op=95, val=208, arg_len=0]: Device not configured
```
Is there a system remedy for this or do I need a script?


----------



## Phishfry (Jan 18, 2018)

On the half-card Atheros I too found lackluster performance early on in my FreeBSD experience.(AR9285 and AR9287 half cards)
I only use one half-card module and it is AR9380 based AR5BHB112. It offers the best wifi on FreeBSD from a half card module.
https://wikidevi.com/wiki/Atheros_AR5BHB112
These are 25 bucks used on ebay so not the cheapest but it works well.
Nice because alot of embedded platforms only offer a half slot.
Even though most on ebay are Dell they work on any machines without a whitelist.


----------

