You are not logged in.

#1 2021-11-06 00:54:36

m4ttj
Member
Registered: 2020-07-26
Posts: 29

Autoconnecting to WiFi with iwd but using NetworkManager for secrets

Hi,

I've got a Wi-Fi network that uses 8021x and so I have defined the following file in /var/lib/iwd/eduroam.8021x. This is what it looks like when added to NetworkManager:

# Auto-generated from NetworkManager connection "eduroam"
# Changes to that connection overwrite this file when enabled by NM's [main].iwd-config-path value

[IPv6]
Enabled=true

[Security]
EAP-Method=PEAP
EAP-Identity=xx@xx.com
EAP-PEAP-CACert=/etc/ssl/certs/xxx.pem
#Password not to be saved, will be queried through the agent
EAP-PEAP-Phase2-Method=MSCHAPV2
EAP-PEAP-Phase2-Identity=xx@xxx.com

This works great, my password isn't in this file (although not a big deal) and it integrates fine with NetworkManager. My only problem is that it doesn't autoconnect. I (think?) iwd should be the one handling this but it seems that it fails to authenticate on startup, possibly due to it not know to poll NetworkManager for the password? I'm not too sure.

Can anybody offer any guidance as to how to narrow the problem down/and or fix it?

EDIT: I should add in NetworkManager I have the setting "Store password for this user only (encrypted)" enabled for this network and others. For this 8021x network it seems NetworkManager doesn't save the password (and adds the comment to the config) but with other networks it seems to leave the password in /var/lib/iwd/*.psk alone.

Last edited by m4ttj (2021-11-06 00:58:23)

Offline

#2 2021-11-06 07:18:51

seth
Member
Registered: 2012-09-03
Posts: 49,992

Re: Autoconnecting to WiFi with iwd but using NetworkManager for secrets

https://wiki.archlinux.org/title/Networ … Fi_backend

Make sure to deactivate the iwd service so they won't collide.

Offline

#3 2021-11-06 20:54:20

m4ttj
Member
Registered: 2020-07-26
Posts: 29

Re: Autoconnecting to WiFi with iwd but using NetworkManager for secrets

Make sure to deactivate the iwd service so they won't collide.

Loaded: loaded (/usr/lib/systemd/system/iwd.service; disabled; vendor preset: disabled)

I've got it disabled and /etc/NetworkManager/conf.d/wifi_backend.conf is configured correctly.

Offline

#4 2021-11-06 21:18:16

seth
Member
Registered: 2012-09-03
Posts: 49,992

Re: Autoconnecting to WiFi with iwd but using NetworkManager for secrets

Sorry, I had been under the impression that you had enabled iwd and were somehow trying to use NM on top of it.

Is the problem only that you can't autoconnect during the boot (before logging in)?
The EAP-Password isn't the PSK and it can't be queried from your keyring/wallet either before you're logged in (and have opened the keyring/wallet)
You'll have to provide it or its hash in that config, https://wiki.archlinux.org/title/Iwd#WPA_Enterprise
I would assume that NM does so unless you do indeed "Store password for this user only (encrypted)"

Offline

#5 2021-11-06 21:21:27

m4ttj
Member
Registered: 2020-07-26
Posts: 29

Re: Autoconnecting to WiFi with iwd but using NetworkManager for secrets

Seth wrote:

Is the problem only that you can't autoconnect during the boot (before logging in)?

No, when I'm already logged in but resuming; e.g. on resume from sleep, after logging in at startup, etc.

Seth wrote:

You'll have to provide it or its hash in that config, https://wiki.archlinux.org/title/Iwd#WPA_Enterprise

I did do this, as well as the password, but I think NM simply removes it and somehow provides the password to iwd some other way when I click "connect" in NM.

Offline

#6 2021-11-06 21:29:08

seth
Member
Registered: 2012-09-03
Posts: 49,992

Re: Autoconnecting to WiFi with iwd but using NetworkManager for secrets

m4ttj wrote:

No, when I'm already logged in but resuming; e.g. on resume from sleep, after logging in at startup, etc.

At this point NM should™ not have any issues to query the PW and hand it down.

Luckily it's very chatty => check the system journal after the resume (sudo journalctl -b), NM will likely have disconnected before and tried to reconnect afterwards and will hopefully log that and why it couldn't resolve the PW.

