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)
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
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.
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.
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
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