2020-10-29 18:15:02

by Michal TOMA

[permalink] [raw]
Subject: rtw_8821ce driver in kernel 5.9.1: wifi module inactive

Hi,

On OpenSuse Tumbleweed rtw_8821ce driver breaks wifi.

-> uname -a
Linux Host-001 5.9.1-1-default #1 SMP Mon Oct 26 07:02:23 UTC 2020 (435e92d) x86_64 x86_64 x86_64 GNU/Linux

/sbin/lspci -nnk | grep -iA3 net
07:00.0 Network controller [0280]: Realtek Semiconductor Co., Ltd. RTL8821CE 802.11ac PCIe Wireless Network Adapter [10ec:c821]
Subsystem: Lenovo Device [17aa:c024]
Kernel driver in use: rtw_8821ce
Kernel modules: rtw88_8821ce, wl
08:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller [10ec:8168] (rev 10)
Subsystem: Lenovo Device [17aa:38cf]
Kernel driver in use: r8168
Kernel modules: r8169, r8168


->cat /proc/net/wireless
Inter-| sta-| Quality | Discarded packets | Missed | WE
face | tus | link level noise | nwid crypt frag retry misc | beacon | 22


->iwconfig wlp7s0
wlp7s0 IEEE 802.11 ESSID:off/any
Mode:Managed Access Point: Not-Associated Tx-Power=20 dBm
Retry short limit:7 RTS thr:off Fragment thr:off
Encryption key:off
Power Management:off

->iwlist wlp7s0 scan
wlp7s0 No scan results


->rfkill list
0: ideapad_wlan: Wireless LAN
Soft blocked: no
Hard blocked: no
1: ideapad_bluetooth: Bluetooth
Soft blocked: yes
Hard blocked: no
2: hci0: Bluetooth
Soft blocked: yes
Hard blocked: no
3: phy0: Wireless LAN
Soft blocked: no
Hard blocked: no


->dmesg | grep 8821
[ 7.075396] rtw_8821ce 0000:07:00.0: Firmware version 24.5.0, H2C version 12
[ 7.764587] rtw_8821ce 0000:07:00.0 wlp7s0: renamed from wlan0
[ 8.354754] rtw_8821ce 0000:07:00.0: start vif 28:39:26:ab:b4:5d on port 0
[ 8.358871] rtw_8821ce 0000:07:00.0: stop vif 28:39:26:ab:b4:5d on port 0
[ 8.874899] rtw_8821ce 0000:07:00.0: start vif e2:57:07:37:e3:1e on port 0
[ 421.023270] rtw_8821ce 0000:07:00.0: stop vif e2:57:07:37:e3:1e on port 0
[ 421.543601] rtw_8821ce 0000:07:00.0: start vif fe:92:51:d5:45:b5 on port 0
[ 833.018457] rtw_8821ce 0000:07:00.0: stop vif fe:92:51:d5:45:b5 on port 0
[ 833.540507] rtw_8821ce 0000:07:00.0: start vif 0e:7e:da:5f:c3:0d on port 0
[ 1245.043076] rtw_8821ce 0000:07:00.0: stop vif 0e:7e:da:5f:c3:0d on port 0
[ 1245.565253] rtw_8821ce 0000:07:00.0: start vif be:74:9e:7b:ed:4b on port 0
And confinues likes this indefinitely


->lshw -C network
*-network
description: Wireless interface
product: RTL8821CE 802.11ac PCIe Wireless Network Adapter
vendor: Realtek Semiconductor Co., Ltd.
physical id: 0
bus info: pci@0000:07:00.0
logical name: wlp7s0
version: 00
serial: be:1c:8a:79:49:d6
width: 64 bits
clock: 33MHz
capabilities: pm msi pciexpress bus_master cap_list ethernet physical wireless
configuration: broadcast=yes driver=rtw_8821ce driverversion=5.9.1-1-default firmware=N/A latency=0 link=no multicast=yes wireless=IEEE 802.11
resources: irq:142 ioport:4000(size=256) memory:a4300000-a430ffff
*-network
description: Ethernet interface
product: RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
vendor: Realtek Semiconductor Co., Ltd.
physical id: 0
bus info: pci@0000:08:00.0
logical name: enp8s0
version: 10
serial: f8:75:a4:08:eb:06
size: 1Gbit/s
capacity: 1Gbit/s
width: 64 bits
clock: 33MHz
capabilities: pm msi pciexpress msix vpd bus_master cap_list ethernet physical tp 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation
configuration: autonegotiation=on broadcast=yes driver=r8168 driverversion=8.048.03-NAPI duplex=full ip=192.168.1.3 latency=0 link=yes multicast=yes port=twisted pair speed=1Gbit/s
resources: irq:140 ioport:3000(size=256) memory:a4204000-a4204fff memory:a4200000-a4203fff


