Wifibox not working (AX201, Raptor Lake-S PCH CNVi WiFi)

Hi,

This is my first post in this forum. I'm not familiar with the tags and formatting so please bear with me (and my poor English) a little:)

I'm a new user to FreeBSD and I'm trying it on my laptop. uname -a gives me:

Code:
FreeBSD tx5pro 14.2-RELEASE-p1 FreeBSD 14.2-RELEASE-p1 GENERIC amd64

I have some problems with the AX201 card. The iwlwifi(4) works (kind of), but only works in 11g mode, and the speed is under 100KB/s. I read these two threads:

Thread intel-corporation-alder-lake-p-pch-cnvi-wifi.92911
Thread iwlwifi-ax203-wifi-speed-96-slower-in-freebsd-vs-windows-11.96657

and this article, learned some basics about net/wifibox, and here's my configuration:

Related configs in /usr/local/etc/wifibox/bhyve.conf:
Code:
cpus=1
memory=128M
console=yes
passthru="0/20/3"
priority=50
stop_wait_max=30

Related configs in /usr/local/etc/wifibox/wpa_supplicant/wpa_supplicant.conf:
Code:
ctrl_interface=/var/run/wpa_supplicant
network={
    ssid="xxxxxxxx"
    psk="xxxxxxxx"
    priority=6
}

Related configs in /etc/rc.conf:
Code:
devmatch_enable="YES"
devmatch_blocklist="if_iwm if_iwlwifi"
wifibox_enable="YES"
ifconfig_wifibox0="SYNCDHCP"
background_dhclient_wifibox0="YES"
defaultroute_delay="0"

After a reboot, the pciconf -lv command gives me this:
Code:
ppt0@pci0:0:20:3:    class=0x028000 rev=0x11 hdr=0x00 vendor=0x8086 device=0x7a70 subvendor=0x8086 subdevice=0x0074
    vendor     = 'Intel Corporation'
    device     = 'Raptor Lake-S PCH CNVi WiFi'
    class      = network

and ifconfig tells me the wifibox0 is at 10.0.0.2:
Code:
wifibox0: flags=1008843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST,LOWER_UP> metric 0 mtu 1500
    options=0
    ether 58:9c:fc:10:b5:79
    inet 10.0.0.2 netmask 0xffffff00 broadcast 10.0.0.255
    id 00:00:00:00:00:00 priority 32768 hellotime 2 fwddelay 15
    maxage 20 holdcnt 6 proto rstp maxaddr 2000 timeout 1200
    root id 00:00:00:00:00:00 priority 32768 ifcost 0 port 0
    member: tap0 flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>
            ifmaxaddr 0 port 4 priority 128 path cost 2000000
    groups: bridge
    nd6 options=9<PERFORMNUD,IFDISABLED>
tap0: flags=1008943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST,LOWER_UP> metric 0 mtu 1500
    options=80000<LINKSTATE>
    ether 58:9c:fc:10:ff:a3
    groups: tap
    media: Ethernet 1000baseT <full-duplex>
    status: active
    nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
    Opened by PID 353

but the network still seems not working.

I logged into the wifibox vm and the ifconfig command only gives me this:
Code:
wifibox:~# ifconfig
eth0      Link encap:Ethernet  HWaddr 00:A0:98:8A:05:71 
          inet addr:10.0.0.1  Bcast:0.0.0.0  Mask:255.255.255.0
          inet6 addr: fe80::2a0:98ff:fe8a:571/64 Scope:Link
          inet6 addr: fd00::ffff/64 Scope:Global
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:62 errors:0 dropped:0 overruns:0 frame:0
          TX packets:50 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:6468 (6.3 KiB)  TX bytes:5846 (5.7 KiB)

lo        Link encap:Local Loopback 
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

and no wlan0 was found as mentioned in this article.

lspci -k in the wifibox vm shows the iwlwifi device:
Code:
00:1f.0 Class 0601: 8086:7000
00:04.2 Class 0100: 1af4:1009 virtio-pci
00:04.0 Class 0100: 1af4:1001 virtio-pci
00:00.0 Class 0600: 1275:1275
00:04.3 Class 0100: 1af4:1009 virtio-pci
00:06.0 Class 0280: 8086:7a70 iwlwifi
00:04.1 Class 0100: 1af4:1009 virtio-pci
00:05.0 Class 0200: 8086:100f e1000

