# Intel Wireless 3160 poor performance speed



## diego (Jun 7, 2020)

Hi all,
I have setup a fresh installation of GhostBSD 20.04.1 in a Toshiba Satellite L50-C. (Try first FreeBSD 12.1 but graphic card works better on GhostBSD  )

When the laptop was working on Linux Mint 19.3, it had an average speed (using wlan0) of 50-60 Mbit/s download and 20-30 Mbit/s upload. However now  the performance of the  Intel Wireless 3160 is really bad. Here an example:

```
root@ghostbsd:~ # speedtest --simple
Download: 11.89 Mbit/s
Upload: 3.20 Mbit/s
root@ghostbsd:~ # speedtest --simple
Download: 11.70 Mbit/s
Upload: 2.87 Mbit/s
```

I added the driver in the  loader.conf(5) config file and it looks fine:

```
root@ghostbsd:~ # cat /boot/loader.conf
...
# Wireless Intel 3160
if_iwn_load="YES"
if_iwnfw_load="YES"
iwm3160fw_load="YES"
...
```

Laptop Specifications:

```
root@ghostbsd:~ # inxi -Fz
System:    Kernel: FreeBSD 12.1-STABLE amd64 bits: 64 Desktop: MATE 1.22.3 OS: FreeBSD 12.1-STABLE
Machine:   Type: Notebook System: TOSHIBA product: SATELLITE L50-C v: PSKXEE-01200NEN serial: <filter>
           Mobo: FF50 model: 06F5 serial: <filter> BIOS: INSYDE v: 5.10 rev: 5.10 date: 07/30/2015
Battery:   ID-1: BAT0 charge: N/A condition: N/A/0.0 Wh
CPU:       Topology: Quad Core model: Intel Pentium N3700 bits: 64 type: MCP L2 cache: N/A
           Speed: 1600 MHz min/max: 480/1601 MHz Core speeds (MHz): No speed data found for 4 cores.
Graphics:  Device-1: Intel Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx Integrated Graphics driver: vgapci
           Display: server: X.Org 1.20.8 driver: modesetting resolution: 1366x768~60Hz
           OpenGL: renderer: Mesa DRI Intel HD Graphics 405 (Braswell) v: 4.5 Mesa 19.0.8
Audio:     Device-1: Intel Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx Series High Definition Audio driver: hdac
Network:   Device-1: Intel Wireless 3160 driver: iwm
           Device-2: Realtek RTL810xE PCI Express Fast Ethernet driver: re
           IF: re0 state: no mac: <filter>
           IF-ID-1: wlan0 state: associated speed: N/A duplex: N/A mac: <filter>
Drives:    Local Storage: total: 454.85 GiB used: 28.57 GiB (6.3%)
           ID-1: /dev/ada0 vendor: Samsung model: SSD 860 EVO 500GB RVT04B6Q size: 454.85 GiB
Partition: ID-1: / size: 448.71 GiB used: 28.57 GiB (6.4%) fs: ufs dev: /dev/label/rootfs0
Swap:      ID-1: swap-1 type: partition size: 2.50 GiB used: 0 KiB (0.0%) dev: /dev/label/swap0
Sensors:   Platform: No Freebsd support. Is a comparable sensors tool available?
Info:      Processes: 119 Uptime: 39m Memory: 7.87 GiB used: 2.74 GiB (34.7%) Shell: csh inxi: 3.1.01
```

I would really appreciate any help because I tried everything and dont know why the performance is so bad.
Best
Diego


----------



## George (Jun 7, 2020)

Maybe try if_iwm_load instead of if_iwn in your loader.conf? With an "m".


----------



## diego (Jun 7, 2020)

Thanks Elazar for your prompt answer. Trying your suggestion with these speed test results:

```
diego@ghostbsd:~$ speedtest --simple
Download: 16.39 Mbit/s
Upload: 13.34 Mbit/s
diego@ghostbsd:~$ speedtest --simple
Download: 16.06 Mbit/s
Upload: 13.34 Mbit/s
diego@ghostbsd:~$ speedtest --simple
Download: 16.05 Mbit/s
Upload: 13.15 Mbit/s
diego@ghostbsd:~$
```

I would say that there is a wee improvement . But it is still so far of 53 Mbit/s Download and 40 Mbit/s Upload obtained by a  Linux Mint Live USB , tested right now.

