You are not logged in.

#1 Today 15:09:58

Wild Penguin
Member
Registered: 2015-03-19
Posts: 410

systemd-timesyncd refuses to sync my clock

Hi,

This is an old laptop with RTC backup battery dead. Sometimes (when the main battery runs out of power) it will forget time.

It uses (currently) iwd to connect to the internet via WiFi.

Systemd-timesyncd refuses to synchronize time / is not working correctly.

I have only one configuration file in /etc/systemd/timesyncd.conf:

#  This file is part of systemd.
#
#  systemd is free software; you can redistribute it and/or modify it under the
#  terms of the GNU Lesser General Public License as published by the Free
#  Software Foundation; either version 2.1 of the License, or (at your option)
#  any later version.
#
# Entries in this file show the compile time defaults. Local configuration
# should be created by either modifying this file (or a copy of it placed in
# /etc/ if the original file is shipped in /usr/), or by creating "drop-ins" in
# the /etc/systemd/timesyncd.conf.d/ directory. The latter is generally
# recommended. Defaults can be restored by simply deleting the main
# configuration file and all drop-ins located in /etc/.
#
# Use 'systemd-analyze cat-config systemd/timesyncd.conf' to display the full config.
#
# See timesyncd.conf(5) for details.

[Time]
NTP=time.mikes.fi time1.mikes.fi time2.mikes.fi time3.mikes.fi
FallbackNTP=0.arch.pool.ntp.org 1.arch.pool.ntp.org 2.arch.pool.ntp.org 3.arch.pool.ntp.org
#RootDistanceMaxSec=5
PollIntervalMinSec=32
PollIntervalMaxSec=2048
ConnectionRetrySec=30
SaveIntervalSec=60

systemd-timesyncd.service is disabled (although I have enabled it previously, see the second point); I can enable / run it with sudo systemctl enable --now systemd-timesyncd.service just fine, but time does not sync.

If I run timedatectl set-ntp true - it gets disabled again!

After running timedatectl:

$ timedatectl status
               Local time: ti 2026-11-10 19:04:12 EET
           Universal time: ti 2026-11-10 17:04:12 UTC
                 RTC time: la 1988-01-02 09:32:36
                Time zone: Europe/Helsinki (EET, +0200)
System clock synchronized: no
              NTP service: active
          RTC in local TZ: no

and

$ timedatectl timesync-status
Command requires systemd-timesyncd.service, but it is not available: Could not activate remote peer 'org.freedesktop.timesync1': activation request failed: unknown unit

And forcibly restarting systemd-timesyncd (after it being disabled by timedatectl):

$ timedatectl status
               Local time: ti 2026-11-10 19:05:48 EET
           Universal time: ti 2026-11-10 17:05:48 UTC
                 RTC time: la 1988-01-02 09:34:12
                Time zone: Europe/Helsinki (EET, +0200)
System clock synchronized: no
              NTP service: active
          RTC in local TZ: no

and:

$ timedatectl timesync-status
       Server: n/a (n/a)
Poll interval: 0 (min: 32s; max 34min 8s)
 Packet count: 0

I've waited "a while", but it will never sync the time.

Here are the logs of systemd-timesyncd from this boot (they are really quite useless and don't give any hint on what I may have misconfigured) EDIT: This is indeed now, not "Nov 10", the time is wrong!:

$ LANG=C journalctl -b0 -u systemd-timesyncd.service 
Nov 10 18:50:48 Viuhti-X61s systemd[1]: Starting Network Time Synchronization...
Nov 10 18:50:48 Viuhti-X61s systemd[1]: Started Network Time Synchronization.
Nov 10 18:52:25 Viuhti-X61s systemd[1]: Stopping Network Time Synchronization...
Nov 10 18:52:26 Viuhti-X61s systemd[1]: systemd-timesyncd.service: Deactivated successfully.
Nov 10 18:52:26 Viuhti-X61s systemd[1]: Stopped Network Time Synchronization.
Nov 10 18:54:08 Viuhti-X61s systemd[1]: Starting Network Time Synchronization...
Nov 10 18:54:08 Viuhti-X61s systemd[1]: Started Network Time Synchronization.
Nov 10 18:54:36 Viuhti-X61s systemd[1]: Stopping Network Time Synchronization...
Nov 10 18:54:37 Viuhti-X61s systemd[1]: systemd-timesyncd.service: Deactivated successfully.
Nov 10 18:54:37 Viuhti-X61s systemd[1]: Stopped Network Time Synchronization.
Nov 10 18:56:38 Viuhti-X61s systemd[1]: Starting Network Time Synchronization...
Nov 10 18:56:38 Viuhti-X61s systemd[1]: Started Network Time Synchronization.
Nov 10 18:57:17 Viuhti-X61s systemd[1]: Stopping Network Time Synchronization...
Nov 10 18:57:18 Viuhti-X61s systemd[1]: systemd-timesyncd.service: Deactivated successfully.
Nov 10 18:57:18 Viuhti-X61s systemd[1]: Stopped Network Time Synchronization.
Nov 10 18:58:31 Viuhti-X61s systemd[1]: Starting Network Time Synchronization...
Nov 10 18:58:31 Viuhti-X61s systemd[1]: Started Network Time Synchronization.
Nov 10 19:03:57 Viuhti-X61s systemd[1]: Stopping Network Time Synchronization...
Nov 10 19:03:58 Viuhti-X61s systemd[1]: systemd-timesyncd.service: Deactivated successfully.
Nov 10 19:03:58 Viuhti-X61s systemd[1]: Stopped Network Time Synchronization.
Nov 10 19:05:46 Viuhti-X61s systemd[1]: Starting Network Time Synchronization...
Nov 10 19:05:46 Viuhti-X61s systemd[1]: Started Network Time Synchronization.

I can set the time manually but I'd rather have it sync whenever online automatically, as the problem will re-occur.

There must be some obvious thing I'm missing, or systemd-timesyncd is just buggy and I need to install some other ntp client?

What I need (in this case) is just simple synchronization to quickly fix the time when it is way off. I don't mind if it tries to get to ms-level accuracy after that (but it is not really needed).

Last edited by Wild Penguin (Today 15:12:04)

Offline

#2 Today 16:01:59

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,727

Re: systemd-timesyncd refuses to sync my clock

I just checked my config file, and the entire thing is commented out.   The values that are commented out are, presumably, the default values.   The values from my config (commented out) match those in your file (not commented out) -- except  this line:

NTP=time.mikes.fi time1.mikes.fi time2.mikes.fi time3.mikes.fi

I can ping mikes.time.fi time.mikes.fi, but are you sure there is a time server there?   The default in my config is blank, with a fallback pointing to services on ntp.org.

My first step would be to temporarily rename your configuration to something else and try again.

Edit:  Dyslexics of the world Untie!

Last edited by ewaller (Today 16:04:41)


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way

Offline

#3 Today 16:22:41

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 78,925

Re: systemd-timesyncd refuses to sync my clock

Command requires systemd-timesyncd.service, but it is not available

systemd-timesyncd.service is disabled (although I have enabled it previously, see the second point); I can enable / run it with sudo systemctl enable --now systemd-timesyncd.service just fine, but time does not sync.

systemctl status systemd-timesyncd.service

Offline

Board footer

Powered by FluxBB