tomaspinho / rtl8821ce

Other
1.6k stars 409 forks source link

8821c sees mainline support in rtw88 #142

Open makson96 opened 4 years ago

makson96 commented 4 years ago

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!

tomaspinho commented 4 years ago

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.

ObserverOfTime commented 4 years ago

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.

makson96 commented 4 years ago

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 commented 4 years ago

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.

ukbeast commented 4 years ago

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

ObserverOfTime commented 4 years ago

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

makson96 commented 4 years ago

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

userofryzen commented 4 years ago

i was going to say the same.. jajaj

ghost commented 4 years ago

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

URemery commented 4 years ago

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 commented 4 years ago

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.

buboleck commented 4 years ago

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

ObserverOfTime commented 4 years ago

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.

tomaspinho commented 4 years ago

Release Candidates are release candidates for a reason :)

Mind posting the build logs in a new issue?

mthw0 commented 4 years ago

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

buboleck commented 4 years ago

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

URemery commented 4 years ago

@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 commented 4 years ago

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 :

mthw0 commented 4 years ago

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?

buboleck commented 4 years ago

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.

tomaspinho commented 4 years ago

@buboleck sounds like a router with a slow DHCP server

buboleck commented 4 years ago

@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.

mthw0 commented 4 years ago

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

URemery commented 4 years ago

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.

mthw0 commented 4 years ago

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.

Kr1sh1 commented 4 years ago

https://lore.kernel.org/linux-wireless/875zai6xfl.fsf@codeaurora.org/T/#u

bsmith75 commented 4 years ago

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.

ObserverOfTime commented 4 years ago

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

ukbeast commented 4 years ago

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 notifications@github.com 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 .

tomaspinho commented 4 years ago

@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.

mthw0 commented 4 years ago

@tomaspinho You mean 5.9? 5.8 is to be released in a week and the RCs don't contain the driver yet or am I missing something here?

lwfinger commented 4 years ago

The code should be in 5.9. It will NOT be in 5.8.

Things reported here will not be fixed unless they are reported to the mailing list at linux-wireless@vger.kernel.org. I do not have one of these devices, thus I cannot report any deficiencies other than failure to build and problems in starting the device. Choosing not to report them to that mailing list, which is the official way to report problems, means that the Realtek developers will be unaware of the problem!

Kr1sh1 commented 4 years ago

Any idea how long before this gets backported to Ubuntu LTS?

I found this: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1885862

tomaspinho commented 4 years ago

Well, looks like I was too optimistic. Honestly had the idea they would include the driver as part of 5.8.

Will have to maintain it until 5.9 as I want to have a bridge version to let go of this repository in a responsible fashion.

lwfinger commented 4 years ago

@el-banto: That would be a question for Ubuntu.

Kr1sh1 commented 4 years ago

Alright, thanks. I appreciate the work going into this.

Eskander commented 4 years ago

Was the new driver included in yesterday's 5.9 RC1? I don't know how to check without actually installing the kernel.

buboleck commented 4 years ago

Was the new driver included in yesterday's 5.9 RC1? I don't know how to check without actually installing the kernel.

Yes it is included. You can check here: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/diff/?id=v5.9-rc1&id2=v5.8&dt=2

ObserverOfTime commented 4 years ago

I just tried 5.9 RC1 and I'm still getting the rfe 2 isn't supported error. How do I go about reporting this to the mailing list? @lwfinger

buboleck commented 4 years ago

The bottom of the readme:

When you have problems where the driver builds and loads correctly, but fails to work, a GitHub issue is NOT the best place to report it. I have no idea of the internal workings of any of the chips, and the Realtek engineers who do will not read these issues. To reach them, send E-mail to linux-wireless@vger.kernel.org. Include a detailed description of any messages in the kernel logs and any steps that you have taken to analyze or fix the problem. If your description is not complete, you are unlikely to get any satisfaction.

Kr1sh1 commented 4 years ago

@ObserverOfTime afaik, it's a known issue and will be fixed but idk when.

tomaspinho commented 4 years ago

How's rtw88 on the latest 5.9-rc2?

mthw0 commented 4 years ago

I would love to try it, but it doesn't even boot (yet).

ObserverOfTime commented 4 years ago

How's rtw88 on the latest 5.9-rc2?

Still not working.

JustMaris commented 4 years ago

Tried 5.9-rc3, does not work. If I do lsmod | grep rtw I can see rtw8821c, but wifi does not work.

ObserverOfTime commented 4 years ago

What about dmesg | grep rtw?

JustMaris commented 4 years ago

What about dmesg | grep rtw?

[ 10.575785] rtw_8821ce 0000:01:00.0: enabling device (0000 -> 0003) [ 10.665837] rtw_8821ce 0000:01:00.0: Firmware version 24.5.0, H2C version 12 [ 10.684683] rtw_8821ce 0000:01:00.0: rfe 2 isn't supported [ 10.684796] rtw_8821ce 0000:01:00.0: failed to setup chip efuse info [ 10.684798] rtw_8821ce 0000:01:00.0: failed to setup chip information

buboleck commented 4 years ago

Only rfe 1 chips are supported in the kernel driver, rfe 2 also works but needs manual edit. Mine is rfe 4 and not working properly with the rtw88.

On September 2, 2020 9:57:06 PM GMT+03:00, "Māris Popēns" notifications@github.com wrote:

What about dmesg | grep rtw?

[ 10.575785] rtw_8821ce 0000:01:00.0: enabling device (0000 -> 0003) [ 10.665837] rtw_8821ce 0000:01:00.0: Firmware version 24.5.0, H2C version 12 [ 10.684683] rtw_8821ce 0000:01:00.0: rfe 2 isn't supported [ 10.684796] rtw_8821ce 0000:01:00.0: failed to setup chip efuse info [ 10.684798] rtw_8821ce 0000:01:00.0: failed to setup chip information

-- You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub: https://github.com/tomaspinho/rtl8821ce/issues/142#issuecomment-685933543

-- Sent from my Android device with K-9 Mail. Please excuse my brevity.

Kr1sh1 commented 4 years ago

@buboleck How do you check which RFE chip you have?

JustMaris commented 4 years ago

@buboleck what would be the manual edit for rfe 2? Have tried looking, but haven't found any information on it.