You are not logged in.

#1 2025-01-13 20:42:52

erik_123
Member
Registered: 2024-12-27
Posts: 22

[SOLVED] Unable To Connect To Wifi

I have installed arch linux for the first time.  I am able to access the internet using a wired ethernet connection.  I am having trouble getting wifi working.

I followed the instructions under Network configuration/Wireless to configure the network with iw.  I am not sure if I did this right.

It says that iw can only handle WEP.  I have WPA2 so I attempted to follow the instructions at wpa_supplicant to authenticate. 

That page says:

Finally, you should obtain an IP address, see Network configuration#IP addresses

I am having trouble following those instructions.  I would be grateful for some help.  Here is what I have tried so far:

Following Network configuration/Wireless:

Check the driver status

lspci -k

03:00.0 Network controller: Intel Corporation Wi-Fi 5(802.11ac) Wireless-AC 9x6x [Thunder Peak] (rev 29)
	Subsystem: Intel Corporation Dual Band Wi-Fi 5 Wireless-AC 9260 160MHz 2x2
	Kernel driver in use: iwlwifi
	Kernel modules: iwlwifi

bring the interface up

ip link set wlan0 up

Check kernel messages for firmware being loaded

[root@laptop1 erik]# dmesg | grep iwlwifi
[    5.308916] iwlwifi 0000:03:00.0: Detected crf-id 0x2816, cnv-id 0x1000200 wfpm id 0x80000000
[    5.308934] iwlwifi 0000:03:00.0: PCI dev 2526/0014, rev=0x321, rfid=0x105110
[    5.308938] iwlwifi 0000:03:00.0: Detected Intel(R) Wireless-AC 9260 160MHz
[    5.325991] iwlwifi 0000:03:00.0: WRT: Overriding region id 0
[    5.325995] iwlwifi 0000:03:00.0: WRT: Overriding region id 1
[    5.325997] iwlwifi 0000:03:00.0: WRT: Overriding region id 2
[    5.325999] iwlwifi 0000:03:00.0: WRT: Overriding region id 3
[    5.326000] iwlwifi 0000:03:00.0: WRT: Overriding region id 4
[    5.326002] iwlwifi 0000:03:00.0: WRT: Overriding region id 6
[    5.326003] iwlwifi 0000:03:00.0: WRT: Overriding region id 8
[    5.326005] iwlwifi 0000:03:00.0: WRT: Overriding region id 9
[    5.326006] iwlwifi 0000:03:00.0: WRT: Overriding region id 10
[    5.326008] iwlwifi 0000:03:00.0: WRT: Overriding region id 11
[    5.326009] iwlwifi 0000:03:00.0: WRT: Overriding region id 15
[    5.326011] iwlwifi 0000:03:00.0: WRT: Overriding region id 16
[    5.326012] iwlwifi 0000:03:00.0: WRT: Overriding region id 18
[    5.326014] iwlwifi 0000:03:00.0: WRT: Overriding region id 19
[    5.326015] iwlwifi 0000:03:00.0: WRT: Overriding region id 20
[    5.326017] iwlwifi 0000:03:00.0: WRT: Overriding region id 21
[    5.326018] iwlwifi 0000:03:00.0: WRT: Overriding region id 28
[    5.326375] iwlwifi 0000:03:00.0: loaded firmware version 46.7e3e4b69.0 9260-th-b0-jf-b0-46.ucode op_mode iwlmvm
[    6.056100] iwlwifi 0000:03:00.0: base HW address: d4:3b:04:8f:fb:d8, OTP minor version: 0x4
[   28.811564] iwlwifi 0000:03:00.0: Registered PHC clock: iwlwifi-PTP, with index: 0

To get the name of your wireless interface, do:

iw dev

This tells me that the name of my wireless interface is wlan0.

Activate the interface

ip link set wlan0 up

To verify that the interface is up, inspect the output of the following command:

ip link show wlan0

4: wlan0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN mode DORMANT group default qlen 1000
    link/ether 86:29:d1:07:0b:0b brd ff:ff:ff:ff:ff:ff permaddr d4:3b:04:8f:fb:d8

Discover access points

iw dev wlan0 scan | less

