You are not logged in.

#1 2018-04-02 17:53:19

jsnlry
Member
Registered: 2012-06-26
Posts: 34

wpa_supplicant reports CTRL-EVENT-SCAN-FAILED ret=-22 retry=1

Hi! On a fresh Archlinux installation on a Lenovo T430 I am not able to connect to WIFI. When I try to connect I find many lines in the journal like the following:

Apr 02 19:30:37 t430 wpa_supplicant[452]: wlp3s0: CTRL-EVENT-SCAN-FAILED ret=-22 retry=1

The wireless card installed in my laptop is

03:00.0 Network controller: Intel Corporation Centrino Ultimate-N 6300 (rev 3e)
  Subsystem: Intel Corporation Centrino Ultimate-N 6300 3x3 AGN
  Kernel driver in use: iwlwifi
  Kernel modules: iwlwifi

and I updated all packages to the latest version, including the following linux kernel

# uname -r
4.15.14-1-ARCH

Before installing Archlinux this Laptop ran Linux Mint and WIFI worked.

Any idea what could be wrong? Any idea what I should try next?

I already searched a lot for other people having the same issue and found...

... another forum post: https://bbs.archlinux.org/viewtopic.php?pid=1216302
but the output for rfkill does not change in my case and also the WIFI won't connect after switching it off and on on my laptop.

... some other posts with broadcom adapters and driver issues
but I have an Intel adapter.

... a Debian bug with similar issues https://bugs.debian.org/cgi-bin/bugrepo … bug=833507
which does not help me on ArchLinux

Last edited by jsnlry (2018-09-22 16:36:08)

Offline

#2 2018-04-02 18:20:51

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

Re: wpa_supplicant reports CTRL-EVENT-SCAN-FAILED ret=-22 retry=1

How are trying to connect to wireless?  NetworkManager? systemd-networkd? Some other tool?  What are your config files - post them in full with code tags around them so that they don't take up too much page space.If you are using wpa-supplicant alone what are your config files. Once you post more complete information other users might be able to spot an error in how you are setting it up. If you are using networkd have you started the correct services? More information is needed before anyone could suggest a way forward.


Mike C

Offline

#3 2018-04-02 18:40:56

jsnlry
Member
Registered: 2012-06-26
Posts: 34

Re: wpa_supplicant reports CTRL-EVENT-SCAN-FAILED ret=-22 retry=1

Oh yes. Forgot to mention that. I use NetworkManager with the KDE frontend (plasma-nm). NetworkManager service is running and it's working with ethernet connection. I did not start any other network services (at least not manually).

The configuration in /etc/NetworkManager/system-connections:

[connection]
id=my_ssid
uuid=12345678-1234-1234-1234-1234567890ab
type=wifi
permissions=

[wifi]
mac-address=24:77:03:00:01:02
mac-address-blacklist=
mode=infrastructure
ssid=my_ssid

[wifi-security]
key-mgmt=wpa-psk
psk-flags=1

[ipv4]
dns-search=
method=auto

[ipv6]
addr-gen-mode=stable-privacy
dns-search=
method=auto

Offline

#4 2018-04-03 11:13:17

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

Re: wpa_supplicant reports CTRL-EVENT-SCAN-FAILED ret=-22 retry=1

Do you get any useful lines with error or warnings in your system log (journalctl -b as root), when trying to connect with NetworkManager? What steps are you doing to try to connect? Provide output from the log - it might give some clues.   Do you get any different results if you try systemd-networkd? https://wiki.archlinux.org/index.php/systemd-networkd

Last edited by mcloaked (2018-04-03 11:14:22)


Mike C

Offline

#5 2018-04-20 20:35:17

jsnlry
Member
Registered: 2012-06-26
Posts: 34

Re: wpa_supplicant reports CTRL-EVENT-SCAN-FAILED ret=-22 retry=1

Yes. The error I mentioned in the title of this thread is what I see in journalctl:

Apr 02 19:30:37 t430 wpa_supplicant[452]: wlp3s0: CTRL-EVENT-SCAN-FAILED ret=-22 retry=1

And after some tens of retries NetworkManager prints the following:

device (wlp3s0): Activation: (wifi) association took too long, failing activation

All the other output related to connecting with a wifi is less interesting than that.


Now I managed to connect to my wifi using systemd-networkd. Therefore I had to...

# disable NetworkManager
sudo systemctl stop NetworkManager
sudo systemctl disable NetworkManager

