Disconnecting and reconnecting to wifi constantly!

Continuing the discussion from Randomly Losing Connection:

Doing things like setting

WIFI_PWR_ON_AC=off

and

[connection]
wifi.powersave = 0

Didn’t make any difference at all.

my system info:

System:
  Kernel: 6.6.5-1-MANJARO arch: x86_64 bits: 64 compiler: gcc v: 13.2.1
    clocksource: hpet available: acpi_pm
    parameters: BOOT_IMAGE=/boot/vmlinuz-6.6-x86_64
    root=UUID=82268f03-e25d-49f2-8269-e8885066570d rw zswap.enabled=0 quiet
    splash udev.log_priority=3
  Desktop: Xfce v: 4.18.1 tk: Gtk v: 3.24.36 info: xfce4-panel wm: xfwm
    v: 4.18.0 vt: 7 dm: LightDM v: 1.32.0 Distro: Manjaro Linux base: Arch Linux
Machine:
  Type: Laptop System: LENOVO product: 82MF v: IdeaPad 3 15ALC6
    serial: <superuser required> Chassis: type: 10 v: IdeaPad 3 15ALC6
    serial: <superuser required>
  Mobo: LENOVO model: LNVNB161216 v: NO DPK serial: <superuser required>                  
    UEFI: LENOVO v: GLCN46WW date: 03/23/2022                                             
Battery:                                                                                  
  ID-1: BAT0 charge: 35.0 Wh (100.0%) condition: 35.0/38.0 Wh (92.0%)                     
    volts: 8.6 min: 7.7 model: SMP L20M2PF0 type: Li-poly serial: <filter>                
    status: full cycles: 59                                                               
CPU:                                                                   
  Info: model: AMD Ryzen 5 5500U with Radeon Graphics bits: 64 type: MT MCP
    arch: Zen 2 gen: 3 level: v3 note: check built: 2020-22                   
    process: TSMC n7 (7nm) family: 0x17 (23) model-id: 0x68 (104) stepping: 1 
    microcode: 0x8608103                                                      
  Topology: cpus: 1x cores: 6 tpc: 2 threads: 12 smt: enabled cache:          
    L1: 384 KiB desc: d-6x32 KiB; i-6x32 KiB L2: 3 MiB desc: 6x512 KiB L3: 8 MiB
    desc: 2x4 MiB                                                                  
  Speed (MHz): avg: 1478 high: 2463 min/max: 400/4056 scaling:                     
    driver: amd-pstate-epp governor: powersave cores: 1: 1397 2: 2463 3: 1506
    4: 1396 5: 1397 6: 1397 7: 1396 8: 1423 9: 1397 10: 400 11: 1397 12: 2172
    bogomips: 50323
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm
  Vulnerabilities:
  Type: gather_data_sampling status: Not affected
  Type: itlb_multihit status: Not affected
  Type: l1tf status: Not affected
  Type: mds status: Not affected
  Type: meltdown status: Not affected
  Type: mmio_stale_data status: Not affected
  Type: retbleed mitigation: untrained return thunk; SMT enabled with STIBP
    protection
  Type: spec_rstack_overflow mitigation: Safe RET
  Type: spec_store_bypass mitigation: Speculative Store Bypass disabled via
    prctl
  Type: spectre_v1 mitigation: usercopy/swapgs barriers and __user pointer
    sanitization
  Type: spectre_v2 mitigation: Retpolines, IBPB: conditional, STIBP:
    always-on, RSB filling, PBRSB-eIBRS: Not affected
  Type: srbds status: Not affected
  Type: tsx_async_abort status: Not affected
