Request for help: I cannot connect to wifi network after reboot

Hi All,
I cannot connect to wifi network after rebooting.
Following reboot, the output of the
systemctl status netctl-auto@wlp3s0-Arin-1 is:

netctl-auto@wlp3s0-Arin-1.service - Automatic wireless connection using netctl profiles
Loaded: loaded (/usr/lib/systemd/system/netctl-auto@.service; enabled; vendor present: disabled)
Active: Inactive (dead)
Docs: man:netctl.special (7)

If I then test
systemctl is-enabled netctl-auto@wlp3s0-Arin-1.service
returns enabled

If I test

ip link
returns (in line 3 which is the relevant bit)

wlp3s0: <BROADCAST, MULTICAST, UP LOWER_UP> mtu 1500 qdisc mq state UP mode DEFAULT group default qlen 1000 link/ether: 62:dd:d8.... brd ff:ff:... permaddr 8c:70:5a....

If I try
systemctl start netctl-auto@wlp3s0-Arin-1.service

It asks for username, and after I enter the username and password, it hangs for about five minutes and then returns an error message

" A dependency job for netctl-auto@wlp3s0-Arin-1.service has failed. See journalctl -xe for details"
I then do
journalctl -xe,
and it returns,
" … (some standard text stating failure )then
The job identifier is 1696 and the job result is dependency.
… more standard text then
Unregistered Authenticaltion Agent for unix-process:2416:100184 (system bus name:1.154 … )"

Nothing seems to work to get back the wifi connection.

What do I need to do to get back to (a) a stable internet connection, and (b) when I reboot, I will get back on the Internet?
This problem started after a recent update (as in yesterday)
I have disabled wpa_supplicant.
I cannot uninstall networkmanager as Arch complains about dependency and it will not let me uninstall it.

What would you advise please?

Best,
Arin Basu

We’re not using netctl as the default network manager. Was networkmanager enabled at the time? If you disable netctl and enable NetworkManager do you still have the same problem?

Can you post the command and full output as to what happens when you try uninstalling networkmanager?

Dear Arin,

Can you pl. post nmcli?

Also, can you pl. try this

nmcli device wifi connect "$SSID" password "$PASSWORD"

Where SSID is your wifi name (haha, I accidentally typed “wife name” first, no don’t do that :-)) and am assuming it is pwd protected.

– Vinay

Yes networkmanager was enabled.
If i disable netctl running systemctl disable netctl.service and issue systemctl enable networkmanager, it returns error message,
Failed to enable unit: Unit file networkmanager.service does not exist.
Command for uninstall networkmanager
pacman -R networkmanager
Returns error:
Failed to prepare transaction (could not prepare dependencies)
Removing networkmanager breaks dependency networkmanager required by archlabs-netwoekmanager-dmenu and
Removing networkmanager breaks dependency required by networkmanager-applet

nmcli shows
wlp3s0 : connecting to $ssid
Then nmcli device wifi connect ssid password password returns
Connection activation failed wi fi network could not be found

@natemaia, if it helps, I found further that if I issue

