It takes a long time to establish a WiFi connection [Video added]

I have no idea whatsoever if that would change anything here, but I noticed on my system two supplicant were installed and trying to achieve the same “job”. It looks like you have both too. On my install I noticed that iwd was making NetworkManager blazing fast to connect to WiFi compared to wpa_supplicant. I dunno, maybe try to get rid of one and see what happens :man_shrugging:
You can check this trhread.

P.S.: I just see @jruschme pointed that earlier, and that you were worried about not be able to reverse… Then don’t worry, I did it back and forth, you just have to restart the service, you won’t be stuck anyway.

1 Like

Just for peace of mind I want to create a Timeshift snapshot before removing wpa_supplicant. I just installed Timeshift from AUR but its not working. Timeshift thinks I am in Live USB mode which I am not. I am getting an impression that Timeshift is not the preffered tool among Arch users. Which restore tool do Arch users use ?

timeshift

Pretty sure disabling wpa_supplicant.service would be enough?

sudo systemctl disable wpa_supplicant.service

then reboot, any problems just re-enable it

sudo systemctl enable wpa_supplicant.service

This worked but I am not going to repeat the same mistake of declaring this as a success prematurely. I will observe this carefully & reply back after 2 days.

After I rebooted the connection was lightning fast as @linuxislife mentioned.

no problem, this is why I ask for your running services, to see if something was conflicting.

I know for a fact dhcp services creates problems with NetworkManager

never used wifi so had no idea wpa_supplicant.service would cause an issue, lets see :slightly_smiling_face:

iwd is what they have on the arch ISO now and it works really well for connecting wifi.

I have deleted that file I had created with the command

sudo rm /etc/NetworkManager/conf.d/wifi_rand_mac.conf

Is that okay ?

I think it should be.

1 Like

Maybe make sure to add the line for iwd in your NetworkManager.conf and to really disable wpa_supplicant (i.e. mask). Not doing so wasn’t enough to disable it on my side.
check here.

P.S.: So btw, in the end, is it a “bug” that both supplicants stay there after intalling the OS ?

@linuxislife
After I added the line

[device]
wifi.backend=iwd

to

/etc/NetworkManager/NetworkManager.conf

and restarted NM with

sudo systemctl restart NetworkManager

My network was completed dead. It was dead even after a reboot. So I removed that line from NetworkManager.conf and again did

sudo systemctl restart NetworkManager

and I my WiFi connection is restored. This is exactly what I was worried about. Thank God I got that idea of removing that line myself otherwise I had no access to even this forum.

iwd is running so I don’t know what went wrong

$ sudo systemctl status iwd
[sudo] password for home: 
● iwd.service - Wireless service
     Loaded: loaded (/usr/lib/systemd/system/iwd.service; enabled; vendor preset: disabled)
     Active: active (running) since Wed 2021-08-11 22:11:25 IST; 7min ago
   Main PID: 490 (iwd)
      Tasks: 1 (limit: 4537)
     Memory: 1.5M
        CPU: 30ms
     CGroup: /system.slice/iwd.service
             └─490 /usr/lib/iwd/iwd

Aug 11 22:11:25 home-system systemd[1]: Starting Wireless service...
Aug 11 22:11:25 home-system iwd[490]: Wireless daemon version 1.16
Aug 11 22:11:25 home-system systemd[1]: Started Wireless service.
Aug 11 22:11:25 home-system iwd[490]: station: Network configuration is disabled.

is wpa_supplicant running or not ?

P.S.: you shouldn’t need to reboot when switching I guess

$ sudo systemctl status wpa_supplicant.service 
● wpa_supplicant.service - WPA supplicant
     Loaded: loaded (/usr/lib/systemd/system/wpa_supplicant.service; disabled; vendor preset: disab>
     Active: active (running) since Wed 2021-08-11 22:12:06 IST; 10min ago
   Main PID: 1406 (wpa_supplicant)
      Tasks: 1 (limit: 4537)
     Memory: 4.3M
        CPU: 31ms
     CGroup: /system.slice/wpa_supplicant.service
             └─1406 /usr/bin/wpa_supplicant -u -s -O /run/wpa_supplicant

Aug 11 22:12:06 home-system wpa_supplicant[1406]: ioctl[SIOCSIWENCODEEXT]: Invalid argument
Aug 11 22:12:06 home-system wpa_supplicant[1406]: ioctl[SIOCSIWENCODEEXT]: Invalid argument
Aug 11 22:12:06 home-system wpa_supplicant[1406]: dbus: fill_dict_with_properties dbus_interface=fi>
Aug 11 22:12:07 home-system wpa_supplicant[1406]: wlan0: Trying to associate with 40:c8:cb:1d:9e:ea>
Aug 11 22:12:07 home-system wpa_supplicant[1406]: Failed to add supported operating classes IE
Aug 11 22:12:07 home-system wpa_supplicant[1406]: wlan0: Association request to the driver failed
Aug 11 22:12:07 home-system wpa_supplicant[1406]: wlan0: Associated with 40:c8:cb:1d:9e:ea
Aug 11 22:12:07 home-system wpa_supplicant[1406]: wlan0: WPA: Key negotiation completed with 40:c8:>
Aug 11 22:12:07 home-system wpa_supplicant[1406]: wlan0: CTRL-EVENT-CONNECTED - Connection to 40:c8>
Aug 11 22:12:07 home-system wpa_supplicant[1406]: bgscan simple: Failed to enable signal strength m>

You should try to fllow those steps.

You can have a look at the wiki there and there too.

P.S.:

disabling is not enough, you need to mask it

sudo systemctl mask --now wpa_supplicant

I followed those steps line by line & still faced disconnection
wifi

Okay, it makes a kind of odd sense that both are installed. iwd is part of the Arch base and is called out in the Arch installation instructions as the way to connect to WiFi for the install. On the other hand, wpa_supplicant is probably pulled in by either the NetworkManager or DE installation. Ick!

So now wpa_supplicant is not running and iwd is ?
They are talking of a special networkmanager-iwd available in the AUR in the wiki otherwise…
Maybe it has nothing to do with choosing a supplicant anyway…
Driver issue or smthg… idk :confused:

I know, weird ¯_ (ツ)_/¯
I only notice looking at the journal, my connection was “ok” i guess…

@linuxislife

Now wpa_supplicant is running coz I unmasked it & started it again otherwise as you can see in that screenshot I was getting “device not ready”.

I will just cope with the extra 10-15 secs delay in connection. This whole process of making the connection time fast is breaking stuff.

You maybe should investigate those messages, idk.

And you can disable iwd for good then if you use wpa_supplicant.

P.S.: appart from the long time to first establish the connection, is your wifi working well once connected ?

@arch_lover
Have you ever tried the 8188eu-dkms-git package from the AUR?

No. The only problem is a little excessive connection time otherwise I have no complaints about my WiFi connection. I will just keep using this installation as it is.