dmesg in the wifibox shows some error in the end.
Code:
[   43.072164] iwlwifi 0000:00:06.0: failed to send MCC_ALLOWED_AP_TYPE_CMD (-5)
[   43.072169] iwlwifi 0000:00:06.0: LED command failed: -5
[   43.072172] iwlwifi 0000:00:06.0: Failed to send MAC_CONFIG_CMD (action:1): -5
I'm not very familiar with these messages. I'm guessing that the problem is probably the wifibox not functioning properly with my AX201 card? The whole dmesg output are provided in the attached file.

Am I doing something wrong with wifibox or missing some configurations?
 

Attachments

ALSO:
First login to wifibox vm shows dhcpcd exited and failed to change interface wlan0 state to 'up':
Code:
Script started on Fri Apr 25 11:52:19 2025
root@tx5pro:~ # wifibox console
Connecting, type "~." to leave the session...
Connected
root
timed out
dhcpcd exited
ifup: failed to change interface wlan0 state to 'up'
 [ !! ]
 * /run/radvd: creating directory
 * /run/radvd: correcting owner
 * Starting IPv6 Router Advertisement Daemon ... [ ok ]
 * Starting Unix Domain Socket pass-through ... [ ok ]
 * Starting WPA Supplicant ... [ ok ]
 * Starting busybox acpid ... [ ok ]
 * Starting busybox crond ... [ ok ]
 * Loading iptables state and starting firewall ... [ ok ]
 * Enabling forwarding ... [ ok ]
 * Starting busybox udhcpd ... [ ok ]
 
Maybe you could try add pptdevs="0/20/3" to /boot/loader.conf.
Thanks for your reply! I tried adding this line to /boot/loader.conf but things are still the same, ifconfig in wifibox vm doesn't show wlan0.

After a reboot, the pciconf -lv command gives me this:
As I mentioned, the pci0:0:20:3 is already recognized as ppt0 even without specifying pptdevs in /boot/loader.conf.
 
dmesg in the wifibox shows some error in the end
Here's the dmesg | grep error inside wifibox vm:
Code:
wifibox:~# dmesg | grep error
[    0.048009] unchecked MSR access error: WRMSR to 0x140 (tried to write 0x0000000000000000) at rIP: 0xffffffff81034320 (init_intel+0x1e0/0x260)
[    0.578493] platform regulatory.0: Direct firmware load for regulatory.db failed with error -2
[    1.515280] iwlwifi 0000:00:06.0: Microcode SW error detected. Restarting 0x0.
[    1.515525] iwlwifi 0000:00:06.0: 0x00000B03 | IML/ROM error/state
[    1.516085] iwlwifi 0000:00:06.0: FW error in SYNC CMD UNKNOWN
[    1.702942] iwlwifi 0000:00:06.0: Microcode SW error detected. Restarting 0x0.
[    1.703198] iwlwifi 0000:00:06.0: 0x00000B03 | IML/ROM error/state
[    1.703450] iwlwifi 0000:00:06.0: FW error in SYNC CMD UNKNOWN
[    1.913667] iwlwifi 0000:00:06.0: Microcode SW error detected. Restarting 0x0.
[    1.913910] iwlwifi 0000:00:06.0: 0x00000B03 | IML/ROM error/state
[    1.914131] iwlwifi 0000:00:06.0: FW error in SYNC CMD UNKNOWN
[    3.915790] iwlwifi 0000:00:06.0: Microcode SW error detected. Restarting 0x0.
[    3.916184] iwlwifi 0000:00:06.0: 0x00000B03 | IML/ROM error/state
[    3.916676] iwlwifi 0000:00:06.0: FW error in SYNC CMD UNKNOWN
[    6.123726] iwlwifi 0000:00:06.0: Microcode SW error detected. Restarting 0x0.
[    6.124064] iwlwifi 0000:00:06.0: 0x00000B03 | IML/ROM error/state
[    6.124565] iwlwifi 0000:00:06.0: FW error in SYNC CMD UNKNOWN
[    8.337248] iwlwifi 0000:00:06.0: Microcode SW error detected. Restarting 0x0.
[    8.337563] iwlwifi 0000:00:06.0: 0x00000B03 | IML/ROM error/state
[    8.337976] iwlwifi 0000:00:06.0: FW error in SYNC CMD UNKNOWN
[   10.545025] iwlwifi 0000:00:06.0: Microcode SW error detected. Restarting 0x0.
[   10.545390] iwlwifi 0000:00:06.0: 0x00000B03 | IML/ROM error/state
[   10.545831] iwlwifi 0000:00:06.0: FW error in SYNC CMD UNKNOWN
[   12.746677] iwlwifi 0000:00:06.0: Microcode SW error detected. Restarting 0x0.
[   12.747043] iwlwifi 0000:00:06.0: 0x00000B03 | IML/ROM error/state
[   12.747531] iwlwifi 0000:00:06.0: FW error in SYNC CMD UNKNOWN
[   32.020189] iwlwifi 0000:00:06.0: Microcode SW error detected. Restarting 0x0.
[   32.020569] iwlwifi 0000:00:06.0: 0x00000B03 | IML/ROM error/state
[   32.021011] iwlwifi 0000:00:06.0: FW error in SYNC CMD UNKNOWN
[   34.228042] iwlwifi 0000:00:06.0: Microcode SW error detected. Restarting 0x0.
[   34.228484] iwlwifi 0000:00:06.0: 0x00000B03 | IML/ROM error/state
[   34.228923] iwlwifi 0000:00:06.0: FW error in SYNC CMD UNKNOWN
[   36.435766] iwlwifi 0000:00:06.0: Microcode SW error detected. Restarting 0x0.
[   36.436117] iwlwifi 0000:00:06.0: 0x00000B03 | IML/ROM error/state
[   36.436582] iwlwifi 0000:00:06.0: FW error in SYNC CMD UNKNOWN
[   38.652053] iwlwifi 0000:00:06.0: Microcode SW error detected. Restarting 0x0.
[   38.652492] iwlwifi 0000:00:06.0: 0x00000B03 | IML/ROM error/state
[   38.652936] iwlwifi 0000:00:06.0: FW error in SYNC CMD UNKNOWN
[   40.858235] iwlwifi 0000:00:06.0: Microcode SW error detected. Restarting 0x0.
[   40.858577] iwlwifi 0000:00:06.0: 0x00000B03 | IML/ROM error/state
[   40.859017] iwlwifi 0000:00:06.0: FW error in SYNC CMD UNKNOWN
[   43.070007] iwlwifi 0000:00:06.0: Microcode SW error detected. Restarting 0x0.
[   43.070418] iwlwifi 0000:00:06.0: 0x00000B03 | IML/ROM error/state
[   43.070855] iwlwifi 0000:00:06.0: FW error in SYNC CMD UNKNOWN
So is it a firmware related issue?
 
