Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 901255 - sys-kernel/linux-firmware-20230310-r1: firmware rtw89/rtw8852b_fw.bin does not load/not recognized after upgrade
Summary: sys-kernel/linux-firmware-20230310-r1: firmware rtw89/rtw8852b_fw.bin does no...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal critical (vote)
Assignee: Gentoo Kernel Bug Wranglers and Kernel Maintainers
URL: https://bugzilla.kernel.org/show_bug....
Whiteboard: Kernel changes needed
Keywords:
Depends on:
Blocks:
 
Reported: 2023-03-15 02:59 UTC by rab0171610
Modified: 2023-04-05 14:53 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info (emergeinfo.txt,6.54 KB, text/plain)
2023-03-15 03:03 UTC, rab0171610
Details

Note You need to log in before you can comment on or make changes to this bug.
Description rab0171610 2023-03-15 02:59:26 UTC
First, I am using an unsupported kernel sys-kernel/zen-sources-6.2.5 as the rtw89 wifi drivers for rtw_8852be are now in the 6.2 kernel. Second, the affected firmware is not an issue on sys-kernel/linux-firmware-20230210 and below (wifi works):
sudo dmesg | grep firmware 
 
[    8.786565] Loading firmware: rtw89/rtw8852b_fw.bin

After upgrade to sys-kernel/linux-firmware-20230310-r1 (wifi does not work/no devices found):
[] loading firmare: rwt89/rtw8852b_fw.bin
[] rtw89_8852be 0000:03:00.0: no suitable firmware found
[] rtw89_8852be 0000:03:00.0: failed to recognize firmware

This issue also affects the unstable version sys-kernel/linux-firmware-20230310.
Copying the affected file, rwt89/rtw8852b_fw.bin to /usr/lib/firmware does not fix the issue but replacing the entire firmware folder from a backup directory fixes the issue so that I can reboot and downgrade appropriately.


Reproducible: Always

Steps to Reproduce:
1.Upgrade to sys-kernel/linux-firmware-20230310 and above
2. Reboot
3.Wifi does not work, devices not found, dmesg reports firmware not loaded/not recognized (rwt89/rtw8852b_fw.bin)
4. Downgrade to previous version, sys-kernel/linux-firmware-20230210
5. Reboot
6. Wifi working, dmesg reports firmware loaded, no errors (rwt89/rtw8852b_fw.bin)

Actual Results:  
Wifi did not work after upgrade, worked before upgrade and worked after downgrading.

Expected Results:  
Wifi would continue to work after upgrade, firmware would load normally after upgrade, firmware would be recognized after upgrade

Network controller [0280]: Realtek Semiconductor Co., Ltd. Device [10ec:b852]
Comment 1 rab0171610 2023-03-15 03:03:04 UTC
Created attachment 857757 [details]
emerge --info

emerge --info
Comment 2 rab0171610 2023-03-15 08:43:44 UTC
Correction: Replacing the files in /usr/lib/firmware/rtw89, specifically rtw8852b_fw.bin
from a backup of the previous working version of sys-kernel/linux-firmware-20230210 does indeed fix the problem.   

I suspect this is an upstream bug but I do not know how I would report my issue there. 

There were two commits made upstream on 2-24-23 to the rtw8852b firmware binary: 

 "rtw89: 8852b: update fw to v0.29.26.0
 New fimrware type 5 to support hardware scan, P2P-PS and etc."

 "rtw89: 8852b: update fw to v0.29.29.0
 Correct channel report of hardware scan."

 "--- a/rtw89/rtw8852b_fw.bin
 +++ b/rtw89/rtw8852b_fw.bin
 . . .Binary files differ"

This newest binary blob version does not work for my machine.
Comment 3 rab0171610 2023-03-15 20:26:41 UTC
Update: I can confirm this is most likely an upstream bug. Using the firmware binary in question (rtw8852b_fw.bin) from archive downloaded from linux-firmware git repository (linux-firmware-20230310.tar.gz) results in the same error - no suitable firmware found/firmware not recognized.
Comment 4 rab0171610 2023-03-17 00:46:26 UTC
This bug has been addressed upstream but in the interim may still affect Gentoo users under certain configurations.

After confirming it was likely an upstream bug, I reported upstream at Kernel.org. Per Ping-Ke (Realtek):

"The firmware format is changed, and wireless-next tree or upcoming 6.3 will
support it. I will also post this information on the bug."

Linux Kernel bugzilla bug 217207
Comment 5 rab0171610 2023-03-17 02:46:56 UTC
In Conclusion:
As a test, I installed the Linux mainline kernel 6.3.0-rc2.

Previous version of rtw8852b firmware from sys-kernel/linux-firmware-20230210 works in the 6.3 kernel as does new version in sys-kernel/linux-firmware-20230310.

With the 6.2 kernel versions, only the previous firmware version works (20230210) and the newer firmware version (20230310) does not.
Comment 6 Mike Pagano gentoo-dev 2023-03-17 19:28:53 UTC
(In reply to rab0171610 from comment #5)
> In Conclusion:
> As a test, I installed the Linux mainline kernel 6.3.0-rc2.
> 
> Previous version of rtw8852b firmware from
> sys-kernel/linux-firmware-20230210 works in the 6.3 kernel as does new
> version in sys-kernel/linux-firmware-20230310.
> 
> With the 6.2 kernel versions, only the previous firmware version works
> (20230210) and the newer firmware version (20230310) does not.

Thanks for this, I imagine a warning might be helpful until that fix works it's way down.

I'll look at the fix and see if we can incorporate it ourselves.
Comment 7 Mike Pagano gentoo-dev 2023-03-17 19:30:02 UTC
Sorry for the spam
Comment 8 Mike Pagano gentoo-dev 2023-03-24 15:54:35 UTC
(In reply to Mike Pagano from comment #7)
> Sorry for the spam

You can get the fix from linux-firmware-99999999 or wait until the April release.
Comment 9 Larry the Git Cow gentoo-dev 2023-04-05 14:53:20 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=149c7a90e16bc254785e16fc25452daaf052a44c

commit 149c7a90e16bc254785e16fc25452daaf052a44c
Author:     Mike Pagano <mpagano@gentoo.org>
AuthorDate: 2023-04-05 14:52:57 +0000
Commit:     Mike Pagano <mpagano@gentoo.org>
CommitDate: 2023-04-05 14:52:57 +0000

    sys-kernel/linux-firmware: add 20230404
    
    Closes: https://bugs.gentoo.org/901255
    
    Signed-off-by: Mike Pagano <mpagano@gentoo.org>

 sys-kernel/linux-firmware/Manifest                 |   1 +
 .../linux-firmware/linux-firmware-20230404.ebuild  | 403 +++++++++++++++++++++
 2 files changed, 404 insertions(+)