WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: RTL8822be driver not found in Tinycore64 11.x  (Read 8143 times)

Offline mrjake2

  • Newbie
  • *
  • Posts: 35
Re: RTL8822be driver not found in Tinycore64 11.x
« Reply #15 on: March 09, 2020, 10:28:47 PM »
Hi mrjake2
... Yes, that was the first thing I tried, and it still complained about not being able to find rte88/rtl8822be.bin. ...
Is that an exact quote? Because  firmware-rtlwifi.tcz.list  lists the firmware files name as:
/usr/local/lib/firmware/rtlwifi/rtl8822befw.bin

Found here:
http://tinycorelinux.net/11.x/x86_64/tcz/firmware-rtlwifi.tcz.list

Sorry, I was typing that from my phone while trying to rush out the door.  This is the exact, correct message that I am getting:
Code: [Select]
> tce-load -il firmware-rtlwifi
firmware-rtlwifi.tcz: OK
> tce-load -il wireless-5.4.3-tinycore64
wireless-5.4.3-tinycore64.tcz: OK
...
rtw_pci 0000:02:00.0: Direct firmware load for rtw88/rtw8822b_fw.bin failed . with error -2
rtw_pci 0000:02:00.0: Falling back to sysnfs fallback for: rtw88/rtw8822b_fw.bin
rtw_pci 0000:02:00.0: failed to request firmware
rtw_pci 0000:02:00.0: failed to load firmware
...

For what it's worth, when trying to get my wireless working on another distro (I believe it was Kali) I had the exact same problem with that driver.  In that case someone had already recompiled the same one that I have compiled, but for Kali.  Dropping that in resolved the issue for me.  So I'm pretty confident that the existing driver really no longer works given that this was a required change in that distro as well.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11619
Re: RTL8822be driver not found in Tinycore64 11.x
« Reply #16 on: March 09, 2020, 10:40:06 PM »
Hi mrjake2
According to your  dmesg,  it's looking for  rtw8822b_fw.bin.  That file is listed here:
http://tinycorelinux.net/11.x/x86_64/tcz/firmware-rtlwifi.tcz.list

Offline mrjake2

  • Newbie
  • *
  • Posts: 35
Re: RTL8822be driver not found in Tinycore64 11.x
« Reply #17 on: March 09, 2020, 11:00:35 PM »
Hi mrjake2
According to your  dmesg,  it's looking for  rtw8822b_fw.bin.  That file is listed here:
http://tinycorelinux.net/11.x/x86_64/tcz/firmware-rtlwifi.tcz.list

That's true, but when I try to load firmware-rtlwifi followed by wireless-KERNEL, it doesn't work.  I get the errors posted above.

However, I did notice that firmware-rtlwifi.tcz puts it in a different directory than the one I get in the error message.  firmware-rtlwifi.tcz puts it in rtlwifi/rtw8822b_fw.bin, but my updated firmware from the rtw88 branch of https://github.com/lwfinger/rtlwifi_new/tree/rtw88 puts them under rtw88/rtw8822b_fw.bin instead.  This exactly matches the dir that I see in the error message, so as a test I created rtw88/ under firmware/ and copied the driver from the firmware-rtlwifi.tcz package to that new dir.  Strangely, this got rid of the "failed to load firmware" error messages, but it also didn't result in seeing the line "Firmware version 27.2.0, H2C version 13", which I believe would mean that the driver was loaded correctly. 

After doing this I loaded wifi.tcz, started X, and tried to run wifi.sh.  It does find wlan0, but it never completes a successful wifi scan.  So I think the driver is in the correct location at this point, but the driver itself isn't correct anymore.  Based on the instructions I see in the README for https://github.com/lwfinger/rtlwifi_new/tree/rtw88 - plus the fact that I've only been able to get this to work when I use the compiled code for that branch, and that I needed the drivers compiled from this same branch to get wifi working in Kali Linux - I believe that I need to be using the version of rtw822b_fw.bin that I compiled, and that it needs to be in rtw88/ instead of rtlwifi/.  I just don't know how to get rid of the taint errors.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11619
Re: RTL8822be driver not found in Tinycore64 11.x
« Reply #18 on: March 09, 2020, 11:19:22 PM »
Hi mrjake2
OK, forget about loading  firmware-rtlwifi.tcz  and  wireless-KERNEL.tcz

