Skip to contentSkip to conversation

Time deamon headaches

PATCH New [email protected] 1 participant 3 messages Mar 17, 2025

lore
Share & tools
lore
#0 lore raw

cover Time deamon headaches

From: Randolph Sapp <[email protected]>

These are patches fixing generic issues I found when debugging a system auth problem related to device time being set prior to rootfs generation time.

These patches do not the fix to the issue described above and are not strictly necessary, they are just useful little fixes to restore default behavior and fix other warnings.

Randolph Sapp (2):
timesyncd: remove invalid character
systemd: remove sync-clocks service

 .../systemd/systemd/sync-clocks.service            | 14 --------------
 .../recipes-core/systemd/systemd/timesyncd.conf    |  2 +-
 .../recipes-core/systemd/systemd_%.bbappend        |  5 -----
 3 files changed, 1 insertion(+), 20 deletions(-)
 delete mode 100644 meta-arago-distro/recipes-core/systemd/systemd/sync-clocks.service
Signature · 1 line
2.48.1
#1 lore raw

PATCH 1/2 timesyncd: remove invalid character

From: Randolph Sapp <[email protected]>

This config file has an invalid character causing systemd-timesyncd to report an issue with the default config. Replace the invalid character with a newline like the original config uses.

---
 meta-arago-distro/recipes-core/systemd/systemd/timesyncd.conf | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta-arago-distro/recipes-core/systemd/systemd/timesyncd.conf +1 -1
index a9f762b7..2de49281 100644
@@ -11,7 +11,7 @@
 # Defaults can be restored by simply deleting this file and all drop-ins.
 #
 # See timesyncd.conf(5) for details.
-​
+
 [Time]
 NTP=0.pool.ntp.org 1.pool.ntp.org 2.pool.ntp.org 3.pool.ntp.org
 FallbackNTP=ntp.ubuntu.com
Signature · 1 line
2.48.1
#2 lore raw

PATCH 2/2 systemd: remove sync-clocks service

In reply to [email protected]

From: Randolph Sapp <[email protected]>

This is already handled by the kernel with RTC_SYSTOHC and any of the userspace time synchronization daemons we have (systemd-timesyncd).

This is handled only when an NTP sync occurs normally, so that the system RTC is updated to the proper time outright and doesn't create potential issues with the time sync daemon drift tracking between boots.

---
 .../systemd/systemd/sync-clocks.service            | 14 --------------
 .../recipes-core/systemd/systemd_%.bbappend        |  5 -----
 2 files changed, 19 deletions(-)
 delete mode 100644 meta-arago-distro/recipes-core/systemd/systemd/sync-clocks.service
meta-arago-distro/recipes-core/systemd/systemd/sync-clocks.service deleted +0 -14
deleted file mode 100644
index b11d05ad..00000000
@@ -1,14 +0,0 @@
-[Unit]
-Description=Synchronize System and HW clocks
-DefaultDependencies=no
-Wants=sysinit.target
-Conflicts=shutdown.target
-After=getty.target
-
-[Service]
-Type=oneshot
-ExecStart=/sbin/hwclock --systohc
-StandardOutput=syslog
-
-[Install]
-WantedBy=multi-user.target
meta-arago-distro/recipes-core/systemd/systemd_%.bbappend +0 -5
index 424f39da..bb57d094 100644
@@ -10,7 +10,6 @@ SRC_URI:append = " \
     file://15-eth.network \
     file://30-wlan.network \
     file://60-usb.network \
-    file://sync-clocks.service \
     file://timesyncd.conf \
     file://37-can-j7.rules \
     file://37-can-am62.rules \
@@ -32,10 +31,6 @@ do_install:append() {
     install -m 0644 ${UNPACKDIR}/30-wlan.network ${D}${sysconfdir}/systemd/network/
     install -m 0644 ${UNPACKDIR}/60-usb.network ${D}${sysconfdir}/systemd/network/
 
-    install -d ${D}${sysconfdir}/systemd/system/sysinit.target.wants
-    install -m 0644 ${UNPACKDIR}/sync-clocks.service ${D}${sysconfdir}/systemd/system/
-    ln -sf ../sync-clocks.service ${D}${sysconfdir}/systemd/system/sysinit.target.wants/sync-clocks.service
-
     # Allow automount from udev
     install -m 0644 ${D}${systemd_system_unitdir}/systemd-udevd.service ${D}${sysconfdir}/systemd/system/
     sed -i 's/MountFlags=slave/MountFlags=shared/g' ${D}${sysconfdir}/systemd/system/systemd-udevd.service
Signature · 1 line
2.48.1