Did you enable VT-d in your BIOS?
Thanks for you reply! VT-d is enabled in the BIOS. Attached image shows some BIOS settings.
 

Attachments

  • IMG_20250426_091826_edit_781862458945278.jpg
    IMG_20250426_091826_edit_781862458945278.jpg
    33.7 KB · Views: 18
Thanks for you reply! VT-d is enabled in the BIOS. Attached image shows some BIOS settings.
Thanks.
Do you have an firewall enabled like pf?
Do you get any output when you ping?
I can't remember if you needed to enable linux for wifibox, but if you don't have it enabled, maybe you can try linux_enable="YES".
Also try installing cpu-microcode
 
Do you have an firewall enabled like pf?
No firewalls are enabled for now.

Do you get any output when you ping?
Ping eth0 inside wifibox (10.0.0.1) is ok:
Code:
root@tx5pro:~ # ping -c 5 10.0.0.1
PING 10.0.0.1 (10.0.0.1): 56 data bytes
64 bytes from 10.0.0.1: icmp_seq=0 ttl=64 time=0.151 ms
64 bytes from 10.0.0.1: icmp_seq=1 ttl=64 time=0.224 ms
64 bytes from 10.0.0.1: icmp_seq=2 ttl=64 time=0.278 ms
64 bytes from 10.0.0.1: icmp_seq=3 ttl=64 time=0.239 ms
64 bytes from 10.0.0.1: icmp_seq=4 ttl=64 time=0.169 ms

--- 10.0.0.1 ping statistics ---
5 packets transmitted, 5 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 0.151/0.212/0.278/0.047 ms
but ping my router (192.168.1.1) fails. I think it's because the wifibox have some errors with iwlwifi (see #5 of this thread) so there's no connection to the router:
Code:
root@tx5pro:~ # ping -c 3 192.168.1.1
PING 192.168.1.1 (192.168.1.1): 56 data bytes
92 bytes from 10.0.0.1: Destination Net Unreachable
Vr HL TOS  Len   ID Flg  off TTL Pro  cks      Src         Dst
 4  5  00 0054 b689   0 0000  40  01 f874 10.0.0.2 192.168.1.1

92 bytes from 10.0.0.1: Destination Net Unreachable
Vr HL TOS  Len   ID Flg  off TTL Pro  cks      Src         Dst
 4  5  00 0054 b68a   0 0000  40  01 f873 10.0.0.2 192.168.1.1

