Wifi disconnects randomly

My wifi connection randomly drops when in Manjaro KDE when the 5.4 LTS kernel is loaded.
I only experince this with Manjaro KDE, not with other distros .
When it brakes it displays a KDE popup window , asking for the password.
It seems kernels 5.8 and 5.9 does not produce this .
My wifi router is set to use atomatic for channel select.

I found only these related so far:

t/wifi-frequently-disconnects-and-prompts-me-for-the-password/37498
t/wifi-connection-randomly-disconnects/35520

Please advise

nov 17 12:01:01 dell6540-manjaro CROND[15315]: (root) CMD (run-parts /etc/cron.hourly)
nov 17 12:02:16 dell6540-manjaro wpa_supplicant[760]: wlp3s0: WPA: Group rekeying completed with 10:62:eb:44:66:9d [GTK=TKIP]
nov 17 12:02:17 dell6540-manjaro wpa_supplicant[760]: wlp3s0: WPA: Group rekeying completed with 10:62:eb:44:66:9d [GTK=TKIP]
nov 17 12:02:18 dell6540-manjaro wpa_supplicant[760]: wlp3s0: WPA: Group rekeying completed with 10:62:eb:44:66:9d [GTK=TKIP]
nov 17 12:02:19 dell6540-manjaro wpa_supplicant[760]: wlp3s0: WPA: Group rekeying completed with 10:62:eb:44:66:9d [GTK=TKIP]
nov 17 12:02:20 dell6540-manjaro wpa_supplicant[760]: wlp3s0: Reject scan trigger since one is already pending
nov 17 12:02:20 dell6540-manjaro wpa_supplicant[760]: wlp3s0: WPA: Group rekeying completed with 10:62:eb:44:66:9d [GTK=TKIP]
nov 17 12:02:21 dell6540-manjaro wpa_supplicant[760]: wlp3s0: WPA: Group rekeying completed with 10:62:eb:44:66:9d [GTK=TKIP]
nov 17 12:02:23 dell6540-manjaro kernel: wlp3s0: deauthenticated from 10:62:eb:44:66:9d (Reason: 1=UNSPECIFIED)
nov 17 12:02:23 dell6540-manjaro wpa_supplicant[760]: wlp3s0: CTRL-EVENT-DISCONNECTED bssid=10:62:eb:44:66:9d reason=1
nov 17 12:02:23 dell6540-manjaro wpa_supplicant[760]: wlp3s0: SME: Trying to authenticate with 10:62:eb:44:66:9d (SSID='MISZTI' freq=2412 MHz)
nov 17 12:02:23 dell6540-manjaro kernel: wlp3s0: authenticate with 10:62:eb:44:66:9d
nov 17 12:02:23 dell6540-manjaro kernel: wlp3s0: send auth to 10:62:eb:44:66:9d (try 1/3)
nov 17 12:02:23 dell6540-manjaro wpa_supplicant[760]: wlp3s0: CTRL-EVENT-REGDOM-CHANGE init=CORE type=WORLD
nov 17 12:02:23 dell6540-manjaro NetworkManager[536]: <info>  [1605610943.2432] device (wlp3s0): supplicant interface state: completed -> authenticating
nov 17 12:02:23 dell6540-manjaro wpa_supplicant[760]: wlp3s0: Trying to associate with 10:62:eb:44:66:9d (SSID='MISZTI' freq=2412 MHz)
nov 17 12:02:23 dell6540-manjaro kernel: wlp3s0: authenticated
nov 17 12:02:23 dell6540-manjaro kernel: wlp3s0: associate with 10:62:eb:44:66:9d (try 1/3)
nov 17 12:02:23 dell6540-manjaro NetworkManager[536]: <info>  [1605610943.2492] device (wlp3s0): supplicant interface state: authenticating -> associating
nov 17 12:02:23 dell6540-manjaro kernel: wlp3s0: RX AssocResp from 10:62:eb:44:66:9d (capab=0x411 status=0 aid=6)
nov 17 12:02:23 dell6540-manjaro wpa_supplicant[760]: wlp3s0: Associated with 10:62:eb:44:66:9d
nov 17 12:02:23 dell6540-manjaro wpa_supplicant[760]: wlp3s0: CTRL-EVENT-SUBNET-STATUS-UPDATE status=0
nov 17 12:02:23 dell6540-manjaro kernel: wlp3s0: associated
nov 17 12:02:23 dell6540-manjaro wpa_supplicant[760]: l2_packet_send - sendto: No buffer space available
nov 17 12:02:23 dell6540-manjaro kernel: wlp3s0: deauthenticating from 10:62:eb:44:66:9d by local choice (Reason: 1=UNSPECIFIED)
nov 17 12:02:23 dell6540-manjaro wpa_supplicant[760]: wlp3s0: CTRL-EVENT-DISCONNECTED bssid=10:62:eb:44:66:9d reason=1 locally_generated=1
nov 17 12:02:23 dell6540-manjaro wpa_supplicant[760]: wlp3s0: WPA: 4-Way Handshake failed - pre-shared key may be incorrect
nov 17 12:02:23 dell6540-manjaro wpa_supplicant[760]: wlp3s0: CTRL-EVENT-SSID-TEMP-DISABLED id=0 ssid="MISZTI" auth_failures=1 duration=10 reason=WRONG_KEY
nov 17 12:02:23 dell6540-manjaro wpa_supplicant[760]: wlp3s0: CTRL-EVENT-REGDOM-CHANGE init=CORE type=WORLD
nov 17 12:02:23 dell6540-manjaro NetworkManager[536]: <info>  [1605610943.3049] device (wlp3s0): supplicant interface state: associating -> 4way_handshake
nov 17 12:02:23 dell6540-manjaro NetworkManager[536]: <info>  [1605610943.3102] device (wlp3s0): supplicant interface state: 4way_handshake -> disconnected
nov 17 12:02:23 dell6540-manjaro NetworkManager[536]: <info>  [1605610943.3121] device (wlp3s0): Activation: (wifi) disconnected during association, asking for new key
nov 17 12:02:23 dell6540-manjaro NetworkManager[536]: <info>  [1605610943.3123] device (wlp3s0): state change: activated -> need-auth (reason 'supplicant-disconnect', sys-iface-state: 'managed')
nov 17 12:02:23 dell6540-manjaro NetworkManager[536]: <info>  [1605610943.3276] dhcp4 (wlp3s0): canceled DHCP transaction
nov 17 12:02:23 dell6540-manjaro NetworkManager[536]: <info>  [1605610943.3276] dhcp4 (wlp3s0): state changed bound -> done
nov 17 12:02:23 dell6540-manjaro NetworkManager[536]: <info>  [1605610943.3283] manager: NetworkManager state is now CONNECTING
nov 17 12:02:23 dell6540-manjaro dbus-daemon[535]: [system] Activating via systemd: service name='org.freedesktop.nm_dispatcher' unit='dbus-org.freedesktop.nm-dispatcher.service' requested by ':1.5' (uid=0 pid=536 comm="/usr/bin/NetworkManager --no-daemon " label="unconfined")
nov 17 12:02:23 dell6540-manjaro systemd[1]: Starting Network Manager Script Dispatcher Service...
nov 17 12:02:23 dell6540-manjaro dbus-daemon[535]: [system] Successfully activated service 'org.freedesktop.nm_dispatcher'
nov 17 12:02:23 dell6540-manjaro audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 subj==unconfined msg='unit=NetworkManager-dispatcher comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
nov 17 12:02:23 dell6540-manjaro systemd[1]: Started Network Manager Script Dispatcher Service.
nov 17 12:02:23 dell6540-manjaro kernel: audit: type=1130 audit(1605610943.342:86): pid=1 uid=0 auid=4294967295 ses=4294967295 subj==unconfined msg='unit=NetworkManager-dispatcher comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
nov 17 12:02:23 dell6540-manjaro kded5[959]: plasma-nm: Unhandled active connection state change:  1
nov 17 12:02:23 dell6540-manjaro kded5[959]: plasma-nm: virtual NMVariantMapMap SecretAgent::GetSecrets(const NMVariantMapMap&, const QDBusObjectPath&, const QString&, const QStringList&, uint)
nov 17 12:02:23 dell6540-manjaro kded5[959]: plasma-nm: Path: "/org/freedesktop/NetworkManager/Settings/6"
nov 17 12:02:23 dell6540-manjaro kded5[959]: plasma-nm: Setting name: "802-11-wireless-security"
nov 17 12:02:23 dell6540-manjaro kded5[959]: plasma-nm: Hints: ()
nov 17 12:02:23 dell6540-manjaro kded5[959]: plasma-nm: Flags: 3
nov 17 12:02:23 dell6540-manjaro NetworkManager[536]: <info>  [1605610943.4097] device (wlp3s0): supplicant interface state: disconnected -> inactive

