rtl8821ce icon indicating copy to clipboard operation
rtl8821ce copied to clipboard

8821c sees mainline support in rtw88

Open makson96 opened this issue 4 years ago • 161 comments

Hi, I just want to share with you great news, which I discovered. As of today initial support for rtl8821c was published for mainline kernel (in rtw88 driver). Here are kernel patches: https://patchwork.kernel.org/patch/11559307/ https://patchwork.kernel.org/patch/11559297/ https://patchwork.kernel.org/patch/11559301/ https://patchwork.kernel.org/patch/11559299/ https://patchwork.kernel.org/patch/11559303/ https://patchwork.kernel.org/patch/11559295/ https://patchwork.kernel.org/patch/11559293/ And here is the firmware: https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/commit/?id=401bd6defb64ebbaf3b020f30f2ac3735d3a0c0f Best regards and have fun!

makson96 avatar May 20 '20 17:05 makson96

This is great news! I intend to archive this repository once the new rtw88 is available in a stable mainline release and proven to be working.

tomaspinho avatar May 25 '20 23:05 tomaspinho

I installed linux-firmware-git and applied the patches to v5.7-rc7 (after fixing some rejections) but the driver isn't working. Perhaps it depends on something else I'm missing. There's a pull request for v5.8 that adds support for 8723DE, but not 8821CE. Hopefully it'll be added later.

ObserverOfTime avatar May 26 '20 07:05 ObserverOfTime

I will probably give it a try, when it will be merged to wireless-drivers-next tree: https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next.git

makson96 avatar May 26 '20 18:05 makson96

There is already second version of initial patches: https://patchwork.kernel.org/cover/11575267/ And five additional patches: https://patchwork.kernel.org/cover/11575281/ From the message of those new patches: " After this set, the RTL8821CE device is supported by rtw88. " So hopefully it will be ready soon.

makson96 avatar May 29 '20 18:05 makson96

OpenSUSE has now included the firmware in TW https://build.opensuse.org/package/rdiff/openSUSE:Factory/kernel-firmware?linkrev=base&rev=143 /rtw8821c_fw.bin

ukbeast avatar May 30 '20 23:05 ukbeast

I tried the new patches on v5.7 but there are some compilation errors so I'll keep waiting.

ObserverOfTime avatar Jun 01 '20 13:06 ObserverOfTime

Another update to patches: https://patchwork.kernel.org/cover/11585415/ https://patchwork.kernel.org/cover/11585439/

makson96 avatar Jun 03 '20 20:06 makson96

i was going to say the same.. jajaj

userofryzen avatar Jun 05 '20 13:06 userofryzen

This says something about the code being ready. https://patchwork.kernel.org/patch/11585441/

ghost avatar Jun 07 '20 17:06 ghost

Hi,

I found the repo mentionned by Larry Finger in the link of Isvincent : https://github.com/lwfinger/rtlwifi_new

As I understand, if you want to give it a try you should refer to the README file of the rtw88 branch. Also, check the repo issues, there's already a user (mentionned in the link of Isvincent) who's trying to build the driver and Larry helps him.

I think that this user did not succeded yet but somebody may have the courage to try

URemery avatar Jun 11 '20 23:06 URemery

Hi,

I tried to build the driver from the repo I shared in my last post. No problem during the build but it throws some errors when loading it (see issue #608 of the repo). I will rebuild as soon as there improvements.

URemery avatar Jun 12 '20 12:06 URemery

Yes, it builds fine on Gentoo kernel 5.7.1 but does not work, loads with errors:

[ 2.324824] rtw_8821ce 0000:01:00.0: enabling device (0000 -> 0003) [ 2.329142] rtw_8821ce 0000:01:00.0: Firmware version 24.5.0, H2C version 12 [ 2.350506] rtw_8821ce 0000:01:00.0: rfe 4 isn't supported [ 2.350612] rtw_8821ce 0000:01:00.0: failed to setup chip efuse info [ 2.350615] rtw_8821ce 0000:01:00.0: failed to setup chip information

buboleck avatar Jun 12 '20 13:06 buboleck

8821CE is entirely broken on v5.8-rc1 since the aforementioned error occurs with both the rtlwifi_new repo and the kernel patches, and this repo doesn't even build.

ObserverOfTime avatar Jun 15 '20 09:06 ObserverOfTime

Release Candidates are release candidates for a reason :)

Mind posting the build logs in a new issue?

tomaspinho avatar Jun 15 '20 10:06 tomaspinho

I have the DKMS build log: https://pastebin.com/raw/T5dkTJnf

mthw0 avatar Jun 15 '20 10:06 mthw0

Yes, it builds fine on Gentoo kernel 5.7.1 but does not work, loads with errors:

[ 2.324824] rtw_8821ce 0000:01:00.0: enabling device (0000 -> 0003) [ 2.329142] rtw_8821ce 0000:01:00.0: Firmware version 24.5.0, H2C version 12 [ 2.350506] rtw_8821ce 0000:01:00.0: rfe 4 isn't supported [ 2.350612] rtw_8821ce 0000:01:00.0: failed to setup chip efuse info [ 2.350615] rtw_8821ce 0000:01:00.0: failed to setup chip information

Apparently mine is "rfe 4", whatever it means. I added it as suggested but it crashes during boot. I think I'll go with voiding the warranty of the laptop and just putting some half mini pci atheros card. This is the first hardware not working in main line linux I got in more than 7 years. Gentoo kernel 5.7.2

buboleck avatar Jun 16 '20 20:06 buboleck

@buboleck You may want to create an issue in the rtlwifi_new/rtw88 repo. We had the same dmesg output concerning 'rfe 2' and it has been corrected.

The driver from this repo now builds correctly but crashes after loading because of null pointer dereference bugs, we are currently trying to patch this while waiting for realtek devs to properly initialize the 8821ce chip data.

URemery avatar Jun 18 '20 12:06 URemery

Hi everybody,

I'm sending this message throug a rtl8821ce chip using the rtw88 driver of the repo of L. Finger on a archlinux machine with kernel 5.7.3-arch1-1 ! It's hopefully the driver that will be shipped in kernel 5.8 (Realtek still has some work to do though).

If you want to give it a try :

  • Clone the rtw88 branch of the repo
  • make && sudo make install
  • blacklist all other conflicting drivers (such as the one from this repo)
  • reboot This protocol is also in the README file of the rtw88 branch.

URemery avatar Jun 18 '20 19:06 URemery

The mentioned driver is working now, although it doesn't work any better than this one. For example it still takes several seconds (~25 since pressing something on the keyboard) after waking up from sleep to reconnect. Does anybody else have this issue too?

mthw0 avatar Jun 19 '20 06:06 mthw0

I noticed when the network is configured to take IP address via DHCP it is slow to connect, if set to static IP connects immediately. BTW the same behavior is on MS. I also noticed another strange thing, if I set fixed IP address in the router DHCP the connection fails, both on linux and windows. Windows obtains the DNS hotsname etc but fails to set the IP address.

The RTW88 is still not working for me.

buboleck avatar Jun 19 '20 07:06 buboleck

@buboleck sounds like a router with a slow DHCP server

tomaspinho avatar Jun 19 '20 08:06 tomaspinho

@tomaspinho my other devices connect fine, this is new laptop I got 2-3 weeks ago. I even tested with old dlink router with dd-wrt still the same.

buboleck avatar Jun 19 '20 08:06 buboleck

Even on the same device in Windows it reconnects immediately, only in Linux it takes almost half a minute.

mthw0 avatar Jun 19 '20 09:06 mthw0

It's maybe slower on startup yes, and it seems that it has some trouble connecting to a low strength signal. But it's only an indev version with patches so it can't be as efficient as a release version. Larry told that he will communicate with the realtek devs about the bugs we found so that they can properly finish the job. He also said that this driver hasn't been merged in a kernel tree yet, but someone from linux.org told me that a driver will be merged in kernel 5.8. Anyway the mainline driver is on a good way.

URemery avatar Jun 19 '20 11:06 URemery

He also said that this driver hasn't been merged in a kernel tree yet, but someone from linux.org told me that a driver will be merged in kernel 5.8.

Can it be merged even if the RCs don't have it? I am running RC2 right now and I had to install the rtw88 driver manually.

mthw0 avatar Jun 22 '20 12:06 mthw0

https://lore.kernel.org/linux-wireless/[email protected]/T/#u

Kr1sh1 avatar Jul 20 '20 17:07 Kr1sh1

The rtw88 driver from @lwfinger's repo is not ready for mainstream use. For me, it works fine on Arch with 5 GHz wifi, but it provides poor connections for 2.4 GHz wifi. The rtl8821ce driver from @tomaspinho's repo works well for me on 2.4 and 5 GHz.

bsmith75 avatar Jul 29 '20 00:07 bsmith75

I suppose that will be fixed by the time it makes it into v5.9.

ObserverOfTime avatar Jul 29 '20 09:07 ObserverOfTime

Would it be easily possible to use tomaspinho's driver over rtw88 once the driver has become available?

On Wed, Jul 29, 2020 at 10:40 AM ObserverOfTime [email protected] wrote:

I suppose that will be fixed by the time it makes it into v5.9.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/tomaspinho/rtl8821ce/issues/142#issuecomment-665557844, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABQ2ZEESTALREMCWPGXVJETR57VCNANCNFSM4NGFHBJA .

ukbeast avatar Jul 29 '20 10:07 ukbeast

@ukbeast Yes, it will be. However, I will stop maintaining this rtl8821ce when rtw88 is released as part of a stable release of kernel 5.8.

tomaspinho avatar Jul 29 '20 10:07 tomaspinho