Bug 272145 - Bug when enabling RTW880 wireless during installation (skb tunable / firmware / loader.conf)
Summary: Bug when enabling RTW880 wireless during installation (skb tunable / firmware...
Status: Open
Alias: None
Product: Base System
Classification: Unclassified
Component: wireless (show other bugs)
Version: 13.2-STABLE
Hardware: amd64 Any
: --- Affects Some People
Assignee: Bjoern A. Zeeb
URL:
Keywords:
Depends on:
Blocks: 273621
  Show dependency treegraph
 
Reported: 2023-06-22 12:30 UTC by Maurício Nunes
Modified: 2024-07-06 16:14 UTC (History)
2 users (show)

See Also:


Attachments
It recognizes my wifi device (85.92 KB, image/jpeg)
2023-06-22 12:30 UTC, Maurício Nunes
no flags Details
when selecting the device (75.81 KB, image/jpeg)
2023-06-22 12:31 UTC, Maurício Nunes
no flags Details
show this messages (98.98 KB, image/jpeg)
2023-06-22 12:31 UTC, Maurício Nunes
no flags Details
pciconf (411.91 KB, image/jpeg)
2023-07-11 00:48 UTC, Maurício Nunes
no flags Details
ifconfig (89.92 KB, image/jpeg)
2023-07-14 12:54 UTC, Maurício Nunes
no flags Details
scan (96.43 KB, image/jpeg)
2023-07-14 12:55 UTC, Maurício Nunes
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Maurício Nunes 2023-06-22 12:30:20 UTC
Created attachment 242933 [details]
It recognizes my wifi device

I've been trying to install a clean version of FreeBSD 13.2 from the USB stick, everything works fine, if I don't enable my wireless. I have an Asus M515DA notebook, and it is wireless only.

The symptom is the same both during the installation and after the installation, I activate the wireless.

It displays that WPA_SUPPLICANT was active but interface was not. I also tried with an iso that I generated from the Source of github, it gives the same error, but at the time it recognizes the wireless networks and when I put the network password, it gives a kernel panic.
Comment 1 Maurício Nunes 2023-06-22 12:31:17 UTC
Created attachment 242934 [details]
when selecting the device
Comment 2 Maurício Nunes 2023-06-22 12:31:49 UTC
Created attachment 242935 [details]
show this messages
Comment 3 Maurício Nunes 2023-06-22 12:51:15 UTC
rtw880: failed to write rsvd page data
rtw880: failed to write data to rsvd page
rtw880: failed to download rsvd page
rtw880: failed to download firmware
lkpi_ic_vap_create: failed to start hw: -16
Comment 4 Bjoern A. Zeeb freebsd_committer freebsd_triage 2023-07-07 00:39:48 UTC
Do you have the pciconf -l information for the wireless card so we know which chipset it is?
Comment 5 Maurício Nunes 2023-07-11 00:48:19 UTC
Created attachment 243334 [details]
pciconf

pciconf -l executed
Comment 6 Bjoern A. Zeeb freebsd_committer freebsd_triage 2023-07-11 01:21:46 UTC
(In reply to Maurício Nunes from comment #5)

Okay, so it's a RTL8821CE.

Just asking, do you have the loader.conf tunable set to the following?
compat.linuxkpi.skb.mem_limit=1
Comment 7 Maurício Nunes 2023-07-12 12:53:28 UTC
In fact, I didn't even touch the loader.conf because the error occurred during the installation. With that I install without network, adjust the loader.conf and then try to install the wi-fi?
Comment 8 Bjoern A. Zeeb freebsd_committer freebsd_triage 2023-07-12 20:18:32 UTC
(In reply to Maurício Nunes from comment #7)

Oh, nice flaw.  I should ensure that the installer does the right thing when I do more of that hopefully later this month.

You can also stop the loader when booting to the installer, manually type in

set compat.linuxkpi.skb.mem_limit=1
boot -v

and see if that helps.  Otherwise, yes, install without wifi, boot, set it in loader, configure wifi, reboot and see what happens then.
Comment 9 Maurício Nunes 2023-07-14 12:52:04 UTC
Let's go to the report:

I made 2 attempts, the first one changing the installation boot.
This recognized the card, all right, but when scanning the networks, it did not show any.

The 2nd attempt: I continued the installation without a network, and when logging into freebsd, I changed the loader.conf and restarted again.

I changed /etc/rc.conf
wlans_rtw880="YES"
ifconfig_wlan0="WPA SYNCDHCP"

I ran the:
service netif restart

wlan0 correctly appeared with my card data.
after configuring wpa_supplicant and starting netif, wlan0 disappeared and only came back after restarting the PC

After that I restarted several times and wlan0 already appears UP and with the IP of my network.

and the ifconfig wlan0 scan worked correctly
Comment 10 Maurício Nunes 2023-07-14 12:54:52 UTC
Created attachment 243386 [details]
ifconfig
Comment 11 Maurício Nunes 2023-07-14 12:55:07 UTC
Created attachment 243387 [details]
scan
Comment 12 Anton Shepelev 2024-07-06 15:46:42 UTC
I have exactly the same problem with:

  Machine: HP laptop, model 15-bw0xx
  FreeBSD: 14.1 stable
  Device : RTL8723DE 802.11b/g/n PCIe Adapter
  Driver : rtw880

After setting:

  compat.linuxkpi.skb.mem_limit=1

in /boot/loader.conf and rebooting, the problem disappeared.
Shall I file submit this bug for 14.1 as well?
Comment 13 Bjoern A. Zeeb freebsd_committer freebsd_triage 2024-07-06 16:14:50 UTC
(In reply to Anton Shepelev from comment #12)

I think there'll be (hopefully) no need for that.  Knowingly I try to keep the versions of FreeBSD the same.

rtw88 and the installer and the tunable and the firmware together are a known problem currently;  I hope the tunable will soon go away entirely and sort that part of the problem.