I checked also the arch wikis

https://wiki.archlinux.org/index.php/Network_configuration/Wireless
https://wiki.archlinux.org/index.php/wpa_supplicant

and found this:

Password-related problems
wpa_supplicant may not work properly if directly passed via stdin particularly long or complex passphrases which include special characters. This may lead to errors such as failed 4-way WPA handshake, PSK may be wrong when launching wpa_supplicant.

In order to solve this try using here strings wpa_passphrase <<< “” or passing a file to the -c flag instead:

wpa_supplicant -i -c /etc/wpa_supplicant/example.conf

In some instances it was found that storing the passphrase cleartext in the psk key of the wpa_supplicant.conf network block gave positive results (see [2]). However, this approach is rather insecure. Using wpa_cli to create this file instead of manually writing it gives the best results most of the time and therefore is the recommended way to proceed.

I use the option "Store password for this user only encrypted " in KDE Wallet.

Hi @laosom,
Please post the output of the following command in the terminal: inxi -N.

Regards

Hi j8a

I tried with the recommended configuration in /etc/NetworkManager/conf.d/wifi_rand_mac.conf
but wifi breaks with the same errors.

lali@dell6540-manjaro:~$ inxi -N
Network: Device-1: Intel Ethernet I217-LM driver: e1000e
Device-2: Intel Centrino Advanced-N 6235 driver: iwlwifi

