You are not logged in.

#1 2021-08-14 01:22:47

punk_physicist
Member
From: ~/
Registered: 2012-01-29
Posts: 39

[SOLVED] WiFi network interface sometimes missing at boot

Generally my WiFi works fine, but sometimes when I boot up it seems like my wifi network card has just disappeared, i.e. running

ip link

usually shows an interface `wlan0` and my internet works as expected, but at other times this interface is simply missing from the list.


Output of

lspci -k

gives

00:14.3 Network controller: Intel Corporation Comet Lake PCH CNVi WiFi
    DeviceName: Onboard - Ethernet
    Subsystem: Rivet Networks Device 1652
    Kernel driver in use: iwlwifi

Last edited by punk_physicist (2021-09-03 19:35:22)

Offline

#2 2021-08-14 01:29:35

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 23,935

Re: [SOLVED] WiFi network interface sometimes missing at boot

The leading cause of this is having multiple network services enabled at the same time, see this similar recent thread: https://bbs.archlinux.org/viewtopic.php?id=268748

Offline

#3 2021-08-14 02:08:38

punk_physicist
Member
From: ~/
Registered: 2012-01-29
Posts: 39

Re: [SOLVED] WiFi network interface sometimes missing at boot

V1del wrote:

The leading cause of this is having multiple network services enabled at the same time, see this similar recent thread: https://bbs.archlinux.org/viewtopic.php?id=268748

So I don't believe I have conflicting services. The output of `systemctl list-unit-files --state enabled` is

UNIT FILE                            STATE   VENDOR PRESET
dhcpcd.service                       enabled disabled
getty@.service                       enabled enabled
iwd.service                          enabled disabled
plexmediaserver.service              enabled disabled
systemd-networkd-wait-online.service enabled disabled
systemd-networkd.service             enabled enabled
systemd-resolved.service             enabled enabled
systemd-networkd.socket              enabled disabled
remote-fs.target                     enabled enabled

I'm trying to use systemd-networkd, and from https://wiki.archlinux.org/title/Systemd-networkd it says

In order to connect to a wireless network with systemd-networkd, a wireless adapter configured with another application such as wpa_supplicant or iwd is required.

which is why I also have iwd.service running.

Offline

#4 2021-08-14 07:36:38

Raynman
Member
Registered: 2011-10-22
Posts: 1,539

Re: [SOLVED] WiFi network interface sometimes missing at boot

But you also have dhcpcd.service enabled.

Offline

#5 2021-08-14 07:38:36

seth
Member
Registered: 2012-09-03
Posts: 60,939

Re: [SOLVED] WiFi network interface sometimes missing at boot

So I don't believe I have conflicting services.

dhcpcd.service                       enabled disabled
…
iwd.service                          enabled disabled
…
systemd-networkd-wait-online.service enabled disabled
systemd-networkd.service             enabled enabled
systemd-resolved.service             enabled enabled
systemd-networkd.socket              enabled disabled

Why is dhcpcd enabled?

However, if "ip l" doesn't show any nic, there's probably a second problem - please post the complete system journal for an affected boot.

Edit: semi-ninja'd by - i guess - a match counting jump 'n run character?

Last edited by seth (2021-08-14 07:40:14)

Online

#6 2021-08-15 17:52:29

punk_physicist
Member
From: ~/
Registered: 2012-01-29
Posts: 39

Re: [SOLVED] WiFi network interface sometimes missing at boot

I had dhcpcd.service enabled, because I somehow missed that networkd is capable of handling DHCP. So I added the necessary config file at /etc/systemd/network/25-wireless.network.

However, I don't believe this was responsible for the disappearing interface. After some Googling I found this page explaining how to set up iwd with networkd. From this page I found

Furthermore, starting with iwd 0.18, you have to create a file /etc/iwd/main.conf containing

[General]
UseDefaultInterface=true

due to iwd’s interface lifecycle handling, otherwise your default interface will be removed by iwd and therefore networkd won’t be able to handle it correctly, at least not when you use the interface’s Name for matching. If you use a [Match] section compatible with iwd’s new interface lifecycle handling, this is not necessary, of course.

So I added the requisite /etc/iwd/main.conf file and so far everything seems to be working. I'll update this page as "fixed" in a few days assuming I don't run into this problem again.

Last edited by punk_physicist (2021-09-03 19:34:13)

Offline

#7 2021-08-15 20:18:09

seth
Member
Registered: 2012-09-03
Posts: 60,939

Re: [SOLVED] WiFi network interface sometimes missing at boot

I don't believe this was responsible for the disappearing interface.

Me neither.

seth wrote:

if "ip l" doesn't show any nic, there's probably a second problem - please post the complete system journal for an affected boot.

Online

Board footer

Powered by FluxBB