# reboot. Without reboot it didn't work. Seems that NetworkManager breaks something (even when I stopped NetworkManager before)
reboot

# start wpa_supplicant and configure wifi
sudo wpa_supplicant -b -i wlp3s0 -c /etc/wpa_supplicant/wpa_supplicant.conf
sudo wpa_cli
> add_network
> set_network 0 ssid "MYSSID"
> set_network 0 psk "passphrase"
> enable_network 0
> quit

# IP configuration in /etc/etc/systemd/network/25-wireless.network (just DHCP; see below)
# and start it
sudo systemctl start systemd-networkd

My working /etc/etc/systemd/network/25-wireless.network:

[Match]
Name=wlp2s0

[Network]
DHCP=ipv4

[DHCP]
RouteMetric=20

And whoop! I'm connected.

When I stop everything and start NetworkManager again, it fails again with ret=-22 as described above.

Offline

#6 2018-04-20 21:12:53

jsnlry
Member
Registered: 2012-06-26
Posts: 34

Re: wpa_supplicant reports CTRL-EVENT-SCAN-FAILED ret=-22 retry=1

Here the full journalctl log when I try to connect using NetworkManager:

Apr 21 01:01:15 t430 NetworkManager[964]: <info>  [1524265275.7478] device (wlp3s0): Activation: starting connection 'MYSSID' (2814fe3d-77a5-4d52-90e1-9ae8ef6c93cd)
Apr 21 01:01:15 t430 NetworkManager[964]: <info>  [1524265275.7479] audit: op="connection-activate" uuid="2814fe3d-77a5-4d52-90e1-9ae8ef6c93cd" name="MYSSID" pid=1779 uid=1200 result="success"
Apr 21 01:01:15 t430 NetworkManager[964]: <info>  [1524265275.7482] device (wlp3s0): state change: disconnected -> prepare (reason 'none', sys-iface-state: 'managed')
Apr 21 01:01:15 t430 NetworkManager[964]: <info>  [1524265275.7484] manager: NetworkManager state is now CONNECTING
Apr 21 01:01:15 t430 NetworkManager[964]: <info>  [1524265275.7617] device (wlp3s0): set-hw-addr: reset MAC address to 24:77:03:00:01:02 (preserve)
Apr 21 01:01:15 t430 kernel: iwlwifi 0000:03:00.0: Radio type=0x0-0x3-0x1
Apr 21 01:01:16 t430 kernel: iwlwifi 0000:03:00.0: Radio type=0x0-0x3-0x1
Apr 21 01:01:16 t430 kernel: IPv6: ADDRCONF(NETDEV_UP): wlp3s0: link is not ready
Apr 21 01:01:16 t430 NetworkManager[964]: <info>  [1524265276.1227] device (wlp3s0): supplicant interface state: inactive -> disabled
Apr 21 01:01:16 t430 NetworkManager[964]: <info>  [1524265276.1234] device (wlp3s0): state change: prepare -> config (reason 'none', sys-iface-state: 'managed')
Apr 21 01:01:16 t430 NetworkManager[964]: <info>  [1524265276.1236] device (wlp3s0): Activation: (wifi) access point 'MYSSID' has security, but secrets are required.
Apr 21 01:01:16 t430 NetworkManager[964]: <info>  [1524265276.1236] device (wlp3s0): state change: config -> need-auth (reason 'none', sys-iface-state: 'managed')
Apr 21 01:01:16 t430 NetworkManager[964]: <info>  [1524265276.1238] sup-iface[0x55b3ed70d970,wlp3s0]: wps: type pbc start...
Apr 21 01:01:16 t430 NetworkManager[964]: <info>  [1524265276.1276] device (wlp3s0): supplicant interface state: disabled -> inactive
Apr 21 01:01:16 t430 wpa_supplicant[952]: wlp3s0: CTRL-EVENT-SCAN-FAILED ret=-22 retry=1
Apr 21 01:01:16 t430 kdeinit5[653]: networkmanager-qt: virtual void NetworkManager::ActiveConnectionPrivate::propertyChanged(const QString&, const QVariant&) Unhandled property "StateFlags"
Apr 21 01:01:16 t430 plasmashell[708]: networkmanager-qt: virtual void NetworkManager::ActiveConnectionPrivate::propertyChanged(const QString&, const QVariant&) Unhandled property "StateFlags"
Apr 21 01:01:16 t430 kdeinit5[653]: plasma-nm: Unhandled active connection state change:  1
Apr 21 01:01:16 t430 kdeinit5[653]: plasma-nm: virtual NMVariantMapMap SecretAgent::GetSecrets(const NMVariantMapMap&, const QDBusObjectPath&, const QString&, const QStringList&, uint)
Apr 21 01:01:16 t430 kdeinit5[653]: plasma-nm: Path: "/org/freedesktop/NetworkManager/Settings/1"
Apr 21 01:01:16 t430 kdeinit5[653]: plasma-nm: Setting name: "802-11-wireless-security"
Apr 21 01:01:16 t430 kdeinit5[653]: plasma-nm: Hints: ()
Apr 21 01:01:16 t430 kdeinit5[653]: plasma-nm: Flags: 13
Apr 21 01:01:16 t430 NetworkManager[964]: <info>  [1524265276.1424] device (wlp3s0): state change: need-auth -> prepare (reason 'none', sys-iface-state: 'managed')
Apr 21 01:01:16 t430 NetworkManager[964]: <info>  [1524265276.1428] device (wlp3s0): state change: prepare -> config (reason 'none', sys-iface-state: 'managed')
Apr 21 01:01:16 t430 NetworkManager[964]: <info>  [1524265276.1436] device (wlp3s0): Activation: (wifi) connection 'MYSSID' has security, and secrets exist.  No new secrets needed.
Apr 21 01:01:16 t430 NetworkManager[964]: <info>  [1524265276.1438] Config: added 'ssid' value 'MYSSID'
Apr 21 01:01:16 t430 NetworkManager[964]: <info>  [1524265276.1439] Config: added 'scan_ssid' value '1'
Apr 21 01:01:16 t430 NetworkManager[964]: <info>  [1524265276.1439] Config: added 'bgscan' value 'simple:30:-80:86400'
Apr 21 01:01:16 t430 NetworkManager[964]: <info>  [1524265276.1440] Config: added 'key_mgmt' value 'WPA-PSK'
Apr 21 01:01:16 t430 NetworkManager[964]: <info>  [1524265276.1440] Config: added 'psk' value '<hidden>'
Apr 21 01:01:16 t430 wpa_supplicant[952]: wlp3s0: CTRL-EVENT-SCAN-FAILED ret=-22 retry=1
Apr 21 01:01:17 t430 wpa_supplicant[952]: wlp3s0: CTRL-EVENT-SCAN-FAILED ret=-22 retry=1
Apr 21 01:01:18 t430 wpa_supplicant[952]: wlp3s0: CTRL-EVENT-SCAN-FAILED ret=-22 retry=1
Apr 21 01:01:19 t430 wpa_supplicant[952]: wlp3s0: CTRL-EVENT-SCAN-FAILED ret=-22 retry=1
Apr 21 01:01:20 t430 wpa_supplicant[952]: wlp3s0: CTRL-EVENT-SCAN-FAILED ret=-22 retry=1
Apr 21 01:01:21 t430 wpa_supplicant[952]: wlp3s0: CTRL-EVENT-SCAN-FAILED ret=-22 retry=1
Apr 21 01:01:22 t430 wpa_supplicant[952]: wlp3s0: CTRL-EVENT-SCAN-FAILED ret=-22 retry=1
Apr 21 01:01:23 t430 wpa_supplicant[952]: wlp3s0: CTRL-EVENT-SCAN-FAILED ret=-22 retry=1
Apr 21 01:01:24 t430 wpa_supplicant[952]: wlp3s0: CTRL-EVENT-SCAN-FAILED ret=-22 retry=1
Apr 21 01:01:25 t430 wpa_supplicant[952]: wlp3s0: CTRL-EVENT-SCAN-FAILED ret=-22 retry=1
Apr 21 01:01:26 t430 wpa_supplicant[952]: wlp3s0: CTRL-EVENT-SCAN-FAILED ret=-22 retry=1
Apr 21 01:01:27 t430 wpa_supplicant[952]: wlp3s0: CTRL-EVENT-SCAN-FAILED ret=-22 retry=1
Apr 21 01:01:28 t430 wpa_supplicant[952]: wlp3s0: CTRL-EVENT-SCAN-FAILED ret=-22 retry=1
Apr 21 01:01:29 t430 wpa_supplicant[952]: wlp3s0: CTRL-EVENT-SCAN-FAILED ret=-22 retry=1
Apr 21 01:01:30 t430 wpa_supplicant[952]: wlp3s0: CTRL-EVENT-SCAN-FAILED ret=-22 retry=1
Apr 21 01:01:31 t430 wpa_supplicant[952]: wlp3s0: CTRL-EVENT-SCAN-FAILED ret=-22 retry=1
Apr 21 01:01:32 t430 wpa_supplicant[952]: wlp3s0: CTRL-EVENT-SCAN-FAILED ret=-22 retry=1
Apr 21 01:01:33 t430 wpa_supplicant[952]: wlp3s0: CTRL-EVENT-SCAN-FAILED ret=-22 retry=1
Apr 21 01:01:34 t430 wpa_supplicant[952]: wlp3s0: CTRL-EVENT-SCAN-FAILED ret=-22 retry=1
Apr 21 01:01:35 t430 wpa_supplicant[952]: wlp3s0: CTRL-EVENT-SCAN-FAILED ret=-22 retry=1
Apr 21 01:01:36 t430 wpa_supplicant[952]: wlp3s0: CTRL-EVENT-SCAN-FAILED ret=-22 retry=1
Apr 21 01:01:37 t430 wpa_supplicant[952]: wlp3s0: CTRL-EVENT-SCAN-FAILED ret=-22 retry=1
Apr 21 01:01:38 t430 wpa_supplicant[952]: wlp3s0: CTRL-EVENT-SCAN-FAILED ret=-22 retry=1
Apr 21 01:01:39 t430 wpa_supplicant[952]: wlp3s0: CTRL-EVENT-SCAN-FAILED ret=-22 retry=1
Apr 21 01:01:40 t430 wpa_supplicant[952]: wlp3s0: CTRL-EVENT-SCAN-FAILED ret=-22 retry=1
Apr 21 01:01:41 t430 NetworkManager[964]: <warn>  [1524265301.0020] device (wlp3s0): Activation: (wifi) association took too long, failing activation
Apr 21 01:01:41 t430 NetworkManager[964]: <info>  [1524265301.0021] device (wlp3s0): state change: config -> failed (reason 'ssid-not-found', sys-iface-state: 'managed')
Apr 21 01:01:41 t430 NetworkManager[964]: <info>  [1524265301.0025] manager: NetworkManager state is now DISCONNECTED
Apr 21 01:01:41 t430 NetworkManager[964]: <warn>  [1524265301.0038] device (wlp3s0): Activation: failed for connection 'MYSSID'
Apr 21 01:01:41 t430 NetworkManager[964]: <info>  [1524265301.0056] device (wlp3s0): state change: failed -> disconnected (reason 'none', sys-iface-state: 'managed')
Apr 21 01:01:41 t430 kernel: IPv6: ADDRCONF(NETDEV_UP): wlp3s0: link is not ready
Apr 21 01:01:41 t430 NetworkManager[964]: <info>  [1524265301.0218] device (wlp3s0): set-hw-addr: set MAC address to 11:22:33:44:55:66 (scanning)
Apr 21 01:01:41 t430 kernel: iwlwifi 0000:03:00.0: Radio type=0x0-0x3-0x1
Apr 21 01:01:41 t430 kernel: iwlwifi 0000:03:00.0: Radio type=0x0-0x3-0x1
Apr 21 01:01:41 t430 kernel: IPv6: ADDRCONF(NETDEV_UP): wlp3s0: link is not ready
Apr 21 01:01:41 t430 NetworkManager[964]: <info>  [1524265301.3706] device (wlp3s0): supplicant interface state: inactive -> disconnected
Apr 21 01:01:41 t430 NetworkManager[964]: <info>  [1524265301.3710] device (wlp3s0): supplicant interface state: disconnected -> disabled
Apr 21 01:01:41 t430 NetworkManager[964]: <info>  [1524265301.3913] device (wlp3s0): supplicant interface state: disabled -> inactive
Apr 21 01:01:41 t430 wpa_supplicant[952]: wlp3s0: Reject scan trigger since one is already pending