I am testing this on 2 laptops. On another one it disconnected onyl once if I remember correctly.

That one is:

[lali@latitudee6500 ~]$ inxi -N
Network: Device-1: Intel 82567LM Gigabit Network driver: e1000e
Device-2: Intel WiFi Link 5100 driver: iwlwifi

Althouh I am unsure if it is really kernel related,
the annoying is, that kernel updates in the 5.4 LTS series do not make any difference or fix.
I did not experince it with 5.7 5.8 5.9 kernels so far, but I wonder what is wrong with it.
Ubuntu based distros are fine with 5.4.
I even tried to create additional users to be sure the kde config files are not messed up,
but I am unsure about the results. It seems more stable though.
I haven’t tested it with my original user and not encrypted password (clear text ).
I would like to understand the wpa errors and the possible fixes.

Hi, @laosom
Please, can you check from the terminal that the linux-firmware is installed on your system?
sudo pacman -Qi linux-firmware
The output may look like this:
Name : linux-firmware Version : 20201113.r1774.2ea8667-1 Description : Firmware files for Linux (Manjaro Overlay Package) Architecture : any URL : https://git.kernel.org/?p=linux/kernel/git/firmware/linux-firmware.git;a=summary Licenses : GPL2 GPL3 custom Groups : None Provides : None Depends On : None Optional Deps : None Required By : linux419 linux54 Optional For : None Conflicts With : linux-firmware-git kernel26-firmware ar9170-fw iwlwifi-1000-ucode iwlwifi-3945-ucode iwlwifi-4965-ucode iwlwifi-5000-ucode iwlwifi-5150-ucode iwlwifi-6000-ucode rt2870usb-fw rt2x00-rt61-fw rt2x00-rt71w-fw Replaces : kernel26-firmware ar9170-fw iwlwifi-1000-ucode iwlwifi-3945-ucode iwlwifi-4965-ucode iwlwifi-5000-ucode iwlwifi-5150-ucode iwlwifi-6000-ucode rt2870usb-fw rt2x00-rt61-fw rt2x00-rt71w-fw Installed Size : 603,01 MiB Packager : Helmut Stult <helmut@manjaro.org> Build Date : vie 13 nov 2020 13:14:13 Install Date : jue 19 nov 2020 09:01:51 Install Reason : Explicitly installed Install Script : No Validated By : Signature
Just in case either you have no output or it is not installed run the following command on the terminal:
sudo pacman -S linux-firmware

