FreeBSD 15: Wireless (iwlwifi) working on a live system, but not an installed one

With the release of FreeBSD 15 and all this exciting news about WiFi improvements around Intel (more specifically iwlwifi), I decided to do some testing. I had an old Lenovo laptop laying around (with a Intel 8260 card) and decided to give it a crack in a live system. Much to my surprise after loading iwlwifi I was able to connect to my 5G wireless network (ac), which according to the man page isn't even supported (its only supported on 2000 series cards) - https://man.freebsd.org/cgi/man.cgi?iwlwifi(4)

connected Live.png


Unfortunately, after the installation and first boot, the surprise turned to disappointment as it wouldn't connect.
To remove any potential user error of threw together a quick script that automate connecting to my network and I can confirm, that something seems broken post install...

Tested against:
1) A fresh boot of a Live environment
2) A fresh boot after an offline install (Installed environment). I had to manually copy the firmware files across because for some reason the installer copies the iwm firmware but not the iwlwifi firmware; go figure.

Attached is the basic connection script that uses wpa_supplicant
Messages logs from both Live and Installed enviroments

Looking at the Installed environment, I can see that the connection fails after the interface comes up which is followed by a Linuxpki error.
Dec 4 17:15:17 freebie kernel: wlan0: Ethernet address: a4:34:d9:c5:73:49
Dec 4 17:15:19 freebie kernel: iwlwifi0: Not associated and the time event is over already...
Dec 4 17:15:19 freebie kernel: iwlwifi0: linuxkpi_ieee80211_connection_loss: vif 0xfffffe00a8c53f00 vap 0xfffffe00a8c53010 state ASSOC (synched 1, assoc 0 beacons 0 dtim_period 0)

I've done some basic troubleshooting. Copied all loader configs, sysctl configurations and rc.conf (although its not used here). I compared the SHAs for all LinuxKPIs files, if_iwlifif and the firmware files in both environments,,,,, everything matches.

Thinking about logging a bug, but wondering if anyone has experienced this?
 

Attachments

Not exactly the same, but I do get a similar linuxpki message. Except in my case the wifi works also on the installed system.

On my ThinkPad T460 FreeBSD 15 defaults to the iwn driver for wifi.

iwm0: <Intel(R) Dual Band Wireless AC 8260> mem 0xe1000000-0xe1001fff at device 0.0 on pci2
iwm8000Cfw: could not load firmware image, error 8
iwm0: hw rev 0x200, fw ver 22.361476.0, address e4:a4:71:4f:e4:f8
I did rename /boot/firmware/iwm8000C to iwm8000Cfw, as this looked like a bug to me. But as you can see the driver still cannot load this firmware and wifi doesn't work on this driver.

So I manually switch to iwlwifi as I don't know how to force FreeBSD to do this on boot....

# devctl detach pci0:4:0:0
# devctl set driver -f pci0:4:0:0 iwlwifi
# wpa_supplicant -B -i wlan0 -c /etc/wpa_supplicant.conf

From there on the wifi works.