The reason might be that the keyring/wallet gets locked by the screenlocker and NM tries to reconnect before you unlock it?
=> Is the screen locked when you resume and can you disable that for a test?

Offline

#7 2021-11-06 21:57:31

m4ttj
Member
Registered: 2020-07-26
Posts: 29

Re: Autoconnecting to WiFi with iwd but using NetworkManager for secrets

Seth wrote:

Luckily it's very chatty => check the system journal after the resume (sudo journalctl -b), NM will likely have disconnected before and tried to reconnect afterwards and will hopefully log that and why it couldn't resolve the PW.

Alright, will check the logs.

Seth wrote:

The reason might be that the keyring/wallet gets locked by the screenlocker and NM tries to reconnect before you unlock it?
=> Is the screen locked when you resume and can you disable that for a test?

This makes a lot of sense, I will try and test this. I suppose as I run KDE Plasma that the option in its setting for this will be relevant.

Unfortunately, I can't test until Monday, will update this thread when I've tested a bit.

Offline

#8 2021-11-09 12:59:31

m4ttj
Member
Registered: 2020-07-26
Posts: 29

Re: Autoconnecting to WiFi with iwd but using NetworkManager for secrets

I ran journalctl -b -u NetworkManager and this shows at resume:

Nov 09 12:54:16 matthew-laptop NetworkManager[570]: <info>  [1636462456.4983] manager: sleep: sleep requested (sleeping: no  enabled: yes)
Nov 09 12:54:16 matthew-laptop NetworkManager[570]: <info>  [1636462456.4993] manager: NetworkManager state is now ASLEEP
Nov 09 12:54:16 matthew-laptop NetworkManager[570]: <info>  [1636462456.4997] device (wlan0): state change: activated -> deactivating (reason 'sleeping', sys-iface-state: 'managed')
Nov 09 12:54:16 matthew-laptop NetworkManager[570]: <info>  [1636462456.6555] device (wlan0): new IWD device state is disconnecting
Nov 09 12:54:16 matthew-laptop NetworkManager[570]: <info>  [1636462456.6556] device (wlan0): state change: deactivating -> disconnected (reason 'sleeping', sys-iface-state: 'managed')
Nov 09 12:54:16 matthew-laptop NetworkManager[570]: <info>  [1636462456.6719] dhcp4 (wlan0): canceled DHCP transaction
Nov 09 12:54:16 matthew-laptop NetworkManager[570]: <info>  [1636462456.6719] dhcp4 (wlan0): state changed bound -> terminated
Nov 09 12:54:16 matthew-laptop NetworkManager[570]: <info>  [1636462456.6745] device (wlan0): new IWD device state is disconnected
Nov 09 12:54:16 matthew-laptop NetworkManager[570]: <info>  [1636462456.6746] device (wlan0): state change: disconnected -> unmanaged (reason 'sleeping', sys-iface-state: 'managed')
Nov 09 12:54:46 matthew-laptop NetworkManager[570]: <info>  [1636462486.5522] manager: sleep: wake requested (sleeping: yes  enabled: yes)
Nov 09 12:54:46 matthew-laptop NetworkManager[570]: <info>  [1636462486.5523] device (wlan0): state change: unmanaged -> unavailable (reason 'managed', sys-iface-state: 'external')
Nov 09 12:54:46 matthew-laptop NetworkManager[570]: <info>  [1636462486.7941] manager: NetworkManager state is now CONNECTED_LOCAL
Nov 09 12:54:46 matthew-laptop NetworkManager[570]: <info>  [1636462486.8039] device (wlan0): new IWD device state is disconnected
Nov 09 12:54:46 matthew-laptop NetworkManager[570]: <info>  [1636462486.8043] device (wlan0): state change: unavailable -> disconnected (reason 'supplicant-available', sys-iface-state: 'managed')

Last edited by m4ttj (2021-11-09 13:00:36)

Offline

#9 2021-11-09 13:16:30

seth
Member
Registered: 2012-09-03
Posts: 49,992

Re: Autoconnecting to WiFi with iwd but using NetworkManager for secrets

Don't filter - all that say is "it failed" but no context as to why.
Did you test w/ the screenlocker?

Offline

