Wifi constantly disconnects and reconnects

I’m not sure if this KDE-related or caused by something else. I have a problem with Wifi connectivity that only affects Linux machines on my network. The Wifi on these machines will disconnect and reconnect over and over. The problem seems to be intermittent.

Affected machines:
-2011 Sony laptop running Debian 12 with Plasma 5.27.
-2015 custom build desktop running openSUSE Tumbleweed with Plasma 5.27

Unaffected machines:
-The same desktop booted into Windows 10
-Surface 7+ running Windows 11
-iPhone 13 mini

Other potentially relevant info:
-Router is a Netgear AX1800
-I run a home server on Ubuntu 22.04, which has Pi-hole and Unbound running my DNS

Any help is much appreciated.

Is there any logs from NetworkManager or the equivalent that give any hints on what might be going wrong?

-I run a home server on Ubuntu 22.04, which has Pi-hole and Unbond running my DNS

Do all your devices (including the unaffected ones) use your DNS server?

All of the devices use the same DNS server.

Here are the logs:

From those logs, it definitely looks like an issue below Plasma, caused by a network misconfiguration, a bug in NetworkManager, or something else deeper.

Are you randomising your MAC address on the other devices that stay connected?

Do you have MAC-address whitelisting on your AP?

Does the linux boxes know the SSID is hidden? (I guess not due to the randomising, but who knows?)

I don’t have a hidden SSID or randomized MAC addressing, and MAC addresses are not whitelisted.

Not sure if I’ve solved it (or at least worked around it) since it was somewhat intermittent, but turning off the smart connect between 2.4 and 5GHz seems to have stopped the issue. The two Linux machines incidentally were on 2.4 GHz, though the issue didn’t happen on Windows on the one machine while in 2.4 GHz.

Try to disable WiFi power saving, or disable IPV6 either on your router or your computer.

If you dual boot windows on the same machine and Windows has “fast boot” turned on, this can cause problem similar to this.

If you are on Intel WiFi like me, I had to disable WiFi power saving like fusionfuture suggested. I followed this Unix & Linux StackExchange post linux - How to turn off Wireless power management permanently - Unix & Linux Stack Exchange and it worked for me.

To see if you have Intel WiFi, run lspci | grep "Wi-Fi"

If you have Intel WiFi, then make a file called default-wifi-powersave-on.conf under /etc/NetworkManager/conf.d/

Specifically, run sudo nano /etc/NetworkManager/conf.d/default-wifi-powersave-on.conf

Add the following to the file you created

[connection]
wifi.powersave = 2

Then save the file by pressing Ctrl + X and then by pressing Y

Now reboot

Power management isn’t on, and doing these steps to disable it didn’t have an impact. It seems that disabling smart connect on the router is the only thing that’s worked.

While that seemed to stop the disconnects, disabling smart connect created other problems, namely devices that connected fine before, now will lose connection if moved around.

Hola Caleb. El problema es el Kernel. Utiliza la herramienta Mainline kernels y cambia a una versión superior. Yo tenía ese mismo problema con el WiFi. Fuente: Mainline, instala versiones del kernel "mainline" en Ubuntu | Ubunlog

¡Buena suerte!

Check earlier in your logs, see if the device firmware loaded correctly.

journalctl -b

Then type /Microcode SW error detected. Is there a wifi firmware error shown?