Bug 210779

Summary: rtw88_8821ce does not seem to support all the versions of the hardware yet.
Product: Networking Reporter: Sérgio M Basto (sergio)
Component: WirelessAssignee: networking_wireless (networking_wireless)
Status: NEW ---    
Severity: normal CC: buboleck, flaviogrossi, lupaorpi22, xrootware
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: 5.9.x Subsystem:
Regression: No Bisected commit-id:
Attachments: attachment-18281-0.html

Description Sérgio M Basto 2020-12-18 23:16:34 UTC
As reported in several places and by several we still need use rtl8821ce code from https://github.com/tomaspinho/rtl8821ce/ to make wifi working 



https://forum.manjaro.org/t/rtl8821ce-wireless-adapter-not-working/38014/4 
https://github.com/tomaspinho/rtl8821ce/issues/176

rtw88_8821ce doesn't work [1]  can't connect  [2] , I also see this [3]
Firmware seems it loads well .

[1] 
wlp7s0: disconnected
        "Realtek RTL8821CE"
        wifi (rtw_8821ce), 86:2D:A0:76:10:7D, hw, mtu 1500


[2]
nmcli d reapply wlp7s0 
Error: Reapplying connection to device 'wlp7s0' (/org/freedesktop/NetworkManager/Devices/3) failed: Device is not activated


[3] 
[33125.882629] rtw_8821ce 0000:07:00.0: Firmware version 24.5.0, H2C version 12
[33125.950002] rtw_8821ce 0000:07:00.0 wlp7s0: renamed from wlan0
[33138.767893] rtw_8821ce 0000:07:00.0: start vif 0e:a7:30:3e:ec:95 on port 0
[33138.778642] rtw_8821ce 0000:07:00.0: stop vif 0e:a7:30:3e:ec:95 on port 0
[33139.241976] rtw_8821ce 0000:07:00.0: start vif 0e:a7:30:3e:ec:95 on port 0
[33483.884137] rtw_8821ce 0000:07:00.0: stop vif 0e:a7:30:3e:ec:95 on port 0
[33484.347890] rtw_8821ce 0000:07:00.0: start vif ce:13:f6:80:58:bf on port 0
[33799.883934] rtw_8821ce 0000:07:00.0: stop vif ce:13:f6:80:58:bf on port 0
[33800.351957] rtw_8821ce 0000:07:00.0: start vif 0a:9d:e3:58:2f:37 on port 0
Comment 1 Flavio Grossi 2020-12-23 09:45:22 UTC
I can confirm the issue with the following hardware from a lenovo BGCN24WW


07:00.0 0280: 10ec:c821


07:00.0 Network controller: Realtek Semiconductor Co., Ltd. RTL8821CE 802.11ac PCIe Wireless Network Adapter
        Subsystem: Lenovo Device c024
        Flags: bus master, fast devsel, latency 0, IRQ 146
        I/O ports at 4000 [size=256]
        Memory at a4300000 (64-bit, non-prefetchable) [size=64K]
        Capabilities: [40] Power Management version 3
        Capabilities: [50] MSI: Enable+ Count=1/1 Maskable- 64bit+
        Capabilities: [70] Express Endpoint, MSI 00
        Capabilities: [100] Advanced Error Reporting
        Capabilities: [158] Latency Tolerance Reporting
        Capabilities: [160] L1 PM Substates
        Capabilities: [170] Precision Time Measurement
        Capabilities: [17c] Vendor Specific Information: ID=0003 Rev=1 Len=054 <?>
        Kernel driver in use: rtw_8821ce
        Kernel modules: rtw88_8821ce