Dec 4 11:26:16 t460 login[2928]: ROOT LOGIN (root) ON ttyv0
Dec 4 11:26:31 t460 dhclient[2286]: receive_packet failed on wlan0: Device not configured
Dec 4 11:26:31 t460 dhclient[2286]: ioctl(SIOCGIFFLAGS) on wlan0: Operation not permitted
Dec 4 11:26:31 t460 dhclient[2286]: Interface wlan0 no longer appears valid.
Dec 4 11:26:31 t460 dhclient[2286]: No live interfaces to poll on - exiting.
Dec 4 11:26:31 t460 dhclient[2286]: exiting.
Dec 4 11:26:31 t460 dhclient[2286]: connection closed
Dec 4 11:26:31 t460 dhclient[2286]: exiting.
Dec 4 11:26:32 t460 kernel: wlan0: link state changed to DOWN
Dec 4 11:26:32 t460 root[2983]: /etc/rc.d/netif: WARNING: wlan0 does not exist. Skipped.
Dec 4 11:26:33 t460 kernel: iwm0: detached
Dec 4 11:26:40 t460 ntpd[2784]: error resolving pool 0.freebsd.pool.ntp.org: Name could not be resolved at this time (2)
Dec 4 11:26:40 t460 ntpd[2784]: error resolving pool 2.freebsd.pool.ntp.org: Name could not be resolved at this time (2)
Dec 4 11:26:52 t460 kernel: iwlwifi0: <iwlwifi> mem 0xe1000000-0xe1001fff at device 0.0 on pci2
Dec 4 11:26:52 t460 kernel: iwlwifi0: Detected crf-id 0xbadcafe, cnv-id 0x3000000 wfpm id 0x80000000
Dec 4 11:26:52 t460 kernel: iwlwifi0: PCI dev 24f3/0130, rev=0x201, rfid=0xd55555d5
Dec 4 11:26:52 t460 kernel: iwlwifi0: Detected Intel(R) Dual Band Wireless-AC 8260
Dec 4 11:26:52 t460 kernel: iwlwifi0: successfully loaded firmware image 'iwlwifi-8000C-36.ucode'
Dec 4 11:26:52 t460 kernel: iwlwifi0: loaded firmware version 36.ca7b901d.0 8000C-36.ucode op_mode iwlmvm
Dec 4 11:26:53 t460 kernel: iwlwifi0: base HW address: e4:a4:71:4f:e4:f8, OTP minor version: 0x4
Dec 4 11:26:53 t460 kernel: wlan0: Ethernet address: e4:a4:71:4f:e4:f8
Dec 4 11:26:56 t460 kernel: iwlwifi0: Not associated and the time event is over already...
Dec 4 11:26:56 t460 kernel: iwlwifi0: linuxkpi_ieee80211_connection_loss: vif 0xfffffe00f9db5f00 vap 0xfffffe00f9db5010 state ASSOC (synched 1,
assoc 0 beacons 0 dtim_period 0)
Dec 4 11:26:58 t460 kernel: iwlwifi0: fail to flush all tx fifo queues Q 5
Dec 4 11:26:58 t460 kernel: iwlwifi0: Queue 5 is active on fifo 3 and stuck for 10000 ms. SW [2, 3] HW [2, 3] FH TRB=0x080305002
Dec 4 11:27:12 t460 kernel: wlan0: link state changed to UP
Dec 4 11:27:12 t460 dhclient[3235]: New IP Address (wlan0): 192.168.178.94
Dec 4 11:27:12 t460 dhclient[3239]: New Subnet Mask (wlan0): 255.255.255.0
Dec 4 11:27:12 t460 dhclient[3243]: New Broadcast Address (wlan0): 192.168.178.255
Dec 4 11:27:12 t460 dhclient[3247]: New Routers (wlan0): 192.168.178.1

rc.conf
hostname="t460"
ifconfig_em0="DHCP"
ifconfig_em0_ipv6="inet6 accept_rtadv"
sshd_enable="YES"
ntpd_enable="YES"
ntpd_sync_on_start="YES"
local_unbound_enable="YES"
powerd_enable="YES"
moused_enable="YES"
# Set dumpdev to "AUTO" to enable crash dumps, "NO" to disable
dumpdev="AUTO"
zfs_enable="YES"
clear_tmp_enable="YES"
wlans_iwm0="wlan0"
devmatch_blocklist="iwm"
wlans_iwlwifi0="wlan0"
ifconfig_iwlwifi0="DHCP"
ifconfig_wlan0="DHCP"

Hope this helps you....?
 
Both of you, please try following setting on the installed system:

/boot/loader.conf (novice, not /etc/rc.conf)
Code:
devmatch_blocklist="if_iwm"
Source https://wiki.freebsd.org/WiFi/Iwlwifi

I have an iwm(4) supported device and want to try iwlwifi(4)
Thanks, but this hasn't been an issue for me. In the Live system I forced iwlwifi to bind to the card by a simple unloading lwm and reloading iwlwifi (check connect.txt). This is because I don't have access to loader or rc in the Live system; so its a hack. On the installed system I tried using a devmatch filter both in loader and rc, it doesn't change the outcome.

In the Installed system the wlan0 interface gets created, but it never correctly associates or comes up. if I watch wpa_cli in debug, I can see the authentication timeout which is what causes the LinuxKPI driver to raise the error. I don't think this is a LinuxKPI issue, but am a loss to explain what it is, considering that the SHAs for if_iwlwifi.ko and the associated microcode match in both the Live and Installed environment. There must be someone else (maybe in the kernel build, as I've replicated all the sysctl settings) that affects the timeout period.

This might explain why the Live system is super clean and the Installed system fails and has an altogether different behavior on first boot.

Also none of this explains why I get iwlwifi connects with ac, which is not supported.

I'm happy to do some testing, if someone points me in the right direction of where I should be looking beyond the obvious.
 
I tested on 14.3-RELEASE, same issue. Think its a build problem so going to log a bug.

Will test on -CURRENT when the download is available again
 
Back
Top