You are not logged in.

#1 2026-10-05 01:10:31

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,183

netctl: unexpected authentication state: alg 57980 (expected 0) tra...

I use (or have been using) `netctl` to manage internet connections. Sometimes I have problems with name resolution, but usually that's all.

I was lazy and did not update Arch for a while, so I got a lot of updates last night. After rebooting, I can't get an internet connection (at least wifi) with `netctl`, though I can connect manually with `ip`, `wpa_supplicant` and `dhcpd`. I have not touched the `netctl` configuration files and I'm trying to connect to a wifi LAN I control, so I know that hasn't changed either. Since I can bring up a connection manually, it doesn't look like hardware, so I'm guessing the problem is something to do with `netctl` itself.

I had some difficulty stopping `netctl` to setup the manual connection, because `systemd` `.slice`s remained even after `stop`ping the services. I don't remember seeing these before, but perhaps I just failed to look. In the journal these appear early

Hyd 04 21:01:52 mycomputer systemd[1]: Created slice Slice /system/netctl-auto.
Hyd 04 21:01:52 mycomputer systemd[1]: Created slice Slice /system/netctl-ifplugd.

But I doubt that is relevant. The most relevant line in the journal may be

Hyd 04 21:46:40 mycomputer kernel: wlan0: 04:95:e6:63:96:91 unexpected authentication state: alg 57980 (expected 0) transact 2 (expected 2)

but I am not really sure I even understand the sequence since I seem to authenticate OK during startup, but with name resolution failing. Then later when I try to restart `netctl`, authentication fails. So, rather than guess what is relevant, I posted the journal to https://paste.c-net.org/WelcomeApproval.

Non-working `netctl` config in `/etc/netctl/networkdienw`:

Description='networkdienw'
Interface=wlan0
Connection=wireless
Security=wpa
IP=dhcp
ESSID='networkdienw'
Key=\"XXX

Working `wpa_supplicant.conf`:

network={
        ssid="networkdienw"
        #psk="pppp"
        psk=XXX
}

PS Despite having just logged in, when I try to submit, I'm told I'm not logged in ...


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#2 2026-10-05 07:30:55

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 78,144

Re: netctl: unexpected authentication state: alg 57980 (expected 0) tra...

Hyd 04 21:01:59 mycomputer kernel: wlan0: authenticate with 04:95:e6:63:96:8c (local address=f4:96:34:dc:aa:f5)
Hyd 04 21:02:01 mycomputer dhcpcd[1141]: wlan0: rebinding lease of 192.168.5.248
Hyd 04 21:02:09 mycomputer dhcpcd[1141]: wlan0: leased 192.168.5.248 for 86400 seconds
Hyd 04 21:02:13 mycomputer login[956]: LOGIN ON tty1 BY dienw
…
Hyd 04 21:37:45 mycomputer kernel: wlan0: disassociated from 04:95:e6:63:96:8c (Reason: 1=UNSPECIFIED)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Hyd 04 21:37:47 mycomputer kernel: wlan0: authenticate with 04:95:e6:63:96:81 (local address=f4:96:34:dc:aa:f5)
Hyd 04 21:37:47 mycomputer kernel: wlan0: send auth to 04:95:e6:63:96:81 (try 1/3)
Hyd 04 21:37:47 mycomputer kernel: wlan0: 04:95:e6:63:96:81 unexpected authentication state: alg 1 (expected 0) transact 2 (expected 2)
Hyd 04 21:37:47 mycomputer kernel: wlan0: send auth to 04:95:e6:63:96:81 (try 2/3)
Hyd 04 21:37:47 mycomputer kernel: wlan0: 04:95:e6:63:96:81 unexpected authentication state: alg 49920 (expected 0) transact 2 (expected 2)
Hyd 04 21:37:47 mycomputer kernel: wlan0: send auth to 04:95:e6:63:96:81 (try 3/3)
Hyd 04 21:37:47 mycomputer kernel: wlan0: authentication with 04:95:e6:63:96:81 timed out

You get a lease but then disasociated after ~35 minutes, then shit hits the fan

Hyd 04 21:46:35 mycomputer sudo[3874]:   dienw : TTY=pts/0 ; PWD=/home/dienw ; USER=root ; COMMAND=/usr/bin/systemctl restart netctl-auto@wlan0.service
Hyd 04 21:46:40 mycomputer kernel: wlan0: authenticate with 04:95:e6:63:96:91 (local address=f4:96:34:dc:aa:f5)
Hyd 04 21:46:40 mycomputer kernel: wlan0: send auth to 04:95:e6:63:96:91 (try 1/3)
Hyd 04 21:46:40 mycomputer kernel: wlan0: 04:95:e6:63:96:91 unexpected authentication state: alg 57980 (expected 0) transact 2 (expected 2)
Hyd 04 21:46:40 mycomputer kernel: wlan0: send auth to 04:95:e6:63:96:91 (try 2/3)
Hyd 04 21:46:40 mycomputer kernel: wlan0: 04:95:e6:63:96:91 denied authentication (status 17)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

