Drivers for RTL8852BE needed.

There is a rtw89 driver for RTL8852BE, but it's not fully supported yet (work in progress).

Note "rtw8852be.c": https://cgit.freebsd.org/src/tree/sys/contrib/dev/rtw89

For the time being, no rtw89 kernel module is delivered with the official system kernel (disconnected from build), it must be build manually from source.

EDIT: Correction, see post # 6
Rich (BB code):
sys/modules/rtw89 # make install

Code:
# cd /usr/src/sys/modules/rtw89
# make && make install

# cd /usr/src/sys/modules/rtw89fw
# make && make install

I myself have a RTL8852AE in my laptop, but last time I checked, loading rtw89 and trying to associate with a wifi access point triggers a kernel panic, and the system crashes.
 
Last edited:
I tried to build rtw89 on a fresh install of 14.1-RELEASE, and the build immediately failed, so there is probably more work before it is ready. I may not be doing it right, too, if more preparation than #make install is needed

After checking the upstream Linux driver notes, it looks like the RTL8852BE is only supported since the 6.2 kernel (February 2023), and that RTL8852BE support was brought in to FreeBSD-current in August 2023 for testing. (commit e2340276fc734a1f0bd0d2cf16fcfba7936c9462).

I have an HP14 i3 with RTL8852BE (a low-end, lightweight notebook), which would be great to use for travel due to its portability, but only if Wifi is supported since it doesn't have an RJ45 port.

I've tested an install of OpenBSD 7.5 and a few Linux distributions to check support for Wifi, and so far only Linux distributions with >=6.2 kernel recognize it and work with a fresh install (checked Debian 12.7 with 6.1 kernel, Linux Mint 22 with 6.8 kernel). This make me think the current Linux driver may work (I don't know if the one already in FreeBSD-current is the most recent or if another update from upstream is needed).
 
I tried to build rtw89 on a fresh install of 14.1-RELEASE, and the build immediately failed,
No problem here. Did you fetch the right FreBSD source (releng/14.1)?

I forgot to mention, driver firmware are needed as well ( sys/modules/rtw89fw # make install ) or net/wifi-firmware-rtw89-kmod

I have an HP14 i3 with RTL8852BE (a low-end, lightweight notebook), which would be great to use for travel due to its portability, but only if Wifi is supported since it doesn't have an RJ45 port.
If you don't mind occupying a USB port and spend a few bucks you could use a supported wifi nano USB adapter, or, if possible, change the pci wifi card.

USB adapters search model name or device ID in sys/dev/usb/usbdevs. apropos wireless will show (mostly) information about wireless driver manuals. Those manual have (non-exhaustive) model listings.

Another option is net/wifibox
Code:
Wifibox deploys a Linux guest (in bhyve(8)) to drive a wireless networking card on
the FreeBSD host system with the help of PCI pass-through.
Package name: wifi-firmware-rtw89-kmod

Build from ports:
Code:
# cd /usr/ports/net/wifibox
# make install clean FLAVOR=rtw89

I myself use a spare wifi adapter I have laying around, can't use wifibox running in bhyve(8). The bhyve(8) kernel module (vmm(4)) interferes with VirtualBox kernel modules.
 
No problem here. Did you fetch the right FreBSD source (releng/14.1)?
Yes - on the notebook computer, I selected to install source from the installation media. On a development box, I used git to pull releng/14.1-RELEASE. Both failed, but with different error messages.

I forgot to mention, driver firmware are needed as well ( sys/modules/rtw89fw # make install ) or net/wifi-firmware-rtw89-kmod
I also tried finding rtw89 in ports and tried both locations:

Code:
 #cd /usr/src/sys/modules/rtw89 && make install
install -T release -o root -g wheel -m 444 if)rtw89.ko /boot modules/
install: if_rtw89.ko: no such file or directory
*** Error code 71

Stop.
make: stopped in /usr/src/sys/modules/rtw89

#cd /usr/src/sys/contrib/dev/rtw89 && make install
make: don't know how to make install. Stop.

My assessment is that it was brought in for testing, but isn't ready for me (who isn't familiar with wifi driver development).

If you don't mind occupying a USB port and spend a few bucks you could use a supported wifi nano USB adapter, or, if possible, change the pci wifi card.