systemctl --type=service to test what other services are running, I get to see that every service runs OK, except netctl@wlp3s0\x2dArin\x2d1.service (which is essentially “netctl@wlp3s0-Arin-1.service”, the netctl-auto@wlp3s0.service runs just fine. The wpa_supplicant.service runs fine.
At that point, if I issue
sudo dhcpcd wlp3s0,
I get back the internet connection

So, is it that netctl-auto@wlp3s0.service and netctl@wlp3s0-Arin-1.service are conflicting with each other? It should be only netctl-auto@wlp3s0-Arin-1.service really that should run, isn’t it?

We need to see a list of enabled internet services:

ls -lR /etc/systemd/system/multi-user.target.wants

You should only have a single connection service enabled.

And you don’t need to remove NetworkManager, just disable it instead:

systemctl disable --now NetworkManager{,-dispatcher,-wait-online}

@Head_on_a_Stick, here is the output of ls -lR /etc/systemd/system/multi-user.target.wants

/etc/systemd/system/multi-user.target.wants:
total 12
lrwxrwxrwx 1 root root 38 Mar  7  2020 docker.service -> /usr/lib/systemd/system/docker.service
lrwxrwxrwx 1 root root 39 Nov  7 16:52 netctl@wlp3s0\x2dArin\x2d1.service -> /usr/lib/systemd/system/netctl@.service
lrwxrwxrwx 1 root root 46 Jul 30  2018 NetworkManager.service -> /usr/lib/systemd/system/NetworkManager.service
lrwxrwxrwx 1 root root 43 Nov  2  2018 org.cups.cupsd.path -> /usr/lib/systemd/system/org.cups.cupsd.path
lrwxrwxrwx 1 root root 40 Jul 30  2018 remote-fs.target -> /usr/lib/systemd/system/remote-fs.target
lrwxrwxrwx 1 root root 48 Nov  7 16:02 systemd-resolved.service -> /usr/lib/systemd/system/systemd-resolved.service
lrwxrwxrwx 1 root root 53 Jun 27 16:29 var-lib-snapd-snap-brave-72.mount -> /etc/systemd/system/var-lib-snapd-snap-brave-72.mount
lrwxrwxrwx 1 root root 53 Nov  6 21:27 var-lib-snapd-snap-brave-84.mount -> /etc/systemd/system/var-lib-snapd-snap-brave-84.mount
lrwxrwxrwx 1 root root 55 Nov  6 21:25 var-lib-snapd-snap-core-10185.mount -> /etc/systemd/system/var-lib-snapd-snap-core-10185.mount
lrwxrwxrwx 1 root root 56 May 31 17:54 var-lib-snapd-snap-core18-1754.mount -> /etc/systemd/system/var-lib-snapd-snap-core18-1754.mount
lrwxrwxrwx 1 root root 56 Nov  6 21:24 var-lib-snapd-snap-core18-1932.mount -> /etc/systemd/system/var-lib-snapd-snap-core18-1932.mount
lrwxrwxrwx 1 root root 54 Jun 27 16:27 var-lib-snapd-snap-core-9436.mount -> /etc/systemd/system/var-lib-snapd-snap-core-9436.mount
lrwxrwxrwx 1 root root 73 Mar  7  2020 var-lib-snapd-snap-gtk\x2dcommon\x2dthemes-1440.mount -> /etc/systemd/system/var-lib-snapd-snap-gtk\x2dcommon\x2dthemes-1440.mount
lrwxrwxrwx 1 root root 73 May 31 17:55 var-lib-snapd-snap-gtk\x2dcommon\x2dthemes-1506.mount -> /etc/systemd/system/var-lib-snapd-snap-gtk\x2dcommon\x2dthemes-1506.mount
lrwxrwxrwx 1 root root 62 Mar  7  2020 var-lib-snapd-snap-hello\x2dworld-29.mount -> /etc/systemd/system/var-lib-snapd-snap-hello\x2dworld-29.mount
lrwxrwxrwx 1 root root 59 May 31 21:08 var-lib-snapd-snap-mailspring-488.mount -> /etc/systemd/system/var-lib-snapd-snap-mailspring-488.mount

So, there are two connection services enabled:

  1. netctl@@wlp3s0-Arin-1.service
  2. NetworkManager.service

I have disabled NetworkManager.service as you advised.
When I rebooted, internet connection (wifi) is now working.
However, during boot, it still could not activate netctl-auto@wlp3s0-Arin-1.service, so when I issued
systemctl status netctl-auto@wlp3s0-Arin-1.service
it showed:
Loaded: loaded (/usr/lib/systemd/system/netctl-auto@.service; enabled; vendor preset: disabled)
Active: inactive (dead)

But the connection is working, :-),
what will fix this error or does it not matter?

So you need to disable one of them. The capitalisation of the unit names is important.

1 Like

Yes, I disabled NetworkManager, but netctl-auto@wlp3s0-Arin-1.service still shows inactive (dead) status.
The wifi connection works on reboot.

@Head_on_a_Stick,
disabling NetworkManager does not work, as the connection again drops on reboot, but what do I need to do to disable netctl?

@arinbasu

Have you followed this guide step for step? https://wiki.archlinux.org/index.php/netctl

For me it works without problems.

this is the
most important part:

1 Like

Either use netctl disable wlp3s0-Arin-1 or just delete the symlink:

rm /etc/systemd/system/multi-user.target.wants/netctl@wlp3s0\x2dArin\x2d1.service

To investigate why it’s failing use the journal:

journalctl --unit netctl@wlp3s0-Arin-1.service

Thank you @Head_on_a_Stick, I think I have disabled netctl profile wlp3s0-Arin-1 and the machine now reboots and I do get the wifi access. But when I invesigated why netctl was failing, and issued,
journalctl --unit netctl@wlp3s0-Arin-1.service, it returned

"Starting networking for netctl profile wlp30/Arin/1
Profile wlps30/Arin/1 does not exist
"
Of course it does not exist!
Why is it searching for this profile or what needs to be done? How can I even disable or remove a profile that does not even exist? How do I find out what profile it starts networking for?

The profiles should be stored under /etc/netctl/.

I think your problems may be caused by incorrect use of netctl — you’re not supposed to use systemctl to enable or disable it directly — and there also appears to be some confusion in this thread as to whether netctl or netctl-auto is being used. Please read the ArchWiki page linked above, it explains how to use it properly.

1 Like

Thanks @subjunkie and @Head_on_a_Stick, you are correct. I was wrongly using netctl. For the time being netctl being disabled, and networkmanager enabled, things seem to be as expected with respect to wifi connection, but I need to read closely the netctl documentation and more widely, the systemd documentation. As I understand, netctl is for enabling/disabling/starting/stopping profiles while systemctl is for enabling/disability/starting/stopping services associated with the profiles. So, if I were to disable networkmanager again, and wanted to switch over to netctl, I’d have to issue something like:

netctl enable <profile> and
systemctl enable netctl-auto@<profile>.service

The is already saved as a file in /etc/netctl/ folder

Is that correct?

No, netctl and netctl-auto are two different things. For netctl-auto you should enable it for the interface rather than the profile and you shouldn’t have plain netctl enabled at the same time.