You could utilize "Security=wpa-configsection", https://man.archlinux.org/man/netctl.profile.5.en but I assume the router is WPA2/WPA3 ?
Can you restrict that to WPA2 for a test?

Online

#3 2026-10-05 07:39:42

-thc
Member
Registered: 2017-03-15
Posts: 1,212

Re: netctl: unexpected authentication state: alg 57980 (expected 0) tra...

Why are there 3 different BSSID-MACs involved?

Associated and disassociated from "...:8c"
Timed out with "...:81"
Denied by "...:91"

2,4/5/6 GHz issue?

Last edited by -thc (2026-10-05 07:41:00)

Offline

#4 2026-10-05 07:55:05

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 78,144

Re: netctl: unexpected authentication state: alg 57980 (expected 0) tra...

Hyd 04 21:01:59 mycomputer kernel: wlan0: authenticate with 04:95:e6:63:96:8c (local address=f4:96:34:dc:aa:f5)
Hyd 04 21:01:59 mycomputer kernel: wlan0: send auth to 04:95:e6:63:96:8c (try 1/3)
Hyd 04 21:01:59 mycomputer kernel: wlan0: associate with 04:95:e6:63:96:8c (try 1/3)
Hyd 04 21:01:59 mycomputer kernel: wlan0: RX AssocResp from 04:95:e6:63:96:8c (capab=0x411 status=0 aid=3)
Hyd 04 21:01:59 mycomputer kernel: wlan0: Limiting TX power to 30 (30 - 0) dBm as advertised by 04:95:e6:63:96:8c
Hyd 04 21:37:45 mycomputer kernel: wlan0: disassociated from 04:95:e6:63:96:8c (Reason: 1=UNSPECIFIED)
Hyd 04 21:37:47 mycomputer kernel: wlan0: authenticate with 04:95:e6:63:96:81 (local address=f4:96:34:dc:aa:f5)
Hyd 04 21:37:47 mycomputer kernel: wlan0: send auth to 04:95:e6:63:96:81 (try 1/3)
Hyd 04 21:37:47 mycomputer kernel: wlan0: 04:95:e6:63:96:81 unexpected authentication state: alg 1 (expected 0) transact 2 (expected 2)
Hyd 04 21:37:47 mycomputer kernel: wlan0: send auth to 04:95:e6:63:96:81 (try 2/3)
Hyd 04 21:37:47 mycomputer kernel: wlan0: 04:95:e6:63:96:81 unexpected authentication state: alg 49920 (expected 0) transact 2 (expected 2)
Hyd 04 21:37:47 mycomputer kernel: wlan0: send auth to 04:95:e6:63:96:81 (try 3/3)
Hyd 04 21:37:47 mycomputer kernel: wlan0: authentication with 04:95:e6:63:96:81 timed out
Hyd 04 21:46:40 mycomputer kernel: wlan0: authenticate with 04:95:e6:63:96:91 (local address=f4:96:34:dc:aa:f5)
Hyd 04 21:46:40 mycomputer kernel: wlan0: send auth to 04:95:e6:63:96:91 (try 1/3)
Hyd 04 21:46:40 mycomputer kernel: wlan0: 04:95:e6:63:96:91 unexpected authentication state: alg 57980 (expected 0) transact 2 (expected 2)
Hyd 04 21:46:40 mycomputer kernel: wlan0: send auth to 04:95:e6:63:96:91 (try 2/3)
Hyd 04 21:46:40 mycomputer kernel: wlan0: 04:95:e6:63:96:91 denied authentication (status 17)
Hyd 04 22:30:05 mycomputer kernel: wlan0: authenticate with 04:95:e6:63:96:91 (local address=f4:96:34:dc:aa:f5)
Hyd 04 22:30:05 mycomputer kernel: wlan0: send auth to 04:95:e6:63:96:91 (try 1/3)
Hyd 04 22:30:05 mycomputer kernel: wlan0: 04:95:e6:63:96:91 unexpected authentication state: alg 34396 (expected 0) transact 2 (expected 2)
Hyd 04 22:30:05 mycomputer kernel: wlan0: send auth to 04:95:e6:63:96:91 (try 2/3)
Hyd 04 22:30:05 mycomputer kernel: wlan0: 04:95:e6:63:96:91 unexpected authentication state: alg 40656 (expected 0) transact 2 (expected 2)
Hyd 04 22:30:05 mycomputer kernel: wlan0: send auth to 04:95:e6:63:96:91 (try 3/3)
Hyd 04 22:30:05 mycomputer kernel: wlan0: 04:95:e6:63:96:91 unexpected authentication state: alg 62076 (expected 0) transact 2 (expected 2)
Hyd 04 22:30:05 mycomputer kernel: wlan0: authentication with 04:95:e6:63:96:91 timed out
Hyd 04 23:47:51 mycomputer kernel: wlan0: authenticate with 04:95:e6:63:96:8c (local address=f4:96:34:dc:aa:f5)
Hyd 04 23:47:51 mycomputer kernel: wlan0: send auth to 04:95:e6:63:96:8c (try 1/3)
Hyd 04 23:47:51 mycomputer kernel: wlan0: associate with 04:95:e6:63:96:8c (try 1/3)
Hyd 04 23:47:51 mycomputer kernel: wlan0: RX AssocResp from 04:95:e6:63:96:8c (capab=0x411 status=0 aid=3)
Hyd 04 23:47:51 mycomputer kernel: wlan0: Limiting TX power to 30 (30 - 0) dBm as advertised by 04:95:e6:63:96:8c
Hyd 04 23:51:47 mycomputer kernel: wlan0: deauthenticating from 04:95:e6:63:96:8c by local choice (Reason: 3=DEAUTH_LEAVING)
Hyd 04 23:53:10 mycomputer kernel: wlan0: authenticate with 04:95:e6:63:96:89 (local address=f4:96:34:dc:aa:f5)
Hyd 04 23:53:10 mycomputer kernel: wlan0: send auth to 04:95:e6:63:96:89 (try 1/3)
Hyd 04 23:53:10 mycomputer kernel: wlan0: 04:95:e6:63:96:89 unexpected authentication state: alg 436 (expected 0) transact 2 (expected 2)
Hyd 04 23:53:10 mycomputer kernel: wlan0: send auth to 04:95:e6:63:96:89 (try 2/3)
Hyd 04 23:53:10 mycomputer kernel: wlan0: 04:95:e6:63:96:89 unexpected authentication state: alg 1548 (expected 0) transact 2 (expected 2)
Hyd 04 23:53:10 mycomputer kernel: wlan0: send auth to 04:95:e6:63:96:89 (try 3/3)
Hyd 04 23:53:10 mycomputer kernel: wlan0: 04:95:e6:63:96:89 unexpected authentication state: alg 55676 (expected 0) transact 2 (expected 2)
Hyd 04 23:53:10 mycomputer kernel: wlan0: authentication with 04:95:e6:63:96:89 timed out
Hyd 05 00:01:17 mycomputer kernel: wlan0: authenticate with 04:95:e6:63:96:8c (local address=f4:96:34:dc:aa:f5)
Hyd 05 00:01:17 mycomputer kernel: wlan0: send auth to 04:95:e6:63:96:8c (try 1/3)
Hyd 05 00:01:17 mycomputer kernel: wlan0: associate with 04:95:e6:63:96:8c (try 1/3)
Hyd 05 00:01:17 mycomputer kernel: wlan0: RX AssocResp from 04:95:e6:63:96:8c (capab=0x411 status=0 aid=3)
Hyd 05 00:01:17 mycomputer kernel: wlan0: Limiting TX power to 30 (30 - 0) dBm as advertised by 04:95:e6:63:96:8c