In the output of this command I see my SSID.  The output contains an RSN block, which means that I have WPA2.

Following wpa_supplicant :

I follow the instructions to set up the config file, this is what I have:

cat /etc/wpa_supplicant/wpa_supplicant.conf
ctrl_interface=/run/wpa_supplicant
update_config=1

network={
	ssid="xxxxxxxxx"
	psk="xxxxxxxxxxxxxx"
	mesh_fwding=1
}

Then I do:

wpa_supplicant -B -i wlan0 -c /etc/wpa_supplicant/wpa_supplicant.conf
Successfully initialized wpa_supplicant
nl80211: kernel reports: Match already configured
nl80211: kernel reports: Match already configured
nl80211: kernel reports: Match already configured
nl80211: kernel reports: Match already configured
nl80211: kernel reports: Match already configured
nl80211: kernel reports: Match already configured
nl80211: kernel reports: Match already configured
nl80211: kernel reports: Match already configured
nl80211: kernel reports: Match already configured
nl80211: kernel reports: Match already configured
nl80211: kernel reports: Match already configured
nl80211: kernel reports: Match already configured
nl80211: kernel reports: Match already configured
nl80211: kernel reports: Match already configured
nl80211: kernel reports: Match already configured
nl80211: kernel reports: Match already configured
nl80211: kernel reports: Match already configured
nl80211: kernel reports: Match already configured
nl80211: kernel reports: Match already configured
nl80211: kernel reports: Match already configured
nl80211: kernel reports: Match already configured
nl80211: kernel reports: Match already configured
nl80211: kernel reports: Match already configured
nl80211: kernel reports: Match already configured
nl80211: kernel reports: Match already configured
nl80211: kernel reports: Match already configured
nl80211: kernel reports: Match already configured
nl80211: kernel reports: Match already configured
nl80211: kernel reports: Match already configured
nl80211: Could not set interface 'p2p-dev-wlan0' UP
nl80211: deinit ifname=p2p-dev-wlan0 disabled_11b_rates=0
p2p-dev-wlan0: Failed to initialize driver interface
p2p-dev-wlan0: CTRL-EVENT-DSCP-POLICY clear_all
P2P: Failed to enable P2P Device interface

I am not sure if all of the above steps have been completed successfully.  As far as I can tell I still don't have a connection:

iw dev wlan0 link
Not connected.

How can I troubleshoot this?

Last edited by erik_123 (2025-01-20 09:47:14)

Offline

#2 2025-01-13 20:55:39

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 8,999
Website

Re: [SOLVED] Unable To Connect To Wifi

Try

ip l set wlan0 down
wpa_supplicant -B -i wlan0 -c /etc/wpa_supplicant/wpa_supplicant.conf

Reference: https://bbs.archlinux.org/viewtopic.php?id=216540


Jin, Jîyan, Azadî

Offline

#3 2025-01-13 21:02:24

erik_123
Member
Registered: 2024-12-27
Posts: 22

Re: [SOLVED] Unable To Connect To Wifi

Many thanks for getting back to me.

# ip l set wlan0 down
# wpa_supplicant -B -i wlan0 -c /etc/wpa_supplicant/wpa_supplicant.conf
Successfully initialized wpa_supplicant
nl80211: kernel reports: Match already configured
nl80211: kernel reports: Match already configured
nl80211: kernel reports: Match already configured
nl80211: kernel reports: Match already configured
nl80211: kernel reports: Match already configured
nl80211: kernel reports: Match already configured
nl80211: kernel reports: Match already configured
nl80211: kernel reports: Match already configured
nl80211: kernel reports: Match already configured
nl80211: kernel reports: Match already configured
nl80211: kernel reports: Match already configured
nl80211: kernel reports: Match already configured
nl80211: kernel reports: Match already configured
nl80211: kernel reports: Match already configured
nl80211: kernel reports: Match already configured
nl80211: kernel reports: Match already configured
nl80211: kernel reports: Match already configured
nl80211: kernel reports: Match already configured
nl80211: kernel reports: Match already configured
nl80211: kernel reports: Match already configured
nl80211: kernel reports: Match already configured
nl80211: kernel reports: Match already configured
nl80211: kernel reports: Match already configured
nl80211: kernel reports: Match already configured
nl80211: kernel reports: Match already configured
nl80211: kernel reports: Match already configured
nl80211: kernel reports: Match already configured
nl80211: kernel reports: Match already configured
nl80211: kernel reports: Match already configured
ctrl_iface exists and seems to be in use - cannot override it
Delete '/run/wpa_supplicant/wlan0' manually if it is not used anymore
Failed to initialize control interface '/run/wpa_supplicant'.
You may have another wpa_supplicant process already running or the file was
left by an unclean termination of wpa_supplicant in which case you will need
to manually remove this file before starting wpa_supplicant again.