#10 2021-11-09 13:25:02

m4ttj
Member
Registered: 2020-07-26
Posts: 29

Re: Autoconnecting to WiFi with iwd but using NetworkManager for secrets

seth wrote:

Don't filter - all that say is "it failed" but no context as to why.

I don't really see anything here that could be causing it.

Nov 09 13:19:00 matthew-laptop systemd-logind[572]: Operation 'sleep' finished.
Nov 09 13:19:00 matthew-laptop kded5[1091]: bluedevil: About to resume
Nov 09 13:19:00 matthew-laptop NetworkManager[570]: <info>  [1636463940.5666] manager: sleep: wake requested (sleeping: yes  enabled: yes)
Nov 09 13:19:00 matthew-laptop kernel: audit: type=1130 audit(1636463940.563:457): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-suspend comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=succ>
Nov 09 13:19:00 matthew-laptop kernel: audit: type=1131 audit(1636463940.563:458): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-suspend comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=succ>
Nov 09 13:19:00 matthew-laptop NetworkManager[570]: <info>  [1636463940.5666] device (wlan0): state change: unmanaged -> unavailable (reason 'managed', sys-iface-state: 'external')
Nov 09 13:19:00 matthew-laptop systemd-networkd[506]: lo: Reset carrier
Nov 09 13:19:00 matthew-laptop systemd-networkd[506]: wlan0: Link UP
Nov 09 13:19:00 matthew-laptop NetworkManager[570]: <info>  [1636463940.8055] manager: NetworkManager state is now CONNECTED_LOCAL
Nov 09 13:19:00 matthew-laptop NetworkManager[570]: <info>  [1636463940.8109] device (wlan0): new IWD device state is disconnected
Nov 09 13:19:00 matthew-laptop NetworkManager[570]: <info>  [1636463940.8113] device (wlan0): state change: unavailable -> disconnected (reason 'supplicant-available', sys-iface-state: 'managed')
Nov 09 13:19:02 matthew-laptop kernel: Bluetooth: hci0: Waiting for firmware download to complete
Nov 09 13:19:02 matthew-laptop kernel: Bluetooth: hci0: Firmware loaded in 1754948 usecs
Nov 09 13:19:02 matthew-laptop kernel: Bluetooth: hci0: Waiting for device to boot
Nov 09 13:19:02 matthew-laptop kernel: Bluetooth: hci0: Device booted in 12698 usecs
Nov 09 13:19:02 matthew-laptop kernel: Bluetooth: hci0: Found Intel DDC parameters: intel/ibt-12-16.ddc
Nov 09 13:19:02 matthew-laptop kernel: Bluetooth: hci0: Applying Intel DDC parameters completed
Nov 09 13:19:02 matthew-laptop kernel: Bluetooth: hci0: Reading supported features failed (-16)
Nov 09 13:19:02 matthew-laptop kernel: Bluetooth: hci0: Firmware revision 0.1 build 212 week 30 2021
Nov 09 13:19:02 matthew-laptop bluetoothd[568]: Battery Provider Manager created
Nov 09 13:19:02 matthew-laptop bluetoothd[568]: src/advertising.c:read_adv_features_callback() Failed to read advertising features: Not Supported (0x0c)
Nov 09 13:19:02 matthew-laptop bluetoothd[568]: Adv Monitor Manager created with supported features:0x00000000, enabled features:0x00000000, max number of supported monitors:32, max number of supported patterns:16
Nov 09 13:19:02 matthew-laptop bluetoothd[568]: Player registered: sender=:1.30 path=/media_player7
Nov 09 13:19:02 matthew-laptop bluetoothd[568]: Endpoint registered: sender=:1.30 path=/MediaEndpoint/A2DPSource/ldac
Nov 09 13:19:02 matthew-laptop bluetoothd[568]: Endpoint registered: sender=:1.30 path=/MediaEndpoint/A2DPSink/aptx_hd
Nov 09 13:19:02 matthew-laptop bluetoothd[568]: Endpoint registered: sender=:1.30 path=/MediaEndpoint/A2DPSource/aptx_hd
Nov 09 13:19:02 matthew-laptop bluetoothd[568]: Endpoint registered: sender=:1.30 path=/MediaEndpoint/A2DPSink/aptx
Nov 09 13:19:02 matthew-laptop bluetoothd[568]: Endpoint registered: sender=:1.30 path=/MediaEndpoint/A2DPSource/aptx
Nov 09 13:19:02 matthew-laptop bluetoothd[568]: Endpoint registered: sender=:1.30 path=/MediaEndpoint/A2DPSource/aac
Nov 09 13:19:02 matthew-laptop bluetoothd[568]: Endpoint registered: sender=:1.30 path=/MediaEndpoint/A2DPSink/sbc
Nov 09 13:19:02 matthew-laptop bluetoothd[568]: Endpoint registered: sender=:1.30 path=/MediaEndpoint/A2DPSource/sbc
Nov 09 13:19:02 matthew-laptop bluetoothd[568]: Endpoint registered: sender=:1.30 path=/MediaEndpoint/A2DPSink/sbc_xq
Nov 09 13:19:02 matthew-laptop bluetoothd[568]: Endpoint registered: sender=:1.30 path=/MediaEndpoint/A2DPSource/sbc_xq
Nov 09 13:19:02 matthew-laptop bluetoothd[568]: Endpoint registered: sender=:1.30 path=/MediaEndpoint/A2DPSource/faststream
Nov 09 13:19:02 matthew-laptop bluetoothd[568]: Endpoint registered: sender=:1.30 path=/MediaEndpoint/A2DPSource/faststream_duplex
Nov 09 13:19:02 matthew-laptop bluetoothd[568]: Endpoint registered: sender=:1.30 path=/MediaEndpoint/A2DPSource/aptx_ll_1
Nov 09 13:19:02 matthew-laptop bluetoothd[568]: Endpoint registered: sender=:1.30 path=/MediaEndpoint/A2DPSource/aptx_ll_0
Nov 09 13:19:02 matthew-laptop bluetoothd[568]: Endpoint registered: sender=:1.30 path=/MediaEndpoint/A2DPSource/aptx_ll_duplex_1
Nov 09 13:19:02 matthew-laptop bluetoothd[568]: Endpoint registered: sender=:1.30 path=/MediaEndpoint/A2DPSource/aptx_ll_duplex_0
Nov 09 13:19:05 matthew-laptop systemd[1]: systemd-rfkill.service: Deactivated successfully.
░░ Subject: Unit succeeded
░░ Defined-By: systemd
░░ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
░░ 
░░ The unit systemd-rfkill.service has successfully entered the 'dead' state.
Nov 09 13:19:05 matthew-laptop audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-rfkill comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Nov 09 13:19:05 matthew-laptop kernel: audit: type=1131 audit(1636463945.546:459): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-rfkill comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=succe>
Nov 09 13:19:07 matthew-laptop systemd[1]: NetworkManager-dispatcher.service: Deactivated successfully.
░░ Subject: Unit succeeded
░░ Defined-By: systemd
░░ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
░░ 
░░ The unit NetworkManager-dispatcher.service has successfully entered the 'dead' state.
Nov 09 13:19:07 matthew-laptop audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=NetworkManager-dispatcher comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Nov 09 13:19:07 matthew-laptop kernel: audit: type=1131 audit(1636463947.710:460): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=NetworkManager-dispatcher comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=>
Nov 09 13:19:09 matthew-laptop bluetoothd[568]: src/profile.c:record_cb() Unable to get Hands-Free Voice gateway SDP record: Host is down
Nov 09 13:19:11 matthew-laptop systemd[983]: Started Konsole - Terminal.
░░ Subject: A start job for unit UNIT has finished successfully
░░ Defined-By: systemd
░░ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
░░ 
░░ A start job for unit UNIT has finished successfully.
░░ 
░░ The job identifier is 1177.
Nov 09 13:19:12 matthew-laptop xdg-desktop-portal-kde[1392]: xdp-kde-wayland-integration: Adding output:
Nov 09 13:19:12 matthew-laptop xdg-desktop-portal-kde[1392]: xdp-kde-wayland-integration:     manufacturer:  "unknown"
Nov 09 13:19:12 matthew-laptop xdg-desktop-portal-kde[1392]: xdp-kde-wayland-integration:     model:  "eDP-1-unknown"
Nov 09 13:19:12 matthew-laptop xdg-desktop-portal-kde[1392]: xdp-kde-wayland-integration:     resolution:  QSize(3840, 2160)
Nov 09 13:19:12 matthew-laptop xdg-desktop-portal-kde[1392]: xdp-kde-background: GetAppState called: no parameters
Nov 09 13:19:12 matthew-laptop xdg-desktop-portal-kde[1392]: xdp-kde-wayland-integration: Adding output:
Nov 09 13:19:12 matthew-laptop xdg-desktop-portal-kde[1392]: xdp-kde-wayland-integration:     manufacturer:  "unknown"
Nov 09 13:19:12 matthew-laptop xdg-desktop-portal-kde[1392]: xdp-kde-wayland-integration:     model:  "eDP-1-unknown"
Nov 09 13:19:12 matthew-laptop xdg-desktop-portal-kde[1392]: xdp-kde-wayland-integration:     resolution:  QSize(3840, 2160)
Nov 09 13:19:18 matthew-laptop audit[68110]: USER_AUTH pid=68110 uid=1000 auid=1000 ses=2 msg='op=PAM:authentication grantors=pam_faillock,pam_permit,pam_faillock acct="matthew" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/2>
Nov 09 13:19:18 matthew-laptop kernel: audit: type=1100 audit(1636463958.193:461): pid=68110 uid=1000 auid=1000 ses=2 msg='op=PAM:authentication grantors=pam_faillock,pam_permit,pam_faillock acct="matthew" exe="/usr/bin/sudo" hostname=>
Nov 09 13:19:18 matthew-laptop kernel: audit: type=1101 audit(1636463958.199:462): pid=68110 uid=1000 auid=1000 ses=2 msg='op=PAM:accounting grantors=pam_unix,pam_permit,pam_time acct="matthew" exe="/usr/bin/sudo" hostname=? addr=? ter>
Nov 09 13:19:18 matthew-laptop kernel: audit: type=1110 audit(1636463958.203:463): pid=68110 uid=1000 auid=1000 ses=2 msg='op=PAM:setcred grantors=pam_faillock,pam_permit,pam_faillock acct="root" exe="/usr/bin/sudo" hostname=? addr=? t>
Nov 09 13:19:18 matthew-laptop audit[68110]: USER_ACCT pid=68110 uid=1000 auid=1000 ses=2 msg='op=PAM:accounting grantors=pam_unix,pam_permit,pam_time acct="matthew" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/2 res=success'
Nov 09 13:19:18 matthew-laptop audit[68110]: CRED_REFR pid=68110 uid=1000 auid=1000 ses=2 msg='op=PAM:setcred grantors=pam_faillock,pam_permit,pam_faillock acct="root" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/2 res=succe>
Nov 09 13:19:18 matthew-laptop dbus-daemon[569]: [system] Activating via systemd: service name='org.freedesktop.home1' unit='dbus-org.freedesktop.home1.service' requested by ':1.380' (uid=0 pid=68110 comm="sudo journalctl -xe ")
Nov 09 13:19:18 matthew-laptop dbus-daemon[569]: [system] Activation via systemd failed for unit 'dbus-org.freedesktop.home1.service': Unit dbus-org.freedesktop.home1.service not found.
Nov 09 13:19:18 matthew-laptop sudo[68110]: pam_systemd_home(sudo:account): systemd-homed is not available: Unit dbus-org.freedesktop.home1.service not found.
Nov 09 13:19:18 matthew-laptop sudo[68110]:  matthew : TTY=pts/2 ; PWD=/home/matthew ; USER=root ; COMMAND=/usr/bin/journalctl -xe
Nov 09 13:19:18 matthew-laptop sudo[68110]: pam_unix(sudo:session): session opened for user root(uid=0) by matthew(uid=1000)
Nov 09 13:19:18 matthew-laptop kernel: audit: type=1105 audit(1636463958.206:464): pid=68110 uid=1000 auid=1000 ses=2 msg='op=PAM:session_open grantors=pam_limits,pam_unix,pam_permit acct="root" exe="/usr/bin/sudo" hostname=? addr=? te>
Nov 09 13:19:18 matthew-laptop audit[68110]: USER_START pid=68110 uid=1000 auid=1000 ses=2 msg='op=PAM:session_open grantors=pam_limits,pam_unix,pam_permit acct="root" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/2 res=succe>
seth wrote:

Did you test w/ the screenlocker?

Same outcome sad

Offline

#11 2021-11-09 13:47:57

seth
Member
Registered: 2012-09-03
Posts: 49,992

Re: Autoconnecting to WiFi with iwd but using NetworkManager for secrets

Let's start w/ the obvious:

Nov 09 13:19:00 matthew-laptop systemd-networkd[506]: wlan0: Link UP
Nov 09 13:19:00 matthew-laptop NetworkManager[570]: <info>  [1636463940.8055] manager: NetworkManager state is now CONNECTED_LOCAL

You're at least runnnig NM and systemd-networkd concurrently. Let's see what else:

find /etc/systemd -type l -exec test -f {} \; -print | awk -F'/' '{ printf ("%-40s | %s\n", $(NF-0), $(NF-1)) }' | sort -f

Offline

#12 2021-11-09 13:59:47

m4ttj
Member
Registered: 2020-07-26
Posts: 29

Re: Autoconnecting to WiFi with iwd but using NetworkManager for secrets

seth wrote:

You're at least runnnig NM and systemd-networkd concurrently. Let's see what else:

Right, I'm guessing this isn't great as they do the same thing? Although, it seems to work fine for everything else.

Running the command you gave yields:

bluetooth.service                        | bluetooth.target.wants
cups.socket                              | sockets.target.wants
dbus-org.bluez.service                   | system
dbus-org.freedesktop.network1.service    | system
dbus-org.freedesktop.nm-dispatcher.service | system
dbus-org.freedesktop.resolve1.service    | system
dbus-org.freedesktop.timesync1.service   | system
dirmngr.socket                           | sockets.target.wants
display-manager.service                  | system
docker.service                           | multi-user.target.wants
getty@tty1.service                       | getty.target.wants
gpg-agent-browser.socket                 | sockets.target.wants
gpg-agent-extra.socket                   | sockets.target.wants
gpg-agent.socket                         | sockets.target.wants
gpg-agent-ssh.socket                     | sockets.target.wants
lm_sensors.service                       | multi-user.target.wants
NetworkManager.service                   | multi-user.target.wants
NetworkManager-wait-online.service       | network-online.target.wants
p11-kit-server.socket                    | sockets.target.wants
pipewire-media-session.service           | pipewire.service.wants
pipewire-pulse.socket                    | sockets.target.wants
pipewire-session-manager.service         | user
pipewire.socket                          | sockets.target.wants
remote-fs.target                         | multi-user.target.wants
systemd-networkd.service                 | multi-user.target.wants
systemd-networkd.socket                  | sockets.target.wants
systemd-networkd-wait-online.service     | network-online.target.wants
systemd-resolved.service                 | multi-user.target.wants
systemd-timesyncd.service                | sysinit.target.wants
xdg-user-dirs-update.service             | default.target.wants