Additional information of rc.config(5):

```
diego@ghostbsd:~$ cat /etc/rc.conf
...
# ----------------------------------> Lan & Wireless
ifconfig_re0="SYNCDHCP"
wlans_iwm0="wlan0"
ifconfig_wlan0="WPA SYNCDHCP"
...
```


----------



## George (Jun 7, 2020)

It's a firmware driver by intel, so it shouldn't differ too much from the linux driver. 

Maybe someone knows some tweaks to speed up wlan, e.g. increasing the package size.


----------



## adri (Jun 8, 2020)

Probably because FreeBSD doesn't support 802.11n or 802.11ac?
Your card will most likely run on 802.11a or 802.11g speed.


----------



## Mjölnir (Jun 8, 2020)

I do not know if/how these settings affect the speed
in /etc/rc.conf
`create_args_wlan0="regdomain ETSI country DE anywhere roaming manual powersave"`
but it might be a good idea anyway to set them for your location (adjust the "ETSI" and "DE" accordingly)


----------



## diego (Jun 8, 2020)

adri said:


> Probably because FreeBSD doesn't support 802.11n or 802.11ac?
> Your card will most likely run on 802.11a or 802.11g speed.


Really interesting what you said .
Didn't think about that. Here more information.

```
root@ghostbsd:~ # ifconfig wlan0
wlan0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
    ether b7:6e:83:7e:ce:g7
    inet 192.168.1.22 netmask 0xffffff00 broadcast 192.168.0.255
    groups: wlan
    ssid SKY6D7 channel 36 (5180 MHz 11a) bssid 24:a7:dc:a9:8b:b5
    regdomain FCC country US authmode WPA2/802.11i privacy ON
    deftxkey UNDEF AES-CCM 3:128-bit txpower 17 bmiss 10 mcastrate 6
    mgmtrate 6 scanvalid 60 wme roaming MANUAL
    media: IEEE 802.11 Wireless Ethernet OFDM/54Mbps mode 11a
    status: associated
    nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
```

Hardware specification:

```
root@ghostbsd:~ # pciconf -lvc
...
iwm0@pci0:1:0:0:    class=0x028000 card=0x81708086 chip=0x08b38086 rev=0xcb hdr=0x00
    vendor     = 'Intel Corporation'
    device     = 'Wireless 3160'
    class      = network
    cap 01[c8] = powerspec 3  supports D0 D3  current D0
    cap 05[d0] = MSI supports 1 message, 64 bit enabled with 1 message
    cap 10[40] = PCI-Express 2 endpoint max data 128(128) FLR RO NS
                 link x1(x1) speed 2.5(2.5) ASPM L1(L0s/L1) ClockPM enabled
    ecap 0001[100] = AER 1 0 fatal 0 non-fatal 0 corrected
    ecap 0003[140] = Serial 1 b46d83ffff6ebef5
    ecap 0018[14c] = LTR 1
    ecap 000b[154] = Vendor 1 ID 51966
```
If you are right, I could not believe that theToshiba laptop has this "rubbish" wlan.
I am running FreeBSD 12.1 in other ACER laptop 5 year older and the wlan is 5 times faster!!


----------



## diego (Jun 8, 2020)

mjollnir said:


> I do not know if/how these settings affect the speed
> in /etc/rc.conf
> `create_args_wlan0="regdomain ETSI country DE anywhere roaming manual powersave"`
> but it might be a good idea anyway to set them for your location (adjust the "ETSI" and "DE" accordingly)


I am living in UK and have added this line in  /etc/rc.conf:

```
create_args_wlan0="country GB"
```
and now the wlan updated shows this:

```
root@ghostbsd:~ # ifconfig wlan0
...
    regdomain ETSI country GB authmode WPA2/802.11i privacy ON
...
```
But the speed is the same. At least I tried.  Thanks


----------



## Phishfry (Jun 8, 2020)

diego said:


> media: IEEE 802.11 Wireless Ethernet OFDM/54Mbps mode 11a


Well your output is showing 11a not 11na mode.
Here is a 11na output on my laptop.