wlan0: CTRL-EVENT-DSCP-POLICY clear_all
wlan0: CTRL-EVENT-DSCP-POLICY clear_all
nl80211: deinit ifname=wlan0 disabled_11b_rates=0

1) How can I test whether it was successful?  I unplug the ethernet cable and then do 'ping archlinux.org', which fails, is there a better way to test whether the wifi connection is working?

2) I get that error message repeatedly, where it tells me to delete '/run/wpa_supplicant/wlan0', is that normal?

Edit:  Here is what I get when I delete the file:

# rm /run/wpa_supplicant/wlan0
# wpa_supplicant -B -i wlan0 -c /etc/wpa_supplicant/wpa_supplicant.conf
Successfully initialized wpa_supplicant
nl80211: kernel reports: Match already configured
nl80211: kernel reports: Match already configured
nl80211: kernel reports: Match already configured
nl80211: kernel reports: Match already configured
nl80211: kernel reports: Match already configured
nl80211: kernel reports: Match already configured
nl80211: kernel reports: Match already configured
nl80211: kernel reports: Match already configured
nl80211: kernel reports: Match already configured
nl80211: kernel reports: Match already configured
nl80211: kernel reports: Match already configured
nl80211: kernel reports: Match already configured
nl80211: kernel reports: Match already configured
nl80211: kernel reports: Match already configured
nl80211: kernel reports: Match already configured
nl80211: kernel reports: Match already configured
nl80211: kernel reports: Match already configured
nl80211: kernel reports: Match already configured
nl80211: kernel reports: Match already configured
nl80211: kernel reports: Match already configured
nl80211: kernel reports: Match already configured
nl80211: kernel reports: Match already configured
nl80211: kernel reports: Match already configured
nl80211: kernel reports: Match already configured
nl80211: kernel reports: Match already configured
nl80211: kernel reports: Match already configured
nl80211: kernel reports: Match already configured
nl80211: kernel reports: Match already configured
nl80211: kernel reports: Match already configured
nl80211: Could not set interface 'p2p-dev-wlan0' UP
nl80211: deinit ifname=p2p-dev-wlan0 disabled_11b_rates=0
p2p-dev-wlan0: Failed to initialize driver interface
p2p-dev-wlan0: CTRL-EVENT-DSCP-POLICY clear_all
P2P: Failed to enable P2P Device interface

Last edited by erik_123 (2025-01-13 21:03:36)

Offline

#4 2025-01-13 21:07:06

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 8,999
Website

Re: [SOLVED] Unable To Connect To Wifi

Sorry, you should have killed the already running wpa_supplicant instance first:

pkill wpa_supplicant
ip l set wlan0 down
wpa_supplicant -B -i wlan0 -c /etc/wpa_supplicant/wpa_supplicant.conf

Jin, Jîyan, Azadî

Offline

#5 2025-01-13 21:12:06

erik_123
Member
Registered: 2024-12-27
Posts: 22

Re: [SOLVED] Unable To Connect To Wifi

That behaves a little bit better, but still fails unfortunately:

# pkill wpa_supplicant
# ip l set wlan0 down
# wpa_supplicant -B -i wlan0 -c /etc/wpa_supplicant/wpa_supplicant.conf
Successfully initialized wpa_supplicant
nl80211: kernel reports: Match already configured
nl80211: kernel reports: Match already configured
nl80211: kernel reports: Match already configured
nl80211: kernel reports: Match already configured
nl80211: kernel reports: Match already configured
nl80211: kernel reports: Match already configured
nl80211: kernel reports: Match already configured
# ping archlinux.org
ping: archlinux.org: Temporary failure in name resolution

