Can't reconnect to wifi after losing connection

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
mr1992
Level 2
Level 2
Posts: 65
Joined: Mon Apr 11, 2016 7:37 pm

Can't reconnect to wifi after losing connection

Post by mr1992 »

Hey there,

I've got a problem with my wifi that I can't quite figure out. I also don't quite know how to provoke the issue. Generally speaking, when the computer has been on for a while, if it loses connection to the wifi, it is impossible to reconnect. Same goes for when you actively disconnect and try to reconnect after a one or two hours. Common solutions to prevent power saving that have frequently been suggested in other posts sadly didn't do the trick. When disconnecting just after startup, it reconnects without an issue.

Sys specs are:

Code: Select all

System:    Kernel: 5.4.0-137-generic x86_64 bits: 64 compiler: gcc v: 9.4.0 
           Desktop: Cinnamon 5.0.7 wm: muffin dm: LightDM Distro: Linux Mint 20.2 Uma 
           base: Ubuntu 20.04 focal 
Machine:   Type: Desktop System: HP product: HP Pavilion Desktop TP01-2xxx v: N/A serial: <filter> 
           Chassis: type: 3 serial: <filter> 
           Mobo: HP model: 8906 v: SMVB serial: <filter> UEFI: AMI v: F.03 date: 04/15/2021

Code: Select all

Network:   Device-1: Realtek RTL8821CE 802.11ac PCIe Wireless Network Adapter 
           vendor: Hewlett-Packard driver: rtl8821ce v: v5.5.2.1_35598.20191029 port: d000 
           bus ID: 0a:00.0 chip ID: 10ec:c821 
           IF: wlp10s0 state: up mac: <filter> 
           Device-2: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet 
           vendor: Hewlett-Packard driver: r8169 v: kernel port: c000 bus ID: 0b:00.0 
           chip ID: 10ec:8168 
Since I don't know how to provoke the error (and I've just restarted the computer), I don't quite know what other output I should post. Please let me know, and thanks in advance for your help :- )
Last edited by LockBot on Thu Aug 03, 2023 10:00 pm, edited 3 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
sleeper12
Level 21
Level 21
Posts: 14596
Joined: Thu May 25, 2017 3:22 pm

Re: Can't reconnect to wifi after losing connection

Post by sleeper12 »

See if there's a 5.15 kernel you can install in Update Manager, View, Linux Kernels.
mr1992
Level 2
Level 2
Posts: 65
Joined: Mon Apr 11, 2016 7:37 pm

Re: Can't reconnect to wifi after losing connection

Post by mr1992 »

Thanks for the reply; I've installed the kernel. While the computer hasn't been running for long enough to check (just rebooted it), wifi seems to have improved insofar as that it is faster in adapting to varying signal strength. Dunno whether that makes sense. Anyway, I've got a feeling this may have done the trick and hope I can put a solved label in the title in a couple of hours.

EDIT:
Okay, it's smooth sailing now, the issue's solved. Thanks a lot for your help!
sleeper12
Level 21
Level 21
Posts: 14596
Joined: Thu May 25, 2017 3:22 pm

Re: Can't reconnect to wifi after losing connection [SOLVED]

Post by sleeper12 »

👍 Glad it helped.
mr1992
Level 2
Level 2
Posts: 65
Joined: Mon Apr 11, 2016 7:37 pm

Re: Can't reconnect to wifi after losing connection

Post by mr1992 »

Okay, unfortunately, I had to unsolve this topic. Didn't use the computer for a while and today, the problem resurfaced. The 5.15 kernel is still active, so there wasn't any accidental switch whilst updating. No idea what caused the problem; it could only be resolved, once again, by restarting the computer.
User avatar
Pjotr
Level 24
Level 24
Posts: 20124
Joined: Mon Mar 07, 2011 10:18 am
Location: The Netherlands (Holland) 🇳🇱
Contact:

Re: Can't reconnect to wifi after losing connection

Post by Pjotr »

What does this command say:

Code: Select all

iwconfig
Tip: 10 things to do after installing Linux Mint 21.3 Virginia
Keep your Linux Mint healthy: Avoid these 10 fatal mistakes
Twitter: twitter.com/easylinuxtips
All in all, horse sense simply makes sense.
mr1992
Level 2
Level 2
Posts: 65
Joined: Mon Apr 11, 2016 7:37 pm

Re: Can't reconnect to wifi after losing connection

Post by mr1992 »

iwconfig:

Code: Select all

lo        no wireless extensions.

enp11s0   no wireless extensions.

wlp10s0   IEEE 802.11bgn  ESSID:"ZBTI1"  Nickname:"<WIFI@REALTEK>"
          Mode:Managed  Frequency:2.462 GHz  Access Point: 34:81:C4:FD:5D:19   
          Bit Rate:72.2 Mb/s   Sensitivity:0/0  
          Retry:off   RTS thr:off   Fragment thr:off
          Power Management:off
          Link Quality=67/100  Signal level=-62 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 see that "retry" is off, which strikes me as a bit strange. Don't know whether that's how it's supposed to be.
