Bug 27118

Summary: RTL8822CE 802.11ac PCIe Wireless Network Adapter fails with kernel-5.8.1-2
Product: Mageia Reporter: Dave Hodgins <davidwhodgins>
Component: RPM PackagesAssignee: Kernel and Drivers maintainers <kernel>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Normal CC: ghibomgx, mageia, pterjan, thierry.vignaud
Version: Cauldron   
Target Milestone: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Source RPM: kernel-5.8.1-2.mga8 CVE:
Status comment:

Description Dave Hodgins 2020-08-15 13:15:06 CEST
RTL8822CE 802.11ac PCIe Wireless Network Adapter fails with kernel-5.8.1-2
It works with kernel-desktop-5.7.12-1.mga8

With 5.8.1-desktop-2.mga8
# lspcidrake -v|grep Network
rtwpci          : Realtek Semiconductor Co., Ltd.|RTL8822CE 802.11ac PCIe Wireless Network Adapter [NETWORK_OTHER] (vendor:10ec device:c822 subv:1a3b subd:3750)
# modinfo rtwpci
modinfo: ERROR: Module rtwpci not found

With 5.7.12-desktop-1.mga8
# lspcidrake -v|grep Network
rtwpci          : Realtek Semiconductor Co., Ltd.|RTL8822CE 802.11ac PCIe Wireless Network Adapter [NETWORK_OTHER] (vendor:10ec device:c822 subv:1a3b subd:3750)
# grep rtwpci /proc/modules
rtwpci 28672 0 - Live 0xffffffffc1052000
rtw88 589824 1 rtwpci, Live 0xffffffffc13e0000
mac80211 897024 2 rtwpci,rtw88, Live 0xffffffffc16f100
Comment 1 David Walser 2020-08-17 19:53:53 CEST
Relevant commits below.

------------------------------------------------------------------------
r1613660 | ghibo | 2020-08-12 12:23:02 -0400 (Wed, 12 Aug 2020) | 5 lines

- Update to release 5.8.1.
- Add stable-queue as of 2020-08-12.
- Fix path in patch 3rd-rtl8821ce-5.8-fix.patch that was not applying.
- Add patch to try bfq instead of mq-deadline as default I/O scheduler.
------------------------------------------------------------------------
r1613410 | tv | 2020-08-11 15:01:27 -0400 (Tue, 11 Aug 2020) | 1 line

fix & reenable rtl8821ce
------------------------------------------------------------------------
r1613361 | tv | 2020-08-11 11:09:19 -0400 (Tue, 11 Aug 2020) | 2 lines

disable CONFIG_RTL8821CE due to build error on all arches (SILENT)
------------------------------------------------------------------------
r1613317 | tv | 2020-08-11 07:41:16 -0400 (Tue, 11 Aug 2020) | 1 line

add URL for rtl8821ce
------------------------------------------------------------------------
r1613316 | tv | 2020-08-11 07:39:53 -0400 (Tue, 11 Aug 2020) | 11 lines

- disable CONFIG_RTL8821CE due to build error

CC: (none) => ghibomgx, thierry.vignaud

Comment 2 Dave Hodgins 2020-08-19 06:50:45 CEST
Still present with kernel-desktop-5.8.1-5.mga8
Thierry Vignaud 2020-08-19 14:33:21 CEST

CC: (none) => pterjan

Comment 3 Pascal Terjan 2020-08-19 15:20:53 CEST
It seems the module is now named rtw88_8822ce 

$ grep -i c822 /lib/modules/5.8.1-server-5.mga8/modules.alias
alias pci:v000010ECd0000C822sv*sd*bc*sc*i* rtw88_8822ce

Does it get loaded? If not, does it work when you load it?
Comment 4 Dave Hodgins 2020-08-19 18:15:53 CEST
After manually loading, journalctl --no-hostname -b|grep wlan shows ...