Offline

#6 2025-01-13 21:17:55

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 8,999
Website

Re: [SOLVED] Unable To Connect To Wifi

You have associated connected with the access point so now you need to assign IP addresses and provision /etc/resolv.conf.

EDIT: I conflated association with authentication, how silly of me. Better to be vaguely right than exactly wrong, eh? tongue

Last edited by Head_on_a_Stick (2025-01-13 21:20:53)


Jin, Jîyan, Azadî

Offline

#7 2025-01-13 21:24:44

erik_123
Member
Registered: 2024-12-27
Posts: 22

Re: [SOLVED] Unable To Connect To Wifi

I am reading Network configuration but I am not quite sure where to start.  What is the easiest way to automatically obtain an IP address?

Offline

#8 2025-01-13 21:26:53

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 8,999
Website

Re: [SOLVED] Unable To Connect To Wifi

pacman -Syu dhcpcd
dhcpcd &

Check the dhcpcd ArchWiki page for more details.

It is also possible to assign static address directly with the ip command, I'll leave it up to you to search the interweb for more. I'm watching the snooker.


Jin, Jîyan, Azadî

Offline

#9 2025-01-13 22:36:43

erik_123
Member
Registered: 2024-12-27
Posts: 22

Re: [SOLVED] Unable To Connect To Wifi

Many thanks for your help, enjoy the snooker.

I am trying to get a dynamic address.  At dhcpcd it says to start the daemon either for all interfaces or for a specific one, then it says:

In either case, you will be assigned a dynamic IP address.

Later it says:

The dhcpcd default configuration should be sufficient usually.

Based on that, I think it should be sufficient for me to do:

systemctl start dhcpcd.service

But this does not seem to work.  What am I missing?

# systemctl status dhcpcd.service
● dhcpcd.service - DHCP/ IPv4LL/ IPv6RA/ DHCPv6 client on all interfaces
     Loaded: loaded (/usr/lib/systemd/system/dhcpcd.service; disabled; preset: disabled)
     Active: active (running) since Mon 2025-01-13 23:30:18 CET; 21s ago
 Invocation: 31dad544f00e418ab59cbd2657659323
   Main PID: 1544 (dhcpcd)
      Tasks: 5 (limit: 18692)
     Memory: 3.8M (peak: 6.3M)
        CPU: 159ms
     CGroup: /system.slice/dhcpcd.service
             ├─1544 "dhcpcd: [manager] [ip4] [ip6]"
             ├─1545 "dhcpcd: [privileged proxy]"
             ├─1546 "dhcpcd: [network proxy]"
             ├─1547 "dhcpcd: [control proxy]"
             └─1561 "dhcpcd: [BPF ARP] enp2s0f1 192.168.1.220"

Jan 13 23:30:19 laptop1 dhcpcd[1545]: enp2s0f1: adding route to 2a00:23c7:ace8:3901::/64
Jan 13 23:30:19 laptop1 dhcpcd[1545]: enp2s0f1: adding default route via fe80::1a82:8cff:fe70:2779
Jan 13 23:30:19 laptop1 dhcpcd[1545]: enp2s0f1: requesting DHCPv6 information
Jan 13 23:30:19 laptop1 dhcpcd[1545]: enp2s0f1: rebinding lease of 192.168.1.220
Jan 13 23:30:19 laptop1 dhcpcd[1545]: enp2s0f1: leased 192.168.1.220 for 86400 seconds
Jan 13 23:30:19 laptop1 dhcpcd[1545]: enp2s0f1: adding route to 192.168.1.0/24
Jan 13 23:30:19 laptop1 dhcpcd[1545]: enp2s0f1: adding default route via 192.168.1.254
Jan 13 23:30:19 laptop1 dhcpcd[1545]: enp2s0f1: pid 0 deleted route to 192.168.1.0/24
Jan 13 23:30:29 laptop1 dhcpcd[1545]: enp2s0f1: failed to request DHCPv6 information
Jan 13 23:30:29 laptop1 dhcpcd[1545]: enp2s0f1: failed to request DHCPv6 information
# ip addr show
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host noprefixroute 
       valid_lft forever preferred_lft forever