Graphics:
  Device-1: AMD Lucienne vendor: Lenovo driver: amdgpu v: kernel arch: GCN-5
    code: Vega process: GF 14nm built: 2017-20 pcie: gen: 3 speed: 8 GT/s
    lanes: 16 link-max: gen: 4 speed: 16 GT/s ports: active: eDP-1
    empty: HDMI-A-1 bus-ID: 03:00.0 chip-ID: 1002:164c class-ID: 0300
    temp: 49.0 C
  Device-2: Syntek Integrated Camera driver: uvcvideo type: USB rev: 2.0
    speed: 480 Mb/s lanes: 1 mode: 2.0 bus-ID: 1-3:2 chip-ID: 174f:2459
    class-ID: fe01 serial: <filter>
  Display: x11 server: X.org v: 1.21.1.9 compositor: xfwm v: 4.18.0 driver:
    X: loaded: amdgpu unloaded: modesetting alternate: fbdev,vesa dri: radeonsi
    gpu: amdgpu display-ID: :0.0 screens: 1
  Screen-1: 0 s-res: 1920x1080 s-size: <missing: xdpyinfo>
  Monitor-1: eDP-1 mapped: eDP model: BOE Display 0x08d5 built: 2019
    res: 1920x1080 hz: 60 dpi: 142 gamma: 1.2 size: 344x194mm (13.54x7.64")
    diag: 395mm (15.5") ratio: 16:9 modes: max: 1920x1080 min: 640x480
  API: EGL v: 1.5 hw: drv: amd radeonsi platforms: device: 0 drv: radeonsi
    device: 1 drv: swrast surfaceless: drv: radeonsi x11: drv: radeonsi
    inactive: gbm,wayland
  API: OpenGL v: 4.6 compat-v: 4.5 vendor: amd mesa v: 23.1.9-manjaro1.1
    glx-v: 1.4 direct-render: yes renderer: AMD Radeon Graphics (renoir LLVM
    16.0.6 DRM 3.54 6.6.5-1-MANJARO) device-ID: 1002:164c memory: 1.95 GiB
    unified: no
Audio:
  Device-1: AMD Renoir Radeon High Definition Audio vendor: Lenovo
    driver: snd_hda_intel v: kernel pcie: gen: 3 speed: 8 GT/s lanes: 16
    link-max: gen: 4 speed: 16 GT/s bus-ID: 03:00.1 chip-ID: 1002:1637
    class-ID: 0403
  Device-2: AMD ACP/ACP3X/ACP6x Audio Coprocessor vendor: Lenovo driver: N/A
    alternate: snd_pci_acp3x, snd_rn_pci_acp3x, snd_pci_acp5x, snd_pci_acp6x,
    snd_acp_pci, snd_rpl_pci_acp6x, snd_pci_ps, snd_sof_amd_renoir,
    snd_sof_amd_rembrandt, snd_sof_amd_vangogh pcie: gen: 3 speed: 8 GT/s
    lanes: 16 link-max: gen: 4 speed: 16 GT/s bus-ID: 03:00.5
    chip-ID: 1022:15e2 class-ID: 0480
  Device-3: AMD Family 17h/19h HD Audio vendor: Lenovo driver: snd_hda_intel
    v: kernel pcie: gen: 3 speed: 8 GT/s lanes: 16 link-max: gen: 4
    speed: 16 GT/s bus-ID: 03:00.6 chip-ID: 1022:15e3 class-ID: 0403
  API: ALSA v: k6.6.5-1-MANJARO status: kernel-api with: aoss
    type: oss-emulator tools: alsactl,alsamixer,amixer
  Server-1: JACK v: 1.9.22 status: off tools: N/A
  Server-2: PipeWire v: 1.0.0 status: active with: 1: pipewire-pulse
    status: active 2: pipewire-media-session status: active 3: pipewire-alsa
    type: plugin tools: pactl,pw-cat,pw-cli
Network:
  Device-1: Realtek RTL8822CE 802.11ac PCIe Wireless Network Adapter
    vendor: Lenovo driver: rtw_8822ce v: N/A modules: rtw88_8822ce pcie: gen: 1
    speed: 2.5 GT/s lanes: 1 port: 2000 bus-ID: 01:00.0 chip-ID: 10ec:c822
    class-ID: 0280
  IF: wlp1s0 state: down mac: <filter>
Bluetooth:
  Device-1: Realtek Bluetooth Radio driver: btusb v: 0.8 type: USB rev: 1.0
    speed: 12 Mb/s lanes: 1 mode: 1.1 bus-ID: 3-4:3 chip-ID: 0bda:c123
    class-ID: e001 serial: <filter>
  Report: rfkill ID: hci0 rfk-id: 3 state: down bt-service: enabled,running
    rfk-block: hardware: no software: yes address: see --recommends
Drives:
  Local Storage: total: 238.47 GiB used: 126.95 GiB (53.2%)
  SMART Message: Required tool smartctl not installed. Check --recommends
  ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: SSSTC model: CL1-4D256
    size: 238.47 GiB block-size: physical: 512 B logical: 512 B speed: 31.6 Gb/s
    lanes: 4 tech: SSD serial: <filter> fw-rev: BS262 temp: 36.9 C scheme: GPT
Partition:
  ID-1: / raw-size: 238.18 GiB size: 233.38 GiB (97.99%)
    used: 126.95 GiB (54.4%) fs: ext4 dev: /dev/nvme0n1p2 maj-min: 259:2
  ID-2: /boot/efi raw-size: 300 MiB size: 299.4 MiB (99.80%)
    used: 296 KiB (0.1%) fs: vfat dev: /dev/nvme0n1p1 maj-min: 259:1
Swap:
  Kernel: swappiness: 60 (default) cache-pressure: 100 (default) zswap: no
  ID-1: swap-1 type: zram size: 5.65 GiB used: 0 KiB (0.0%) priority: 100
    comp: zstd avail: lzo,lzo-rle,lz4,lz4hc,842 max-streams: 12 dev: /dev/zram0
Sensors:
  System Temperatures: cpu: 60.1 C mobo: N/A gpu: amdgpu temp: 50.0 C
  Fan Speeds (rpm): N/A
Info:
  Processes: 323 Uptime: 9m wakeups: 0 Memory: total: 6 GiB available: 5.65 GiB
  used: 3.93 GiB (69.5%) Init: systemd v: 254 default: graphical
  tool: systemctl Compilers: gcc: 13.2.1 clang: 16.0.6 Packages: pm: pacman
  pkgs: 1591 libs: 480 tools: pamac,yay Shell: Bash v: 5.2.21
  running-in: cool-retro-term inxi: 3.3.31

Does that mean it does affect multiple networks now ?

(there is a problem with your wireless cards function)

Or are you trying to diagnose that problematic network?

I am only having this issue with a single network so far, but still I want to fix it since it’s my house’s wifi and I cannot change it.

This issue is making my experience awful since I am not able to download anything properly because of random disconnection or play online games because of it so I’ll do whatever must be done to fix it. Are there any other logs I can send to help diagnose the issue?

This shows the device as down currently.

Also did you end up installing any certain package(s) for it ?

pacman -Qs rtw

And I guess lets look at the module in use:

modinfo rtw88_8822ce

But you say it is only this network. Which makes me believe it is a problem of that network. Do other devices work properly on it? Do you have no control? You cannot even restart the router?

filename:       /lib/modules/6.6.5-1-MANJARO/kernel/drivers/net/wireless/realtek/rtw88/rtw88_8822ce.ko.zst
license:        Dual BSD/GPL
description:    Realtek 802.11ac wireless 8822ce driver
author:         Realtek Corporation
srcversion:     61803211D563F376F29D2F6
alias:          pci:v000010ECd0000C82Fsv*sd*bc*sc*i*
alias:          pci:v000010ECd0000C822sv*sd*bc*sc*i*
depends:        rtw88_pci,rtw88_8822c
retpoline:      Y
intree:         Y
name:           rtw88_8822ce                                                          
vermagic:       6.6.5-1-MANJARO SMP preempt mod_unload                                
sig_id:         PKCS#7                                                                
signer:         Build time autogenerated kernel key                                   
sig_key:        31:30:43:6E:CC:E2:F2:F6:DC:79:86:9F:51:52:AB:2E:8F:51:30:85           
sig_hashalgo:   sha512                                                                
signature:      30:66:02:31:00:86:E0:71:D7:D4:83:2E:77:CC:AC:1E:84:4B:5C:4C:
                E0:17:DC:71:8F:59:56:CF:56:55:72:25:AA:88:44:3C:28:40:60:CC:
                29:C8:39:14:A1:08:0A:55:E8:D5:AF:D0:41:02:31:00:C2:CE:52:54:  
                FA:AF:DC:89:EB:9E:73:92:D3:04:64:6D:2B:B9:DA:E9:B3:CD:DD:8B:  
                D5:ED:44:21:6D:84:49:FE:17:58:44:75:7E:72:E4:45:04:31:AA:24:  
                96:40:34:E2        ```

But you say it is only this network. Which makes me believe it is a problem of that network. Do other devices work properly on it? Do you have no control? You cannot even restart the router?

I’ve only “tested” it in two different networks and it didn’t seem to have this issue but I can’t be certain of it. Plus, I don’t think it’s a issue of the device since it worked normally on Windows and only now i am having this issue on Linux.

Probably try a simple ping test. Then we can see if there is any consistent disconnect after x min or so. Or on which condition it happens.

export LANG=C # Reset to default language
export P='192.168.178.1' # Router IP or Domain
# Run:
while true; do echo "$(date '+[%Y/%m/%d %H:%M:%S]') $P -> $(ping -c5 "$P" | grep "packet loss")"; done

Also try running wavemon. Maybe you see there something suspicious. Signal strength goes down or something else.

pamac install wavemon
[2023/12/13-20:30:41] 192.168.178.1 -> 5 packets transmitted, 0 received, 100% packet loss, time 4053ms
[2023/12/13-20:30:55] 192.168.178.1 -> 5 packets transmitted, 0 received, 100% packet loss, time 4048ms
[2023/12/13-20:31:09] 192.168.178.1 -> 5 packets transmitted, 0 received, 100% packet loss, time 4050ms
[2023/12/13-20:31:23] 192.168.178.1 -> 5 packets transmitted, 0 received, 100% packet loss, time 4044ms
[2023/12/13-20:31:37] 192.168.178.1 -> 5 packets transmitted, 0 received, 100% packet     loss, time 4043ms                                                                         
[2023/12/13-20:31:51] 192.168.178.1 -> 5 packets transmitted, 0 received, 100% packet     loss, time 4047ms                                                                         
[2023/12/13-20:32:05] 192.168.178.1 -> 5 packets transmitted, 0 received, 100% packet     loss, time 4047ms                                                                         
[2023/12/13-20:32:19] 192.168.178.1 -> 5 packets transmitted, 0 received, 100% packet loss, time 4052ms                                                      
[2023/12/13-20:32:33] 192.168.178.1 -> 5 packets transmitted, 0 received, 100% packet loss, time 4044ms                                                             
[2023/12/13-20:32:47] 192.168.178.1 -> 5 packets transmitted, 0 received, 100% packet loss, time 4047ms                                                             
[2023/12/13-20:33:01] 192.168.178.1 -> 5 packets transmitted, 0 received, 100% packet loss, time 4051ms                                                                  
[2023/12/13-20:33:15] 192.168.178.1 -> 5 packets transmitted, 0 received, 100% packet loss, time 4044ms
[2023/12/13-20:33:29] 192.168.178.1 -> 5 packets transmitted, 0 received, 100% packet loss, time 4048ms
[2023/12/13-20:33:43] 192.168.178.1 -> 5 packets transmitted, 0 received, 100% packet loss, time 4047ms
[2023/12/13-20:33:57] 192.168.178.1 -> 5 packets transmitted, 0 received, 100% packet loss, time 4044ms
[2023/12/13-20:34:11] 192.168.178.1 -> 5 packets transmitted, 0 received, 100% packet loss, time 4048ms
[2023/12/13-20:34:25] 192.168.178.1 -> 5 packets transmitted, 0 received, 100% packet loss, time 4045ms
[2023/12/13-20:34:39] 192.168.178.1 -> 5 packets transmitted, 0 received, 100% packet loss, time 4042ms
[2023/12/13-20:34:54] 192.168.178.1 -> 5 packets transmitted, 0 received, +1 errors, 100% packet loss, time 4046ms
[2023/12/13-20:35:08] 192.168.178.1 -> 5 packets transmitted, 0 received, 100% packet loss, time 4047ms
[2023/12/13-20:35:22] 192.168.178.1 -> 5 packets transmitted, 0 received, 100% packet loss, time 4045ms
[2023/12/13-20:35:36] 192.168.178.1 -> 5 packets transmitted, 0 received, 100% packet loss, time 4043ms
[2023/12/13-20:35:50] 192.168.178.1 -> 5 packets transmitted, 0 received, 100% packet loss, time 4052ms

These are the logs, in the meantime I disconnected at least twice. I am trying to install wavemon but I keep disconnecting so it’s taking forever.

And what about these things?

  • check installed packages
  • do other devices/systems, such as phones, laptops, etc, work on this network ?
  • is the network and/or router entirely out of your control? Can you cycle the power even?

And what about these things?

check installed packages
do other devices/systems, such as phones, laptops, etc, work on this network ?
is the network and/or router entirely out of your control? Can you cycle the power even?

I can restart the router and i’ve done that before. Other devices work fine aswell, running pacman -Qs rtw simply outputs nothing.

Really? 192.168.178.1 is your router?

ip route

No connection at all if always 100% loss.

My bad. I was very stupid by not changing the IP, lol.
Did it again but with the correct ip.

export P='192.168.100.33'                                                
[tksh@temple ~]$ while true; do echo "$(date '+[%Y/%m/%d %H:%M:%S]') $P -> $(ping -c5     "$P" | grep "packet loss")"; done                                                         
[2023/12/13 20:45:08] 192.168.100.33 -> 5 packets transmitted, 5 received, 0% packet l    oss, time 4006ms                                                                          
[2023/12/13 20:45:12] 192.168.100.33 -> 5 packets transmitted, 5 received, 0% packet loss, time 4006ms                                                       
[2023/12/13 20:45:16] 192.168.100.33 -> 5 packets transmitted, 5 received, 0% packet loss, time 4005ms                                                              
[2023/12/13 20:45:20] 192.168.100.33 -> 5 packets transmitted, 5 received, 0% packet loss, time 4006ms                                                              
[2023/12/13 20:45:24] 192.168.100.33 -> 5 packets transmitted, 5 received, 0% packet loss, time 4005ms                                                                   
[2023/12/13 20:45:28] 192.168.100.33 -> 5 packets transmitted, 5 received, 0% packet loss, time 4006ms
[2023/12/13 20:45:32] 192.168.100.33 -> 5 packets transmitted, 5 received, 0% packet loss, time 4006ms
[2023/12/13 20:45:36] 192.168.100.33 -> 5 packets transmitted, 5 received, 0% packet loss, time 4004ms
[2023/12/13 20:45:40] 192.168.100.33 -> 5 packets transmitted, 5 received, 0% packet loss, time 4006ms
[2023/12/13 20:45:44] 192.168.100.33 -> 5 packets transmitted, 5 received, 0% packet loss, time 4006ms
[2023/12/13 20:45:48] 192.168.100.33 -> 5 packets transmitted, 5 received, 0% packet loss, time 4006ms
[2023/12/13 20:45:52] 192.168.100.33 -> 5 packets transmitted, 5 received, 0% packet loss, time 4004ms
[2023/12/13 20:45:56] 192.168.100.33 -> 5 packets transmitted, 5 received, 0% packet loss, time 4007ms
[2023/12/13 20:46:00] 192.168.100.33 -> 5 packets transmitted, 1 received, 80% packet loss, time 4035ms
[2023/12/13 20:46:05] 192.168.100.33 -> 5 packets transmitted, 1 received, +3 errors, 80% packet loss, time 4021ms
[2023/12/13 20:46:19] 192.168.100.33 -> 5 packets transmitted, 5 received, 0% packet loss, time 4005ms
[2023/12/13 20:46:23] 192.168.100.33 -> 5 packets transmitted, 5 received, 0% packet loss, time 4003ms
[2023/12/13 20:46:27] 192.168.100.33 -> 5 packets transmitted, 4 received, 20% packet loss, time 4005ms
[2023/12/13 20:46:32] 192.168.100.33 -> 5 packets transmitted, 0 received, +3 errors, 100% packet loss, time 4049ms
[2023/12/13 20:46:46] 192.168.100.33 -> 5 packets transmitted, 5 received, 0% packet loss, time 4005ms
[2023/12/13 20:46:50] 192.168.100.33 -> 5 packets transmitted, 3 received, 40% packet loss, time 4010ms
[2023/12/13 20:46:55] 192.168.100.33 -> 5 packets transmitted, 0 received, 100% packet loss, time 4056ms

By the way, somehow I even got completely disconnected from the network and it asked for me to input the password again. It’s bad.

Now with signal strenght:

while true; do echo "$(date '+[%Y/%m/%d %H:%M:%S]') $P -> $(ping -c5 "$P" | grep "packet loss") | $(awk 'NR==3 {print "Signal = " $3 "00 %"}' /proc/net/wireless)"; done
1 Like

Check the solution mentioned at the following link. It involves installing a different driver and should be worth a try:

Other Random thoughts:
Double check router configuration?
Has the router been rebooted recently?
Is the router firmware updated?
Has the modem been disconnected/re-connected or rebooted recently?
Does wifi exhibit the same issue with other devices?
Is a firewall involved here?
Is the wifi adapter faulty? Can you check with a different adapter?

1 Like

Now with signal strenght:

[2023/12/13 21:09:42] 192.168.100.33 -> 5 packets transmitted, 5 received, 0% packet loss, time 4005ms | Signal = 54.00 %
[2023/12/13 21:09:46] 192.168.100.33 -> 5 packets transmitted, 2 received, 60% packet loss, time 4024ms | Signal = 54.00 %
[2023/12/13 21:09:51] 192.168.100.33 -> 5 packets transmitted, 0 received, 100% packet loss, time 4059ms | Signal = 53.00 %
[2023/12/13 21:10:05] 192.168.100.33 -> 5 packets transmitted, 5 received, 0% packet loss, time 4004ms | Signal = 53.00 %
[2023/12/13 21:10:09] 192.168.100.33 -> 5 packets transmitted, 5 received, 0% packet loss, time 4006ms | Signal = 70.00 %                                                   
[2023/12/13 21:10:13] 192.168.100.33 -> 5 packets transmitted, 5 received, 0% packet loss, time 4004ms | Signal = 53.00 %                                                   
[2023/12/13 21:10:17] 192.168.100.33 -> 5 packets transmitted, 5 received, 0% packet loss, time 4004ms | Signal = 52.00 %                                                   
[2023/12/13 21:10:21] 192.168.100.33 -> 5 packets transmitted, 5 received, 0% packet loss, time 4004ms | Signal = 51.00 %                                    
[2023/12/13 21:10:25] 192.168.100.33 -> 5 packets transmitted, 5 received, 0% packet loss, time 4006ms | Signal = 52.00 %                                           
[2023/12/13 21:10:29] 192.168.100.33 -> 5 packets transmitted, 5 received, 0% packet loss, time 4005ms | Signal = 53.00 %                                           
[2023/12/13 21:10:33] 192.168.100.33 -> 5 packets transmitted, 5 received, 0% packet loss, time 4007ms | Signal = 50.00 %                                           
[2023/12/13 21:10:37] 192.168.100.33 -> 5 packets transmitted, 2 received, 60% packet loss, time 4032ms | Signal = 52.00 %                                               
[2023/12/13 21:10:42] 192.168.100.33 -> 5 packets transmitted, 0 received, +3 errors, 100% packet loss, time 4041ms | Signal = 52.00 %
[2023/12/13 21:10:56] 192.168.100.33 -> 5 packets transmitted, 5 received, 0% packet loss, time 4006ms | Signal = 50.00 %

Not sure if it’s useful to know, but if I use my phone as an Wi-Fi Hotspot and connect to the network the problem is gone. But it is still not a viable way to use it. Most likely this is driver related issue?

I would say it is far more complicated. At a signal strength of ~50% you get an unstable connection with quite a mount of uncorrectable packets. Most likely it has to do with used Wifi standard and the range. Also Bluetooth can here reduce the connectivity, since both are on one chip. If the phone is next to it and you connect to it, then the interference is much lower.

Probably try this, like mentioned in the link to Garuda forum:

pamac install linux66-headers # since you use linux66
pamac build rtw88-dkms-git

File: /etc/modprobe.d/rtl8822ce.conf

options rtw_pci disable_aspm=1
blacklist rtw88_8822ce
install bluetooth /bin/false

Reboot then.

1 Like

Another thought:
Have you tried changing wifi channel in router configuration?

Theres lots I would like to do if we are allowed access to the router.
As apparently the wireless card works fine everywhere else.
But OP insists we cannot control it, even if it is their home network.