Bug 201875 - Not work Network controller: Realtek Semiconductor Co., Ltd. RTL8821CE 802.11ac PCIe Wireless Network Adapter
Summary: Not work Network controller: Realtek Semiconductor Co., Ltd. RTL8821CE 802.11...
Status: NEW
Alias: None
Product: Drivers
Classification: Unclassified
Component: network-wireless (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: drivers_network-wireless@kernel-bugs.osdl.org
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-12-04 10:54 UTC by Cristian Aravena Romero
Modified: 2022-07-29 01:34 UTC (History)
14 users (show)

See Also:
Kernel Version: Ubuntu 4.18.0-11.12-generic 4.18.12
Subsystem:
Regression: No
Bisected commit-id:


Attachments
dmesg 4.20.0-042000rc6-generic (67.11 KB, text/plain)
2018-12-11 10:57 UTC, Cristian Aravena Romero
Details
dmesg crash log (16.85 KB, text/plain)
2020-12-29 09:55 UTC, Michael
Details
crash after association (4.93 KB, text/plain)
2020-12-29 13:52 UTC, Michael
Details
5.13.7 dmesg log with driver firmware crash (258.45 KB, text/plain)
2021-08-06 19:35 UTC, Tomas Gayoso
Details

Description Cristian Aravena Romero 2018-12-04 10:54:44 UTC
Hello,

Open bug in launchpad.net
https://bugs.launchpad.net/bugs/1806649

Not work Network controller: Realtek Semiconductor Co., Ltd. RTL8821CE 802.11ac PCIe Wireless Network Adapter.

Best regards,
--
Cristian Aravena Romero (caravena)
Comment 1 Cristian Aravena Romero 2018-12-11 10:57:35 UTC
Created attachment 279945 [details]
dmesg 4.20.0-042000rc6-generic
Comment 2 Cristian Aravena Romero 2018-12-11 10:58:18 UTC
Not work with linux 4.20-rc6
Comment 3 liberodark 2019-05-25 10:39:54 UTC
rtl8821ce not work for 5.1 and 5.2 RC1
Comment 4 liberodark 2019-05-25 10:42:05 UTC
Have see this work : 
https://github.com/tomaspinho/rtl8821ce

That is my pc : 

inxi -F
System:
  Host: pc-pc Kernel: 5.0.9-2-MANJARO x86_64 bits: 64 Desktop: N/A 
  Distro: Manjaro Linux 
Machine:
  Type: Laptop System: ASUSTeK product: TUFGaming FX505DY_FX505DY v: 1.0 
  serial: <root required> 
  Mobo: ASUSTeK model: FX505DY v: 1.0 serial: <root required> 
  UEFI: American Megatrends v: FX505DY.308 date: 03/19/2019 
Battery:
  ID-1: BAT0 charge: 30.9 Wh condition: 46.5/48.0 Wh (97%) 
CPU:
  Topology: Quad Core model: AMD Ryzen 5 3550H with Radeon Vega Mobile Gfx 
  bits: 64 type: MT MCP L2 cache: 2048 KiB 
  Speed: 1223 MHz min/max: 1400/2100 MHz Core speeds (MHz): 1: 1223 2: 1230 
  3: 1395 4: 1312 5: 1272 6: 1226 7: 1311 8: 1226 
Graphics:
  Device-1: AMD Baffin [Radeon RX 460/560D / Pro 
  450/455/460/555/555X/560/560X] 
  driver: amdgpu v: kernel 
  Device-2: AMD Picasso driver: amdgpu v: kernel 
  Display: x11 server: X.org 1.20.4 driver: modesetting 
  resolution: <xdpyinfo missing> 
  OpenGL: renderer: AMD RAVEN (DRM 3.27.0 5.0.9-2-MANJARO LLVM 8.0.0) 
  v: 4.5 Mesa 19.0.3 
Audio:
  Device-1: AMD Raven/Raven2/Fenghuang HDMI/DP Audio driver: snd_hda_intel 
  Device-2: AMD Family 17h HD Audio driver: snd_hda_intel 
  Sound Server: ALSA v: k5.0.9-2-MANJARO 
Network:
  Device-1: Realtek RTL8821CE 802.11ac PCIe Wireless Network Adapter 
  driver: N/A 
  Device-2: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet 
  driver: r8168 
  IF: enp4s0 state: down mac: 04:92:26:1d:b6:a5 
  IF-ID-1: enp5s0f3u3 state: unknown speed: N/A duplex: N/A 
  mac: c2:f9:45:e7:5c:cc 
Drives:
  Local Storage: total: 476.94 GiB used: 7.54 GiB (1.6%) 
  ID-1: /dev/nvme0n1 vendor: Kingston model: RBUSNS8154P3512GJ 
  size: 476.94 GiB 
Partition:
  ID-1: / size: 468.16 GiB used: 7.54 GiB (1.6%) fs: ext4 
  dev: /dev/nvme0n1p2 
Sensors:
  System Temperatures: cpu: 50.5 C mobo: N/A 
  Fan Speeds (RPM): N/A 
  GPU: device: amdgpu temp: 41 C device: amdgpu temp: 41 C 
Info:
  Processes: 241 Uptime: 13m Memory: 7.54 GiB used: 1.66 GiB (22.0%) 
  Shell: bash inxi: 3.0.33 

Not have see any merge on kernel of this driver.
You have any idea if you have any work for that ?

Best Regards
Comment 5 Alberto 2019-09-18 11:49:14 UTC
I am having this problem too, I have to compile like DKMS module it because the driver is not in the kernel.
Will it be mainlined some day in the kernel?
I think that the driver is opensourced by realtek I don't know why isn't it mainlined..
Other thing is if they are going to support that wireless card in the new realtek driver already in the kernel tree RTW88 I think it was ( I don't remember well)
Comment 6 Alberto 2019-09-18 11:56:30 UTC
https://github.com/RangeeGmbH/rtl8821ce
in this github there are mentions about an official driver by realtek for this card, weird that is not mainlined yet
Comment 8 Alberto 2019-09-18 18:45:10 UTC
(In reply to djip.perois from comment #7)
> https://www.phoronix.com/scan.php?page=news_item&px=Realtek-RTW88-WiFi-Linux-
> Driver
> 
> like you.. waiting!

I won't expect to realtek to add support for our wireless card.. 
I don't know why this card is not mainlined or supported already by rtlwifi
Comment 9 djip.perois 2019-09-19 22:35:19 UTC
https://lkml.org/lkml/2019/5/15/809
expected next year...
Comment 10 djip.perois 2019-09-19 22:45:36 UTC
next look to be the 8723de...
https://github.com/rtlwifi-linux/rtw88_8723de
Comment 11 Alberto 2019-09-20 00:04:16 UTC
it is looking like realtek is doing the things really bad, the developpers are so angry I think, there are reasons surely.
meanwhile we are suffering for this. Realtek, pls, do the things better-.-
I think it will be possible with the RTW88 new driver.
Comment 12 Yen-Hsuan Chuang 2020-05-07 02:49:36 UTC
Hey, I am trying to get them mainlined, and there's a lot of patches to be reviewed. So please give me some time to upstream them (RTL8723DE is under review, and RTL8821CE should be next!).

rtw88 just get applied for an year, there were so many features to be applied. I will send them ASAP. And I'd agree Realtek folks didn't play the upstream well, but now it's getting more attention, should be supported better.
Comment 13 Alberto 2020-05-07 07:12:09 UTC
I really hope this, finally I returned the laptop, not only for the wifi but other things more important ( like mal function firmwares and drivers included in windows)
so I cant test nothing here, my wireless wifi is 8822BE and with rtw88 each kernel is working better in all situations so I am very happy. Please, do the things like with 8822be but for all wireless cards in the future.

In addition, is there any specific time to probably get it mainlained? is there any kernel mail list plase?
Comment 14 Yen-Hsuan Chuang 2020-05-07 07:43:01 UTC
As there will need some time for maintainers to review on it, I cannot guarantee the time that the code will be landed. But if you're interested, you can subscribe linux-wireless [1].

[1] https://patchwork.kernel.org/project/linux-wireless/list/
Comment 15 Alberto 2020-05-07 07:47:51 UTC
(In reply to Yen-Hsuan Chuang from comment #14)
> As there will need some time for maintainers to review on it, I cannot
> guarantee the time that the code will be landed. But if you're interested,
> you can subscribe linux-wireless [1].
> 
> [1] https://patchwork.kernel.org/project/linux-wireless/list/

I am seeing.. why don't you sent both of them at the same time(8821ce and 8723DE)? May be I don't know well how it works but.. can you let us know please?
Comment 16 Yen-Hsuan Chuang 2020-05-07 07:50:43 UTC
Because review the code requires to spend time. And the maintainer doesn't like to put a lot of code for review at once. So I send them gradually, as you can see I split RTL8723DE into many patchsets.
Comment 17 Alberto 2020-05-07 08:01:52 UTC
ah, okay, but.. only for knowing if you have sufficient time to spend explaining a little bit how it works to us. 
Are you going to put more patchsets before the mantainers review the code already posted or are you going to wait?
I ask because I think in that case for supporting new cards already in the market and very popular may be they make an exception.
Good day and good morning( in my case)
Comment 18 Yen-Hsuan Chuang 2020-05-07 08:29:16 UTC
I do wish the code can be applied ASAP, but that reason does not make the maintainers review code faster. They have a lot of code of different drivers to review. (My RTL8822CE/RTL8822BE took me 7 months to be applied).

Anyway, it's implemented, and we now look good under the process. As long as RTL8723DE is applied, I can try to push RTL8821CE after that!
Comment 19 Alberto 2020-05-07 09:21:22 UTC
(In reply to Yen-Hsuan Chuang from comment #18)
> I do wish the code can be applied ASAP, but that reason does not make the
> maintainers review code faster. They have a lot of code of different drivers
> to review. (My RTL8822CE/RTL8822BE took me 7 months to be applied).
> 
> Anyway, it's implemented, and we now look good under the process. As long as
> RTL8723DE is applied, I can try to push RTL8821CE after that!

have you any github or site where you have that code?
Is it possible that some aur mantainers or distributions want this patches to be  in them kernels in the shortest time possible even if the patches are not too much tested and reviewed yet. I know a few that sure would patch them kernels to have support or to test it.
Comment 20 Lingfeng Ren 2020-05-11 01:34:49 UTC
It would seem to be that there is a mirror at https://github.com/endlessm/linux/tree/master/drivers/net/wireless/rtl8821ce,
though there are a few issues with compiling on kernels 5+

Would a conservative estimate for the patch be mid to late this year?
Comment 21 Alberto 2020-05-26 13:05:21 UTC
(In reply to Yen-Hsuan Chuang from comment #18)
> I do wish the code can be applied ASAP, but that reason does not make the
> maintainers review code faster. They have a lot of code of different drivers
> to review. (My RTL8822CE/RTL8822BE took me 7 months to be applied).
> 
> Anyway, it's implemented, and we now look good under the process. As long as
> RTL8723DE is applied, I can try to push RTL8821CE after that!

I have seen that there is pathwork already queued so.. Thank you so much :)

May be it's ready for 5.8 may be not, BTW , it's good to know :)
Comment 22 Michael 2020-07-09 08:26:55 UTC
RTL8821CE is a very common chipset (e.g. Asus TUF Gaming Laptop Series):
04:00.0 Network controller: Realtek Semiconductor Co., Ltd. RTL8821CE 802.11ac PCIe Wireless Network Adapter
It would be great to have mainline support.
BTW:
I'm the author of hcxdumptool/hcxtools:
https://github.com/ZerBea
It would be great, to have monitor mode and full packet injection on both bands, too. Please consider to add this feature.
Comment 23 Lingfeng Ren 2020-07-09 15:44:49 UTC
The only I problem I have with the driver by tomaspinho https://github.com/tomaspinho/rtl8821ce, is that it does not have bluetooth channel switching, and thus when using bluetooth and wifi at the same time I would encounter heavy interference, which in most cases makes bluetooth unusable.
Comment 24 Michael 2020-07-09 16:58:13 UTC
@Lingfeng Ren
Thanks for that information, but I don't support a third party driver which is not part of the official kernel (https://www.kernel.org/)
Luckily, I noticed that work is in progress (5.8rc4 and Wireless Mailing List).
Comment 25 dedanna 2020-07-27 14:58:18 UTC
Hi,
I have this on my laptop as well. It has been very frustrating since March this year, when I got the laptop, because I can't install Linux until there is a wireless driver for this thing. None of the Linux distros have it in their mid-year releases as well.
As mentioned previously, this is a common chipset. I'm really disappointed at the slowness of the driver's release, as it is keeping people off of Linux.
For the meantime, I am having to use Windows 10, which, IMO, is malware in itself - I absolutely hate it.
Why are we waiting on RealTek? Shouldn't Linux devels be writing their own for Linux?
Just a thought.
Thank you.
Comment 26 djip.perois 2020-07-27 21:27:18 UTC
may by a good new:
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/tree/drivers/net/wireless/realtek/rtw88?h=next-20200727

look somme file related to rtl8821ce in the new realteck kernel drivers (rtw88) in kernel-next => for 5.9?
Comment 27 Yen-Hsuan Chuang 2020-07-28 02:06:19 UTC
I fianlly make the RTL8821CE into the upstream, it should be in Linux v5.9 :)
Sorry for the bad experience, I am trying to make all the 802.11ac devices from Realtek supported in the mainline Linux kernel. Started from RTL8822CE/RTL8822BE, then RTL8723DE -> RTL8821CE. Next should be USB series.

Cheers! I will keep working on that, if someone is helping me, it would be faster for sure.
Comment 28 dedanna 2020-07-28 02:34:44 UTC
I wish I could help you! I am years out of practice on coding, and remember very little of it. What I can do, is I have a fairly decent following in a few circles, and can try to get help for you, OK?  Thank you so much for your work on this! You have no idea how much it is appreciated! I am dying to run my beloved Linux again, and you've just given me hope!
Comment 29 Yen-Hsuan Chuang 2020-07-28 02:42:25 UTC
Appreciated! You can help by reviewing the code on patchwork:
https://patchwork.kernel.org/project/linux-wireless/list/?series=&submitter=&state=*&q=rtw88&archive=&delegate=

I think the bottle neck for the wireless drivers is that the wireless drivers are the most complicated driver, including a lot of stuffs such the wifi protocol, signal/antenna control, etc. So the maintainer cannot review them very quickly. Which makes the process of upstreaming slow. But if somebody can help to review the code and leave comment on it, it would save some time for him.

Another is you can fetch the patch and try to run the RTL8821CE on your machine to see if there's any problems, if so, we can see if we can solve it to make the driver better.
Comment 30 dedanna 2020-07-28 02:51:13 UTC
I would need a walkthrough on how to install it please?

Oh, wait, I don't have internet access from Linux. I *might* be able to snag it using cygwin? I would need to install Linux too, but that is no problem.
I've just made a public Facebook post for you also, asking for help on this.
It makes sense that the wireless drivers would be the most difficult. I'll do everything I can for you, and will probably be able to give this the seriousness it needs this weekend. It's already a bad week at work. I want to get that over with so I can concentrate on this.
Comment 31 Ilgaz Γ–cal 2020-08-07 18:45:45 UTC
rtl8821cu (usb version?) which is closely related to this chip needed dkms module to work and that dkms module fails to compile on Kernel 5.8.x which was just released as stable.

So if you have that chip and rely on it for connection, dkms will fail (unless someone provides a patch) and you won't have connectivity.

This is the project we rely on:
https://github.com/brektrou/rtl8821CU

This is what happens when you install Kernel 5.8

https://github.com/brektrou/rtl8821CU/issues/74
Comment 33 husongtao 2020-10-29 05:45:52 UTC
rtl8821ce can't get networks on kernel 5.9.1-arch1-1, furthermore i can't use dmks https://github.com/tomaspinho/rtl8821ce, which works before. so i have to roll back to 5.8 to use dkms, hope you fix this soon, thank you!
Comment 34 Michael 2020-10-29 16:58:09 UTC
Good job - thanks! I didn't expect monitor mode to work on rtw88.
But now we have another working device. I am pleasantly surprised.

$ uname -r
5.9.1-arch1-1

$ lspci
04:00.0 Network controller: Realtek Semiconductor Co., Ltd. RTL8821CE 802.11ac PCIe Wireless Network Adapter


$ sudo hcxdumptool -i wlp4s0 --check_injection
initialization...
starting packet injection test (that can take up to two minutes)...
packet injection is working!
ratio: 18 to 16 

terminating...

$ sudo hcxdumptool -i wlp4s0 --check_driver
initialization...
starting driver test...
driver tests passed...
all required ioctl() system calls are supported by driver

terminating...

$ sudo hcxdumptool -I
wlan interfaces:
70665578cdab wlp4s0 (rtw_8821ce)
[zerobeat@tuffbook ~]$ sudo hcxdumptool -i wlp4s0
initialization...
interface is already in monitor mode

start capturing (stop with ctrl+c)
NMEA 0183 SENTENCE........: N/A
INTERFACE NAME............: wlp4s0
INTERFACE HARDWARE MAC....: 70665578cdab
DRIVER....................: rtw_8821ce
DRIVER VERSION............: 5.9.1-arch1-1
DRIVER FIRMWARE VERSION...: N/A
ERRORMAX..................: 100 errors
BPF code blocks...........: 0
FILTERLIST ACCESS POINT...: 0 entries
FILTERLIST CLIENT.........: 0 entries
FILTERMODE................: unused
WEAK CANDIDATE............: 12345678
ESSID list................: 0 entries
ACCESS POINT (ROGUE)......: 000e2a377bda (BROADCAST HIDDEN)
ACCESS POINT (ROGUE)......: 000e2a377bdb (BROADCAST OPEN)
ACCESS POINT (ROGUE)......: 000e2a377bdc (incremented on every new client)
CLIENT (ROGUE)............: b4e1eb534377
EAPOLTIMEOUT..............: 20000 usec
EAPOLEAPTIMEOUT...........: 2500000 usec
REPLAYCOUNT...............: 63645
ANONCE....................: ef69d28d217bf6b43e3df8f522074c6bac3c6d25dae904c5d0f7af8bc74ea350
SNONCE....................: 9c0118a590dae273b2b6ab4259fb90bb557f490e21511ec103c9edd11393b9d0

Cheers
Mike
Comment 35 Michael 2020-12-28 09:55:57 UTC
Running heavy workload, the driver stops working and become unresponsive without an additional error message. New connection attempts will fail:
[38157.155784] wlp4s0: authenticate with 58:6e:d6:91:d7;bc
[38157.660905] wlp4s0: send auth to 58:6e:d6:91:d7;bc (try 1/3)
[38158.487628] wlp4s0: send auth to 58:6e:d6:91:d7;bc (try 2/3)
[38159.527773] wlp4s0: send auth to 58:6e:d6:91:d7;bc (try 3/3)
[38160.098138] wlp4s0: aborting authentication with 58:6e:d6:91:d7;bc by local choice (Reason: 3=DEAUTH_LEAVING)

The same applies when running monitor mode and doing packet injection.

kernel: 5.9.14
device: RTL8821CE 802.11ac PCIe Wireless Network Adapter
Comment 36 Michael 2020-12-29 09:55:00 UTC
Created attachment 294389 [details]
dmesg crash log

Attached log.
Driver crashed directly after activating monitor mode.
Comment 37 Michael 2020-12-29 13:52:33 UTC
Created attachment 294397 [details]
crash after association

Very often the driver crashes directly after successful association with an ACCSSS POINT
Comment 38 dedanna 2021-03-28 02:58:30 UTC
I can't believe, after a long stretch of being offline, that we are still waiting on Linux devs for this driver. It's no one's fault here, as everyone here is at least trying. I'm talking about kernel devs, etc. I don't understand it. It's a common NIC.
Comment 39 dedanna 2021-03-28 02:59:20 UTC
I'm still on Windows! πŸ™
Comment 40 sergey79 2021-04-22 22:04:52 UTC
(In reply to Yen-Hsuan Chuang from comment #27)
> Next should be USB series.

Any chance for RTL8821CU?
Comment 41 Tomas Gayoso 2021-06-02 21:10:12 UTC
hi, I have had no luck using this driver with an ATH10K wifi hotspot. I can only make it work to somne degree of stability using older ATH9K based wifi routers. I reported this to realtek with no luck:

https://github.com/rtlwifi-linux/rtk_wifi_driver_rtl8822ce/issues/3 

I can help test patches for this driver, to. I can compile and patch my own kernels, let me know how I may help here.
Comment 42 Tomas Gayoso 2021-08-06 19:35:37 UTC
Created attachment 298225 [details]
5.13.7 dmesg log with driver firmware crash

crash on 5.13.7 attached. 

I updated the comments in https://github.com/rtlwifi-linux/rtk_wifi_driver_rtl8822ce/issues/3 too. 

Let me know what may I do help debug/test this driver. Thanks!

Note You need to log in before you can comment on or make changes to this bug.