Happy to provide more information if needed.

Michal


2020-10-30 18:36:19

by Larry Finger

[permalink] [raw]
Subject: Re: rtw_8821ce driver in kernel 5.9.1: wifi module inactive

On 10/29/20 11:47 AM, Michal TOMA wrote:
> ->rfkill list
> 0: ideapad_wlan: Wireless LAN
> Soft blocked: no
> Hard blocked: no
> 1: ideapad_bluetooth: Bluetooth
> Soft blocked: yes
> Hard blocked: no
> 2: hci0: Bluetooth
> Soft blocked: yes
> Hard blocked: no
> 3: phy0: Wireless LAN
> Soft blocked: no
> Hard blocked: no


Those bluetooth soft blocks may stop wifi. Can you clear them?

Larry

2020-10-30 22:19:20

by Michal TOMA

[permalink] [raw]
Subject: Re: rtw_8821ce driver in kernel 5.9.1: wifi module inactive

On Friday, October 30, 2020 01:35:45 PM Larry Finger wrote:
> On 10/29/20 11:47 AM, Michal TOMA wrote:
> > ->rfkill list
> > 0: ideapad_wlan: Wireless LAN
> >
> > Soft blocked: no
> > Hard blocked: no
> >
> > 1: ideapad_bluetooth: Bluetooth
> >
> > Soft blocked: yes
> > Hard blocked: no
> >
> > 2: hci0: Bluetooth
> >
> > Soft blocked: yes
> > Hard blocked: no
> >
> > 3: phy0: Wireless LAN
> >
> > Soft blocked: no
> > Hard blocked: no
>
> Those bluetooth soft blocks may stop wifi. Can you clear them?
>
> Larry

No change with soft blocks cleared:

rfkill unblock 1
rfkill unblock 2
rfkill list
0: ideapad_wlan: Wireless LAN
Soft blocked: no
Hard blocked: no
1: ideapad_bluetooth: Bluetooth
Soft blocked: no
Hard blocked: no
2: hci0: Bluetooth
Soft blocked: no
Hard blocked: no
3: phy0: Wireless LAN
Soft blocked: no
Hard blocked: no

iwlist wlp7s0 scan
wlp7s0 No scan results


2020-10-30 22:26:46

by Larry Finger

[permalink] [raw]
Subject: Re: rtw_8821ce driver in kernel 5.9.1: wifi module inactive

On 10/30/20 4:21 PM, Michal TOMA wrote:

> iwlist wlp7s0 scan
>
> wlp7s0 No scan results
>

You should move away from those obsolete commands (iwconfig, iwlist, etc.). The
new command would be

sudo iw dev wlp7s0 scan

It might not make any difference, but the new ones are better.

Any additional messages between the start and stop vif messages in dmesg?

I do not have an 8821ce for testing' however, I am not aware of any changes in
5.9.1 that should stop it from working/

Larry

2020-10-31 01:32:27

by Larry Finger

[permalink] [raw]
Subject: Re: rtw_8821ce driver in kernel 5.9.1: wifi module inactive

Michal,

My rtl8822ce works fine with 5.10.0-rc1 and 5.9.1 from openSUSE TW.

Larry

2020-10-31 11:31:10

by Michal TOMA

[permalink] [raw]
Subject: Re: rtw_8821ce driver in kernel 5.9.1: wifi module inactive

On Friday, October 30, 2020 05:23:53 PM Larry Finger wrote:
> On 10/30/20 4:21 PM, Michal TOMA wrote:
> > iwlist wlp7s0 scan
> >
> > wlp7s0 No scan results
>
> You should move away from those obsolete commands (iwconfig, iwlist, etc.).
> The new command would be
>
> sudo iw dev wlp7s0 scan
>
> It might not make any difference, but the new ones are better.
>
> Any additional messages between the start and stop vif messages in dmesg?
>
> I do not have an 8821ce for testing' however, I am not aware of any changes
> in 5.9.1 that should stop it from working/
>
> Larry

iw dev wlp7s0 scan
returns nothing at all