Offline

#13 2021-11-09 14:03:16

seth
Member
Registered: 2012-09-03
Posts: 49,992

Re: Autoconnecting to WiFi with iwd but using NetworkManager for secrets

Assuming you want to go w/ networkmanager, stop & disable all systemd-networkd* services and probably also systemd-resolved.service (afaiu NM invokes that itself by default configuration)
There're no other network managing services enabled.

Offline

#14 2021-11-09 14:30:28

m4ttj
Member
Registered: 2020-07-26
Posts: 29

Re: Autoconnecting to WiFi with iwd but using NetworkManager for secrets

seth wrote:

Assuming you want to go w/ networkmanager, stop & disable all systemd-networkd* services and probably also systemd-resolved.service (afaiu NM invokes that itself by default configuration)

Done, and confirmed with the same command as above. I restarted to be sure but it still seems to not be working (didn't connect to eduroam automatically on boot).

Offline

#15 2021-11-09 14:34:04

seth
Member
Registered: 2012-09-03
Posts: 49,992

Re: Autoconnecting to WiFi with iwd but using NetworkManager for secrets

Updated system journal?

sudo journalctl -b | curl -F 'f:1=<-' ix.io

Offline

#16 2021-11-09 14:48:40

m4ttj
Member
Registered: 2020-07-26
Posts: 29

Re: Autoconnecting to WiFi with iwd but using NetworkManager for secrets

seth wrote:
sudo journalctl -b | curl -F 'f:1=<-' ix.io

This doesn't seem to work (doesn't provide a link). Here's a pastebin with the same content instead: https://pastebin.com/raw/nvGq6e9j.

