2023-08-14 10:12:25

by Emmanuel Mazurier

[permalink] [raw]
Subject: rtw89_8852ae : failed to recognize firmware elements

Hello,
After a Debian 11 update, new header was installed : 5.10.0-24-amd64,
and after upgrading rtw89 firmware, the driver was not recognized by
the system.

Dmesg error :
rtw89core: loading out-of-tree module taints kernel.
rtw89_8852ae 0000:09:00.0: not mfw format
rtw89_8852ae 0000:09:00.0: failed to recognize firmware elements
rtw89_8852ae 0000:09:00.0: failed to setup chip information
rtw89_8852ae: probe of 0000:09:00.0 failed with error -22

I have installed the firmware-realtek package too.

Do you have any idea about the problem ? I can't use wifi for the moment.
Thank you for your help.

PS : I've created an issue into your Github project
https://github.com/lwfinger/rtw89/issues/266

Regards,
Emmanuel


2023-08-14 12:51:21

by Ping-Ke Shih

[permalink] [raw]
Subject: Re: rtw89_8852ae : failed to recognize firmware elements

On Mon, 2023-08-14 at 11:52 +0200, Emmanuel Mazurier wrote:
>
> Hello,
> After a Debian 11 update, new header was installed : 5.10.0-24-amd64,
> and after upgrading rtw89 firmware, the driver was not recognized by
> the system.
>
> Dmesg error :
> rtw89core: loading out-of-tree module taints kernel.
> rtw89_8852ae 0000:09:00.0: not mfw format
> rtw89_8852ae 0000:09:00.0: failed to recognize firmware elements

With these errors, it seems like you installed the latest wireless-next
kernel (aka kernel 6.6-rc), but your firmware is the oldest firmware
that we used it in development stage.

Please provide below information to diagnose this problem.

1. kernel version you are using
$ uname -a

2. firmware you are using
$ ls -al /lib/firmware/rtw89/rtw8852a_fw.bin
$ md5sum /lib/firmware/rtw89/rtw8852a_fw.bin

> rtw89_8852ae 0000:09:00.0: failed to setup chip information
> rtw89_8852ae: probe of 0000:09:00.0 failed with error -22
>
> I have installed the firmware-realtek package too.
>
> Do you have any idea about the problem ? I can't use wifi for the moment.


A possible fix is to update firmware to the latest that you can download
it via:
https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/tree/rtw89/rtw8852a_fw.bin

I will also send a patch to be backward compatible with the old firmware
if this problem is resolved.

Ping-Ke






2023-08-14 13:03:20

by Ping-Ke Shih

[permalink] [raw]
Subject: Re: rtw89_8852ae : failed to recognize firmware elements

On Mon, 2023-08-14 at 12:20 +0000, Ping-Ke Shih wrote:
> On Mon, 2023-08-14 at 11:52 +0200, Emmanuel Mazurier wrote:
> > Hello,
> > After a Debian 11 update, new header was installed : 5.10.0-24-amd64,
> > and after upgrading rtw89 firmware, the driver was not recognized by
> > the system.
> >
> > Dmesg error :
> > rtw89core: loading out-of-tree module taints kernel.
> > rtw89_8852ae 0000:09:00.0: not mfw format
> > rtw89_8852ae 0000:09:00.0: failed to recognize firmware elements
>
> With these errors, it seems like you installed the latest wireless-next
> kernel (aka kernel 6.6-rc), but your firmware is the oldest firmware
> that we used it in development stage.
>
> Please provide below information to diagnose this problem.
>
> 1. kernel version you are using
> $ uname -a
>
> 2. firmware you are using
> $ ls -al /lib/firmware/rtw89/rtw8852a_fw.bin
> $ md5sum /lib/firmware/rtw89/rtw8852a_fw.bin
>
> > rtw89_8852ae 0000:09:00.0: failed to setup chip information
> > rtw89_8852ae: probe of 0000:09:00.0 failed with error -22
> >
> > I have installed the firmware-realtek package too.
> >
> > Do you have any idea about the problem ? I can't use wifi for the moment.
>
> A possible fix is to update firmware to the latest that you can download
> it via:
> https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/tree/rtw89/rtw8852a_fw.bin
>
> I will also send a patch to be backward compatible with the old firmware
> if this problem is resolved.
>

Please also capture log when it failed to load firmware, and see if the
firmware version like:

rtw89_8852ae 0000:03:00.0: loaded firmware rtw89/rtw8852a_fw.bin
rtw89_8852ae 0000:03:00.0: enabling device (0100 -> 0103)
rtw89_8852ae 0000:03:00.0: Firmware version 0.9.12.2 (a6a0c425), cmd version 0, type 1
rtw89_8852ae 0000:03:00.0: not mfw format
rtw89_8852ae 0000:03:00.0: failed to recognize firmware elements
rtw89_8852ae 0000:03:00.0: failed to setup chip information
rtw89_8852ae: probe of 0000:03:00.0 failed with error -22

Ping-Ke


2023-08-14 14:58:39

by Emmanuel Mazurier

[permalink] [raw]
Subject: Re: rtw89_8852ae : failed to recognize firmware elements