```
wlan0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
    ether e4:d5:3d:38:2e:7f
    inet 192.168.100.23 netmask 0xffffff00 broadcast 192.168.100.255
    groups: wlan
    ssid APU channel 157 (5785 MHz 11a ht/40+) bssid 4c:5e:0c:11:65:38
    regdomain 106 indoor ecm authmode WPA2/802.11i privacy ON
    deftxkey UNDEF TKIP 2:128-bit TKIP 3:128-bit txpower 30 bmiss 7
    mcastrate 6 mgmtrate 6 scanvalid 60 ampdulimit 64k ampdudensity 8
    shortgi wme burst roaming MANUAL
    media: IEEE 802.11 Wireless Ethernet MCS mode 11na
    status: associated
    nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
```


----------



## diego (Jun 9, 2020)

Phishfry said:


> Well your output is showing 11a not 11na mode.
> Here is a 11na output on my laptop.
> 
> ```
> ...


Well if it's a hardware problem, I guess that I have few solutions:

1) Buy  a new External USB Network Adapter
2) Back to Linux Mint (I dont want to do that)
3) Any alternatives?

Thanks


----------



## scottro (Jun 9, 2020)

I'm not sure you'll find an external adapter (I think most of them use realtek, or did when I last looked, about a year ago).  As far as I can tell (my own experience is also with Intel, 7260) this is just one those things where you have better performance on Linux. If you find an external adapter to give you similar speeds, please post here, as I was never able to find one that gave Linux like speeds on Free or Open BSD.


----------



## George (Jun 9, 2020)

iwm() can do 802.11ac, or claims to.

```
iwm - Intel IEEE 802.11ac wireless network driver
```


----------



## Jose (Jun 9, 2020)

Looks like 802.11ac support is still very much a work in progress:





						rS351868
					






					reviews.freebsd.org
				








						Fixing up KA9Q-unix, or "neck deep in 30 year old codebases.."
					

I'll preface this by saying - yes, I'm still neck deep in FreeBSD's wifi stack and 802.11ac support, but it turns out it's slow work to fix ...




					adrianchadd.blogspot.com


----------



## diego (Jun 10, 2020)

scottro said:


> If you find an external adapter to give you similar speeds, please post here, as I was never able to find one that gave Linux like speeds on Free or Open BSD.


I will try an external adapter. 
More information found in this link:





						FreeBSD To Sponsor Work For 802.11ac Support - Phoronix
					






					www.phoronix.com


----------



## Phishfry (Jun 10, 2020)

Most USB adapters are also only 11a/11g so save your money.
I suggest you crack her open and install an Atheros wireless adapter.
With that you will acheive ~50 Megabits/sec
AR9380 on ebay for cheap.
Find out if your current wireless adapter is MiniPCIe or NGFF/M.2 and I can recommend something appropriate.
For MiniPCIe in a half size form factor I recommend AR5BHB112.








						Dell Alienware M18x R2 18.4" Genuine Laptop WiFi Wireless Card 7WCGT AR5BHB112  | eBay
					

Find many great new & used options and get the best deals for Dell Alienware M18x R2 18.4" Genuine Laptop WiFi Wireless Card 7WCGT AR5BHB112 at the best online prices at eBay! Free shipping for many products!



					www.ebay.com
				



For MiniPCIe in the full form factor I recommend AR5BXB112








						iMac 21" 27" A1311 A1312 2011 WiFi Bluetooth Air Port Card AR5BXB112 607-7211  | eBay
					

We solve all problems fast and fair. YOU WILL NOT BE DISAPPOINTED. At least give us a chance to correct any wrong.  Ask us if you are not sure - provide your system original S/N and we can check for you.



					www.ebay.com


----------



## diego (Jun 11, 2020)

Phishfry said:


> Most USB adapters are also only 11a/11g so save your money.
> I suggest you crack her open and install an Atheros wireless adapter.


Thanks for the information. I will go for a new one following your advice....


----------



## diego (Oct 30, 2020)

I think I have good news with new FreeBSD 12.2-RELEASE...

```
Updates to the wireless networking stack and various drivers have been introduced
to provide better 802.11n and 802.11ac support.
```

More details here:





						TrueNAS - Welcome to the Open Storage Era
					

TrueNAS is the World’s #1 Open Source Storage. Based on OpenZFS, it is trusted by millions and deployed worldwide.




					www.freebsdnews.com


----------

