Configuring RTW880 wifi card

Howdy folks, this is my first time being here, and I have quite the conundrum.

I've tried installing FreeBSD on several different computers, however, I have ran into the same issue several times. A lot of computers I have tried to install freebsd on have a wifi card that is recognized as 'RTW880'. I'm not exactly sure if they are all the same, but on this computer which I am writing from, the true name of the card is called "Realtek Semiconductor Co., Ltd. RTL8821CE 802.11ac" and when it tries to connect to the internet it spits out an 'error 95' with the wpa_supplicant. I don't currently have FreeBSD installed on anything (unfortunately), so I will update this with the exact error when I try to run the installer on something later.

I have learned online that the necessary driver to make the wificard work does seem to be pre-installed on dvd1 installation media, and I have found that if I start the installer and go into the shell before beginning the actual install process and type 'pkg install wifi-firmware-rtw88-kmod' or 'pkg install net/wifi-firmware-rtw88-kmod', it will then connect to wifi during the installation (despite spitting out many errors about being unable to find the relevant FreeBSD repositories) until the first reboot after installation completes (although, I should say that this doesn't always work, working about 90% of the time).

The question then becomes how do I make the wifi-card start working again after installation? It's hard to look for help because a lot of other information that I have found tends to be very old, sometimes going as far back as FreeBSD 13, like here The wiki says that it's a ram issue, which does seem to track with the computers I have worked on, as all of them have been more than 4gb ram. It says to add 'compat.linuxkpi.skb.mem_limit=1' to loader.conf, but this doesn't seem to do anything. Maybe linuxulator might help? And from an older post here it suggests to check if the if_rtw88.ko is loaded, and I did check, and it was, so I can't say why it's not being 'attached' to the card. I've also found other sources that suggest trying to add a whole bunch of other tuneables, but those don't seem to do anything either.

I realize that this may not be the most the most complete info, but I hope this is enough to get started atleast, and I'll post that information later and any other information you guys think might be useful.

Thank you so much!

Update: Here is what that error it spits out looks like

rtw880: lkpi_iv_newstate: error 95 during state transition 2 (AUTH) -> 3 (ASSOC)
 
The basic procedure, after the system installation (preferable 15.0-RELEASE), is to install net/wifi-firmware-rtw88-kmod, making sure ifconfig_rtw880= in /etc/rc.conf is set and /etc/wpa_supplicant.conf is configured accordingly (see handbook, chapter "7.4. Wireless Networks").

The rtw88(4) driver is include in the system, it attaches itself automatically to the wifi device through devmatch(8). The firmware is loaded automatically without any user configuration (provided the firmware package is installed).

No need to set compat.linuxkpi.skb.mem_limit=1 manually. On installation, the rtw88 firmware package drops /boot/loader.conf.d/rtw88.conf with that setting (it takes effect on system reboot, after the firmware package installation).
 
The basic procedure, after the system installation (preferable 15.0-RELEASE), is to install net/wifi-firmware-rtw88-kmod, making sure ifconfig_rtw880= in /etc/rc.conf is set and /etc/wpa_supplicant.conf is configured accordingly (see handbook, chapter "7.4. Wireless Networks").

The rtw88(4) driver is include in the system, it attaches itself automatically to the wifi device through devmatch(8). The firmware is loaded automatically without any user configuration (provided the firmware package is installed).

No need to set compat.linuxkpi.skb.mem_limit=1 manually. On installation, the rtw88 firmware package drops /boot/loader.conf.d/rtw88.conf with that setting (it takes effect on system reboot, after the firmware package installation).
Right, I should say I did in fact read the handbook when I was looking for help. It didn't work the first time, and I thought I followed all the steps, but I did look through that chapter again. This time when I did it again, it did actually work. It did spit out the same error, but then it just stopped after a couple times, so maybe I was just being impatient the whole time or somehow I skipped a step?

I would love to test if this was replicatible, but since it started working again, I decided to try getting XFCE set up, but I was running FreeBSD off of a USB, and during the install there was some catastrophic I/O error and it just blew up everything on the USB stick, so I'll have to try again later 🙃 but thanks for the help.
 
LotGC this is a regression in the rtw88 drivers for 15.0 There is a section of the 15.0 release notes that vaguely mentions it. The next release should fix this and I believe increase the WiFi speeds available.
The rtw88(4) driver has been updated to Linux v6.17. A possible issue that devices cannot authenticate is still being investigated. c1d365f39e08

That said, the driver is functional in 15.0. It is just inconsistent.
The best thing you can do is find a channel that connects well and direct the system to use that channel.
  1. Keep retrying until it connects.
  2. Use ifconfig to find what channel its on
  3. Put channel 161 at the end of your if_config_wlan0 string in rc.conf
  4. In wpa_supplicant.conf, set bssid=ROUTER-MAC-ADDRESS (do not surround the address with quotes)
This is a workaround and not 100%. There will still be errors but it works better.
 
Back
Top