Thank you for replying so quickly.
The update to latest version with your "rtw8852a_fw.bin" file is
working perfectly: the wifi driver is loaded now.

Here are the other infomations (before the update) :

> Please provide below information to diagnose this problem.
>
> 1. kernel version you are using
> $ uname -a

Linux manu-debian 5.10.0-24-amd64 #1 SMP Debian 5.10.179-5
(2023-08-08) x86_64 GNU/Linux
>
> 2. firmware you are using
> $ ls -al /lib/firmware/rtw89/rtw8852a_fw.bin
> $ md5sum /lib/firmware/rtw89/rtw8852a_fw.bin

No file was found

And i could not log other elements that these dmesg entries:

[lun. août 14 15:39:19 2023] rtw89core: loading out-of-tree module
taints kernel.
[lun. août 14 15:39:19 2023] rtw89_8852ae 0000:09:00.0: firmware:
failed to load rtw89/rtw8852a_fw.bin (-2)
[lun. août 14 15:39:19 2023] firmware_class: See
https://wiki.debian.org/Firmware for information about missing
firmware
[lun. août 14 15:39:19 2023] rtw89_8852ae 0000:09:00.0: Direct
firmware load for rtw89/rtw8852a_fw.bin failed with error -2
[lun. août 14 15:39:19 2023] rtw89_8852ae 0000:09:00.0: failed to
early request firmware: -2
[lun. août 14 15:39:19 2023] rtw89_8852ae 0000:09:00.0: firmware:
failed to load rtw89/rtw8852a_fw.bin (-2)
[lun. août 14 15:39:19 2023] rtw89_8852ae 0000:09:00.0: Direct
firmware load for rtw89/rtw8852a_fw.bin failed with error -2
[lun. août 14 15:39:19 2023] rtw89_8852ae 0000:09:00.0: failed to wait
firmware completion
[lun. août 14 15:39:19 2023] rtw89_8852ae 0000:09:00.0: failed to
setup chip information
[lun. août 14 15:39:19 2023] rtw89_8852ae: probe of 0000:09:00.0
failed with error -22

So, for the next kernel upgrade, does the process described here
remain https://github.com/lwfinger/rtw89 the same, or should the
latest firmware be used?

Regards,
Emmanuel


rtw89_8852ae 0000:09:00.0: failed to setup chip information
rtw89_8852ae: probe of 0000:09:00.0 failed with error -22

>
>
>
>
>
>

2023-08-14 16:20:51

by Larry Finger

[permalink] [raw]
Subject: Re: rtw89_8852ae : failed to recognize firmware elements

On 8/14/23 09:27, Emmanuel Mazurier wrote:
> [lun. août 14 15:39:19 2023] rtw89_8852ae 0000:09:00.0: firmware:
> failed to load rtw89/rtw8852a_fw.bin (-2)
> [lun. août 14 15:39:19 2023] firmware_class: See
> https://wiki.debian.org/Firmware for information about missing
> firmware
> [lun. août 14 15:39:19 2023] rtw89_8852ae 0000:09:00.0: Direct
> firmware load for rtw89/rtw8852a_fw.bin failed with error -2
> [lun. août 14 15:39:19 2023] rtw89_8852ae 0000:09:00.0: failed to
> early request firmware: -2
> [lun. août 14 15:39:19 2023] rtw89_8852ae 0000:09:00.0: firmware:
> failed to load rtw89/rtw8852a_fw.bin (-2)
> [lun. août 14 15:39:19 2023] rtw89_8852ae 0000:09:00.0: Direct
> firmware load for rtw89/rtw8852a_fw.bin failed with error -2
> [lun. août 14 15:39:19 2023] rtw89_8852ae 0000:09:00.0: failed to wait
> firmware completion

This set of messages is what happens when no firmware is installed, thus it is
not surprising that the device started working when you actually installed the
firmware.

A kernel update should never delete the firmware, thus the procedure described
in the GitHub repo's README.md is correct. A new kernel requires a rebuild of
any out-of-kernel drivers, either manually or with dkms!

Larry


2023-08-15 06:59:50

by Ping-Ke Shih

[permalink] [raw]
Subject: Re: rtw89_8852ae : failed to recognize firmware elements

On Mon, 2023-08-14 at 16:27 +0200, Emmanuel Mazurier wrote:
>
>
> Here are the other infomations (before the update) :
>
> > Please provide below information to diagnose this problem.
> >
> > 1. kernel version you are using
> > $ uname -a
>
> Linux manu-debian 5.10.0-24-amd64 #1 SMP Debian 5.10.179-5
> (2023-08-08) x86_64 GNU/Linux

So, you installed driver from https://github.com/lwfinger/rtw89 ?


> > 2. firmware you are using
> > $ ls -al /lib/firmware/rtw89/rtw8852a_fw.bin
> > $ md5sum /lib/firmware/rtw89/rtw8852a_fw.bin
>
> No file was found
>


Can you reproduce below symptom as your initial post? If so, please share
firmware size and its md5sum.

rtw89_8852ae 0000:09:00.0: not mfw format
rtw89_8852ae 0000:09:00.0: failed to recognize firmware elements

These messages told me that a firmware is loaded but its format is unexpected.
I mean it should not no file exists.

Ping-Ke