Wifi driver rtl8821ce fails itermitently

Questions about Wi-Fi and other network devices, file sharing, firewalls, connection sharing etc
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
joe_joe
Level 1
Level 1
Posts: 12
Joined: Fri Nov 26, 2021 9:17 pm

Wifi driver rtl8821ce fails itermitently

Post by joe_joe »

Since I installed Mint, I've had issues with my wifi. After the system suspends and comes back, sometimes the wifi works and sometimes it doesn't. When visiting my parents, it seems like it fails every time when it comes back from suspend. It will always work after restarting it. Curiously, if my wifi was working fine last time, I have an 80 or 90% chance of it working after coming back from suspend, but if I had to restart the module, it will probably fail again.

Here's what I mean by restart the module, which is the only thing that has worked for me besides restarting it. If my wifi doesn't work after coming back from suspend, I

Code: Select all

$ systemctl suspend
$ sudo modprobe -r rtl8821ce
$ sudo modprobe rtl8821ce
and that will bring it back. If I try it without suspending it first, it will not work. Wifi will just stop working then and I have to restart. wifi won't show up under 'nmcli device'.

One interesting thing that I've noticed is that if I have gmail open and my wifi stopped working after suspend, I will see messages in there that were received while my laptop lid was closed. Also just a few times I've had wifi work fine after opening my lid again but then stop working after just a minute or less. For those reasons I suspect it has something to do with the module being restarted.

So I've tried all the tricks on this forum and others and this is all I could get to work. My questions are: is there a way to permanently fix this without keeping my laptop running all the time? If not, why do I have to suspend my laptop first? This is very curious to me, but if we can't fix this driver issue for rtl8821, someone who knows more about this can find me a simpler way to restart everything.

Code: Select all

$ inxi -Fxpmrz
System:    Kernel: 5.4.0-90-generic x86_64 bits: 64 compiler: gcc v: 9.3.0 Desktop: Xfce 4.16.0 Distro: Linux Mint 20.2 Uma 
           base: Ubuntu 20.04 focal 
Machine:   Type: Laptop System: HP product: HP Laptop 14z-fq0000 v: N/A serial: <filter> 
           Mobo: HP model: 87B7 v: 28.15 serial: <filter> UEFI: AMI v: F.10 date: 06/11/2020 
Battery:   ID-1: BAT0 charge: 37.7 Wh condition: 37.7/37.7 Wh (100%) model: Hewlett-Packard Primary status: Full 
Memory:    RAM: total: 9.67 GiB used: 3.16 GiB (32.7%) 
           RAM Report: permissions: Unable to run dmidecode. Root privileges required. 
CPU:       Topology: Dual Core model: AMD Athlon Silver 3050U with Radeon Graphics bits: 64 type: MCP arch: Zen+ rev: 1 
           L2 cache: 1024 KiB 
           flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm bogomips: 9182 
           Speed: 1287 MHz min/max: 1400/2300 MHz Core speeds (MHz): 1: 1309 2: 1236 
Graphics:  Device-1: Advanced Micro Devices [AMD/ATI] Picasso vendor: Hewlett-Packard driver: amdgpu v: kernel bus ID: 04:00.0 
           Display: x11 server: X.Org 1.20.9 driver: amdgpu,ati unloaded: fbdev,modesetting,vesa resolution: 1366x768~60Hz 
           OpenGL: renderer: AMD RAVEN2 (DRM 3.35.0 5.4.0-90-generic LLVM 11.0.0) v: 4.6 Mesa 20.2.6 direct render: Yes 
Audio:     Device-1: Advanced Micro Devices [AMD/ATI] Raven/Raven2/Fenghuang HDMI/DP Audio vendor: Hewlett-Packard 
           driver: snd_hda_intel v: kernel bus ID: 04:00.1 
           Device-2: Advanced Micro Devices [AMD] Raven/Raven2/FireFlight/Renoir Audio Processor vendor: Hewlett-Packard 
           driver: N/A bus ID: 04:00.5 
           Device-3: Advanced Micro Devices [AMD] Family 17h HD Audio vendor: Hewlett-Packard driver: snd_hda_intel v: kernel 
           bus ID: 04:00.6 
           Sound Server: ALSA v: k5.4.0-90-generic 
Network:   Device-1: Realtek RTL8821CE 802.11ac PCIe Wireless Network Adapter vendor: Hewlett-Packard driver: rtl8821ce 
           v: v5.5.2.1_35598.20191029 port: f000 bus ID: 02:00.0 
           IF: wlo1 state: up mac: <filter> 
Drives:    Local Storage: total: 238.47 GiB used: 57.02 GiB (23.9%) 
           ID-1: /dev/nvme0n1 model: KBG40ZNV256G KIOXIA size: 238.47 GiB 
Partition: ID-1: / size: 162.57 GiB used: 56.96 GiB (35.0%) fs: ext4 dev: /dev/nvme0n1p5 
           ID-2: /boot/efi size: 256.0 MiB used: 67.4 MiB (26.3%) fs: vfat dev: /dev/nvme0n1p1 
Sensors:   System Temperatures: cpu: 61.2 C mobo: N/A gpu: amdgpu temp: 56 C 
           Fan Speeds (RPM): N/A 
