Skip to content

iwd: install D-Bus activation services#60351

Open
Logarithmus wants to merge 1 commit intovoid-linux:masterfrom
Logarithmus:iwd-dbus-activation
Open

iwd: install D-Bus activation services#60351
Logarithmus wants to merge 1 commit intovoid-linux:masterfrom
Logarithmus:iwd-dbus-activation

Conversation

@Logarithmus
Copy link
Copy Markdown
Contributor

Testing the changes

  • I tested the changes in this PR: briefly

The activation file content (Exec=/usr/libexec/iwd, no SystemdService=) was placed manually at /usr/share/dbus-1/system-services/net.connman.iwd.service on a running Void system. With the runit service disabled, NetworkManager (wifi.backend=iwd) successfully D-Bus-activated iwd on demand and brought up the wireless device. Package was not yet rebuilt with xbps-src.

Background

Upstream iwd's Makefile.am installs src/net.connman.iwd.service and wired/net.connman.ead.service (the D-Bus bus-activation files) inside the if SYSTEMD_SERVICE block, alongside the systemd unit:

if SYSTEMD_SERVICE
src_iwd_DEPENDENCIES += src/iwd.service

systemd_unit_DATA += src/iwd.service
dbus_bus_DATA += src/net.connman.iwd.service

systemd_network_DATA += src/80-iwd.link
endif

Void's template passes --disable-systemd-service, so the whole block is skipped and the activation files are dropped — even though they aren't systemd-specific. Result: dbus-daemon has no activation rule for net.connman.iwd, so NetworkManager (configured with [device].wifi.backend=iwd) cannot launch iwd on demand.

The user-visible symptom is that Wi-Fi sometimes fails to come up at boot. If the runit service is enabled, it works if iwd happens to register on D-Bus before NetworkManager queries it (a runit-parallel-startup race). If the runit service is disabled in the expectation that NM will D-Bus-activate iwd (the documented setup), it never works.

Fix

Ship our own net.connman.iwd.service and net.connman.ead.service activation files with Exec= pointing at the binaries directly and no SystemdService= line, and install them in post_install. The runit services are kept as-is for users who prefer always-running iwd.

Upstream's Makefile.am gates installation of net.connman.iwd.service
and net.connman.ead.service behind the systemd-service build
conditional, alongside the systemd unit. With --disable-systemd-service
(which Void uses) these activation files are dropped, even though they
are not systemd-specific.

Without them, dbus-daemon cannot launch iwd/ead on demand, so clients
like NetworkManager (with wifi.backend=iwd) fail to bring up the
wireless device unless the runit service happens to already be running.
This causes intermittent boot-time failures depending on iwd vs.
NetworkManager startup ordering.

Install our own activation files (with Exec= pointing at the binaries
directly, and no SystemdService= line) so D-Bus activation works on
non-systemd Void.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant