2024-04-15 08:38:20

by Plamen Dimitrov

[permalink] [raw]
Subject: Problems with RTL8852BE PCIe 802.11ax Wireless Network Controller and Linux kernel 6.7.7-100.fc38.x86_64

Hi all,

I had some problems with RTL8852BE and tried a commonly suggested fix

$ sudo cat /etc/modprobe.d/20-wifi.conf
options rtw89_pci disable_aspm_l1ss=y disable_aspm_l1=y disable_clkreq=y
options rtw89_core disable_ps_mode=y

as

$ lsmod | grep rtw
rtw89_8852be 12288 0
rtw89_8852b 364544 1 rtw89_8852be
rtw89_pci 81920 1 rtw89_8852be
rtw89_core 577536 2 rtw89_8852b,rtw89_pci
mac80211 1568768 2 rtw89_core,rtw89_pci
cfg80211 1335296 3 rtw89_8852b,rtw89_core,mac80211

but this doesn't fix my issue which looks like

[ 1794.542266] rtw89_8852be 0000:02:00.0: FW does not process h2c registers
[ 1794.542269] rtw89_8852be 0000:02:00.0: HW scan failed with status: -110
[ 1794.935328] rtw89_8852be 0000:02:00.0: xtal si not ready(W): offset=90 val=10 mask=10
[ 1795.006323] rtw89_8852be 0000:02:00.0: xtal si not ready(W): offset=90 val=10 mask=10
[ 1795.006330] rtw89_8852be 0000:02:00.0: mac init fail, ret:-110

I verified that the changes take effect via

$ sudo modprobe -r rtw89_8852be
$ sudo modprobe -r rtw89_core
$ sudo modprobe -v rtw89_8852be

which produces

insmod /lib/modules/6.7.4-100.fc38.x86_64/kernel/net/mac80211/mac80211.ko.xz
insmod /lib/modules/6.7.4-100.fc38.x86_64/kernel/drivers/net/wireless/realtek/rtw89/rtw89_core.ko.xz disable_ps_mode=y
insmod /lib/modules/6.7.4-100.fc38.x86_64/kernel/drivers/net/wireless/realtek/rtw89/rtw89_pci.ko.xz disable_aspm_l1ss=y disable_aspm_l1=y disable_clkreq=y
insmod /lib/modules/6.7.4-100.fc38.x86_64/kernel/drivers/net/wireless/realtek/rtw89/rtw89_8852b.ko.xz
insmod /lib/modules/6.7.4-100.fc38.x86_64/kernel/drivers/net/wireless/realtek/rtw89/rtw89_8852be.ko.xz

However, the `xtal is not ready` still appears after reloading and the device is likely in a bad state once the error is already encountered:

[12876.478139] rtw89_8852be 0000:02:00.0: loaded firmware rtw89/rtw8852b_fw-1.bin
[12876.478249] rtw89_8852be 0000:02:00.0: Unable to change power state from D3cold to D0, device inaccessible
[12876.529327] rtw89_8852be 0000:02:00.0: xtal si not ready(R): offset=41
[12876.529336] rtw89_8852be 0000:02:00.0: no suitable firmware found
[12876.529339] rtw89_8852be 0000:02:00.0: failed to recognize firmware
[12876.529342] rtw89_8852be 0000:02:00.0: failed to setup chip information
[12876.530074] rtw89_8852be: probe of 0000:02:00.0 failed with error -2

Does anyone know what is going on here?

Regards,
Plamen Dimitrov


Attachments:
OpenPGP_0xA4696276CE5A052D.asc (3.14 kB)
OpenPGP public key
OpenPGP_signature.asc (855.00 B)
OpenPGP digital signature
Download all attachments

2024-04-16 00:32:02

by Ping-Ke Shih

[permalink] [raw]
Subject: RE: Problems with RTL8852BE PCIe 802.11ax Wireless Network Controller and Linux kernel 6.7.7-100.fc38.x86_64

Plamen Dimitrov <[email protected]> wrote:

> Hi all,
>
> I had some problems with RTL8852BE and tried a commonly suggested fix
>
> $ sudo cat /etc/modprobe.d/20-wifi.conf
> options rtw89_pci disable_aspm_l1ss=y disable_aspm_l1=y disable_clkreq=y
> options rtw89_core disable_ps_mode=y
>
> as
>
> $ lsmod | grep rtw
> rtw89_8852be 12288 0
> rtw89_8852b 364544 1 rtw89_8852be
> rtw89_pci 81920 1 rtw89_8852be
> rtw89_core 577536 2 rtw89_8852b,rtw89_pci
> mac80211 1568768 2 rtw89_core,rtw89_pci
> cfg80211 1335296 3 rtw89_8852b,rtw89_core,mac80211
>
> but this doesn't fix my issue which looks like
>
> [ 1794.542266] rtw89_8852be 0000:02:00.0: FW does not process h2c registers
> [ 1794.542269] rtw89_8852be 0000:02:00.0: HW scan failed with status: -110
> [ 1794.935328] rtw89_8852be 0000:02:00.0: xtal si not ready(W): offset=90 val=10 mask=10
> [ 1795.006323] rtw89_8852be 0000:02:00.0: xtal si not ready(W): offset=90 val=10 mask=10
> [ 1795.006330] rtw89_8852be 0000:02:00.0: mac init fail, ret:-110

These logs said that it can download firmware successfully, but timed out to
ask firmware to do scan. I would try module parameters like you did, but
please do "cold reboot" to take effect the parameters, because hardware
has been gotten into abnormal state.

> However, the `xtal is not ready` still appears after reloading and the device is likely in a bad state once
> the error is already encountered:
>
> [12876.478139] rtw89_8852be 0000:02:00.0: loaded firmware rtw89/rtw8852b_fw-1.bin
> [12876.478249] rtw89_8852be 0000:02:00.0: Unable to change power state from D3cold to D0, device
> inaccessible
> [12876.529327] rtw89_8852be 0000:02:00.0: xtal si not ready(R): offset=41

This is second IO driver does to read hardware revision, but inaccessible.
You should reboot to recover hardware state.

> [12876.529336] rtw89_8852be 0000:02:00.0: no suitable firmware found
> [12876.529339] rtw89_8852be 0000:02:00.0: failed to recognize firmware
> [12876.529342] rtw89_8852be 0000:02:00.0: failed to setup chip information
> [12876.530074] rtw89_8852be: probe of 0000:02:00.0 failed with error -2



2024-04-16 02:27:12

by Plamen Dimitrov

[permalink] [raw]
Subject: Re: Problems with RTL8852BE PCIe 802.11ax Wireless Network Controller and Linux kernel 6.7.7-100.fc38.x86_64

Hi again,

On 4/16/24 08:31, Ping-Ke Shih wrote:
>>
>> [ 1794.542266] rtw89_8852be 0000:02:00.0: FW does not process h2c registers
>> [ 1794.542269] rtw89_8852be 0000:02:00.0: HW scan failed with status: -110
>> [ 1794.935328] rtw89_8852be 0000:02:00.0: xtal si not ready(W): offset=90 val=10 mask=10
>> [ 1795.006323] rtw89_8852be 0000:02:00.0: xtal si not ready(W): offset=90 val=10 mask=10
>> [ 1795.006330] rtw89_8852be 0000:02:00.0: mac init fail, ret:-110
>
> These logs said that it can download firmware successfully, but timed out to
> ask firmware to do scan. I would try module parameters like you did, but
> please do "cold reboot" to take effect the parameters, because hardware
> has been gotten into abnormal state.

Indeed, I had tried this before but did not include it in my report. Now I decided to redo everything
just in case and the WiFi still disappears within a few minutes with logs like

```
Apr 16 10:14:22 vagrant.whitetree kernel: rtw89_8852be 0000:02:00.0: read rf busy swsi
Apr 16 10:14:22 vagrant.whitetree kernel: rtw89_8852be 0000:02:00.0: write rf busy swsi
Apr 16 10:14:22 vagrant.whitetree kernel: rtw89_8852be 0000:02:00.0: write rf busy swsi
Apr 16 10:14:22 vagrant.whitetree kernel: rtw89_8852be 0000:02:00.0: write rf busy swsi
Apr 16 10:14:22 vagrant.whitetree kernel: rtw89_8852be 0000:02:00.0: write rf busy swsi
Apr 16 10:14:22 vagrant.whitetree kernel: rtw89_8852be 0000:02:00.0: read rf busy swsi
Apr 16 10:14:22 vagrant.whitetree kernel: rtw89_8852be 0000:02:00.0: write rf busy swsi
Apr 16 10:14:22 vagrant.whitetree kernel: rtw89_8852be 0000:02:00.0: FW does not process h2c registers
Apr 16 10:14:22 vagrant.whitetree kernel: rtw89_8852be 0000:02:00.0: HW scan failed with status: -110
...
Apr 16 10:14:23 vagrant.whitetree kernel: rtw89_8852be 0000:02:00.0: xtal si not ready(W): offset=90 val=10 mask=10
Apr 16 10:14:23 vagrant.whitetree kernel: rtw89_8852be 0000:02:00.0: xtal si not ready(W): offset=90 val=10 mask=10
Apr 16 10:14:23 vagrant.whitetree kernel: rtw89_8852be 0000:02:00.0: mac init fail, ret:-110
Apr 16 10:14:23 vagrant.whitetree kernel: rtw89_8852be 0000:02:00.0: xtal si not ready(W): offset=90 val=10 mask=10
Apr 16 10:14:23 vagrant.whitetree kernel: rtw89_8852be 0000:02:00.0: xtal si not ready(W): offset=90 val=10 mask=10
Apr 16 10:14:23 vagrant.whitetree kernel: rtw89_8852be 0000:02:00.0: mac init fail, ret:-110
Apr 16 10:14:23 vagrant.whitetree kernel: rtw89_8852be 0000:02:00.0: xtal si not ready(W): offset=90 val=10 mask=10
Apr 16 10:14:23 vagrant.whitetree kernel: rtw89_8852be 0000:02:00.0: xtal si not ready(W): offset=90 val=10 mask=10
Apr 16 10:14:23 vagrant.whitetree kernel: rtw89_8852be 0000:02:00.0: mac init fail, ret:-110
Apr 16 10:14:23 vagrant.whitetree kernel: rtw89_8852be 0000:02:00.0: xtal si not ready(W): offset=90 val=10 mask=10
Apr 16 10:14:23 vagrant.whitetree kernel: rtw89_8852be 0000:02:00.0: xtal si not ready(W): offset=90 val=10 mask=10
Apr 16 10:14:23 vagrant.whitetree kernel: rtw89_8852be 0000:02:00.0: mac init fail, ret:-110
Apr 16 10:14:24 vagrant.whitetree kernel: rtw89_8852be 0000:02:00.0: xtal si not ready(W): offset=90 val=10 mask=10
Apr 16 10:14:24 vagrant.whitetree kernel: rtw89_8852be 0000:02:00.0: xtal si not ready(W): offset=90 val=10 mask=10
Apr 16 10:14:24 vagrant.whitetree kernel: rtw89_8852be 0000:02:00.0: mac init fail, ret:-110
Apr 16 10:14:24 vagrant.whitetree kernel: rtw89_8852be 0000:02:00.0: xtal si not ready(W): offset=90 val=10 mask=10
Apr 16 10:14:24 vagrant.whitetree kernel: rtw89_8852be 0000:02:00.0: xtal si not ready(W): offset=90 val=10 mask=10
Apr 16 10:14:24 vagrant.whitetree kernel: rtw89_8852be 0000:02:00.0: mac init fail, ret:-110
```
This reconfirmed my previous conclusion that the settings did not help. Perhaps there is some other useful info
I could provide and should investigate?

Regards,
Plamen Dimitrov


Attachments:
OpenPGP_0xA4696276CE5A052D.asc (3.14 kB)
OpenPGP public key
OpenPGP_signature.asc (855.00 B)
OpenPGP digital signature
Download all attachments

2024-04-16 02:31:48

by Ping-Ke Shih

[permalink] [raw]
Subject: RE: Problems with RTL8852BE PCIe 802.11ax Wireless Network Controller and Linux kernel 6.7.7-100.fc38.x86_64

Plamen Dimitrov <[email protected]> wrote:

>
> Indeed, I had tried this before but did not include it in my report. Now I decided to redo everything
> just in case and the WiFi still disappears within a few minutes with logs like

Did you mean it works initially but WiFi got lost after a while?
Please attach your full log from boot (via private mail if you have concern).

Another try is to disable power save by 'iw' command right after booting, like
sudo iw wlan0 set power_save off


2024-04-23 02:31:23

by Plamen Dimitrov

[permalink] [raw]
Subject: Re: Problems with RTL8852BE PCIe 802.11ax Wireless Network Controller and Linux kernel 6.7.7-100.fc38.x86_64

On 4/16/24 10:31, Ping-Ke Shih wrote:
> Plamen Dimitrov<[email protected]> wrote:
>
>> Indeed, I had tried this before but did not include it in my report. Now I decided to redo everything
>> just in case and the WiFi still disappears within a few minutes with logs like
> Did you mean it works initially but WiFi got lost after a while?

Exactly. Sometimes it may even work for hours before I hit the issue, right now I tried with kernel

6.7.11-100.fc38.x86_64

and the issue happens after a few minutes.

> Please attach your full log from boot (via private mail if you have concern).
>
> Another try is to disable power save by 'iw' command right after booting, like
> sudo iw wlan0 set power_save off

I had to take a while to make sure that this indeed worked and so far it took some days without any failure
which makes me guess that this has actually helped. I even tried rebooting again and the problem is still
likely fixed. I will monitor the situation but for the sake of sustainable solution, I guess the above
does set a setting that we could not set in any other way? It seems to work and that's great, I just wonder
if running `sudo iw wlan0 set power_save off` upon each reboot or kernel update can be replaced with something
more long lasting.

