# Internet speed on freebsd 13.0 is extremely slow



## anarchy89 (May 1, 2022)

I just installed freebsd 13.0 on my lenovo thinkpad x260. I also have debian and windows 10 installed on the same laptop in different partitions.

On both debian and window 10, when I use fast.com, I can easily get 400mbps on wireless.

However, on my freebsd, for both wired and wireless, I can only seem to get 20mbps.

I am not sure where to begin to fix this, I just started using freebsd and only just figured out how to connect to the internet. I want to try to understand what is going on. I have spent the last to days reading documentation and trying to find posts in forums from people with similar problems, but I can seem to solve it their way. 

I would really appreciate some guidance. I really want to learn how to use this OS.

The output of my ifconfig wlan0 look like this,


```
wlan0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
    ether xx:xx:xx:xx:xx:xx
    inet6 fe80::xxxx:xxxx:xxxx:xxxx%wlan0 prefixlen 64 scopeid 0x3
    inet 192.168.1.xxx netmask 0xffffff00 broadcast 192.168.1.255
    groups: wlan
    ssid xxxxxxxx channel 36 (5180 MHz 11a) bssid xx:xx:xx:xx:xx:xx
    regdomain APAC2 country XX 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
    parent interface: iwm0
    media: IEEE 802.11 Wireless Ethernet OFDM/54Mbps mode 11a
    status: associated
    nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
```

My /etc/rc.conf looks like this,


```
zfs_enable="YES"
clear_tmp_enable="YES"
hostname="freebsd"
keymap="us.kbd"
wlans_iwm0="wlan0"
ifconfig_wlan0="WPA SYNCDHCP"
# ifconfig_DEFAULT="SYNCDHCP -rxcsum -txcsum -lro -tso -vlanhwtso"
create_args_wlan0="country SG regdomain APAC2"
local_unbound_enable="YES"
sshd_enable="YES"
moused_enable="YES"
ntpdate_enable="YES"
ntpd_enable="YES"
powerd_enable="YES"
# Set dumpdev to "AUTO" to enable crash dumps, "NO" to disable
dumpdev="AUTO"
dbus_enable="YES"
hald_enable="YES"
slim_enable="YES"
kld_list="i915kms"
ifconfig_em0="DHCP"
ifconfig_vtnet0_ipv6="inet6 accept_rtadv"
ipv6_activate_all_interfaces="YES"
```

The output from my sudo ifconfig wlan0 list sta looks like this,


```
ADDR               AID CHAN RATE RSSI IDLE  TXSEQ  RXSEQ CAPS FLAG        
xx:xx:xx:xx:xx:xx   32   36  54M 38.0    0  35896  27568 EP   AQ           RSN BSSLOAD HTCAP VHTCAP VHTOPMODE VHTPWRENV WME (rssi 0.0:0.0:0.0:0.0 nf 0:0:0:0)
```

The output from sudo ifconfig wlan0 list roam looks like this,


```
roam:11a     rssi    7dBm rate 12 Mb/s
    roam:11b     rssi    7dBm rate  1 Mb/s
    roam:11g     rssi    7dBm rate  5 Mb/s
```

When I try to change the speed using this commands, sudo ifconfig wlan0 mode 11n, this is the error


```
ifconfig: SIOCSIFMEDIA (media): Device not configured
```

When I try, sudo ifconfig wlan0 roam:rate 1000, I get

```
ifconfig: SIOCS80211: Invalid argument
```


----------



## grahamperrin@ (May 1, 2022)

Welcome to FreeBSD Forums. 



anarchy89 said:


> … on my freebsd, for both wired and wireless, I can only seem to get 20mbps. …



What's the wireless hardware? 

I used to get less than 10 on FreeBSD, alongside Windows getting around 9x as fast from the same router. I'm not sure when or how things improved, but (with 14.0-CURRENT) the slowness with Wi-Fi seems to be a thing of the past. 

<https://bsd-hardware.info/?computer=6fbb1f806232>