The device seems to be recognized, but a scan does not report any network
Comment 2 Sérgio M Basto 2020-12-30 14:31:35 UTC
(In reply to Flavio Grossi from comment #1)
> I can confirm the issue with the following hardware from a lenovo BGCN24WW
> 
> 
> 07:00.0 0280: 10ec:c821
> 
> 
> 07:00.0 Network controller: Realtek Semiconductor Co., Ltd. RTL8821CE
> 802.11ac PCIe Wireless Network Adapter
>         Subsystem: Lenovo Device c024
>         Flags: bus master, fast devsel, latency 0, IRQ 146
>         I/O ports at 4000 [size=256]
>         Memory at a4300000 (64-bit, non-prefetchable) [size=64K]
>         Capabilities: [40] Power Management version 3
>         Capabilities: [50] MSI: Enable+ Count=1/1 Maskable- 64bit+
>         Capabilities: [70] Express Endpoint, MSI 00
>         Capabilities: [100] Advanced Error Reporting
>         Capabilities: [158] Latency Tolerance Reporting
>         Capabilities: [160] L1 PM Substates
>         Capabilities: [170] Precision Time Measurement
>         Capabilities: [17c] Vendor Specific Information: ID=0003 Rev=1
> Len=054 <?>
>         Kernel driver in use: rtw_8821ce
>         Kernel modules: rtw88_8821ce
> 
> 
> The device seems to be recognized, but a scan does not report any network
    
my laptop is also the Version: BGCN24WW :) 

lspci -s 07:00.0  -nv
07:00.0 0280: 10ec:c821
        Subsystem: 17aa:c024
        Flags: bus master, fast devsel, latency 0, IRQ 146
        I/O ports at 4000 [size=256]
        Memory at a4300000 (64-bit, non-prefetchable) [size=64K]
        Capabilities: [40] Power Management version 3
        Capabilities: [50] MSI: Enable+ Count=1/1 Maskable- 64bit+
        Capabilities: [70] Express Endpoint, MSI 00
        Capabilities: [100] Advanced Error Reporting
        Capabilities: [148] Device Serial Number 00-e0-4c-ff-fe-c8-21-01
        Capabilities: [158] Latency Tolerance Reporting
        Capabilities: [160] L1 PM Substates
        Capabilities: [170] Precision Time Measurement
        Capabilities: [17c] Vendor Specific Information: ID=0003 Rev=1 Len=054 <?>
        Kernel driver in use: rtl8821ce
        Kernel modules: rtw88_8821ce, rtl8821ce
Comment 3 Sérgio M Basto 2020-12-30 14:36:15 UTC
more info here: https://github.com/tomaspinho/rtl8821ce/issues/142
Comment 4 Luis Ortega 2020-12-31 17:11:06 UTC
In my case, my laptop uses a rfe4 variant of the chip.