Hope it help, regards

Hi j8a,

Yes I have:

lali@dell6540-manjaro:~$ sudo pacman -Qi linux-firmware
Name : linux-firmware
Version : 20201113.r1774.2ea8667-1
Description : Firmware files for Linux (Manjaro Overlay Package)
Architecture : any
URL : https://git.kernel.org/?p=linux/kernel/git/firmware/linux-firmware.git;a=summary
Licenses : GPL2 GPL3 custom
Groups : None
Provides : None
Depends On : None
Optional Deps : None
Required By : linux419 linux54 linux58 linux59
Optional For : None
Conflicts With : linux-firmware-git kernel26-firmware ar9170-fw iwlwifi-1000-ucode iwlwifi-3945-ucode iwlwifi-4965-ucode iwlwifi-5000-ucode iwlwifi-5150-ucode iwlwifi-6000-ucode rt2870usb-fw rt2x00-rt61-fw rt2x00-rt71w-fw
Replaces : kernel26-firmware ar9170-fw iwlwifi-1000-ucode iwlwifi-3945-ucode iwlwifi-4965-ucode iwlwifi-5000-ucode iwlwifi-5150-ucode iwlwifi-6000-ucode rt2870usb-fw rt2x00-rt61-fw rt2x00-rt71w-fw
Installed Size : 603,01 MiB
Packager : Helmut Stult helmut@manjaro.org
Build Date : 2020. nov. 13., péntek, 17:14:13 CET
Install Date : 2020. nov. 18., szerda, 17:27:36 CET
Install Reason : Installed as a dependency for another package
Install Script : No
Validated By : Signature

lali@dell6540-manjaro:~$ grep -i linux-firmware /var/log/pacman.log
[2020-08-11T15:30:54+0200] [ALPM] upgraded linux-firmware (20200519.r1641.8ba6fa6-1 -> 20200716.r1675.1d1c80b-1)
[2020-08-16T16:55:47+0200] [ALPM] upgraded linux-firmware (20200716.r1675.1d1c80b-1 -> 20200807.r1689.c331aa9-1)
[2020-08-27T20:12:01+0200] [ALPM] upgraded linux-firmware (20200807.r1689.c331aa9-1 -> 20200817.r1695.7a30af1-1)
[2020-09-08T20:11:28+0200] [ALPM] upgraded linux-firmware (20200817.r1695.7a30af1-1 -> 20200901.r1699.d5f9eea-1)
[2020-10-04T20:28:17+0200] [ALPM] upgraded linux-firmware (20200901.r1699.d5f9eea-1 -> 20200923.r1716.afbfb5f-1)
[2020-10-20T08:08:59+0200] [ALPM] upgraded linux-firmware (20200923.r1716.afbfb5f-1 -> 20201005.r1732.58d41d0-1)
[2020-11-05T18:36:25+0100] [ALPM] upgraded linux-firmware (20201005.r1732.58d41d0-1 -> 20201023.r1747.dae4b4c-1)
[2020-11-18T17:27:36+0100] [ALPM] upgraded linux-firmware (20201023.r1747.dae4b4c-1 -> 20201113.r1774.2ea8667-1)
lali@dell6540-manjaro:~$

Hi @laosom,
I read the wiki Arch posts and I suggest you to consider the following:

Create an wpa supplicant interface with:
sudo wpa_supplicant -i -c /etc/wpa_supplicant/wlp3s0.conf

Then, with a text editor open example.conf and write the text.
network={
ssid=“MISZTI”
psk=“I do not know your passphrase”
}

Save, and rerun wpa_supplicant.

Hope it helps, regards

Hi Javier,

Would you explain why that would help ?
I use NetworkManager and KDE wallet to store the password ecrypted.

Hi, @laosom
Please, take a look at this post.
`` `https://forum.manjaro.org/t/wifi-disconnects-randomly/38077/9```
Maybe, you could find the answer to your question reading the wiki archlinux posts.
Regards