Fwd: rtw89_8852be wifi disconnects and needs to be restarted

From: Bagas Sanjaya
Date: Tue Oct 10 2023 - 05:04:49 EST


Hi,

I notice a regression report on Bugzilla [1]. Quoting from it:

> Hi,
>
> I got a new laptop HP 445 G9 that comes with the Realtek RTL8852BE. The wifi is able to connect to internet briefly and then it disconnects from the network, the device is not available any longer until I restart the laptop.
>
> I'm using Arch and cloned the linux 6.2 and installed this version, although not maintained anymore, it works fine and is stable, wifi never disconnects, but newer versions of the kernel seem to have the issue mentioned above. Below are some logs from the kernel 6.5
>
> Oct 03 21:29:14 ryzen14 kernel: rtw89_8852be 0000:02:00.0: loaded firmware rtw89/rtw8852b_fw-1.bin
> Oct 03 21:29:14 ryzen14 kernel: rtw89_8852be 0000:02:00.0: enabling device (0000 -> 0003)
> Oct 03 21:29:14 ryzen14 kernel: rtw89_8852be 0000:02:00.0: Firmware version 0.29.29.1, cmd version 0, type 5
> Oct 03 21:29:14 ryzen14 kernel: rtw89_8852be 0000:02:00.0: Firmware version 0.29.29.1, cmd version 0, type 3
> Oct 03 21:29:14 ryzen14 kernel: rtw89_8852be 0000:02:00.0: chip rfe_type is 1
> Oct 03 21:29:14 ryzen14 NetworkManager[823]: <info> [1696321754.6290] rfkill0: found Wi-Fi radio killswitch (at /sys/devices/pci0000:00/0000:00:01.3/0000:02:00.0/ieee80211/phy0/rfkill0) (driver rtw89_8852be)
> Oct 03 21:30:41 ryzen14 kernel: rtw89_8852be 0000:02:00.0: failed to pre-release fwcmd
> Oct 03 21:30:41 ryzen14 kernel: rtw89_8852be 0000:02:00.0: read rf busy swsi
> Oct 03 21:30:41 ryzen14 kernel: rtw89_8852be 0000:02:00.0: read rf busy swsi
> Oct 03 21:30:41 ryzen14 kernel: rtw89_8852be 0000:02:00.0: timed out to flush pci txch: 0
> Oct 03 21:30:41 ryzen14 kernel: rtw89_8852be 0000:02:00.0: timed out to flush pci txch: 1
> Oct 03 21:30:41 ryzen14 kernel: rtw89_8852be 0000:02:00.0: timed out to flush pci txch: 2
> Oct 03 21:30:41 ryzen14 kernel: rtw89_8852be 0000:02:00.0: timed out to flush pci txch: 3
> Oct 03 21:30:41 ryzen14 kernel: rtw89_8852be 0000:02:00.0: timed out to flush pci txch: 8
> Oct 03 21:30:41 ryzen14 kernel: rtw89_8852be 0000:02:00.0: timed out to flush pci txch: 9
> Oct 03 21:30:41 ryzen14 kernel: rtw89_8852be 0000:02:00.0: timed out to flush pci txch: 0
> Oct 03 21:30:41 ryzen14 kernel: rtw89_8852be 0000:02:00.0: timed out to flush pci txch: 1
> Oct 03 21:30:41 ryzen14 kernel: rtw89_8852be 0000:02:00.0: timed out to flush pci txch: 2
> Oct 03 21:30:41 ryzen14 kernel: rtw89_8852be 0000:02:00.0: timed out to flush pci txch: 3
> Oct 03 21:30:41 ryzen14 kernel: rtw89_8852be 0000:02:00.0: timed out to flush pci txch: 8
> Oct 03 21:30:41 ryzen14 kernel: rtw89_8852be 0000:02:00.0: timed out to flush pci txch: 9
> Oct 03 21:30:42 ryzen14 kernel: rtw89_8852be 0000:02:00.0: FW does not process h2c registers
> Oct 03 21:30:42 ryzen14 kernel: rtw89_8852be 0000:02:00.0: read rf busy swsi
> Oct 03 21:30:42 ryzen14 kernel: rtw89_8852be 0000:02:00.0: read rf busy swsi
> Oct 03 21:30:42 ryzen14 kernel: rtw89_8852be 0000:02:00.0: write rf busy swsi
> Oct 03 21:30:42 ryzen14 kernel: rtw89_8852be 0000:02:00.0: write rf busy swsi
> Oct 03 21:30:42 ryzen14 kernel: rtw89_8852be 0000:02:00.0: read rf busy swsi
> ....
> Oct 03 21:30:56 ryzen14 kernel: rtw89_8852be 0000:02:00.0: write rf busy swsi
> Oct 03 21:30:56 ryzen14 kernel: rtw89_8852be 0000:02:00.0: FW does not process h2c registers
> Oct 03 21:30:56 ryzen14 kernel: rtw89_8852be 0000:02:00.0: HW scan failed with status: -110
> Oct 03 21:30:57 ryzen14 kernel: rtw89_8852be 0000:02:00.0: Update probe request failed
> Oct 03 21:30:58 ryzen14 kernel: rtw89_8852be 0000:02:00.0: FW does not process h2c registers
> Oct 03 21:30:58 ryzen14 kernel: rtw89_8852be 0000:02:00.0: read rf busy swsi
> Oct 03 21:30:58 ryzen14 kernel: rtw89_8852be 0000:02:00.0: read rf busy swsi
> ...
> Oct 03 21:30:58 ryzen14 kernel: rtw89_8852be 0000:02:00.0: read rf busy swsi
> Oct 03 21:30:58 ryzen14 kernel: rtw89_8852be 0000:02:00.0: write rf busy swsi
> Oct 03 21:30:58 ryzen14 kernel: rtw89_8852be 0000:02:00.0: FW does not process h2c registers
> Oct 03 21:30:58 ryzen14 kernel: rtw89_8852be 0000:02:00.0: HW scan failed with status: -110
> Oct 03 21:30:58 ryzen14 kernel: rtw89_8852be 0000:02:00.0: xtal si not ready(W): offset=90 val=10 mask=10
> Oct 03 21:30:58 ryzen14 kernel: rtw89_8852be 0000:02:00.0: xtal si not ready(W): offset=90 val=10 mask=10
> Oct 03 21:30:58 ryzen14 kernel: rtw89_8852be 0000:02:00.0: mac init fail, ret:-110
> Oct 03 21:30:58 ryzen14 kernel: rtw89_8852be 0000:02:00.0: xtal si not ready(W): offset=90 val=10 mask=10
> Oct 03 21:30:59 ryzen14 kernel: rtw89_8852be 0000:02:00.0: xtal si not ready(W): offset=90 val=10 mask=10
> Oct 03 21:30:59 ryzen14 kernel: rtw89_8852be 0000:02:00.0: mac init fail, ret:-110
>
> More details about the wireless device based on HP specification:
>
> Realtek RTL8852BE 802.11ax (2x2) Wi-Fi and Bluetooth 5.2 combo
> Qualcomm Fast Connect 6900 Wi-Fi 6E 802.11ax (2x2) and Bluetooth 5.2 combo
>
> Hopefully those details are useful, let me know if I can provide any further information.

Then the reporter (Cc'ed) had found the workaround:

> Hi all,
>
> After some more testing I found a workaround for now to run any modern kernel (> 6.2). I disabled some of the features for low power mode on the pci device and it seems stable now while running 6.5.
>
> I created a file in modprobe.d to disable the power saving settings:
>
> /etc/modprobe.d/20-wifi.conf
> options rtw89_pci disable_aspm_l1ss=y disable_aspm_l1=y
> options rtw89_core disable_ps_mode=y
>
> Probably there are some issues with the driver when in power saving mode, which is the default behavior. Hopefully the new info brings some light for fixing the drivers.
>
> Thanks,

See Bugzilla for the full thread.

Anyway, I'm adding this regression to regzbot:

#regzbot introduced: v6.2..v6.5 https://bugzilla.kernel.org/show_bug.cgi?id=217978
#regzbot title: rtw89_8852be wifi disconnects in power saving mode

Thanks.

[1]: https://bugzilla.kernel.org/show_bug.cgi?id=217978

--
An old man doll... just what I always wanted! - Clara