Best,
Plamen Dimitrov



Attachments:
OpenPGP_0xA4696276CE5A052D.asc (3.14 kB)
OpenPGP public key
OpenPGP_signature.asc (855.00 B)
OpenPGP digital signature
Download all attachments

2024-04-23 02:49:45

by Ping-Ke Shih

[permalink] [raw]
Subject: RE: Problems with RTL8852BE PCIe 802.11ax Wireless Network Controller and Linux kernel 6.7.7-100.fc38.x86_64

Plamen Dimitrov <[email protected]> wrote:
> >
> > Another try is to disable power save by 'iw' command right after booting, like
> > sudo iw wlan0 set power_save off
>
> I had to take a while to make sure that this indeed worked and so far it took some days without any failure
> which makes me guess that this has actually helped. I even tried rebooting again and the problem is still
> likely fixed. I will monitor the situation but for the sake of sustainable solution, I guess the above
> does set a setting that we could not set in any other way? It seems to work and that's great, I just wonder
> if running `sudo iw wlan0 set power_save off` upon each reboot or kernel update can be replaced with something
> more long lasting.
>

If you use network manager as WiFi controller, set 'wifi.powersave = 2' in config file [1].

[1] https://gist.github.com/jcberthon/ea8cfe278998968ba7c5a95344bc8b55

2024-04-25 03:30:59

by Plamen Dimitrov

[permalink] [raw]
Subject: Re: Problems with RTL8852BE PCIe 802.11ax Wireless Network Controller and Linux kernel 6.7.7-100.fc38.x86_64

On 4/23/24 10:49, Ping-Ke Shih wrote:
> Plamen Dimitrov<[email protected]> wrote:
>>> Another try is to disable power save by 'iw' command right after booting, like
>>> sudo iw wlan0 set power_save off
>> I had to take a while to make sure that this indeed worked and so far it took some days without any failure
>> which makes me guess that this has actually helped. I even tried rebooting again and the problem is still
>> likely fixed. I will monitor the situation but for the sake of sustainable solution, I guess the above
>> does set a setting that we could not set in any other way? It seems to work and that's great, I just wonder
>> if running `sudo iw wlan0 set power_save off` upon each reboot or kernel update can be replaced with something
>> more long lasting.
>>
> If you use network manager as WiFi controller, set 'wifi.powersave = 2' in config file [1].
>
> [1]https://gist.github.com/jcberthon/ea8cfe278998968ba7c5a95344bc8b55

So I applied this with the wifi card failing again with the above errors. Then I tried the same NetworkManager config
but with a full reboot and the wifi crashed again. I reissued the previous `iw` comment to set this but then the wifi
crashed again before and after additional cold reboot. I am really not sure what is going on here. Should I look for
more logs once this happens again despite the powersave mode?

--
Best,
Plamen Dimitrov


Attachments:
OpenPGP_0xA4696276CE5A052D.asc (3.14 kB)
OpenPGP public key
OpenPGP_signature.asc (855.00 B)
OpenPGP digital signature
Download all attachments

2024-04-25 05:42:05

by Ping-Ke Shih

[permalink] [raw]
Subject: RE: Problems with RTL8852BE PCIe 802.11ax Wireless Network Controller and Linux kernel 6.7.7-100.fc38.x86_64

Plamen Dimitrov <[email protected]> wrote:
> On 4/23/24 10:49, Ping-Ke Shih wrote:
> > Plamen Dimitrov<[email protected]> wrote:
> >>> Another try is to disable power save by 'iw' command right after booting, like
> >>> sudo iw wlan0 set power_save off
> >> I had to take a while to make sure that this indeed worked and so far it took some days without any failure
> >> which makes me guess that this has actually helped. I even tried rebooting again and the problem is still
> >> likely fixed. I will monitor the situation but for the sake of sustainable solution, I guess the above
> >> does set a setting that we could not set in any other way? It seems to work and that's great, I just
> wonder
> >> if running `sudo iw wlan0 set power_save off` upon each reboot or kernel update can be replaced with
> something
> >> more long lasting.
> >>
> > If you use network manager as WiFi controller, set 'wifi.powersave = 2' in config file [1].
> >
> > [1]https://gist.github.com/jcberthon/ea8cfe278998968ba7c5a95344bc8b55
>
> So I applied this with the wifi card failing again with the above errors. Then I tried the same NetworkManager
> config
> but with a full reboot and the wifi crashed again. I reissued the previous `iw` comment to set this but
> then the wifi
> crashed again before and after additional cold reboot. I am really not sure what is going on here. Should
> I look for
> more logs once this happens again despite the powersave mode?

Using 'sudo iw wlan0 get power_save' to check power save status expected.