rtw880: could not load firmware image 'rtw88/rtw8821c_fw.bin'

During install of FreeBSD to a c.2019 HP 17-by1xxx (probably 17-by1061st) laptop, the installer failed to configure a wireless connection. On boot, I get 12 repetitions of

rtw880: <rtw88> port 0x3000-0x30ff mem 0xa1100000-0xa110ffff at device 0.0 on pci3
rtw88/rtw8821c_fw.bin: could not load binary firmware /boot/firmware/rtw88/rtw8821c_fw.bin either
rtw8821c_fw.bin: could not load binary firmware /boot/firmware/rtw88/rtw8821c_fw.bin either
rtw88_rtw8821c_fw.bin: could not load binary firmware /boot/firmware/rtw88/rtw8821c_fw.bin either (x3)
rtw880: could not load firmware image 'rtw88/rtw8821c_fw.bin'
rtw880: failed to request firmware
rtw880: failed to load firmware
rtw880: failed to setup chip efuse info
rtw880: failed to setup chip information
device_attach: rtw880 attach returned 22

I thought I would need to download and install a firmware package. However, kldstat does show an if_rtw88.ko (and if_re.ko) loaded. I don't know the difference between any of these or what exactly the problem is but, when trying to cargo-cult the networking thing in the handbook, I get 'no interface configured' or something like that - I can try it again if specifics are needed. (It's very confusing, as all my searches turn up people talking about FreeBSD not even supporting 802.11ac (which makes it hard to get enthusiastic about trying to troubleshoot it) or maybe it does and maybe install this module or override the default driver or try the experimental one or maybe it's not that at all and it's just misconfigured and so on and all I want is to have a net connection so I can install more than what comes with FreeBSD-15.0-RELEASE-amd64-memstick.img.xz and get to work. After years of just using my old Slack and being totally uninvolved with new things or the free software world, in the past month or so I've gotten a new desktop running Slackware-current along with its Windows 11 and gotten the old laptop triple-booting the same along with FreeBSD (during the holidays with my usual impeccable timing) and, while it started out as fun and a blast from the past, I'm just kind of burnt out at this point.)

Also, a totally unrelated problem but maybe can be solved in a line on the side, the console will not blank and neither 'vidcontrol -t' nor adding 'timeout=foo' (or whatever the line was) to rc.conf has any effect. Nor kldload'ing something else, but I forget what. That would be nice, too, as it's ridiculous to reboot just to blank the screen.
 
kldstat does show an if_rtw88.ko (and if_re.ko) loaded.
Those are device driver kernel modules provided by FreeBSD, but the rtw88(4) firmware is not included, it must be installed from package:
Rich (BB code):
DESCRIPTION
     The rtw88 driver is derived from Realtek's Linux rtw88 driver.

     This driver requires firmware to be loaded before it will work.  The
     package wifi-firmware-rtw88-kmod from the
     ports/net/wifi-firmware-rtw88-kmod port needs to be installed before the
     driver is loaded.  Otherwise no wlan(4) interface can be created using
     ifconfig(8).  One can use fwget(8) to install the correct firmware
     package.

If no internet connection is possible to the machine (e.g. over ethernet), you can use a smartphone's USB tether function to create a connection to download the firmware package.
 
This is really screwed up. I managed to get my phone and laptop to cooperate (not easy) and got FreeBSD a ue0 in ifconfig. Then fwget -n showed a kabylake thing and my rtw firmware but, when I ran fwget for real, I got "No SRV record found for the repo 'FreeBSD-base'". STFW turned up a thread on this very board which pointed to another. That tipped me off to my resolv.conf being empty but putting 'nameserver 8.8.8.8' gave me nothing and trying other things gave me various errors until I thought that I should be using DHCP eventually, anyway, so I ran dhclient. That got me a good connection to the site but with an error message about "pkg: Repository FreeBSD-base has a wrong packagesite, need to re-create database" so the very next thing I did was 'pkg update -f' and that updated the DBs. So the very next next thing I did is re-run 'fwget' and it tells me "Needed firmware packages: gpu(etc), wifi(etc)\nThe most recent versions of packages are already installed."