2: enp2s0f1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether 80:fa:5b:63:a9:89 brd ff:ff:ff:ff:ff:ff
    altname enx80fa5b63a989
    inet 192.168.1.220/24 brd 192.168.1.255 scope global dynamic enp2s0f1
       valid_lft 86321sec preferred_lft 75521sec
    inet6 2a00:23c7:ace8:3901:1cf7:ae55:3ec8:be67/64 scope global dynamic mngtmpaddr noprefixroute 
       valid_lft 288sec preferred_lft 108sec
    inet6 2a00:23c7:ace8:3901:82fa:5bff:fe63:a989/64 scope global dynamic mngtmpaddr noprefixroute 
       valid_lft 288sec preferred_lft 108sec
    inet6 fe80::82fa:5bff:fe63:a989/64 scope link proto kernel_ll 
       valid_lft forever preferred_lft forever
4: wlan0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default qlen 1000
    link/ether d4:3b:04:8f:fb:d8 brd ff:ff:ff:ff:ff:ff

Offline

#10 2025-01-14 07:28:21

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 8,999
Website

Re: [SOLVED] Unable To Connect To Wifi

Okay, we're nearly there :-)

You just need to make sure wpa_supplicant is authenticated (ie, the password has been accepted by the access point), then bring wlan0 up with the ip command, then run dhcpcd, which will only assign addresses once the interface is up and authenticated. Dhcpcd should also write to /etc/resolv.conf to complete association with the AP.

In respect of persistent connections I would actually recommend IWD instead of wpa_supplicant — it's fasted & lighter, has fewer dependencies, and takes advantage of more of the kernel's security features. It can also assign IP addresses itself: https://wiki.archlinux.org/title/Iwd#En … figuration

If you prefer to stick with wpa_supplicant you can take advantage of the dhcpcd hook to automate the connection: https://wiki.archlinux.org/title/Dhcpcd … supplicant

Whichever method you chose always be sure to only enable a single networking service to prevent conflicts and other problems.


Jin, Jîyan, Azadî

Offline

#11 2025-01-14 19:35:14

erik_123
Member
Registered: 2024-12-27
Posts: 22

Re: [SOLVED] Unable To Connect To Wifi

Many thanks for your kind response.

Based on what you say, I would prefer to use iwd rather than wpa-supplicant.

I created file /etc/iwd/main.conf with contents:

[General]
EnableNetworkConfiguration=true

When I try to connect, it fails:

[root@laptop1 erik]# iwctl --passphrase xxxxxxxxxxxxxx station wlan0 connect xxxxxxxxx
Operation failed

Any idea what I am doing wrong?  I am continuing to troubleshoot, any advice greatly appreciated.

Here are the services that I have running at the moment, can I kill any of them?

# systemctl --type=service --state=running 
  UNIT                              LOAD   ACTIVE SUB     DESCRIPTION                                          
  accounts-daemon.service           loaded active running Accounts Service
  dbus-broker.service               loaded active running D-Bus System Message Bus
  dhcpcd.service                    loaded active running DHCP/ IPv4LL/ IPv6RA/ DHCPv6 client on all interfaces
  iwd.service                       loaded active running Wireless service
  lightdm.service                   loaded active running Light Display Manager
  ModemManager.service              loaded active running Modem Manager
  polkit.service                    loaded active running Authorization Manager
  systemd-ask-password-wall.service loaded active running Forward Password Requests to Wall
  systemd-journald.service          loaded active running Journal Service
  systemd-logind.service            loaded active running User Login Management
  systemd-networkd.service          loaded active running Network Configuration
  systemd-resolved.service          loaded active running Network Name Resolution
  systemd-udevd.service             loaded active running Rule-based Manager for Device Events and Files
  systemd-userdbd.service           loaded active running User Database Manager
  upower.service                    loaded active running Daemon for power management
  user@1000.service                 loaded active running User Manager for UID 1000

Offline

#12 2025-01-14 19:39:57

erik_123
Member
Registered: 2024-12-27
Posts: 22