Aug 19 12:05:52 network[1129]: Bringing up interface wlan0:
Aug 19 12:05:52 network[1336]: ERROR     : [/etc/sysconfig/network-scripts/ifup-eth] rtwpci device wlan0 does not seem to be present, delaying initialization.
Aug 19 12:05:52 /etc/sysconfig/network-scripts/ifup-eth[1370]: rtwpci device wlan0 does not seem to be present, delaying initialization.
Aug 19 12:07:07 systemd-networkd[644]: wlan0: Link UP
Aug 19 12:07:07 systemd-networkd[644]: wlan0: Link DOWN
Aug 19 12:07:08 systemd-networkd[644]: wlan0: Link UP
Aug 19 12:07:08 systemd-networkd[644]: wlan0: Link DOWN
Aug 19 12:07:08 ifplugd(wlan0)[2379]: ifplugd 0.28 initializing.
Aug 19 12:07:08 ifplugd(wlan0)[2379]: Using interface wlan0/70:66:55:C3:EC:83 with driver <rtw_8822ce> (version: 5.8.2-desktop-1.mga8)
Aug 19 12:07:08 systemd-networkd[644]: wlan0: Link UP
Aug 19 12:07:08 ifplugd(wlan0)[2379]: Using detection mode: SIOCETHTOOL
Aug 19 12:07:08 systemd-networkd[644]: wlan0: found matching network '/etc/systemd/network/10-wlan0.network', based on potentially unpredictable ifname
Aug 19 12:07:08 ifplugd(wlan0)[2379]: Initialization complete, link beat not detected.

For reference, with 5.7.12 that shows ...

Aug 19 11:47:38 systemd-networkd[638]: wlan0: found matching network '/etc/systemd/network/10-wlan0.network', based on potentially unpredictable ifname
Aug 19 11:47:39 systemd-networkd[638]: wlan0: Link UP
Aug 19 11:47:39 systemd-networkd[638]: wlan0: Link DOWN
Aug 19 11:47:39 systemd-networkd[638]: wlan0: Link UP
Aug 19 11:47:39 network[1134]: Bringing up interface wlan0:
Aug 19 11:47:39 ifplugd(wlan0)[1360]: ifplugd 0.28 initializing.
Aug 19 11:47:39 ifplugd(wlan0)[1360]: Using interface wlan0/70:66:55:C3:EC:83 with driver <rtw_pci> (version: 5.7.12-desktop-1.mga8)
Aug 19 11:47:39 ifplugd(wlan0)[1360]: Using detection mode: SIOCETHTOOL
Aug 19 11:47:39 ifplugd(wlan0)[1360]: Initialization complete, link beat not detected.
Aug 19 11:47:43 kernel: wlan0: authenticate with b0:39:56:58:49:b0
Aug 19 11:47:43 kernel: wlan0: send auth to b0:39:56:58:49:b0 (try 1/3)
Aug 19 11:47:43 kernel: wlan0: authenticated
Aug 19 11:47:43 kernel: wlan0: associate with b0:39:56:58:49:b0 (try 1/3)
Aug 19 11:47:43 kernel: wlan0: RX AssocResp from b0:39:56:58:49:b0 (capab=0x31 status=0 aid=1)
Aug 19 11:47:43 kernel: wlan0: associated
Aug 19 11:47:43 ifplugd(wlan0)[1360]: Link beat detected.
Aug 19 11:47:43 systemd-networkd[638]: wlan0: Gained carrier
Aug 19 11:47:43 kernel: IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
Aug 19 11:47:43 systemd-networkd[638]: wlan0: Connected WiFi access point: NOSSID5Gxxxxxxxxxxxxxxxxxxxxxx (b0:39:56:58:49:b0)
Aug 19 11:47:43 systemd-networkd[638]: wlan0: found matching network '/etc/systemd/network/10-wlan0.network', based on potentially unpredictable ifname
Aug 19 11:47:44 ifplugd(wlan0)[1360]: Executing '/etc/ifplugd/ifplugd.action wlan0 up'.
Aug 19 11:47:44 dhclient[1624]: DHCPREQUEST for 192.168.10.200 on wlan0 to 255.255.255.255 port 67
Aug 19 11:47:44 ifplugd(wlan0)[1360]: client: Determining IP information for wlan0... done.
Aug 19 11:47:44 ifplugd(wlan0)[1360]: Program executed successfully.
Comment 5 Dave Hodgins 2020-08-19 18:25:40 CEST
Also, with 5.8.2, draknetcenter shows "Unable to find network interface for selected device (using rtwpci driver)."
Comment 6 Pascal Terjan 2020-08-19 18:37:29 CEST
Right, I wonder if this is just a matter of updating ldetect-lst to point to the correct driver. However I am worried about users of previous driver if that's all we do as they may need to run drakconnect again to get it updated...