Indeed and only 04:95:e6:63:96:8c seems to succeed no matter what.
=> Configure the BSSID?

Online

#5 2026-10-05 23:20:53

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,183

Re: netctl: unexpected authentication state: alg 57980 (expected 0) tra...

Thanks very much for helping.

seth wrote:

You could utilize "Security=wpa-configsection", https://man.archlinux.org/man/netctl.profile.5.en but I assume the router is WPA2/WPA3 ?
Can you restrict that to WPA2 for a test?

Do you mean in netctl? I don't think there's anything I can set on the router side.

-thc wrote:

Why are there 3 different BSSID-MACs involved?

Associated and disassociated from "...:8c"
Timed out with "...:81"
Denied by "...:91"

2,4/5/6 GHz issue?

There are 3 access points creating the LAN b/c otherwise the connections are patchy.

8c is the 5G wifi address (not a MAC address? The settings show other values for that?) for the AP closest to the laptop.

91 is the 2.4G wifi address for the next closest.
81 is the 2.4G addr for the third (actually the first, since it is connected to the broadband router).

Each of the 3 has multiple addresses, including 2.4G and 5G.

So I assume it always prefers the closest AP, since that's the best signal (when the laptop is on my desk, at least) and it makes sense to prefer 5G, though I'm not sure why it tries 2.4G for the others and 5G for only this one.

