Wpa_supplicant Preventing Shutdown

Hey everyone,

On kernel 5.15 and later, wpa_supplicant freezes on shutdown preventing my computer from shutting down unless I kill it by holding the power button. After reverting to 5.10, this doesn’t happen anymore. Below are logs from normal and shutdowns with the broken kernel.

Normal shutdown:

systemd[1]: Stopping WPA supplicant...
wpa_supplicant[1127]: nl80211: deinit ifname=p2p-dev-wlp6s0 disabled_11b_rates=0
wpa_supplicant[1127]: p2p-dev-wlp6s0: CTRL-EVENT-TERMINATING
wpa_supplicant[1127]: nl80211: deinit ifname=wlp6s0 disabled_11b_rates=0
wpa_supplicant[1127]: wlp6s0: CTRL-EVENT-TERMINATING
systemd[1]: wpa_supplicant.service: Deactivated successfully.
systemd[1]: Stopped WPA supplicant.

Broken Kernel:

systemd[1]: Stopping WPA supplicant...
wpa_supplicant[1418]: nl80211: deinit ifname=p2p-dev-wlp6s0 disabled_11b_rates=0
systemd[1]: wpa_supplicant.service: State 'stop-sigterm' timed out. Killing.
systemd[1]: wpa_supplicant.service: Killing process 1418 (wpa_supplicant) with signal SIGKILL.
systemd[1]: wpa_supplicant.service: Processes still around after SIGKILL. Ignoring.
systemd[1]: wpa_supplicant.service: State 'final-sigterm' timed out. Killing.
systemd[1]: wpa_supplicant.service: Killing process 1418 (wpa_supplicant) with signal SIGKILL.
systemd[1]: wpa_supplicant.service: Processes still around after final SIGKILL. Entering failed mode.
systemd[1]: wpa_supplicant.service: Failed with result 'timeout'.
systemd[1]: wpa_supplicant.service: Unit process 1418 (wpa_supplicant) remains running after unit stopped.
systemd[1]: Stopped WPA supplicant.

Please let me know if there is anything I could provide and/or test!

Thanks!

You can try disabling wpa_supplicant and switch to iwd as wifi backend for example:

$ sudo pacman -Syu iwd 
$ sudo systemctl stop wpa_supplicant
$ sudo systemctl mask wpa_supplicant
$ sudo systemctl enable iwd.service
$ sudo tee /etc/NetworkManager/conf.d/wifi_backend.conf <<EOF
[device]
wifi.backend=iwd
EOF
$ systemctl reboot

I know that this may fix the issue, but shouldn’t this issue with wpa_supplicant be fixed?

This is the website given in the package info.
I could not find a link to a public bug tracker, only mailing lists (and archives) though.

wpa_supplicant doesn’t see alot of development these days though, according to my pacman.log it’s basically version 2.9 for more than 2 years.