WTF? Were they always installed? (Then why didn't I have wifi?) Did they just get installed? (Then why the error messages about the pkg db and no good messages about the install?) Or is the pkg thing even more confused than I am?
Well, actually, 'pkg info | less' shows they are installed packages now which weren't there before, so I guess it was behind door #2.

Is it safe to disconnect my phone and try to get a native wifi connection now (and does the firmware package require a reboot)? And is it safe to pick up with the steps in the handbook again or are things so screwed up that I should take other steps? (And, can I install the X packages, tmux, the sqlite cli, sc-im, and whatnot right now, before disconnecting my phone, so I at least have them? Sorry, I realize this is getting off the network issue but it's a timing issue related to the network issue.)

But I will say it was a hell of a relief to at least get the pkg db update 'fetch'ed and run without even one error. :) And thanks so much for getting me this far!
 
Is it safe to disconnect my phone and try to get a native wifi connection now (and does the firmware package require a reboot)? And is it safe to pick up with the steps in the handbook again or are things so screwed up that I should take other steps?
Check dmesg(8) for rtw88 firmware related messages like "successfully loaded firmware". If the firmware was loaded, proceed with the wifi configuration (FreeBSD handbook 7.4. Wireless Networks).

And, can I install the X packages, tmux, the sqlite cli, sc-im, and whatnot right now, before disconnecting my phone, so I at least have them?
Sure, if the system has a connection to the internet, it doesn't matter how the connection is made. USB tethering is as good as wifi or ethernet, perhaps at a lower or higher speed. With my phone (older Samsung model, 6+ years) I get a lower speed over USB tethering than over the phones mobile hotspot.

Apropos wifi, the smartphone can also be used to connect the FreeBSD machine to a configured wifi access point over USB tethering. Instead of "Mobile Data" choose "Wi-Fi" as connection type on the phone.

A word to the rtw88(4) driver, it's a newly developed, derived from a Linux driver, it might have hickups or complete failure. Check

https://lists.freebsd.org/archives/freebsd-wireless/ and bugzilla rtw88 related reports.

My machines (ThinkPad E15) wifi card requires the rtw89(4) driver, it produces regularly kernel panics on 15.0, so, wifi with that card is not possible, at the moment. I'm using an external wifi dongle to get a internet connection.

iwlwifi(4), rtw88(4), rtw89(4) are actively improved (by driver developer Bjoern A. Zeeb) on 16-CURRENT, don't expect in case of an issue on 15.0 a solution any time soon. In case of problems, you can report them in Bugzilla, the developer can then give you information on how to proceed.

And thanks so much for getting me this far!
My pleasure.
 
If you still have trouble, you might want to try wifibox, which runs Linux in a VM and has it drive the wifi device. The FreeBSD driver hasn't been updated to run a full speed yet, so it'll be faster.
I have the also have an rtw8821c. It takes a while and sometimes fails to connect to an access point using both methods. This is a regression from 14.3 where it worked great, but this is a known issue in the 15.0 release notes.
The rtw88(4) driver has been updated to Linux v6.17. A possible issue that devices cannot authenticate is still being investigated. c1d365f39e08
 
A word to the rtw88(4) driver, it's a newly developed, derived from a Linux driver, it might have hickups or complete failure. Check

https://lists.freebsd.org/archives/freebsd-wireless/ and bugzilla rtw88 related reports.

I have the also have an rtw8821c. It takes a while and sometimes fails to connect to an access point using both methods.

Before I saw your posts, my phone went into sleep mode (which I didn't think about ahead of time), so that ended up breaking the connection anyway and I had trouble reconnecting for some reason. So I went ahead and did the network setup. I also had a bit of trouble there where, initially, somewhere in the configuration process, it called wpa_supplicant automatically and the connection didn't work, but I issued 'wpa_supplicant -Dbsd -iwlan0 -c/etc/wpa_supplicant.conf' myself and, like you say, jwillia3 , it took a long time with a lot of error messages (possibly 'error 95 during state transition 2 auth' though that might have been when it tried to do it automatically) but then it did finally connect. (Then I installed X and, of course, had issues with that but I'm now looking at twm on the laptop and hope to be posting from it soon.)

If you end up using wifibox and still have trouble with the driver attaching, roll back to wifibox 1.6.0.

Thanks for the tip!

Thanks to you all! I think now I can calm down and handle each issue as it comes now that I'm over the install/network/X hurdles. :)
 
Commander Garble I did some more prodding on the native drivers. This might help:
1. Disable bluetooth if you're not using it (this interfered with wifibox for me)
2. Direct the wifi channel
3. Actively request the access point

/etc/rc.conf
Code:
devmatch_blocklist="ng_bluetooth ng_ubt ng_btsocket"
ifconfig_wlan0="WPA inet 192.168.0.102 netmask 255.255.255.0 channel 161"

/etc/wpa_supplicant.conf
Code:
network={
    priority=1
    scan_ssid=1
    ssid="YOUR WIRELESS SSID"
    bssid=00:00:00:00:00:00
    psk="YOUR WIRELESS PASSCODE"
}

You can find your bssid and channel from the info printed by ifconfig.
This isn't a guarantee, but it significantly improved my situation.
 
Back
Top