Idk I messed up my system time sync I think

I’m on fedora 41 kde, and this is my first time using linux (maybe a a bit of a steep learning curve lol. I think I may have messed up my system clock as it keeps desyncing with my actual real time. I tried following some online guides on how to configure ntp time, but I think I also managed to mess it up…If anyone can help, it would be greatly appreciated.

this is what my konsole looks like right now

spirals@fedora:~$ timedatectl
Local time: Sat 2025-02-01 18:09:52 CST
Universal time: Sat 2025-02-01 10:09:52 UTC
RTC time: Sat 2025-02-01 18:09:52
Time zone: Asia/Shanghai (CST, +0800)
System clock synchronized: no
NTP service: active
RTC in local TZ: yes

Warning: The system is configured to read the RTC time in the local time zone.
This mode cannot be fully supported. It will create various problems
with time zone changes and daylight saving time adjustments. The RTC
time is never updated, it relies on external facilities to maintain it.
● chronyd.service - NTP client/server
Loaded: loaded (/usr/lib/systemd/system/chronyd.service; enabled; preset: enabled)
Drop-In: /usr/lib/systemd/system/service.d
└─10-timeout-abort.conf, 50-keep-warm.conf
Active: active (running) since Sat 2025-02-01 18:02:41 CST; 8min ago
Invocation: d5515e8f707e4777b5e1bfc64bdb0dd3
Docs: man:chronyd(8)
man:chrony.conf(5)
Main PID: 89634 (chronyd)
Tasks: 1 (limit: 37602)
Memory: 1M (peak: 3.5M)
CPU: 35ms
CGroup: /system.slice/chronyd.service
└─89634 /usr/sbin/chronyd -F 2

Feb 01 18:02:41 fedora systemd[1]: Starting chronyd.service - NTP client/server…
Feb 01 18:02:41 fedora chronyd[89634]: chronyd version 4.6.1 starting (+CMDMON +NTP +REFCLOCK +RTC +PRIVDROP >
Feb 01 18:02:41 fedora chronyd[89634]: Using leap second list /usr/share/zoneinfo/leap-seconds.list
Feb 01 18:02:41 fedora chronyd[89634]: Frequency 0.095 +/- 0.444 ppm read from /var/lib/chrony/drift
Feb 01 18:02:41 fedora chronyd[89634]: Loaded seccomp filter (level 2)
Feb 01 18:02:41 fedora systemd[1]: Started chronyd.service - NTP client/server.
Feb 01 18:05:05 fedora chronyd[89634]: Can’t synchronise: no selectable sources
~
~
~
lines 1-22/22 (END)

Thanks in advance!

First you should fix your RTC to be in UTC.

sudo timedatectl set-local-rtc 0

Did you change /etc/chrony.conf at all? If so please share the changes you made.

What does chronyc sources report?

1 Like

I think I may have disabled it somehow, when I entered in

chronyc sources

it says

506 cannot talk to daemon

chrony is still installed, and as far as I know, still works, maybe I failed to actually link to a ntp server?
thanks!

You can check it by running sudo tcpdump port ntp. This should show some package once every minut, or perhaps once every 5 minutes. This would look something similar to

14:11:23.608649 IP6 newbox.40330 > time.cloudflare.com.ntp: NTPv4, Client, length 48
14:11:23.621972 IP6 time.cloudflare.com.ntp > newbox.40330: NTPv4, Server, length 48
14:11:55.794823 IP6 newbox.46689 > time.cloudflare.com.ntp: NTPv4, Client, length 48
14:11:55.809455 IP6 time.cloudflare.com.ntp > newbox.46689: NTPv4, Server, length 48
14:13:00.044772 IP6 newbox.51535 > time.cloudflare.com.ntp: NTPv4, Client, length 48
14:13:00.060616 IP6 time.cloudflare.com.ntp > newbox.51535: NTPv4, Server, length 48

where time.cloudflare.com.ntp is one of the members of the fedora.pool.ntp.org time server pool. There are quite a few of them scattered around the world.

If you only see outgoing ntp packages without corresponding incoming packages, you may have some firewall issue.

1 Like

What does systemctl status chronyd report?
Is the service running? I cannot recall if chronyd exits if the time is very wrong or not.
Maybe check what the time set in the BIOS is.

With the service stopped. systemctl stop chronyd
You can run from a terminal with sudo chronyd -d or for extra debug sudo chronyd -dd

spirals@fedora:~$ systemctl status chronyd 
● chronyd.service - NTP client/server
     Loaded: loaded (/usr/lib/systemd/system/chronyd.service; enabled; preset: enabled)
    Drop-In: /usr/lib/systemd/system/service.d
             └─10-timeout-abort.conf, 50-keep-warm.conf
     Active: active (running) since Sat 2025-02-01 20:17:23 CST; 2h 29min ago
 Invocation: 65ac9aaa72504223a7ee839cbdf09d71
       Docs: man:chronyd(8)
             man:chrony.conf(5)
   Main PID: 25548 (chronyd)
      Tasks: 1 (limit: 37607)
     Memory: 1.4M (peak: 3.9M)
        CPU: 124ms
     CGroup: /system.slice/chronyd.service
             └─25548 /usr/sbin/chronyd -F 2

Feb 01 20:17:23 fedora systemd[1]: Starting chronyd.service - NTP client/server...
Feb 01 20:17:23 fedora chronyd[25548]: chronyd version 4.6.1 starting (+CMDMON +NTP +REFCLOCK +RTC +PRIVDROP >
Feb 01 20:17:23 fedora chronyd[25548]: Using leap second list /usr/share/zoneinfo/leap-seconds.list
Feb 01 20:17:23 fedora chronyd[25548]: Frequency 0.095 +/- 0.444 ppm read from /var/lib/chrony/drift
Feb 01 20:17:23 fedora chronyd[25548]: Loaded seccomp filter (level 2)
Feb 01 20:17:23 fedora systemd[1]: Started chronyd.service - NTP client/server.
Feb 01 20:19:47 fedora chronyd[25548]: Can't synchronise: no selectable sources

it shows this, so I’m guessing I’m just not connected to the ntp servers?

my bios time has also been set to utc

I see no packages haha, and it says that 0 packets were received. I’m assuming that’s not good

I edited your post to use pre-formatted text for the report (the </> button).

This says that you either have a bad /etc/chrony.conf or a network issue blocking NTP packets.

What is in your /etc/chrony.conf (show here please)?
What is the output of chronyc sources?

1 Like

for chronyc sources:

spirals@Spirals:~$ chronyc sources
MS Name/IP address         Stratum Poll Reach LastRx Last sample               
===============================================================================
^- time.cloudflare.com           3   6    36   180   +130ms[ +130ms] +/-  212ms
^* 119.28.230.190                2   6    36   180  +1928us[-130.0s] +/-   35ms
^- time.cloudflare.com           3   6    66   178   +117ms[ +117ms] +/-  198ms
^- 2402:f000:1:416:101:6:6:>     2   6    36   177  +1219us[+1219us] +/-   19ms

for chrony.config I appear to have two files, the first one says this:


# Use public servers from the pool.ntp.org project.
# Please consider joining the pool (https://www.pool.ntp.org/join.html).
pool 2.fedora.pool.ntp.org iburst

# Use NTP servers from DHCP.
sourcedir /run/chrony-dhcp

# Record the rate at which the system clock gains/losses time.
driftfile /var/lib/chrony/drift

# Allow the system clock to be stepped in the first three updates
# if its offset is larger than 1 second.
makestep 1.0 3

# Enable kernel synchronization of the real-time clock (RTC).
rtcsync

# Enable hardware timestamping on all interfaces that support it.
#hwtimestamp *

# Increase the minimum number of selectable sources required to adjust
# the system clock.
#minsources 2

# Allow NTP client access from local network.
#allow (pretty sure this is my IP Address)

# Serve time even if not synchronized to a time source.
#local stratum 10

# Require authentication (nts or key option) for all NTP sources.
#authselectmode require

# Specify file containing keys for NTP authentication.
#keyfile /etc/chrony.keys

# Save NTS keys and cookies.
ntsdumpdir /var/lib/chrony

# Insert/delete leap seconds by slewing instead of stepping.
#leapsecmode slew

# Set the TAI-UTC offset of the system clock.
leapseclist /usr/share/zoneinfo/leap-seconds.list

# Specify directory for log files.
logdir /var/log/chrony

# Select which information is logged.
#log measurements statistics tracking

While the second one says this

u     chrony -     "chrony system user" /var/lib/chrony /sbin/nologin

Thanks!

This shows 4 ntp servers which don’t agree on what time it is. Perhaps it would be better to switch to using a Chinese ntp pool, for example cn.pool.ntp.org. You do that in /etc/chrony.conf by replacing the line

pool 2.fedora.pool.ntp.org iburst

by

pool cn.pool.ntp.org iburst

I swapped this, and everything seems to be working now, thanks!