Offline

#7 2018-04-20 22:04:27

jsnlry
Member
Registered: 2012-06-26
Posts: 34

Re: wpa_supplicant reports CTRL-EVENT-SCAN-FAILED ret=-22 retry=1

Seems that the problem is solved. Some days went by since this has started and in the meantime some updates came in.
Now it works.

Offline

#8 2018-09-22 16:35:56

jsnlry
Member
Registered: 2012-06-26
Posts: 34

Re: wpa_supplicant reports CTRL-EVENT-SCAN-FAILED ret=-22 retry=1

I must correct myself. The problem is still there. It doesn't happen always, but it happens every time after resuming from standby. It's very annoying.

Turning off the WIFI using the hardware switch and turning it on again helps sometimes, but not always. Sometimes it takes half an hour to get back online and even rebooting does not help always.

Offline

#9 2018-09-23 08:45:48

keibak
Member
Registered: 2017-05-24
Posts: 21

Re: wpa_supplicant reports CTRL-EVENT-SCAN-FAILED ret=-22 retry=1

I'm seeing the same log messages. My issue is, that the first connection to the wireless network takes a lot of time. Subsequent connections are established way faster.

The netword card uses a Broadcom chip. As you are seeing this with Intel hardware, I guess this is more of a software issue. It seems that wpa_supplicant and/or network_manager aren't properly initialized before the connection attempt.