Repos:     No active apt repos in: /etc/apt/sources.list 
           Active apt repos in: /etc/apt/sources.list.d/official-package-repositories.list 
           1: deb http://mirrors.evowise.com/linuxmint/packages uma main upstream import backport
           2: deb http://la-mirrors.evowise.com/ubuntu focal main restricted universe multiverse
           3: deb http://la-mirrors.evowise.com/ubuntu focal-updates main restricted universe multiverse
           4: deb http://la-mirrors.evowise.com/ubuntu focal-backports main restricted universe multiverse
           5: deb http://security.ubuntu.com/ubuntu/ focal-security main restricted universe multiverse
           6: deb http://archive.canonical.com/ubuntu/ focal partner
Info:      Processes: 199 Uptime: 1d 5h 24m Init: systemd runlevel: 5 Compilers: gcc: 9.3.0 Shell: bash v: 5.0.17 inxi: 3.0.38

Code: Select all

$ rfkill list all
12: hci0: Bluetooth
	Soft blocked: yes
	Hard blocked: no
13: phy0: Wireless LAN
	Soft blocked: no
	Hard blocked: no

Code: Select all

$ iwconfig
lo        no wireless extensions.

wlo1      IEEE 802.11bgn  ESSID:"MOTO8808"  Nickname:"<WIFI@REALTEK>"
          Mode:Managed  Frequency:2.437 GHz  Access Point: E8:91:20:F7:B7:82   
          Bit Rate:72.2 Mb/s   Sensitivity:0/0  
          Retry:off   RTS thr:off   Fragment thr:off
          Power Management:off
          Link Quality=97/100  Signal level=-23 dBm  Noise level=0 dBm
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0
I appreciate any help.
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
sleeper12
Level 21
Level 21
Posts: 14557
Joined: Thu May 25, 2017 3:22 pm

Re: Wifi driver rtl8821ce fails itermitently

Post by sleeper12 »

You can install the 5.13 kernel in Update Manager, View, Linux Kernels & reboot. No guarantee it will help, but it might.
joe_joe
Level 1
Level 1
Posts: 12
Joined: Fri Nov 26, 2021 9:17 pm

Re: Wifi driver rtl8821ce fails itermitently

Post by joe_joe »

Thanks, but I've had this issue for over a year now and it hasn't changed with multiple kernel versions. From what I've read it's an issue with the driver/device.
sleeper12
Level 21
Level 21
Posts: 14557
Joined: Thu May 25, 2017 3:22 pm

Re: Wifi driver rtl8821ce fails itermitently

Post by sleeper12 »

The 5.13 kernel is generally better for newer hardware, so it's worth a try. But, it's your choice.
SupraLance
Level 1
Level 1
Posts: 1
Joined: Tue Dec 14, 2021 1:57 am

Re: Wifi driver rtl8821ce fails itermitently

Post by SupraLance »

Joe_Joe, it IS an issue with the driver/device, but it WILL be fixed in a new kernel, in this case that should be kernel 5.16. As the RealTek engineers gradually release more relevant info, the linux gurus figure out how to make their stuff work for them, and all this gradually makes it's way into new kernels (and is often backported as updates to older kernels). I would expect basic functionality in the 5.16 kernel, and probably gradual improvements over the next several kernels after. I'm waiting anxiously as I need a driver that works with secure boot, since much of windows 11 won't work without secure boot.
kelebek333
Level 4
Level 4
Posts: 419
Joined: Sat Jun 25, 2011 11:57 am

Re: Wifi driver rtl8821ce fails itermitently

Post by kelebek333 »

Kernel 5.13 has built-in rtl8821ce (rtw88_8821ce) driver. If you install kernel 5.13, you must remove rtl8821ce-dkms package after installation.
joe_joe
Level 1
Level 1
Posts: 12
Joined: Fri Nov 26, 2021 9:17 pm

Re: Wifi driver rtl8821ce fails itermitently

Post by joe_joe »

Thanks a lot for both of your replies. At this point I strongly believe that my module is the issue. When it acts up I can't even modprobe -r and modprobe it without it not working at all, which tells me there's something very wrong with it. I still think it's very odd though that sometimes it works just fine after exiting suspend and sometimes it doesn't. Any idea what's causing it to be that broken?

I don't need secureboot, but happy to hear that the general issue is getting fixed. I'll try a newer kernel. I have 5.4.0-91-generic now.
User avatar
comrade
Level 1
Level 1
Posts: 28
Joined: Thu Dec 16, 2021 2:47 am

Re: Wifi driver rtl8821ce fails itermitently

Post by comrade »

joe_joe I have exactly the same issue with my lm 20. Sometimes the wifi works at startup and most of the times it doesn't. The only two differences between yours and mine situation are 1) my driver and 2) No matter what command i put, i just can't start wifi unless it automatically starts at startup.

I've tried different distros and all the currently available kernels. Nothing ever worked.

From this I've concluded that its not SOFTWARE but HARDWARE problem.
joe_joe
Level 1
Level 1
Posts: 12
Joined: Fri Nov 26, 2021 9:17 pm

Re: Wifi driver rtl8821ce fails itermitently

Post by joe_joe »

Which driver/module are you using? Is it an unofficial one as well?

If it works in windows, it's probably a software problem. Lots of these wifis don't' have official drivers in linux.

Have you tried suspending it, waking up, removing and replacing the module like I did?
$ systemctl suspend
$ sudo modprobe -r rtl8821ce
$ sudo modprobe rtl8821ce
joe_joe
Level 1
Level 1
Posts: 12
Joined: Fri Nov 26, 2021 9:17 pm

Re: Wifi driver rtl8821ce fails itermitently

Post by joe_joe »

Working fine so far. It's an intermitent failure though so we'll see. I notice that it's using a different driver altogether though, rtw8821 or something.
Locked

Return to “Networking”