Re: [SOLVED] Unable To Connect To Wifi

I disabled ModemManager.service, now the iwctl command succeeds, but "ping archlinux.org" fails, continuing to troubleshoot...

Offline

#13 2025-01-14 19:43:22

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 8,999
Website

Re: [SOLVED] Unable To Connect To Wifi

erik_123 wrote:

Any idea what I am doing wrong?

If thereare any spaces or special characters in the passphrase or SSID name they will need to be quoted. If you omit the --passphrase option iwctl will ask for the password, which means you don't have to worry about quoting (apart from the SSID).

erik_123 wrote:

Here are the services that I have running at the moment, can I kill any of them?

It is important that dhcpcd is disabled and stopped before iwd is enabled and started because the network configuration of both programs will conflict.

If you're using systemd-networkd make sure that isn't trying to assign addresses and if you're not using it then it's probably best to disable it.


Jin, Jîyan, Azadî

Offline

#14 2025-01-15 09:53:56

erik_123
Member
Registered: 2024-12-27
Posts: 22

Re: [SOLVED] Unable To Connect To Wifi

I went back to ubuntu.  I am one hundred percent certain that I am an idiot, I am sure that any competent person could get this working in two minutes, but I have spent hours on it and I can't afford to be without my laptop any longer.  I loathe ubuntu, but when the installer popped up that little dialog, asking me for my wifi password, and then it connected to wifi straight away, sweet mother of christ what a relief that was.

It is important that dhcpcd is disabled and stopped before iwd is enabled and started because the network configuration of both programs will conflict.

I stopped and disabled dhcpcd, still could not connect to wifi.

If you're using systemd-networkd make sure that isn't trying to assign addresses and if you're not using it then it's probably best to disable it.

I tried disabling it, my ethernet connection stopped working, so I reenabled it.  I have no idea whether or not it was trying to assign addresses, and I could not figure out how to tell.  All I did was install and enable it.

I installed arch two weeks ago and since then I was using it as my daily driver.  But I was at home using ethernet and did not bother to configure wifi.  Now I am on the road with no easy access to ethernet and I could not afford to be without a connection any longer.  I will try again later to install arch, at a moment when I have less pressure.  I can't thank you enough for all of your help.

Last edited by erik_123 (2025-01-15 09:54:37)

Offline

#15 2025-01-15 10:10:16

mithrial
Member
Registered: 2017-03-05
Posts: 149

Re: [SOLVED] Unable To Connect To Wifi

If you're using systemd-networkd, you don't need any of the other networking services. Only IWD is necessary for the connection, then systemd-network takes over.

Add this file to

/etc/systemd/network/10-wifi.network
[Match]
Name=wl*

[Network]
Description=All wifi connections
DHCP=yes

and restart systemd-network.

Then, use iwd to connect to the wifi (iwgtk works fine as GUI).

Disable (or remove) dhcpd, NetworkManager, or any other network managers.

Also, revert your changes from the

/etc/iwd/main.conf

file.

Offline

#16 2025-01-15 10:35:06

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 74,314

Re: [SOLVED] Unable To Connect To Wifi

@erik_123, you've completely over-complicated this.
There's
0. rfkill
1. kernel module
2. something that brings the nic up (reflected in "ip l")
3. something that provides a carrier (iwd, wpa_supplicant or some cable)
4. something that provides a lease (static IP or dhcp)
5. something that configures route and DNS