[   53.437225] rtw_8821ce 0000:01:00.0: enabling device (0000 -> 0003)
[   53.465564] rtw_8821ce 0000:01:00.0: Firmware version 24.5.0, H2C version 12
[   53.482751] rtw_8821ce 0000:01:00.0: rfe 4 isn't supported
[   53.482855] rtw_8821ce 0000:01:00.0: failed to setup chip efuse info
[   53.482857] rtw_8821ce 0000:01:00.0: failed to setup chip information
Comment 5 Sérgio M Basto 2020-12-31 21:28:41 UTC
(In reply to Luis Ortega from comment #4)
> In my case, my laptop uses a rfe4 variant of the chip.
> 
> [   53.437225] rtw_8821ce 0000:01:00.0: enabling device (0000 -> 0003)
> [   53.465564] rtw_8821ce 0000:01:00.0: Firmware version 24.5.0, H2C version
> 12
> [   53.482751] rtw_8821ce 0000:01:00.0: rfe 4 isn't supported
> [   53.482855] rtw_8821ce 0000:01:00.0: failed to setup chip efuse info
> [   53.482857] rtw_8821ce 0000:01:00.0: failed to setup chip information

Can you send what is the pci ID please ? lspci -s 07:00.0 -nk
Comment 6 Luis Ortega 2021-01-01 00:39:09 UTC
(In reply to Sérgio M Basto from comment #5)
> (In reply to Luis Ortega from comment #4)
> > In my case, my laptop uses a rfe4 variant of the chip.
> > 
> > [   53.437225] rtw_8821ce 0000:01:00.0: enabling device (0000 -> 0003)
> > [   53.465564] rtw_8821ce 0000:01:00.0: Firmware version 24.5.0, H2C
> version
> > 12
> > [   53.482751] rtw_8821ce 0000:01:00.0: rfe 4 isn't supported
> > [   53.482855] rtw_8821ce 0000:01:00.0: failed to setup chip efuse info
> > [   53.482857] rtw_8821ce 0000:01:00.0: failed to setup chip information
> 
> Can you send what is the pci ID please ? lspci -s 07:00.0 -nk


$ lspci -s 01:00.0 -nk
01:00.0 0280: 10ec:c821
	Subsystem: 1a3b:3040
	Kernel driver in use: rtl8821ce
	Kernel modules: rtw88_8821ce, 8821ce
Comment 7 Dimitar Kosev 2021-02-04 14:46:41 UTC
Same issue here, RFE4 is not supported, laptop Asus M509DA:

DMI: ASUSTeK COMPUTER INC. VivoBook_ASUSLaptop X509DA_M509DA/X509DA, BIOS X509DA.306 10/11/2019

lspci -s 01:00.0 -nk

01:00.0 0280: 10ec:c821
        Subsystem: 1a3b:3040
        Kernel driver in use: rtl8821ce
        Kernel modules: 8821ce

I use the old driver as I need the wifi, no lan port.
Comment 8 xrootware 2021-03-07 20:20:46 UTC
Have some problems with built-in kernel driver and adapter 8821ce on lenovo laptop. Kernel 5.11. Random disconnects. BTW https://github.com/tomaspinho/rtl8821ce/ works fine.
Comment 9 Flavio Grossi 2021-04-14 07:22:30 UTC
it seems to have been fixed (at least for my model) with recent kernels.

I'm on 5.11.12 right now (on fedora). Will report back if i have any issues with stability or anything else.
Comment 10 Sérgio M Basto 2021-04-14 09:58:00 UTC
That is a good new , I will try kernel 5.11.12 (on fedora) as well .

For users that doesn't use Fedora, attention Fedora kernel may have backports from 5.12 kernel ... ( I haven't time to check where is the fix on vanilla kernel )
Comment 11 Flavio Grossi 2021-05-04 10:17:22 UTC
little update: this seems to work fine, but i repeatedly (every 5 minutes at least) have this in dmesg:

[mar mag  4 12:10:24 2021] wlp7s0: associated
[mar mag  4 12:10:25 2021] ------------[ cut here ]------------
[mar mag  4 12:10:25 2021] purge skb(s) not reported by firmware
[mar mag  4 12:10:25 2021] WARNING: CPU: 11 PID: 2377 at drivers/net/wireless/realtek/rtw88/tx.c:161 rtw_tx_report_purge_timer+0x20/0x50 [rtw88_core]
[mar mag  4 12:10:25 2021] Modules linked in: ccm snd_seq_dummy rfcomm snd_hrtimer xt_CHECKSUM xt_MASQUERADE xt_conntrack ipt_REJECT nf_reject_ipv4 ip6table_mangle ip6table_nat ip6table_filter ip6_tables iptable_mangle iptable_nat nf_nat nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 iptable_filter bridge stp llc vboxnetadp(OE) vboxnetflt(OE) vboxdrv(OE) cmac bnep sunrpc vfat fat snd_sof_pci snd_sof_intel_hda_common snd_sof_intel_hda snd_sof_intel_byt snd_sof_intel_ipc snd_sof snd_sof_xtensa_dsp snd_soc_skl snd_hda_codec_realtek snd_soc_hdac_hda snd_hda_ext_core snd_hda_codec_generic snd_soc_sst_ipc x86_pkg_temp_thermal ledtrig_audio snd_soc_sst_dsp snd_hda_codec_hdmi intel_powerclamp snd_soc_acpi_intel_match snd_soc_acpi coretemp snd_hda_intel snd_intel_dspcfg kvm_intel soundwire_intel rtw88_8821ce rtw88_8821c soundwire_generic_allocation rtw88_pci snd_soc_core rtw88_core snd_compress iTCO_wdt snd_pcm_dmaengine intel_pmc_bxt soundwire_cadence joydev iTCO_vendor_support mei_hdcp intel_rapl_msr kvm
[mar mag  4 12:10:25 2021]  snd_hda_codec uvcvideo mac80211 btusb btrtl snd_hda_core videobuf2_vmalloc videobuf2_memops btbcm irqbypass btintel videobuf2_v4l2 ac97_bus snd_hwdep rapl videobuf2_common intel_cstate snd_seq bluetooth videodev intel_uncore snd_seq_device cfg80211 snd_pcm intel_wmi_thunderbolt wmi_bmof processor_thermal_device pcspkr ecdh_generic snd_timer ecc mei_me i2c_i801 processor_thermal_rfim mc libarc4 i2c_smbus processor_thermal_mbox snd ideapad_laptop processor_thermal_rapl mei idma64 soundcore intel_rapl_common platform_profile intel_pch_thermal elan_i2c intel_soc_dts_iosf sparse_keymap int3403_thermal rfkill int340x_thermal_zone int3400_thermal acpi_thermal_rel acpi_pad acpi_tad zram ip_tables i915 nouveau mxm_wmi drm_ttm_helper ttm i2c_algo_bit drm_kms_helper cec crct10dif_pclmul crc32_pclmul crc32c_intel drm ghash_clmulni_intel nvme serio_raw r8169 nvme_core i2c_hid wmi video pinctrl_cannonlake fuse
[mar mag  4 12:10:25 2021] CPU: 11 PID: 2377 Comm: systemd-oomd Tainted: G        W  OE     5.11.16-300.fc34.x86_64 #1
[mar mag  4 12:10:25 2021] Hardware name: LENOVO 81LK/LNVNB161216, BIOS BGCN24WW 08/19/2019
[mar mag  4 12:10:25 2021] RIP: 0010:rtw_tx_report_purge_timer+0x20/0x50 [rtw88_core]
[mar mag  4 12:10:25 2021] Code: 0f 1f 84 00 00 00 00 00 66 90 0f 1f 44 00 00 8b 47 f0 85 c0 75 01 c3 41 54 55 53 48 89 fb 48 c7 c7 50 94 df c0 e8 4f 6c d8 c9 <0f> 0b 4c 8d 63 d8 4c 89 e7 e8 72 22 df c9 48 8d 7b e0 48 89 c5 e8
[mar mag  4 12:10:25 2021] RSP: 0000:ffffae5c80344ed8 EFLAGS: 00010296
[mar mag  4 12:10:25 2021] RAX: 0000000000000025 RBX: ffff9a291c256468 RCX: 0000000000000027
[mar mag  4 12:10:25 2021] RDX: ffff9a2c5e4d8ac8 RSI: 0000000000000001 RDI: ffff9a2c5e4d8ac0
[mar mag  4 12:10:25 2021] RBP: ffff9a291c256468 R08: 0000000000000000 R09: ffffae5c80344d08
[mar mag  4 12:10:25 2021] R10: ffffae5c80344d00 R11: ffffffff8bb35c68 R12: ffffffffc0de6cf0
[mar mag  4 12:10:25 2021] R13: dead000000000122 R14: 0000000000000000 R15: ffff9a2c5e4dae80
[mar mag  4 12:10:25 2021] FS:  00007faa5735eb40(0000) GS:ffff9a2c5e4c0000(0000) knlGS:0000000000000000
[mar mag  4 12:10:25 2021] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[mar mag  4 12:10:25 2021] CR2: 00007fbffb48e000 CR3: 000000011c39e001 CR4: 00000000003726e0
[mar mag  4 12:10:25 2021] Call Trace:
[mar mag  4 12:10:25 2021]  <IRQ>
[mar mag  4 12:10:25 2021]  ? rtw_tx_write_data_h2c_get+0x90/0x90 [rtw88_core]
[mar mag  4 12:10:25 2021]  call_timer_fn+0x29/0xf0
[mar mag  4 12:10:25 2021]  __run_timers.part.0+0x1b1/0x210
[mar mag  4 12:10:25 2021]  ? recalibrate_cpu_khz+0x10/0x10
[mar mag  4 12:10:25 2021]  ? ktime_get+0x38/0x90
[mar mag  4 12:10:25 2021]  ? lapic_next_deadline+0x28/0x30
[mar mag  4 12:10:25 2021]  ? clockevents_program_event+0x95/0xf0
[mar mag  4 12:10:25 2021]  ? sched_clock+0x5/0x10
[mar mag  4 12:10:25 2021]  run_timer_softirq+0x26/0x50
[mar mag  4 12:10:25 2021]  __do_softirq+0xd0/0x28f
[mar mag  4 12:10:25 2021]  asm_call_irq_on_stack+0x12/0x20
[mar mag  4 12:10:25 2021]  </IRQ>
[mar mag  4 12:10:25 2021]  do_softirq_own_stack+0x37/0x40
[mar mag  4 12:10:25 2021]  __irq_exit_rcu+0xbf/0x100
[mar mag  4 12:10:25 2021]  sysvec_apic_timer_interrupt+0x36/0x80
[mar mag  4 12:10:25 2021]  ? asm_sysvec_apic_timer_interrupt+0xa/0x20
[mar mag  4 12:10:25 2021]  asm_sysvec_apic_timer_interrupt+0x12/0x20
[mar mag  4 12:10:25 2021] RIP: 0033:0x7faa57f2924e
[mar mag  4 12:10:25 2021] Code: 4c 39 c7 73 af 48 89 c8 41 b9 01 00 00 00 0f b6 50 01 48 8d 48 01 84 d2 75 bb 66 90 48 39 cb 0f 84 50 01 00 00 48 8b 44 24 08 <48> 85 c0 74 03 48 89 08 45 85 c9 0f 85 eb 02 00 00 8b 54 24 14 4c
[mar mag  4 12:10:25 2021] RSP: 002b:00007ffe54123980 EFLAGS: 00000297
[mar mag  4 12:10:25 2021] RAX: 00007ffe541239f0 RBX: 000055a170e33fd0 RCX: 000055a170e33fd1
[mar mag  4 12:10:25 2021] RDX: 0000000000000000 RSI: 0000000000000008 RDI: 1fffffffffffffff
[mar mag  4 12:10:25 2021] RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000
[mar mag  4 12:10:25 2021] R10: 00007faa5805bac0 R11: 00007faa5805c3c0 R12: 0000000000000000
[mar mag  4 12:10:25 2021] R13: 000055a170e33fd0 R14: 0000000000000000 R15: 0000000000000008
[mar mag  4 12:10:25 2021] ---[ end trace 5adb776f1e2e0e0d ]---
[mar mag  4 12:10:32 2021] rtw_8821ce 0000:07:00.0: timed out to flush queue 1



anyone seeing something similar? Has it already been reported?
Comment 12 Sérgio M Basto 2021-05-04 10:29:43 UTC
After upgrade to F33, I also see this message: 
Apr 24 14:53:28 ideapad.local kernel: ------------[ cut here ]------------
Apr 24 14:53:28 ideapad.local kernel: purge skb(s) not reported by firmware

Thanks for the report
Comment 13 Flavio Grossi 2021-06-27 17:07:50 UTC
Unfortunately with the 5.12 kernels it seems to provoke an hard freeze of the operating system after a few minutes.

Switching back to a 5.11 kernel seems ok.

Anyone has the same problem? Cannot even produce a useful log because no traces of the crash survive the freeze (but i heavily suspect the wireless driver is the culprit here)
Comment 14 Sérgio M Basto 2021-07-01 22:39:46 UTC
seems that works for me without ooops messages with kernel 5.12.12-200.fc33.x86_64

dmesg -T | grep 8821
[Sun Jun 27 18:07:56 2021] rtw_8821ce 0000:07:00.0: Firmware version 24.8.0, H2C version 12
[Sun Jun 27 18:07:56 2021] rtw_8821ce 0000:07:00.0 wlp7s0: renamed from wlan0
[Sun Jun 27 18:07:58 2021] Bluetooth: hci0: RTL: examining hci_ver=08 hci_rev=000c lmp_ver=08 lmp_subver=8821
[Sun Jun 27 18:07:58 2021] Bluetooth: hci0: RTL: loading rtl_bt/rtl8821c_fw.bin
[Sun Jun 27 18:07:58 2021] Bluetooth: hci0: RTL: loading rtl_bt/rtl8821c_config.bin
[Thu Jul  1 23:14:40 2021] rtw_8821ce 0000:07:00.0: start vif ea:a9:ac:b5:36:4d on port 0
[Thu Jul  1 23:14:41 2021] rtw_8821ce 0000:07:00.0: stop vif ea:a9:ac:b5:36:4d on port 0
[Thu Jul  1 23:14:41 2021] rtw_8821ce 0000:07:00.0: start vif de:09:5e:09:2d:0c on port 0
[Thu Jul  1 23:14:45 2021] rtw_8821ce 0000:07:00.0: stop vif de:09:5e:09:2d:0c on port 0
[Thu Jul  1 23:14:45 2021] rtw_8821ce 0000:07:00.0: start vif 28:39:26:7b:1f:d5 on port 0
[Thu Jul  1 23:14:49 2021] rtw_8821ce 0000:07:00.0: sta 0c:80:63:f5:c4:06 joined with macid 0
[Thu Jul  1 23:14:57 2021] rtw_8821ce 0000:07:00.0: sta 0c:80:63:f5:c4:06 with macid 0 left
[Thu Jul  1 23:14:57 2021] rtw_8821ce 0000:07:00.0: stop vif 28:39:26:7b:1f:d5 on port 0
[Thu Jul  1 23:14:57 2021] rtw_8821ce 0000:07:00.0: start vif 72:5d:f9:85:c6:f0 on port 0
[Thu Jul  1 23:14:58 2021] rtw_8821ce 0000:07:00.0: stop vif 72:5d:f9:85:c6:f0 on port 0
[Thu Jul  1 23:14:58 2021] rtw_8821ce 0000:07:00.0: start vif 28:39:26:7b:1f:d5 on port 0
[Thu Jul  1 23:15:02 2021] rtw_8821ce 0000:07:00.0: sta cc:19:a8:74:bb:86 joined with macid 0
Comment 15 Flavio Grossi 2021-07-02 07:27:17 UTC
It's weird but it was unusable for me on 5.12 kernels, it would cause an hard freeze within minutes of use

However, adding

options rtw88_pci disable_aspm=1

when loading the kernel module seems to have fixed it for me on 5.12 kernel (and it got rid of the kernel traces on the 5.11 one)

Hope this helps anyone
Comment 16 Dimitar Kosev 2022-01-13 09:09:14 UTC
Created attachment 300258 [details]
attachment-18281-0.html

I resolved this by replacing the rtl8821ce with OEM Asus Atheros QCA9377. 

On January 13, 2022 10:40:19 AM GMT+02:00, bugzilla-daemon@bugzilla.kernel.org wrote:
>https://bugzilla.kernel.org/show_bug.cgi?id=210779
>
>Jonas Hopusch (kernel-bugs@jotoho.de) changed:
>
>           What    |Removed                     |Added
>----------------------------------------------------------------------------
>                 CC|                            |kernel-bugs@jotoho.de
>
>-- 
>You may reply to this email to add a comment.
>
>You are receiving this mail because:
>You are on the CC list for the bug.