Unpack the driver extension you created.

Move the firmware from that extension into an extension called:
Code: [Select]
firmware-rtl8822be.tczAdd a file called:
Code: [Select]
/usr/loca/tce.installed/firmware-rtl8822bePlace the following in that file:
Code: [Select]
#!/bin/sh
udevadm trigger

Then copy your firmware and driver extensions to your tce directory, then reboot and:
Code: [Select]
tce-load -i firmware-rtl8822be.tcz
tce-load -i YourCompiledDriver.tcz

    [EDIT]: Added missing  -i  to  tce-load  command.  Rich
« Last Edit: March 09, 2020, 11:46:10 PM by Rich »

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11619
Re: RTL8822be driver not found in Tinycore64 11.x
« Reply #19 on: March 09, 2020, 11:27:11 PM »
Hi mrjake2
... Then copy your firmware and driver extensions to your tce directory, then reboot and:
Code: [Select]
tce-load -i firmware-rtl8822be.tcz
tce-load -i YourCompiledDriver.tcz
And then see what  dmesg  returns.

    [EDIT]: Added missing  -i  to  tce-load  command.  Rich
« Last Edit: March 09, 2020, 11:46:40 PM by Rich »

Offline mrjake2

  • Newbie
  • *
  • Posts: 35
Re: RTL8822be driver not found in Tinycore64 11.x
« Reply #20 on: March 10, 2020, 12:09:16 AM »
Hi mrjake2
... Then copy your firmware and driver extensions to your tce directory, then reboot and:
Code: [Select]
tce-load -i firmware-rtl8822be.tcz
tce-load -i YourCompiledDriver.tcz
And then see what  dmesg  returns.

    [EDIT]: Added missing  -i  to  tce-load  command.  Rich

Hi Rich - a couple of weird things happened when I tried that.

  • when I tried to tce-load firmware-rtl8822be, it said "firmware-rtl8822be already installed"!  I am quite positive that I had not installed it yet.  I even tried to tce-remove it and reload it, but I got the same message.
  • when loading the drivers immediately following that, I got the taint warnings.
  • when I tried to load wifi.tcz, I got a bunch of error messages starting with the same errors I posted earlier (Falling back to sysfs for rtw88/rtw8822b_fw.bin, failed to request firmware, etc.). I then see "BUG: kernel NULL pointer dereference address: 000000000008", followed by several more lines that look like coredump info.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11619
Re: RTL8822be driver not found in Tinycore64 11.x
« Reply #21 on: March 10, 2020, 12:28:42 AM »
Hi mrjake2
  • when I tried to tce-load firmware-rtl8822be, it said "firmware-rtl8822be already installed"!  I am quite positive that I had not installed it yet.  I even tried to tce-remove it and reload it, but I got the same message.
Maybe it was listed in your  onboot.lst?  You did reboot prior to trying to load it, right?


Offline mrjake2

  • Newbie
  • *
  • Posts: 35
Re: RTL8822be driver not found in Tinycore64 11.x
« Reply #22 on: March 10, 2020, 02:14:06 AM »
Hi mrjake2
Maybe it was listed in your  onboot.lst?  You did reboot prior to trying to load it, right?

Sorry, I missed the part about rebooting.  But I did reboot by happenstance because I tried this several times.  Whenever I rebooted, the script in /usr/local/tce.installed disappeared though, so I needed to recreate it after every reboot.  Do I need to do something differently to make sure the script persists between reboots?