> … freebsd 13.0 …



Which version, exactly? 

`freebsd-version -kru ; uname -aKU`


----------



## anarchy89 (May 1, 2022)

grahamperrin said:


> Welcome to FreeBSD Forums.
> 
> 
> 
> ...


Here is the output


```
13.0-RELEASE-p11
13.0-RELEASE-p11
13.0-RELEASE-p11
FreeBSD freebsd 13.0-RELEASE-p11 FreeBSD 13.0-RELEASE-p11 #0: Tue Apr  5 18:54:35 UTC 2022     root@amd64-builder.daemonology.net:/usr/obj/usr/src/amd64.amd64/sys/GENERIC  amd64 1300139 1300139
```

Is there a way I can upgrade to freebsd 14? 

Or do a fresh install without disrupting my Windows 10 and debian installs?


----------



## grahamperrin@ (May 2, 2022)

Essentials​Please, *what's the wireless hardware?*

From `wlans_iwm0="wlan0"` in your opening post, we can tell that the iwm(4) driver is in use, however this covers a broad range of (Intel IEEE 802.11ac) hardware.

I see Intel _Wireless 8260_ at <https://bsd-hardware.info/?d=FreeBSD&probe=f53c625efd#pci:8086-24f3-8086-0130> for someone's ThinkPad X260 _20F5A28AUK_, I can't guess whether this differs from your X260.

_8260_ near the foot of <https://bsd-hardware.info/?d=FreeBSD&probe=f53c625efd&log=pciconf>. *Please run this command*:

`pciconf -lv | grep -A 14 0x028000`




anarchy89 said:


> Is there a way I can upgrade to freebsd 14?



Yes, however it involves building and installing from source code, which is probably not what's wanted by a newcomer.

More importantly, I can *not* be certain that it'll resolve the issue(s) in your case, because in mine:



grahamperrin said:


> I'm not sure when or how things improved,



– and FreeBSD `14.0-CURRENT` is not release quality (not recommended for a newcomer to FreeBSD).

Re: the second of the visualisations at <https://forums.freebsd.org/posts/564808> – *FreeBSD development lifecycle* – think _green is good_ (like, `RELEASE` is more stable than `STABLE`). If anything there doesn't make sense, and you can't find an explanation elsewhere, feel free to ask over there (the _FreeBSD release engineering_ topic).



anarchy89 said:


> … a fresh install without disrupting my Windows 10 and debian installs?



You could build and install from the source code for `13.0-RELEASE-p11`, however I don't imagine this helping in your case.


----------



## anarchy89 (May 2, 2022)

grahamperrin said:


> Essentials​Please, *what's the wireless hardware?*
> 
> From `wlans_iwm0="wlan0"` in your opening post, we can tell that the iwm(4) driver is in use, however this covers a broad range of (Intel IEEE 802.11ac) hardware.
> 
> ...


This is the output from that command,


```
iwm0@pci0:4:0:0:    class=0x028000 rev=0x3a hdr=0x00 vendor=0x8086 device=0x24f3 subvendor=0x8086 subdevice=0x0130
    vendor     = 'Intel Corporation'
    device     = 'Wireless 8260'
    class      = network
```


----------



## SirDice (May 2, 2022)

```
Currently,	iwm only supports 802.11b and 802.11g modes.  It will not as-
     sociate to	access points that are configured to operate only in 802.11n
     or	802.11ac modes.
```
iwn(4)


----------



## anarchy89 (May 2, 2022)

SirDice said:


> ```
> Currently,    iwm only supports 802.11b and 802.11g modes.  It will not as-
> sociate to    access points that are configured to operate only in 802.11n
> or    802.11ac modes.
> ...


Then why am I also getting the same speed on the wired ethernet connection? On windows and debian my fast.com goes to 950 mbps. On my freebsd it only stays at 20 as well.


----------



## SirDice (May 2, 2022)

anarchy89 said:


> Then why am I also getting the same speed on the wired ethernet connection?


Your system is configured for wireless, not wired. Disable your wireless interface to test this correctly.


----------



## bakul (May 2, 2022)

grahamperrin said:


> I'm not sure when or how things improved, but (with 14.0-CURRENT) the slowness with Wi-Fi seems to be a thing of the past.


These changes are in the 13/stable branch. No need to upgrade to -CURRENT.
But even iwlwifi doesn’t handle  802.11ax (or 802.11ac, AFAIK) so still behind windows or Linux drivers that support the fastest speeds.


----------



## grahamperrin@ (May 2, 2022)

bakul said:


> These changes are in the 13/stable branch. …



Please, can you link to a relevant commit?

I tried, repeatedly, to find something a few weeks ago; and there's no mention of iwn(4) – _n_ – in the current draft of release notes for 13.1. 



grahamperrin said:


> ⚠ FreeBSD 13.1-RELEASE Release Notes​Any significant omission?


----------



## grahamperrin@ (May 2, 2022)

anarchy89 please, can you recall which guide(s) you followed for installation of FreeBSD? The page addresses will be ideal, thanks.



anarchy89 said:


> `hald_enable="YES"`



You should remove that line. HAL died more than a year ago, which might mean that you followed an outdated guide.



SirDice said:


> … Disable your wireless interface to test this correctly.



anarchy89 if there's difficulty regaining an Internet connection (with your wired network) after e.g. `ifconfig wlan0 down`, please let us know.


----------



## Erichans (May 2, 2022)

SirDice said:


> ```
> Currently,	iwm only supports 802.11b and 802.11g modes.  It will not as-
> sociate to	access points that are configured to operate only in 802.11n
> or	802.11ac modes.
> ...





grahamperrin said:


> Please, can you link to a relevant commit?
> 
> I tried, repeatedly, to find something a few weeks ago; and there's no mention of iwn(4) – _n_ – in the current draft of release notes for 13.1.


I think what SirDice meant was iwm(4).
However, it seems that iwm(4) will be taken over by iwlwifi(4):


> DESCRIPTION
> The iwlwifi driver	is derived from	Intel's	Linux iwlwifi driver and pro-
> vides support for all chipsets supported by the mvm part of that driver.
> iwlwifi will be a successor to iwm(4) and may superseed that driver in
> ...


as was committed to stable/13 on 2022-01-09 02:39 per commit


----------



## grahamperrin@ (May 2, 2022)

Erichans said:


> I think what _*[FONT=monospace]SirDice[/FONT]*_ meant was iwm(4).



Understood, thanks.

I'm curious about iw_n_ –



grahamperrin said:


> I used to get less than 10 … not sure when or how things improved, but (with 14.0-CURRENT) the slowness with Wi-Fi seems to be a thing of the past.
> 
> <https://bsd-hardware.info/?computer=6fbb1f806232>



– iwn at <https://bsd-hardware.info/?d=FreeBSD&probe=c4dee3f070#pci:8086-0082-8086-1301> in the most recent result.


----------



## bakul (May 2, 2022)

grahamperrin said:


> Please, can you link to a relevant commit?
> 
> I tried, repeatedly, to find something a few weeks ago; and there's no mention of iwn(4) – _n_ – in the current draft of release notes for 13.1.


iwm, what the OP is using, is superceded by iwlwifi and that is what I was talking about. It is merged in stable/13. I don't think iwn would work for the same hardware but frankly I can't keep track of the zillion different versions of wifi boards Intel made/sells!


----------



## grahamperrin@ (May 2, 2022)

Thanks,



bakul said:


> iwm, what the OP is using, is superceded by iwlwifi …



anarchy89 if you like: 

upgrade to (release candidate) `13.1-RC5`
upgrade packages
manually remove the Wi-Fi lines from /etc/rc.conf
run `bsdconfig`, networking management, wireless networks …
after configuration is complete, review /etc/rc.conf to tell which driver was chosen.
bsdconfig(8)

rc.conf(5)


----------