Seth wrote:

=> Configure the BSSID?

All 3 are configured to provide a single network and the laptop is configured to connect to the configured ESSID. At least, I am on epistemically thin ground here, but that was my understanding of how the devices were meant to work?

I don't understand why authentication fails for the others, even if it makes more sense to connect to the closest?

Last edited by cfr (2026-10-05 23:22:46)


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#6 Yesterday 05:34:28

-thc
Member
Registered: 2017-03-15
Posts: 1,212

Re: netctl: unexpected authentication state: alg 57980 (expected 0) tra...

cfr wrote:

There are 3 access points creating the LAN b/c otherwise the connections are patchy.

That a "wireless LAN" or WiFi actually. I always cringe at that.

cfr wrote:

8c is the 5G wifi address (not a MAC address? The settings show other values for that?) for the AP closest to the laptop.

You're right - it's "BSSID" only - "MAC" is misleading here. The BSSID is created by the AP and unrelated to any MAC address.
Since the SSID "networkdienw" is configured on multiple APs the BSSID shows which one the PC has chosen.

cfr wrote:

So I assume it always prefers the closest AP, since that's the best signal (when the laptop is on my desk, at least) and it makes sense to prefer 5G, though I'm not sure why it tries 2.4G for the others and 5G for only this one.

That's part of your problem - since you let your device "choose" the AP and the frequency it may fail for several reasons.

cfr wrote:

All 3 are configured to provide a single network and the laptop is configured to connect to the configured ESSID. At least, I am on epistemically thin ground here, but that was my understanding of how the devices were meant to work?

You can do that (configure multiple APs and their two frequencies with the exact same SSID and the exact same password) - if the device fails you're non the wiser why.

What seth meant is to pin the device to a fixed BSSID (for testing).

Last edited by -thc (Yesterday 05:35:00)

Offline

#7 Yesterday 07:05:41

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 78,144

Re: netctl: unexpected authentication state: alg 57980 (expected 0) tra...

I suspect what happens is that the connection to the "main" AP is lost but it doesn't realize that and when you want to connect to it through one of the proxies it tells you to go away because you're already connected.

Context: https://en.wikipedia.org/wiki/Wireless_ … ion_system
What does the setup/configuration exactly look like (ie. what extenders are involved and how to the communicate to each other and the router)?

Online

#8 Today 08:14:23

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,183

Re: netctl: unexpected authentication state: alg 57980 (expected 0) tra...

seth wrote:

I suspect what happens is that the connection to the "main" AP is lost but it doesn't realize that and when you want to connect to it through one of the proxies it tells you to go away because you're already connected.

Context: https://en.wikipedia.org/wiki/Wireless_ … ion_system
What does the setup/configuration exactly look like (ie. what extenders are involved and how to the communicate to each other and the router)?

It's a wireless mesh with 3 nodes. One is connected to the ISP's broadband router's ethernet. The other two are at more-or-less strategic locations around the house and connect wirelessly to the gateway node. This was recommended by one of the ISP's engineers, after dutifully reporting the company's official recommendation for poor signal.

4 devices connect to the mesh wirelessly: a PC, a printer, my laptop and an Android phone. The PC (Fedora so using networkmanager) and phone don't seem to have problems. They do not support 5G. The printer does have issues at times but, honestly, I think that's the printer. It is certainly better with the mesh than it was without.

The mesh configuration is rather less informative and rather less extensive than I would like. It seems possible only through an App. Aside from naming the nodes and setting the name and password, I mostly left things default. What information would you like? I don't mind typing out whatever will help, but if there is something I can look for, that would be nice.


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#9 Today 14:12:02

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 78,144

Re: netctl: unexpected authentication state: alg 57980 (expected 0) tra...

You're probably also not moving printer and PC around a lot wink

I mostly left things default. What information would you like?

Brand/model (or a link to the manual) and can you at all affect it's behavior at all (ie. does it use WDS at all or some other bridging/forwarding technique)

It also might help to switch between clientid and duid in /etc/dhcpcd.conf (while that's a wild guess, but we don't know why the router/proxies don't like you anymore itfp)

Did you btw. test the relevance of the actually used BSSID (ie. can the manual wpa_supplicant instance connect to 04:95:e6:63:96:81 or 04:95:e6:63:96:91 and/or does netctl succeed when returning to 04:95:e6:63:96:8c)?

Online

Board footer

Powered by FluxBB