commit ba0fbe236fb8a7b992e82d6eafb03a600f5eba43
Author: Zong-Zhe Yang <kevin_yang@realtek.com>
Date:   Fri May 15 13:23:23 2020 +0800

    rtw88: extract: make 8822c an individual kernel module
    
    Make objects about 8822c functions and 8822c tables,
    i.e. rtw8822c.o and rtw8822c_table.o, an individual
    kernel module called rtw88_8822c.ko.
    
    For 8822c pcie chip, i.e. 8822CE chip, add a chip
    entry point module called rtw88_8822ce.ko which
    will depend on rtw88_8822c.ko and rtwpci.ko.
    
    Signed-off-by: Zong-Zhe Yang <kevin_yang@realtek.com>
    Signed-off-by: Yan-Hsuan Chuang <yhchuang@realtek.com>
    Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
    Link: https://lore.kernel.org/r/20200515052327.31874-4-yhchuang@realtek.com
Comment 7 Pascal Terjan 2020-08-19 18:54:10 CEST
Actually there is nothing setting it, I don't know why lspcidrake tells you it is rtwpci which doesn't exist anymore :(

I added the new modules to list_modules.pm (https://gitweb.mageia.org/software/drakx/commit/?id=cd38fa874f1807b931e837474204bd241afeefab) but I don't expect it to help here.
Comment 8 Martin Whitaker 2020-08-19 19:27:45 CEST
(In reply to Pascal Terjan from comment #7)
> Actually there is nothing setting it, I don't know why lspcidrake tells you
> it is rtwpci which doesn't exist anymore :(

It's mentioned in /usr/share/ldetect-lst/fallback-modules.alias

CC: (none) => mageia

Comment 9 Thierry Vignaud 2020-08-19 19:48:10 CEST
I'm rebuilding ldetect-lst in order to regenerate fallback-modules.alias with 5.8.x
Comment 10 Dave Hodgins 2020-08-19 21:21:45 CEST
As to concerns about upgrades, once this is working again in Mageia 8, I'll
replace that install with a Mageia 7 install and then test upgrading via
urpmi to ensure that works too. If it doesn't that will have to be fixed
after we have a working test strategy.
Comment 11 Dave Hodgins 2020-08-20 02:20:22 CEST
With ldetect-lst-0.6.9-2.mga8.x86_64, no change.
lspcidrake -v still shows rtwpci as the selected module for the wireless nic,
and wireless still fails to work.
Comment 12 Pascal Terjan 2020-08-20 15:04:14 CEST
I tried faking the device on my machine (modifying ldetect to always inject that device) and got the correct module:

rtw88_8822ce    : Realtek Semiconductor Co., Ltd.|RTL8822CE 802.11ac PCIe Wireless Network Adapter [NETWORK_OTHER] (vendor:10ec device:c822 subv:1a3b subd:3750)

I don't know what could be different...
Comment 13 Dave Hodgins 2020-08-20 15:44:39 CEST
I'm replacing the install with a new cauldron netinstall (using wired ethernet),
to see if that makes any difference.

On that install, do you have anything from updates testing installed? I didn't
on the install I'm now replacing.
Comment 14 Dave Hodgins 2020-08-20 16:13:08 CEST
Closing as fixed for now.

I completed the netinstall using the wired interface, then after rebooting
into the installed system added the wireless settings, after disconnecting
the wired connection, the wireless nic is working and lspcidrake is showing
that it's using rtw88_8822ce.

The differences between the new install and the problem one that I'm aware of
are that the problem install started as a beta1 install followed by updates,
and during install I'd added the kernel command line option net.ifnames=0,
which I didn't do in this network install.

I'll reopen if an upgrade from an m7 install or the next set of iso images
recreate the problem. I don't like the situation as the reason updates
didn't fix the problem has not been identified, but fow now I can't currently
test possible fixes.

Resolution: (none) => FIXED
Status: NEW => RESOLVED

Comment 15 Dave Hodgins 2020-08-22 16:52:19 CEST
Just fyi, I did a fresh beta 1 install, installed updates, and problem did
not recur, so it was something that has changed in cauldron since then that
caused the problem.