I’m trying to connect to my router with wpa_supplicant, but this is what it outputs after a few minutes:
wlan1: SME: Trying to authenticate with "bssid_1" (SSID='ssid_1' freq=2437 MHz)
wlan1: CTRL-EVENT-DISCONNECTED bssid="bssid_1" reason=1 locally_generated=1
wlan1: Trying to associate with "bssid_1" (SSID='ssid_1' freq=2437 MHz)
wlan1: Associated with "bssid_1"
wlan1: CTRL-EVENT-SUBNET-STATUS-UPDATE status=0
WPA: No PMK set for PTK derivation
wlan1: CTRL-EVENT-DISCONNECTED bssid="bssid_1" reason=1 locally_generated=1
wlan1: SME: Trying to authenticate with "bssid_2" (SSID='ssid_1' freq=2437 MHz)
wlan1: SME: Authentication request to the driver failed
wlan1: No network configuration found for the current AP
wlan1: CTRL-EVENT-DISCONNECTED bssid="bssid_3" reason=3 locally_generated=1
wlan1: CTRL-EVENT-SUBNET-STATUS-UPDATE status=0
wlan1: SME: Trying to authenticate with "bssid_4" (SSID='ssid_1' freq=2412 MHz)
wlan1: Trying to associate with "bssid_4" (SSID='ssid_1' freq=2412 MHz)
wlan1: Associated with "bssid_4"
wlan1: CTRL-EVENT-SUBNET-STATUS-UPDATE status=0
wlan1: Authentication with "bssid_4" timed out.
wlan1: CTRL-EVENT-DISCONNECTED bssid="bssid_4" reason=3 locally_generated=1
wlan1: WPA: 4-Way Handshake failed - pre-shared key may be incorrect
wlan1: CTRL-EVENT-SSID-TEMP-DISABLED id=0 ssid="ssid_1" auth_failures=1 duration=10 reason=WRONG_KEY
wlan1: No network configuration found for the current AP
wlan1: CTRL-EVENT-DISCONNECTED bssid="bssid_5" reason=3 locally_generated=1
wlan1: CTRL-EVENT-SUBNET-STATUS-UPDATE status=0
wlan1: CTRL-EVENT-SSID-REENABLED id=0 ssid="ssid_1"
wlan1: SME: Trying to authenticate with "bssid_1" (SSID='ssid_1' freq=2437 MHz)
wlan1: Trying to associate with "bssid_1" (SSID='ssid_1' freq=2437 MHz)
wlan1: Associated with "bssid_1"
wlan1: CTRL-EVENT-SUBNET-STATUS-UPDATE status=0
wlan1: Authentication with "bssid_1" timed out.
wlan1: CTRL-EVENT-DISCONNECTED bssid="bssid_1" reason=3 locally_generated=1
wlan1: WPA: 4-Way Handshake failed - pre-shared key may be incorrect
wlan1: CTRL-EVENT-SSID-TEMP-DISABLED id=0 ssid="ssid_1" auth_failures=2 duration=23 reason=WRONG_KEY
wlan1: CTRL-EVENT-SSID-TEMP-DISABLED id=0 ssid="ssid_1" auth_failures=3 duration=46 reason=CONN_FAILED
wlan1: No network configuration found for the current AP
wlan1: CTRL-EVENT-DISCONNECTED bssid="bssid_3" reason=3 locally_generated=1
wlan1: CTRL-EVENT-SUBNET-STATUS-UPDATE status=0
wlan1: CTRL-EVENT-SSID-REENABLED id=0 ssid="ssid_1"
wlan1: SME: Trying to authenticate with "bssid_2" (SSID='ssid_1' freq=2437 MHz)
wlan1: Trying to associate with "bssid_2" (SSID='ssid_1' freq=2437 MHz)
wlan1: Associated with "bssid_2"
wlan1: CTRL-EVENT-SUBNET-STATUS-UPDATE status=0
wlan1: Authentication with "bssid_2" timed out.
wlan1: CTRL-EVENT-DISCONNECTED bssid="bssid_2" reason=3 locally_generated=1
wlan1: WPA: 4-Way Handshake failed - pre-shared key may be incorrect
wlan1: CTRL-EVENT-SSID-TEMP-DISABLED id=0 ssid="ssid_1" auth_failures=4 duration=77 reason=WRONG_KEY
wlan1: No network configuration found for the current AP
wlan1: CTRL-EVENT-DISCONNECTED bssid="bssid_3" reason=3 locally_generated=1
wlan1: CTRL-EVENT-SUBNET-STATUS-UPDATE status=0
Please use code tags around the output you post to make it easier to read.
where should such tags be
These are code tags, click on them:
Alternatively using markdown syntax, you can use three backticks like:
```
code
```
1 Like
Changed the first post to include backticks around the output.
I’m not sure why one uses wpa_supplicant? Doesn’t NetworkManager automatically do the job?
I’m no expert on this, but I assume networkmanager is using wpa_supplicant to do the work.
2 Likes
Yes, Network Manager uses wpa_supplicant or (and this is still experimental last time I looked) iwd.
1 Like
@endeavourosuser
I use iwd instead of wpa_supplicant since a while back. It works quite well in all may installs. If you want to try, here are the steps:
sudo pacman -Syu
sudo pacman -S iwd
Create the file iwd.conf
sudo nano /etc/NetworkManager/conf.d/iwd.conf
Copy and paste the following and save the file:
[device]
wifi.backend=iwd
sudo systemctl stop wpa_supplicant
sudo systemctl enable --now iwd
sudo systemctl restart NetworkManager
If your wifi works, then:
sudo systemctl mask wpa_supplicant
Hope this helps!
Edit: correcting typo
2 Likes
I’ve used both backends with NetworkManager. There doesn’t seem to be any difference performance wise. It either connects or it doesn’t. I wonder whether the router was in the middle of an update over the network. Mine does that occasionally, usually in the “small hours”. Just a thought…
Perhaps not noticeable to “human senses”. Here is what ArchWiki says about iwd:
The core goal of the project is to optimize resource utilization by not depending on any external libraries and instead utilizing features provided by the Linux Kernel to the maximum extent possible.
In a way of some sort of comparison:
pactree iwd
iwd
├─glibc
│ ├─linux-api-headers provides linux-api-headers>=4.10
│ ├─tzdata
│ └─filesystem
│ └─iana-etc
├─readline
│ ├─glibc
│ ├─ncurses
│ │ ├─glibc
│ │ └─gcc-libs
│ │ └─glibc provides glibc>=2.27
│ └─ncurses provides libncursesw.so=6-64
├─readline provides libreadline.so=8-64
└─ell
└─gcc-libs
pactree wpa_supplicant
wpa_supplicant
├─openssl
│ └─glibc
│ ├─linux-api-headers provides linux-api-headers>=4.10
│ ├─tzdata
│ └─filesystem
│ └─iana-etc
├─dbus provides libdbus
│ ├─systemd-libs
│ │ ├─glibc
│ │ ├─libcap
│ │ │ ├─glibc
│ │ │ └─pam
│ │ │ ├─glibc
│ │ │ ├─libtirpc
│ │ │ │ └─krb5
│ │ │ │ ├─glibc
│ │ │ │ ├─e2fsprogs
│ │ │ │ │ ├─bash provides sh
│ │ │ │ │ │ ├─readline
│ │ │ │ │ │ │ ├─glibc
│ │ │ │ │ │ │ ├─ncurses
│ │ │ │ │ │ │ │ ├─glibc
│ │ │ │ │ │ │ │ └─gcc-libs
│ │ │ │ │ │ │ │ └─glibc provides glibc>=2.27
│ │ │ │ │ │ │ └─ncurses provides libncursesw.so=6-64
│ │ │ │ │ │ ├─readline provides libreadline.so=8-64
│ │ │ │ │ │ ├─glibc
│ │ │ │ │ │ └─ncurses
│ │ │ │ │ └─util-linux-libs
│ │ │ │ ├─libldap
│ │ │ │ │ ├─libsasl
│ │ │ │ │ │ └─openssl
│ │ │ │ │ └─e2fsprogs
│ │ │ │ ├─keyutils
│ │ │ │ │ ├─glibc
│ │ │ │ │ └─bash provides sh
│ │ │ │ ├─keyutils provides libkeyutils.so=1-64
│ │ │ │ ├─e2fsprogs provides libss.so=2-64
│ │ │ │ └─e2fsprogs provides libcom_err.so=2-64
│ │ │ ├─pambase
│ │ │ ├─audit
│ │ │ │ ├─glibc
│ │ │ │ ├─krb5
│ │ │ │ ├─krb5 provides libkrb5.so=3-64
│ │ │ │ ├─krb5 provides libgssapi_krb5.so=2-64
│ │ │ │ ├─libcap-ng
│ │ │ │ │ └─glibc
│ │ │ │ └─libcap-ng provides libcap-ng.so=0-64
│ │ │ ├─audit provides libaudit.so=1-64
│ │ │ ├─libxcrypt
│ │ │ │ └─glibc
│ │ │ └─libxcrypt provides libcrypt.so=2-64
│ │ ├─libgcrypt
│ │ │ └─libgpg-error
│ │ │ ├─glibc
│ │ │ └─bash provides sh
│ │ ├─libp11-kit
│ │ │ ├─glibc
│ │ │ ├─libtasn1
│ │ │ │ └─glibc
│ │ │ └─libffi
│ │ │ └─glibc
│ │ ├─lz4
│ │ │ └─glibc
│ │ ├─xz
│ │ │ └─bash provides sh
│ │ └─zstd
│ │ ├─glibc
│ │ ├─gcc-libs
│ │ ├─zlib
│ │ │ └─glibc
│ │ ├─xz
│ │ └─lz4
│ ├─expat
│ │ └─glibc
│ ├─audit
│ ├─systemd-libs provides libsystemd.so=0-64
│ └─audit provides libaudit.so=1-64
├─readline
└─libnl
└─glibc
I’ve used iwd before on the arch ISO to install Arch on my HP laptop that doesn’t have Ethernet.
1 Like
Yep, iwd does seem cleaner code-wise. AFAIK wpa_supplicant is a BSD thing which makes me think perhaps UNIX. Sometimes stuff can become outdated. I am certainly no expert!
1 Like
From an end user’s perspective, my line of thought was:
The less moving part (read dependencies) the less prone to issues and glitches.
Iwd has obviously much less dependencies so I switched away from wpa_supplicant.
With that said, I had never any issues with the latter either.
Yep, totally agree. The only ongoing issue would be the maintenance of the code if that was required.
1 Like
tbg
May 1, 2022, 7:11am
17
Depending on your wifi hardware, some users report much quicker connection times with iwd.
Then that is a hardware thing not software. Perhaps we need to move on?
I’ve been keeping my eye on iwd as it matures because it appears it will ultimately be the new “default”. My old PC I tinker around with uses a USB wifi and runs Vanilla Arch (and whatever other OS I fell like screwing with at the time). After researching, I opted to go with wpa_supplicant because it’s support through network manager was more mature. The main reported bug with using iwd as the Network Manager backend is that, if the remote service drops, Network manager won’t re-connect to it when it comes back up. You can get to the details via the Network Manager ArchWiki page scrolling down to the section describing using iwd with it. Following up on it this morning, it looks like maybe it’s solved now?
I might set it up on the tinker box and see what happens. My main PC uses Ethernet.
1 Like
Oh and, just in case someone does this while troubleshooting I should mention that, if both iwd and wpa_supplicant are running, the PC will connect for a second or two then drop. So, if you’re seeing that, make sure you don’t have them both running.