No additionnal messages between the start vif and stop vif messages, this just
goes on indefinitely:
[ 832.419210] rtw_8821ce 0000:07:00.0: stop vif 2e:71:fe:88:e7:38 on port 0
[ 832.940915] rtw_8821ce 0000:07:00.0: start vif 2e:7f:5e:d9:5e:45 on port 0
[ 1244.435074] rtw_8821ce 0000:07:00.0: stop vif 2e:7f:5e:d9:5e:45 on port 0
[ 1244.960984] rtw_8821ce 0000:07:00.0: start vif 5a:94:ec:c6:74:63 on port 0
[ 1656.506940] rtw_8821ce 0000:07:00.0: stop vif 5a:94:ec:c6:74:63 on port 0
[ 1657.040551] rtw_8821ce 0000:07:00.0: start vif aa:d0:5e:6a:0c:be on port 0
[ 2068.443729] rtw_8821ce 0000:07:00.0: stop vif aa:d0:5e:6a:0c:be on port 0
[ 2068.972402] rtw_8821ce 0000:07:00.0: start vif 5a:60:d3:11:e5:6b on port 0
[ 2480.455695] rtw_8821ce 0000:07:00.0: stop vif 5a:60:d3:11:e5:6b on port 0
[ 2480.976273] rtw_8821ce 0000:07:00.0: start vif 56:46:bd:44:4b:e3 on port 0
[ 2892.494486] rtw_8821ce 0000:07:00.0: stop vif 56:46:bd:44:4b:e3 on port 0
[ 2893.016142] rtw_8821ce 0000:07:00.0: start vif c6:66:3a:cc:8e:df on port 0

Michal

2020-10-31 11:55:34

by Michal TOMA

[permalink] [raw]
Subject: Re: rtw_8821ce driver in kernel 5.9.1: wifi module inactive

On Friday, October 30, 2020 08:30:16 PM Larry Finger wrote:
> Michal,
>
> My rtl8822ce works fine with 5.10.0-rc1 and 5.9.1 from openSUSE TW.
>
> Larry

I didn't try 5.10.0-rc1 yet.
I suspect some kind of deep sleep mode that seems to survive hard reboot.
I'm on a laptop where I can't remove the battery and I don't have a double
boot to Windows to make a test.
As additionnal context, before kernel 5.9.1, I was using the rtl8821ce driver
for openSUSE TW which packages the driver from the tomaspinho github repo:
https://build.opensuse.org/package/view_file/home:Sauerland/rtl8821ce/rtl8821ce.spec?expand=0

And my wifi was working perfectly fine.

Since then I tried to blacklist the rtw_8821ce driver and use the rtl8821ce
driver compiled for 5.9.1 and the behaviour is exactly the same: no wifi
either when the rtl8821ce is loaded by the kernel.

Michal

2020-10-31 16:57:00

by Larry Finger

[permalink] [raw]
Subject: Re: rtw_8821ce driver in kernel 5.9.1: wifi module inactive

On 10/31/20 6:30 AM, Michal TOMA wrote:
> On Friday, October 30, 2020 08:30:16 PM Larry Finger wrote:
>> Michal,
>>
>> My rtl8822ce works fine with 5.10.0-rc1 and 5.9.1 from openSUSE TW.
>>
>> Larry
>
> I didn't try 5.10.0-rc1 yet.
> I suspect some kind of deep sleep mode that seems to survive hard reboot.
> I'm on a laptop where I can't remove the battery and I don't have a double
> boot to Windows to make a test.
> As additionnal context, before kernel 5.9.1, I was using the rtl8821ce driver
> for openSUSE TW which packages the driver from the tomaspinho github repo:
> https://build.opensuse.org/package/view_file/home:Sauerland/rtl8821ce/rtl8821ce.spec?expand=0
>
> And my wifi was working perfectly fine.
>
> Since then I tried to blacklist the rtw_8821ce driver and use the rtl8821ce
> driver compiled for 5.9.1 and the behaviour is exactly the same: no wifi
> either when the rtl8821ce is loaded by the kernel.

Use the following to try the 5.10.0-rc1 kernel:

sudo zypper ar http://download.opensuse.org/repositories/Kernel:/HEAD/standard \
KOTD
sudo zypper dist-upgrade --allow-vendor-change --from kernel-repo
sudo zypper install kernel-default-5.10.rc1-3.1.g91029f0.x86_64

One warning: This kernel will not work with VirtualBox. There is one
incompatibility with 5.10 that I still have to solve.

Larry