Offline

#17 2021-11-09 15:05:42

seth
Member
Registered: 2012-09-03
Posts: 49,992

Re: Autoconnecting to WiFi with iwd but using NetworkManager for secrets

Nov 09 14:25:43 matthew-laptop NetworkManager[606]: <error> [1636467943.4329] iwd-manager[0x555bd00e2f50]: IWD device named wlan0 is not a Wifi device

This is either because https://wiki.archlinux.org/title/Networ … Fi_backend is "experimental" and has "issues" or some confusion during the startup phase - I'd try w/o docker & wireguard to see whether it's interferencec from there…

Offline

#18 2021-11-09 15:12:52

m4ttj
Member
Registered: 2020-07-26
Posts: 29

Re: Autoconnecting to WiFi with iwd but using NetworkManager for secrets

seth wrote:

This is either because https://wiki.archlinux.org/title/Networ … Fi_backend is "experimental" and has "issues" or some confusion during the startup phase

Worth making an in issue for? Would it be for iwd or NetworkManager?

seth wrote:

I'd try w/o docker & wireguard to see whether it's interferencec from there

Wireguard shouldn't be connected/enabled on startup. I can try with docker disabled - it should be simple case of disabling the unit file right?

Offline

#19 2021-11-09 15:17:16

seth
Member
Registered: 2012-09-03
Posts: 49,992

