Apologies — the original description contained an error that sent you down
the wrong path: this is not a fresh desktop image. The affected system is
the Raspberry Pi *server* preinstalled image, originally 24.10, release-
upgraded through 25.04 and 25.10 to 26.04 (dist-upgrade logs from
2025-05-17, 2025-10-30 and 2026-05-15). A desktop was added along the way,
so the rootfs is NetworkManager-managed (netplan NM renderer,
systemd-networkd disabled). Sorry for the wasted reproduction effort.

That difference explains both of your observations:

1. chrony vs timesyncd: chrony never got pulled in by the release
upgrades, so systemd-timesyncd is still the active NTP client here —
the angle you suspected:

  $ dpkg -l chrony | tail -1
  un  chrony  <none>  <none>  (no description available)
  $ systemctl is-active systemd-timesyncd
  active

2. Why /run/systemd/netif/state never exists on your fresh desktop image:
the systemd-networkd dracut module is dragged in by
cloud-initramfs-dyn-netconf, which is part of the server/cloud image
stack and not on desktop images:

  $ dpkg -S /usr/lib/dracut/modules.d/05dyn-netconf
  cloud-initramfs-dyn-netconf: /usr/lib/dracut/modules.d/05dyn-netconf
  $ cat /usr/lib/dracut/modules.d/05dyn-netconf/module-setup.sh
  ...
  depends() {
      echo systemd-networkd
  }

There is no check() gating it, so every initrd built on a server-based
install includes the full networkd service, enabled at multi-user.target:

  $ sudo lsinitrd /boot/initrd.img-7.0.0-1014-raspi | grep -E 'networkd|^dracut 
modules' -A2
  dracut modules:
  dyn-netconf
  ...
  systemd-networkd
  ...
  etc/systemd/system/multi-user.target.wants/systemd-networkd.service
      -> /usr/lib/systemd/system/systemd-networkd.service

3. Journal of the current boot showing the handoff (note the timestamp
jumps — the initrd runs with the clock unset, which is also why the drift
matters on battery-less Pis):

  Apr 15 14:32:53 systemd[1]: Starting systemd-networkd.service...
  Jan 04 16:20:22 systemd-networkd[309]: eth0: Configuring with
      /run/systemd/network/zzzz-dracut-default.network.
  Jan 04 16:20:23 systemd-networkd[309]: eth0: Link UP
  Jan 04 16:20:23 systemd[1]: Stopping systemd-networkd.service...
      (never gained carrier -> final state write: ONLINE_STATE=offline)
  Jan 04 16:20:23 systemd[1]: Reached target initrd-switch-root.target.

4. Initrd-networkd leftovers still visible in /run this boot (the state
file itself is absent only because my tmpfiles.d workaround removes it;
note the 1970 timestamp):

  $ ls -la /run/systemd/netif/
  drwxr-xr-x systemd-network ... Apr 15 14:32 dhcp-server-lease
  srw-rw-rw- systemd-network ... Apr 15 14:32 io.systemd.Network
  drwxr-xr-x systemd-network ... Apr 15 14:32 leases
  drwxr-xr-x systemd-network ... Jan  4  1970 links
  $ ls /run/systemd/network/
  zzzz-dracut-default.network

On "confirmed working": the workaround was verified on this system, where
the initrd recreates the file on every boot — deleting it made timesyncd
sync immediately (stepping the clock +5m4.5s), and the tmpfiles.d rule has
kept it syncing across reboots since. On your desktop image the
precondition (networkd in the initrd) is absent, so there was nothing for
it to do.

So the affected population is narrower than the original description
claimed: installs carrying cloud-initramfs-dyn-netconf (server-image
lineage, including server installs upgraded to desktop) whose rootfs
renderer is NetworkManager and whose NTP client is still
systemd-timesyncd (e.g. pre-resolute installs that never got chrony).
Given that the actual module pulling networkd into the initrd is
05dyn-netconf, this may be better targeted at cloud-initramfs-tools than
(or in addition to) ubuntu-raspi-settings — happy for it to be retargeted.

And yes, I used an AI assistant to investigate and draft this report; the
"desktop image" slip slipped in that way and I should have caught it
before filing. The machine, the symptom, and every output above are from
the real affected system.

** Changed in: ubuntu-raspi-settings (Ubuntu)
       Status: Incomplete => New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2160661

Title:
  systemd-timesyncd never syncs: stale /run/systemd/netif/state left by
  initrd systemd-networkd (via cloud-initramfs-dyn-netconf) on
  NetworkManager-managed server-lineage installs

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ubuntu-raspi-settings/+bug/2160661/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to