You can have *exactly* one tool for each job (where the first two aren't really selectable), but:
The more integrated ones (like networkmanager and even iwd! - if you only use wifi there's absolutely no reason to stack systemd-network or anything else on top of it) provide all features by themselves.

You can follow the wiki to manually walk through all those steps but you don't have to (and would not for daily use - that's tedious) and the usual approach is to pick a network configuring tool you like (mostly depending on your connection needs and GUI desires) - ubuntu likely got you NM because it has probably the best integration w/ the popular bigger DEs and it works the exact same way on arch.

To add to mithrial's suggestion, make sure to NOT use https://wiki.archlinux.org/title/Iwd#En … figuration if you want to use systemd-networkd (or networkmanager. or dhcpcd. or … wink

Offline

#17 2025-01-15 11:49:19

erik_123
Member
Registered: 2024-12-27
Posts: 22

Re: [SOLVED] Unable To Connect To Wifi

Many thanks for the clarifications.  I am back on ubuntu now.  As soon as I get the chance I will take another crack at installing arch.  I travel often and need to switch back and forth between multiple ethernet and/or wifi networks.  The reason that I configured file "/etc/iwd/main.conf" was because the wiki said that this would assign IP addresses, which sounded like something that I needed to do, I will skip that step next time.

Offline

#18 2025-01-19 20:16:22

erik_123
Member
Registered: 2024-12-27
Posts: 22

Re: [SOLVED] Unable To Connect To Wifi

I reinstalled arch.  From the live environment, I am able to connect to wifi using iwctl.  I have created a bootable installation.  I am running systemd-networkd and iwd.  Do I need systemd-resolved?  I created file "/etc/systemd/network/10-wifi.network" as described above.  When I do "systemctl status systemd.networkd.service", it says "Could not set hostname: Access denied".  When I run iwctl, I connect to the SSID, it does not ask me for my password, and I get no connection.  I tried giving global read permissions to "/etc/systemd/network/10-wifi.network" and "/etc/hostname", no joy.  Any idea what I am doing wrong?  Googling this error turns up mentions of polkit, do I need to run that?  The wiki does not mention it.  I would be grateful for any suggestions.

Last edited by erik_123 (2025-01-19 20:38:18)

Offline

#19 2025-01-19 20:36:41

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 74,314

Re: [SOLVED] Unable To Connect To Wifi

systemd-networkd heavily relies on resolved, yes.

systemctl status systemd-networkd
resolvectl status
ip a; ip r
ping -c1 _gateway

In doubt (and you lacking any network access) link a picture of those outputs.

It is however a bit odd that there're no issues on the live system, did you forget to install the linux-firmware package?

Offline

#20 2025-01-19 20:41:00

erik_123
Member
Registered: 2024-12-27
Posts: 22

Re: [SOLVED] Unable To Connect To Wifi

Thanks for getting back to me.  I did install linux-firmware.

I installed polkit.  This fixed the error message "Could not set hostname: Access denied".  iwctl still does not ask me for a password.  But "ping archlinux.org" succeeds.  So now I have an internet connection, even though I have not ever entered my wifi password on the installed system.

Offline

#21 2025-01-19 21:40:16

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 74,314

Re: [SOLVED] Unable To Connect To Wifi

Depending on how you installed it, archinstall might have copied the passphrase into /var/lib/iwd.
I don't use networkd/resolved but they run as system service, it seems odd that they'd need polkit to access anything.
hostnamed seems to (optionally) rely on it: https://github.com/systemd/systemd/issues/13501 but even if you cannot set the hostname (you should™ configure a static hostname anyway, https://wiki.archlinux.org/title/Networ … e_hostname - several protocols are hostname sensitive, changing it during the boot can break them) that should™ not have impeded your network at all.

The status quo is reliable now?

Please always remember to mark resolved threads by editing your initial posts subject - so others will know that there's no task left, but maybe a solution to find.
Thanks.

Offline

#22 2025-01-20 09:50:02

erik_123
Member
Registered: 2024-12-27
Posts: 22

Re: [SOLVED] Unable To Connect To Wifi

The status quo is now reliable and I owe everyone a beer.

Yes, I was thinking that the live instance must somehow have leaked the wifi credentials to the installed instance.  I am not running hostnamed.  I did configure a static hostname.

Many thanks again for all of your help.

Offline

#23 2025-01-20 10:50:57

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 8,999
Website

Re: [SOLVED] Unable To Connect To Wifi

erik_123 wrote:

I am running systemd-networkd and iwd.  Do I need systemd-resolved?

No, systemd-resolved is not needed at all. IWD will attempt to use systemd-resolved or resolvconf to configure /etc/resolv.conf if network configuration is enabled but if those programs are not running then you can populate /etc/resolv.conf manually.

Last edited by Head_on_a_Stick (2025-01-20 10:51:48)


Jin, Jîyan, Azadî

Offline

Board footer

Powered by FluxBB