Re: Autoconnecting to WiFi with iwd but using NetworkManager for secrets

Nov 09 14:25:43 matthew-laptop NetworkManager[606]: <info>  [1636467943.1222] manager: (vps): new WireGuard device (/org/freedesktop/NetworkManager/Devices/3)
Nov 09 14:25:43 matthew-laptop NetworkManager[606]: <info>  [1636467943.1225] manager: (home): new WireGuard device (/org/freedesktop/NetworkManager/Devices/4

it should be simple case of disabling the unit file right?

Right. (And you can check the journal to see whether it's "docker-free")

Would it be for iwd or NetworkManager?

NM. Might be related to an existing one but the only other result for that error google cam up w/ is https://forum.manjaro.org/t/alienware-1 … n/52152/10 - so it's not very common it seems.

Offline

#20 2021-11-13 19:13:24

m4ttj
Member
Registered: 2020-07-26
Posts: 29

Re: Autoconnecting to WiFi with iwd but using NetworkManager for secrets

seth wrote:

Right. (And you can check the journal to see whether it's "docker-free")

Just done it. Seems to still not work. No logs show anything about docker.

seth wrote:
Nov 09 14:25:43 matthew-laptop NetworkManager[606]: <error> [1636467943.4329] iwd-manager[0x555bd00e2f50]: IWD device named wlan0 is not a Wifi device

I just realised, wouldn't this affect all networks then?

Offline

#21 2021-11-13 21:46:27

seth
Member
Registered: 2012-09-03
Posts: 49,992

Re: Autoconnecting to WiFi with iwd but using NetworkManager for secrets

Not if it's some race condition. Is the error still there?
Does the audo-connection btw. work w/ wpa_supplicant?

Edit: https://wiki.archlinux.org/title/Iwd#Re … after_boot - but that doesn't help w/ iwd being invoked by NM…

Last edited by seth (2021-11-13 21:54:19)

Offline

#22 2021-11-13 22:03:32

m4ttj
Member
Registered: 2020-07-26
Posts: 29

Re: Autoconnecting to WiFi with iwd but using NetworkManager for secrets

seth wrote:

Not if it's some race condition. Is the error still there?

Yes. It's still there with both eduroam and my home network (but autoconnection works with my home network).

seth wrote:

Does the audo-connection btw. work w/ wpa_supplicant?

I'm not sure, and I'm slightly hesitant to try as I haven't got anything setup on the wpa_supplicant side and would require me to switch with NetworkManager.

This isn't exactly a pressing issue as it's not hard to press the "connect" button manually, but I've created an issue in the NetworkManager repo too.

Offline

Board footer

Powered by FluxBB