USB adapters search model name or device ID in sys/dev/usb/usbdevs. apropos wireless will show (mostly) information about wireless driver manuals. Those manual have (non-exhaustive) model listings.
Thanks - This is a much better option for me - it looks like there are supported chipsets in PCI and USB forms for <= USD$30. It is much easier to get a device with a supported chipset than troubleshooting a driver for firmware that isn't expected to work yet.

Another option is net/wifibox
Code:
Wifibox deploys a Linux guest (in bhyve(8)) to drive a wireless networking card on
the FreeBSD host system with the help of PCI pass-through.
Package name: wifi-firmware-rtw89-kmod

Build from ports:
Code:
# cd /usr/ports/net/wifibox
# make install clean FLAVOR=rtw89

I myself use a spare wifi adapter I have laying around, can't use wifibox running in bhyve(8). The bhyve(8) kernel module (vmm(4)) interferes with VirtualBox kernel modules.
This sounds like a great option if the notebook also had a wired connection handy to bootstrap it (otherwise, installing a package on an air-gapped system is more effort, especially compared to getting a PCI/USB with a chipset that is supported).
 
#cd /usr/src/sys/modules/rtw89 && make install
The command should have been
Code:
# cd /usr/src/sys/modules/rtw89
# make && make install

# cd /usr/src/sys/modules/rtw89fw
# make && make install
My mistake. Corrected. Sorry for the confusion.

This sounds like a great option if the notebook also had a wired connection
Right, forgot about that.

Nevertheless, wifibox can be an option even with a supported adapter if you need higher speed. Currently on FreeBSD 802.11 a/b/g modes are supported. Support for 802.11 n/ac is to come. 802.11ax and 6Ghz support are planned.
 
Thanks for the clarification - that is my lack of experience, since most packages just needed 'make install'.

That was partially successful - both the driver and firmware make && make install commands compiled without any error message (using 14.1-RELEASE both from install media on the notebook and git on a separate development box), but the 8852b firmware was not generated.

I added the driver to rc.conf based on rtw88(4) man page:
Code:
# sysrc kld_list="${kld_list} if_rtw89"

the dmesg found the device, but couldn't find the specific firmware:
Code:
rtw89_8852be0: <rtw89_8852be> port 0x3000-0x30ff mem 0x80500000-0x805fffff at device 0.0 on pci1
rtw89_8852be0: <rtw89_8852be> could not load firmware image 'rtw89/rtw8852b_fw-1.bin'
rtw89_8852be0: <rtw89_8852be> could not load firmware image 'rtw89/rtw8852b_fw.bin'

So I looked to see if the firmware was somewhere...

Code:
# find / -iname rtw8852*fw*
The result was that there was "8852a" and "8852c" firmware, but not "8852b"
There are 8852b files in the source directories, but it might just not be fully connected for testing.

Next Steps - find out why the 8852b isn't included in the firmware Makefile and there isn't an 8852b subdirectory (based on similar subdirectories for 8852a and 8852c). Then find out what exactly needs to be in the files/directories to make it build the rtw8852b_fw[-1].bin files. I haven't done this previously, so I don't know exactly where to check.
 
The result was that there was "8852a" and "8852c" firmware, but not "8852b"
There are 8852b files in the source directories, but it might just not be fully connected for testing.
I can't tell, I haven't looked into the issue for a while.

rtw89_8852be0: <rtw89_8852be> could not load firmware image 'rtw89/rtw8852b_fw-1.bin'
rtw89_8852be0: <rtw89_8852be> could not load firmware image 'rtw89/rtw8852b_fw.bin'
You could try the rtw89 firmware from https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/tree/rtw89 (use "plain" link at end of line for download, place fw under /boot/modules).

I am not optimistic this will work. There must be a reason why the firmware are excluded, but it can't hurt to try. Be advised, it may trigger a kernel panic.
 
I tried copying it over (placing in /boot/modules --> no change) Then I copied it to the directories that had rtw8852a_fw.bin files --> also no change (dmesg "could not load firmware..."). My current plan is to stop testing the rtw8852be unless/until there is an update to the driver because there are alternatives readily available (replacement wifi card, USB dongle).

After checking the physical wifi card, I ordered a $20 replacement M.2 wifi card that uses an Intel chipset on the supported list. Thanks for the suggestion for using apropos - I had not used it specifically for wireless before, and it was really useful. If that fails, the backup plan is to purchase a nano USB wifi.
 
Back
Top