sleeper12
Level 21
Level 21
Posts: 14596
Joined: Thu May 25, 2017 3:22 pm

Re: Can't reconnect to wifi after losing connection

Post by sleeper12 »

Post what this shows:

Code: Select all

lspci -nnk | grep -iA3 net
mr1992
Level 2
Level 2
Posts: 65
Joined: Mon Apr 11, 2016 7:37 pm

Re: Can't reconnect to wifi after losing connection

Post by mr1992 »

lspci -nnk | grep -iA3 net

Code: Select all

0a:00.0 Network controller [0280]: Realtek Semiconductor Co., Ltd. RTL8821CE 802.11ac PCIe Wireless Network Adapter [10ec:c821]
	Subsystem: Hewlett-Packard Company RTL8821CE 802.11ac PCIe Wireless Network Adapter [103c:884d]
	Kernel driver in use: rtl8821ce
	Kernel modules: rtw88_8821ce, rtl8821ce
0b:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller [10ec:8168] (rev 16)
	Subsystem: Hewlett-Packard Company RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller [103c:8906]
	Kernel driver in use: r8169
	Kernel modules: r8169
0c:00.0 Non-Volatile memory controller [0108]: Micron Technology Inc Device [1344:5410] (rev 01)
sleeper12
Level 21
Level 21
Posts: 14596
Joined: Thu May 25, 2017 3:22 pm

Re: Can't reconnect to wifi after losing connection

Post by sleeper12 »

Try:

Code: Select all

sudo modprobe rtw88_8821ce
mr1992
Level 2
Level 2
Posts: 65
Joined: Mon Apr 11, 2016 7:37 pm

Re: Can't reconnect to wifi after losing connection

Post by mr1992 »

I did, is there an output somewhere I am to post? Probably will take some time to see results otherwise seeing I can't provoke the error.
sleeper12
Level 21
Level 21
Posts: 14596
Joined: Thu May 25, 2017 3:22 pm

Re: Can't reconnect to wifi after losing connection

Post by sleeper12 »

It should give you rtw88_8821ce as the driver in use. Check again lspci -nnk | grep -iA3 net
Maybe that driver will run better for you.
mr1992
Level 2
Level 2
Posts: 65
Joined: Mon Apr 11, 2016 7:37 pm

Re: Can't reconnect to wifi after losing connection

Post by mr1992 »

The output I get is this:

Code: Select all

0a:00.0 Network controller [0280]: Realtek Semiconductor Co., Ltd. RTL8821CE 802.11ac PCIe Wireless Network Adapter [10ec:c821]
	Subsystem: Hewlett-Packard Company RTL8821CE 802.11ac PCIe Wireless Network Adapter [103c:884d]
	Kernel driver in use: rtl8821ce
	Kernel modules: rtw88_8821ce, rtl8821ce
0b:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller [10ec:8168] (rev 16)
	Subsystem: Hewlett-Packard Company RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller [103c:8906]
	Kernel driver in use: r8169
	Kernel modules: r8169
0c:00.0 Non-Volatile memory controller [0108]: Micron Technology Inc Device [1344:5410] (rev 01)
For some reason, modprobe didn't change anything that I can see: it looks just like the previous output.
sleeper12
Level 21
Level 21
Posts: 14596
Joined: Thu May 25, 2017 3:22 pm

Re: Can't reconnect to wifi after losing connection

Post by sleeper12 »

Not sure if it will let you, but try:

Code: Select all

sudo modprobe -r rtl8821ce

Code: Select all

sudo modprobe rtw88_8821ce
sleeper12
Level 21
Level 21
Posts: 14596
Joined: Thu May 25, 2017 3:22 pm

Re: Can't reconnect to wifi after losing connection

Post by sleeper12 »

If that doesn't work, let's see:

Code: Select all

dkms status
mr1992
Level 2
Level 2
Posts: 65
Joined: Mon Apr 11, 2016 7:37 pm

Re: Can't reconnect to wifi after losing connection

Post by mr1992 »

Yup, that did the trick, lspci -nnk | grep -iA3 net now shows me the right one:

Code: Select all

0a:00.0 Network controller [0280]: Realtek Semiconductor Co., Ltd. RTL8821CE 802.11ac PCIe Wireless Network Adapter [10ec:c821]
	Subsystem: Hewlett-Packard Company RTL8821CE 802.11ac PCIe Wireless Network Adapter [103c:884d]
	Kernel driver in use: rtw_8821ce
	Kernel modules: rtw88_8821ce, rtl8821ce
0b:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller [10ec:8168] (rev 16)
	Subsystem: Hewlett-Packard Company RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller [103c:8906]
	Kernel driver in use: r8169
	Kernel modules: r8169
0c:00.0 Non-Volatile memory controller [0108]: Micron Technology Inc Device [1344:5410] (rev 01)
Hope this solves the problem; had the issue resurface again today (prior to implementing your solution, obviously). Thanks for your help!
Locked

Return to “Networking”