92 bytes from 10.0.0.1: Destination Net Unreachable
Vr HL TOS  Len   ID Flg  off TTL Pro  cks      Src         Dst
 4  5  00 0054 b68b   0 0000  40  01 f872 10.0.0.2 192.168.1.1


--- 192.168.1.1 ping statistics ---
3 packets transmitted, 0 packets received, 100.0% packet loss

I can't remember if you needed to enable linux for wifibox, but if you don't have it enabled, maybe you can try linux_enable="YES".
IMHO, the wifibox is based on bhyve and the wireless card is pci-passthru-ed to the vm, right? I'm not sure if linux emulation is related. linux.ko wasn't loaded before.
I tried adding linux_enable="YES" to /etc/rc.conf and reboot, kldstat shows:
Code:
Id Refs Address                Size Name
 1   73 0xffffffff80200000  1f3c6c0 kernel
 2    1 0xffffffff82a68000     3390 acpi_wmi.ko
 3    1 0xffffffff82a6c000    30a80 linux.ko
 4    4 0xffffffff82a9d000     c2a8 linux_common.ko
 5    1 0xffffffff82aaa000    2de10 linux64.ko
 6    1 0xffffffff82ad8000     2278 pty.ko
 7    1 0xffffffff82adb000     3560 fdescfs.ko
 8    1 0xffffffff82adf000     73c0 linprocfs.ko
 9    1 0xffffffff82ae7000     440c linsysfs.ko
10    1 0xffffffff82aec000     7798 if_bridge.ko
11    1 0xffffffff82af4000     60e0 bridgestp.ko
12    1 0xffffffff82c00000   33e438 vmm.ko
13    1 0xffffffff82afb000     21dc nmdm.ko
14    1 0xffffffff82afe000     3360 uhid.ko
15    1 0xffffffff82b02000     4364 ums.ko
16    1 0xffffffff82b07000     3360 wmt.ko
17    1 0xffffffff82b0b000     4d20 ng_ubt.ko
18    3 0xffffffff82b10000     abb8 netgraph.ko
19    2 0xffffffff82b1b000     a250 ng_hci.ko
20    2 0xffffffff82b26000     2670 ng_bluetooth.ko
21    1 0xffffffff82b29000     2a68 mac_ntpd.ko
but still can't see wlan0 in wifibox vm, and the dmesg | grep error command shows the same errors as #5 of this thread.

Also try installing cpu-microcode
Actually I'm dual-booting FreeBSD and Windows 11 on my laptop, and the BIOS is the newest version from Windows Updates. HWiNFO(R) 64 shows Microcode Update Revision is 12B. I'm not sure if I should change the microcode via sysutils/cpu-microcode.
 
Used to be that you had to stop the host loading a driver for anything related to passthrough, don't use it any more so I'm unaware if this still holds true. I gave up with FreeBSD with my AX210 and Debian runs it fine after a little tinkering around bluetooth dragging down wifi performance. Sometimes you have to make decisions on OS that fit your hardware and FreeBSD just didn't cut it for AX support to be viable for me. Shame really but hey ho, the laptop's to do work, not a tinkering time sink.
 
Used to be that you had to stop the host loading a driver for anything related to passthrough
Yeah I think the devmatch_blocklist line is for this purpose.

Shame really but hey ho, the laptop's to do work, not a tinkering time sink.
I tried wifibox on a Lenovo 15ISK laptop with AX210 a few months ago and it works fine, didn't expect to be this hard on a new laptop:oops:Maybe I just have too much time to do these tinkering things lol

Hope that the DesktopLaptopWorkingGroup can really improve wireless situations for laptops.
 
If this is 0, set it to 1 in /boot/loader.conf
It was 0.

I modified /boot/loader.conf to this:
Code:
vmm_load="YES"
pptdevs="0/20/3"

hw.vmm.amdvi.enable=1
reboot and sysctl hw.vmm.amdvi.enable shows 1.