Search for the error message always pointed me to problems with mac adress randomization. However changing those settings didn't have any effect for me: After login WLAN takes time to connect

Offline

#10 2018-09-28 16:24:46

jsnlry
Member
Registered: 2012-06-26
Posts: 34

Re: wpa_supplicant reports CTRL-EVENT-SCAN-FAILED ret=-22 retry=1

How satisfying... I'm not alone with this problem. But still, the issue is very annoying.

I also tried replacing the WIFI chip, but the T430 is locked to this specific chip only. When I replace it, the laptop won't start because the other WIFI chip is not "supported" by Lenovo. I read somewhere, that it's possible to patch the BIOS somehow, so that it allows other WIFI cards, but that also does not really sound like a solution to me.

I hope we can fix this soon. Otherwise I have to switch back to Debian on this machine — because with this it worked.

Offline

#11 2019-01-05 21:30:48

bbbart
Member
From: Belgium
Registered: 2016-03-14
Posts: 15
Website

Re: wpa_supplicant reports CTRL-EVENT-SCAN-FAILED ret=-22 retry=1

I'm facing the same problem on my Arch installation, dual booting with Mac OS. Both with linux-macbook and linux-lts I can't connect to any WIFI access point any longer (tried old ones, tried new ones, tried preconfigured ones, tried some I never connect to in the past). Right now I'm booted into Mac OS X Mojave on the same Macbook Air, which simply connects without any problem.

