You are not logged in.

#26 2022-01-10 10:14:42

mcloaked
Member
From: Yorkshire, UK
Registered: 2012-02-02
Posts: 1,222

Re: [SOLVED] iwd frequent disconnects (iwlwifi 0000:02:00.0: Unhandled alg

Testing more today I got a connection loss that re-established itself - the journal entries relevant are:

Jan 10 10:02:16 lenovo2 kernel: wlan0: AP xx:xx:xx:xx:xx:xx changed bandwidth, new config is 2437.000 MHz, width 2 (2427.000/0 MHz)
Jan 10 10:03:06 lenovo2 systemd-networkd[701]: wlan0: Lost carrier
Jan 10 10:03:06 lenovo2 systemd-networkd[701]: wlan0: Failed to send DHCP RELEASE, ignoring: Operation not permitted
Jan 10 10:03:06 lenovo2 systemd-networkd[701]: wlan0: DHCP lease lost
Jan 10 10:03:07 lenovo2 iwd[700]: Received Deauthentication event, reason: 4, from_ap: false
Jan 10 10:03:07 lenovo2 dbus-daemon[664]: [system] Activating via systemd: service name='org.freedesktop.hostname1' unit='dbus-org.freedesktop.hostname1.service' requested by ':1.3' (uid=193 pid=701 comm="/usr/lib/systemd/systemd-networkd " label="kernel")
Jan 10 10:03:07 lenovo2 audit: BPF prog-id=51 op=LOAD
Jan 10 10:03:07 lenovo2 audit: BPF prog-id=52 op=LOAD
Jan 10 10:03:07 lenovo2 audit: BPF prog-id=53 op=LOAD
Jan 10 10:03:07 lenovo2 kernel: audit: type=1334 audit(1641808987.022:234): prog-id=51 op=LOAD
Jan 10 10:03:07 lenovo2 kernel: audit: type=1334 audit(1641808987.022:235): prog-id=52 op=LOAD
Jan 10 10:03:07 lenovo2 kernel: audit: type=1334 audit(1641808987.022:236): prog-id=53 op=LOAD
Jan 10 10:03:07 lenovo2 systemd[1]: Starting Hostname Service...
Jan 10 10:03:07 lenovo2 systemd-networkd[701]: wlan0: DHCPv6 lease lost
Jan 10 10:03:07 lenovo2 systemd-timesyncd[509]: No network connectivity, watching for changes.
Jan 10 10:03:07 lenovo2 dbus-daemon[664]: [system] Successfully activated service 'org.freedesktop.hostname1'
Jan 10 10:03:07 lenovo2 systemd[1]: Started Hostname Service.
Jan 10 10:03:07 lenovo2 audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 subj=kernel msg='unit=systemd-hostnamed comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Jan 10 10:03:07 lenovo2 kernel: audit: type=1130 audit(1641808987.064:237): pid=1 uid=0 auid=4294967295 ses=4294967295 subj=kernel msg='unit=systemd-hostnamed comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Jan 10 10:03:07 lenovo2 systemd-hostnamed[3032]: Hostname set to <lenovo2> (static)
Jan 10 10:03:07 lenovo2 kernel: wlan0: authenticate with xx:xx:xx:xx:xx:xx
Jan 10 10:03:07 lenovo2 kernel: wlan0: send auth to xx:xx:xx:xx:xx:xx (try 1/3)
Jan 10 10:03:07 lenovo2 kernel: wlan0: authenticated
Jan 10 10:03:07 lenovo2 kernel: wlan0: associate with xx:xx:xx:xx:xx:xx (try 1/3)
Jan 10 10:03:07 lenovo2 kernel: wlan0: RX AssocResp from 1xx:xx:xx:xx:xx:xx (capab=0x1431 status=0 aid=7)
Jan 10 10:03:07 lenovo2 systemd-networkd[701]: wlan0: Connected WiFi access point: mike-guest (xx:xx:xx:xx:xx:xx)
Jan 10 10:03:07 lenovo2 kernel: wlan0: associated
Jan 10 10:03:07 lenovo2 systemd-networkd[701]: wlan0: Gained carrier

Mike C

Offline

#27 2022-01-11 18:19:04

jprestwo
Member
Registered: 2022-01-06
Posts: 31

Re: [SOLVED] iwd frequent disconnects (iwlwifi 0000:02:00.0: Unhandled alg

mcloaked,

Thank you for the logs, but I don't see any deauths for IWD at least in those logs... There was a bunch of roaming which all was fine (some failed but this is due to no better BSS candidates, totally normal). Nothing really seems wrong from what I can tell.

One thing to note is wpa_supplicant never roamed in those logs you posted so that could be the differentiating factor as far as how both supplicants are interacting with the card. The fact you were seeing those strange "Unhandled Alg" prints tells me the firmware is not behaving right. No idea if roaming could have something to do with it or not. I would at least let linux-wireless know about this behavior with iwlwifi and maybe someone on the driver/FW team could give some insight.

If you happen to get iwmon logs when IWD deauths I'm happy to take another look.

Offline

#28 2022-01-12 11:25:57

mcloaked
Member
From: Yorkshire, UK
Registered: 2012-02-02
Posts: 1,222

Re: [SOLVED] iwd frequent disconnects (iwlwifi 0000:02:00.0: Unhandled alg

I wonder if there are any parameters for iwd itself that might help - there is a good list of options in the output of 'man iwd.config' including some concerning roaming thresholds. such a 'RoamThreshold'


Mike C

Offline

#29 2022-01-12 21:49:12

jprestwo
Member
Registered: 2022-01-06
Posts: 31

Re: [SOLVED] iwd frequent disconnects (iwlwifi 0000:02:00.0: Unhandled alg

mcloaked wrote:

I wonder if there are any parameters for iwd itself that might help - there is a good list of options in the output of 'man iwd.config' including some concerning roaming thresholds. such a 'RoamThreshold'

You can play with RoamThreshold[5G] to make roaming initiated by IWD less sensitive. Problem is this won't effect roaming if the AP requests it. Currently IWD has no switches to turn this off or alter the behavior. IWD assumes if the AP wants us to roam its for a good reason (high load, low signal, AP going down, etc.).

Offline

#30 2022-01-27 17:54:43

mcloaked
Member
From: Yorkshire, UK
Registered: 2012-02-02
Posts: 1,222

Re: [SOLVED] iwd frequent disconnects (iwlwifi 0000:02:00.0: Unhandled alg

I have been tinkering with various settings and looking up more suggestions about the wifi disconnect issues.  After changing the systemd-networkd network files to change from the old [DHCP] stanza to [DHCPV4] and using a separate route metric for ipv4 and i[pv6, by adding a section:

[IPv6AcceptRA]
RouteMetric=512

this still led to occasional disconnection events. However checking the logs for potentially more relevant  lines I did note that disconnections were preceded by log lines like:

Jan 27 15:09:49 lenovo2 kernel: wlan0: AP xx:xx:xx:xx:xx:xx changed bandwidth, new config is 2437.000 MHz, width 2 (2427.000/0 MHz)

So I was trying understand if the bandwidth switching  initiated by the router might lead to loss of stable wireless connection, and I did find references/postings from the past to Access Points switching between 20MHz and 40MHz on 2.4GHz causing problems with stability. So I changed the settings on the router, so that the bandwidth for the 2.4GHz wireless connections is now fixed at 20MHz only.   In addition I set the 5GHz bandwidth to 80MHz rather than allowing all bandwidth options. Also  the 2.4MHz ssid setting is for N only and the 5GHz ssid has AC only one one router, (but a second router allows different modes on 5GHz) instead of allowing multiple modes as it was set before. The laptop I am using only has 2.4GHz capability, and after making that change I have had no loss of connection events at all.  I will run a soak test on a different laptop, that has both 2.4 and 5GHz, over the next few days to see if these changes do finally resolve this issue. Also after the iwd update to 1.22 there was also no improvement (and 1.23 is in [testing] at the moment too). I will report further after a long period connected to see if the bandwidth changed setting on the router has resolved the issue for me, or not.

Edit: I have now also been testing the 5GHz connection and it too is now very stable.

Last edited by mcloaked (2022-01-27 20:13:01)


Mike C

Offline

#31 2022-01-28 10:45:39

mcloaked
Member
From: Yorkshire, UK
Registered: 2012-02-02
Posts: 1,222

Re: [SOLVED] iwd frequent disconnects (iwlwifi 0000:02:00.0: Unhandled alg

Having tested three different laptops now - one with both 2.4GHz and 5GHz wireless capability, and two that can only connect on the 2.4GHz band, I have had not a single disconnection event since running tests with fixed AP bandwidths.  It therefore looks like the origin of the problems was not in iwd, or systemd-networkd, or the wifi drivers, or in any configs in the arch linux system, and with wireless chips that are all different in each of the three machines.  Certainly updating the config files for systemd-networkd, and removing the hacks in the wireless driver settings, can't do any harm, but the key to resolving this looks like it was all down to changing the routers' (access points), wireless settings from multiple bandwidth modes to single bandwidth only for both the wifi bands, and that alone appears to have led to stable wireless connections for me. Does making the same change for the original poster's system also lead to a solution?

Last edited by mcloaked (2022-01-28 10:48:04)


Mike C

Offline

#32 2022-02-02 19:11:16

evofabs67
Member
Registered: 2022-01-05
Posts: 7

Re: [SOLVED] iwd frequent disconnects (iwlwifi 0000:02:00.0: Unhandled alg

Thanks. I will try your suggestion @mcloaked and report back when I have enough data.

Edit: This also has not worked, I am still getting dropped connections and kernel iwlwifi errors. Not sure what there is left to do other than switch to wpa_supplicant for now...

Edit 2: So iwd is now in version 1.25 and I got a new router + access points for my house and the issue is now gone. Maybe it was my network setup after all but it is still weird to me that the issue wasn't present with wpa_supplicant and the old setup but who knows. Thanks to everyone who tried to help, I'm marking this as solved.

Last edited by evofabs67 (2022-03-14 10:42:23)

Offline

Board footer

Powered by FluxBB