Still, dhcpcd exited and failed to change interface wlan0 state to 'up' (see #2 of this thread) when logging into the wifibox vm, and dmesg | grep error inside wifibox shows the same errors as in #5 of this thread.



BTW, I'm a little confused by this part of wifibox(8) man page:
By default, PCI pass-through is disabled for AMD-based hardware, hence
it must be explicitly enabled via the corresponding syctl(8) variable.
The AMD-based hardware means AMD as in amd64/aarch64/riscv etc. instead of AMD or Intel company, right? I'm confused because it's an Intel CPU in my laptop.
 
No firewalls are enabled for now.


Ping eth0 inside wifibox (10.0.0.1) is ok:
Code:
root@tx5pro:~ # ping -c 5 10.0.0.1
PING 10.0.0.1 (10.0.0.1): 56 data bytes
64 bytes from 10.0.0.1: icmp_seq=0 ttl=64 time=0.151 ms
64 bytes from 10.0.0.1: icmp_seq=1 ttl=64 time=0.224 ms
64 bytes from 10.0.0.1: icmp_seq=2 ttl=64 time=0.278 ms
64 bytes from 10.0.0.1: icmp_seq=3 ttl=64 time=0.239 ms
64 bytes from 10.0.0.1: icmp_seq=4 ttl=64 time=0.169 ms

--- 10.0.0.1 ping statistics ---
5 packets transmitted, 5 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 0.151/0.212/0.278/0.047 ms
but ping my router (192.168.1.1) fails. I think it's because the wifibox have some errors with iwlwifi (see #5 of this thread) so there's no connection to the router:
Code:
root@tx5pro:~ # ping -c 3 192.168.1.1
PING 192.168.1.1 (192.168.1.1): 56 data bytes
92 bytes from 10.0.0.1: Destination Net Unreachable
Vr HL TOS  Len   ID Flg  off TTL Pro  cks      Src         Dst
 4  5  00 0054 b689   0 0000  40  01 f874 10.0.0.2 192.168.1.1

92 bytes from 10.0.0.1: Destination Net Unreachable
Vr HL TOS  Len   ID Flg  off TTL Pro  cks      Src         Dst
 4  5  00 0054 b68a   0 0000  40  01 f873 10.0.0.2 192.168.1.1

92 bytes from 10.0.0.1: Destination Net Unreachable
Vr HL TOS  Len   ID Flg  off TTL Pro  cks      Src         Dst
 4  5  00 0054 b68b   0 0000  40  01 f872 10.0.0.2 192.168.1.1


--- 192.168.1.1 ping statistics ---
3 packets transmitted, 0 packets received, 100.0% packet loss


IMHO, the wifibox is based on bhyve and the wireless card is pci-passthru-ed to the vm, right? I'm not sure if linux emulation is related. linux.ko wasn't loaded before.
I tried adding linux_enable="YES" to /etc/rc.conf and reboot, kldstat shows:
Code:
Id Refs Address                Size Name
 1   73 0xffffffff80200000  1f3c6c0 kernel
 2    1 0xffffffff82a68000     3390 acpi_wmi.ko
 3    1 0xffffffff82a6c000    30a80 linux.ko
 4    4 0xffffffff82a9d000     c2a8 linux_common.ko
 5    1 0xffffffff82aaa000    2de10 linux64.ko
 6    1 0xffffffff82ad8000     2278 pty.ko
 7    1 0xffffffff82adb000     3560 fdescfs.ko
 8    1 0xffffffff82adf000     73c0 linprocfs.ko
 9    1 0xffffffff82ae7000     440c linsysfs.ko
10    1 0xffffffff82aec000     7798 if_bridge.ko
11    1 0xffffffff82af4000     60e0 bridgestp.ko
12    1 0xffffffff82c00000   33e438 vmm.ko
13    1 0xffffffff82afb000     21dc nmdm.ko
14    1 0xffffffff82afe000     3360 uhid.ko
15    1 0xffffffff82b02000     4364 ums.ko
16    1 0xffffffff82b07000     3360 wmt.ko
17    1 0xffffffff82b0b000     4d20 ng_ubt.ko
18    3 0xffffffff82b10000     abb8 netgraph.ko
19    2 0xffffffff82b1b000     a250 ng_hci.ko
20    2 0xffffffff82b26000     2670 ng_bluetooth.ko
21    1 0xffffffff82b29000     2a68 mac_ntpd.ko
but still can't see wlan0 in wifibox vm, and the dmesg | grep error command shows the same errors as #5 of this thread.


Actually I'm dual-booting FreeBSD and Windows 11 on my laptop, and the BIOS is the newest version from Windows Updates. HWiNFO(R) 64 shows Microcode Update Revision is 12B. I'm not sure if I should change the microcode via sysutils/cpu-microcode.
Thanks for that.
I used to get the same results pinging 1.1.1.1 with wifibox (fromt host) but I can't remember how I fixed it. I think once my router was actually blocking the IP.
The reason why I asked if Linux was enabled was because wifibox uses drivers from Alpine Linux.
I may be wrong, but I've never seen Windows Update provide BIOS updates (flashing) in all my years of using Windows.
Try also adding your hostname to your hosts file:
Code:
127.0.0.1                              <HOSTNAME>
 
Back
Top