I also did check that it isn't listed in my onboot.lst.  The only thing in there is Xorg-7.7, and I have showapps on the linux kernel params to ensure that it wasn't being loaded as a dependency (it's not).

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11619
Re: RTL8822be driver not found in Tinycore64 11.x
« Reply #23 on: March 10, 2020, 02:33:22 AM »
Hi mrjake2
... Whenever I rebooted, the script in /usr/local/tce.installed disappeared though, so I needed to recreate it after every reboot.  Do I need to do something differently to make sure the script persists between reboots? ...
... Move the firmware from that extension into an extension called:
Code: [Select]
firmware-rtl8822be.tczAdd a file called:
Code: [Select]
/usr/loca/tce.installed/firmware-rtl8822bePlace the following in that file:
Code: [Select]
#!/bin/sh
udevadm trigger
The script is supposed to be part of your  firmware-rtl8822be.tcz  extension.

Offline mrjake2

  • Newbie
  • *
  • Posts: 35
Re: RTL8822be driver not found in Tinycore64 11.x
« Reply #24 on: March 10, 2020, 02:53:22 AM »
The script is supposed to be part of your  firmware-rtl8822be.tcz  extension.

Got it.   So I changed that and some of the strange errors have gone away now.  However, I do still get the taint warnings when I load the drivers I compiled (not the firmware).  After that, though, wifi works as expected.

So to summarize, I get the following after each step:
  • tce-load firmware-rtl8822be (my firmware): no errors
  • tce-load wireless-rtl8822be (my drivers): taint warnings
  • tce-load wifi: no errors
  • After all of the above: wifi works as expected

So I guess what we learned from this is that the taint messages are coming from the drivers, not the firmware.  Not sure what to do with that information though.

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14815
Re: RTL8822be driver not found in Tinycore64 11.x
« Reply #25 on: March 10, 2020, 03:32:22 AM »
Packaging the module to /usr/local/lib/modules is correct - the taint message comes from the module being out of tree/licensing issues.

Since your module moved from staging in kernel 4.x to being in-tree in 5.x, I'm surprised that the stock version does not work.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11619
Re: RTL8822be driver not found in Tinycore64 11.x
« Reply #26 on: March 10, 2020, 11:24:10 AM »
Hi Juanito
... Since your module moved from staging in kernel 4.x to being in-tree in 5.x, I'm surprised that the stock version does not work.
Looking here:
http://tinycorelinux.net/11.x/x86_64/tcz/wireless-5.4.3-tinycore64.tcz.list
I don't see  rtl8822be  or any  8822  drivers listed. Or am I misunderstanding something?

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11619
Re: RTL8822be driver not found in Tinycore64 11.x
« Reply #27 on: March 10, 2020, 11:55:44 AM »
Hi Juanito
Checking here:
http://tinycorelinux.net/11.x/x86_64/release/src/kernel/config-5.4.3-tinycore64

I see:

# CONFIG_RTL8XXXU_UNTESTED is not set
CONFIG_RTW88=m
CONFIG_RTW88_CORE=m
CONFIG_RTW88_PCI=m
CONFIG_RTW88_8822BE=y
CONFIG_RTW88_8822CE=y
# CONFIG_RTW88_DEBUG is not set
# CONFIG_RTW88_DEBUGFS is not set


If that's the driver for his hardware, it's built into the kernel. If that's true, does the firmware need to be built into the kernel too?

Offline mrjake2

  • Newbie
  • *
  • Posts: 35
Re: RTL8822be driver not found in Tinycore64 11.x
« Reply #28 on: March 10, 2020, 11:57:49 AM »
Quote from: Rich link=topic=23583.msg147948
Looking here:
http://tinycorelinux.net/11.x/x86_64/tcz/wireless-5.4.3-tinycore64.tcz.list
I don't see  rtl8822be  or any  8822  drivers listed. Or am I misunderstanding something?

They are in an unexpected place but they are there:

tinycore64/kernel/drivers/net/wireless/realtek/rtw88/rtw88.ko.gz
./usr/local/lib/modules/5.4.3-tinycore64/kernel/drivers/net/wireless/realtek/rtw88/rtwpci.ko.gz

Those are the same names as the drivers that I compiled, however their location has changed to no longer be under Realtek. They are now just under wireless/rtw88/.