I'm using this same laptop for little over five years now, with an Arch installation exactly as old as the laptop itself. While in the past this WIFI problem occurred once in a while (and was usually solved by rmmodding and reloading wl.ko), now this problem remains, seemingly indefinitely (could not associate after letting it try for three odd hours).

I first thought it was a hardware problem, but on OS X there is no issue at all, so that's definitely not the case. Perhaps this is due to a recent update of the kernel, wpa_supplicant, the broadcom wireless module or even NetworkManager?

Offline

#12 2019-01-05 21:34:49

loqs
Member
Registered: 2014-03-06
Posts: 7,294

Re: wpa_supplicant reports CTRL-EVENT-SCAN-FAILED ret=-22 retry=1

@bbbart are you sure it is the same issue and not https://bugs.archlinux.org/task/61119 ?

Offline

#13 2019-01-05 21:49:14

bbbart
Member
From: Belgium
Registered: 2016-03-14
Posts: 15
Website

Re: wpa_supplicant reports CTRL-EVENT-SCAN-FAILED ret=-22 retry=1

Interesting! Let me downgrade wpa_supplicant. I do see it indeed got upgraded from 2.6 to 2.7 on 1st January 2019.

(However, to be fair, this post is written from the Arch installation I just complained about above. Meanwhile I rebooted and the WIFI simple connected at once. First time today! :-/)

I just downgraded back to 2.6... let's retry!

Offline

#14 2019-01-05 21:55:42

bbbart
Member
From: Belgium
Registered: 2016-03-14
Posts: 15
Website

Re: wpa_supplicant reports CTRL-EVENT-SCAN-FAILED ret=-22 retry=1

Well... I'm online now again from Arch, but difficult to say of course if it's due to the wpa_supplicant downgrade. Let's just hope things are stable now again... :-)

Thanks for pointing this out @loqs!

Offline

#15 2019-01-16 20:33:37

UnknownUser
Member
Registered: 2019-01-16
Posts: 1

Re: wpa_supplicant reports CTRL-EVENT-SCAN-FAILED ret=-22 retry=1

After a fresh installation, I stumbled over the same problem. My logs look like those jsnlry posted. It turns out that the wifi link is down; at least after executing

 ip link set wlp3s0 up 

connecting to my wireless network using the nm-applet works.

Offline

Board footer

Powered by FluxBB