Strangely accurate RTC time on Debian - Page 1
Forum section: electronics / general

author: Logan
author_rank: Frequent Contributor
timestamp: May 16, 2024, 03:41:38 pm
content: Hi friends.One of my PC's RTC only drift 0.3 seconds over 15 days, and it even correct itself sometimes (so it's not always faster or slower).It's so strange because it's using a similar configuration compare to another PC, which drift ~10 seconds per day...There's no ntpd installed, how can I check if there's any software syncing time for me, or is this RTC just happens to be so accurate?Thank you for reading.

author: RoGeorge
author_rank: Super Contributor
timestamp: May 16, 2024, 05:33:09 pm
content: In Ubuntu (which is a customised Debian) the time synchronization is on by default. Try this from a terminal:timedatectl status

author: Nominal Animal
author_rank: Super Contributor
timestamp: May 16, 2024, 05:42:05 pm
content: Instead ofntpd, systemd usessystemd.timesyncdservice.Even though you don't haventpdor anything similarly named running, you do have an ntpd client-onlysystemd.timesyncdservice running.

author: Logan
author_rank: Frequent Contributor
timestamp: May 16, 2024, 10:37:32 pm
content: Thank you both.Here's some CLI results:~$ timedatectl statusLocal time: Thu 2024-05-16 22:32:31 UTCUniversal time: Thu 2024-05-16 22:32:31 UTCRTC time: Thu 2024-05-16 22:32:31Time zone: UTC (UTC, +0000)System clock synchronized: noNTP service: n/aRTC in local TZ: no~$ timedatectl timesync-statusFailed to query server: The name org.freedesktop.timesync1 was not provided by any .service files~$ timedatectl show-timesyncFailed to parse bus message: No route to host~$ timedatectl showTimezone=UTCLocalRTC=noCanNTP=noNTP=noNTPSynchronized=noTimeUSec=Thu 2024-05-16 22:32:45 UTCRTCTimeUSec=Thu 2024-05-16 22:32:45 UTC~$ systemctl status systemd.timesyncdUnit systemd.timesyncd.service could not be found.Still seems not synced...

author: SiliconWizard
author_rank: Super Contributor
timestamp: May 16, 2024, 10:39:12 pm
content: Yep. systemd-based distributions rarely use ntpd, although you can use it instead of systemd.timesyncd if you prerfer. That's what I had set up myself, but it turned out that ntpd was much slower to update time than timesyncd for some reason, so I eventually resorted to timesyncd.Also to answer the OP, not all RTCs on motherboards are born equal. 10 seconds per day of RTC drift is about 115 ppm, which is about average (not good) for a *basic* crystal-based oscillator, and proof in itself that it's not network-synced.But 0.3 s of drift over 15 days would be 0.23 ppm, which, while not completely impossible with a good TCXO, is completely unlikely to be what you get with any consumer PC RTC, so it's evidently network-synced.

author: Logan
author_rank: Frequent Contributor
timestamp: May 16, 2024, 10:50:36 pm
content: Thank you, but as CLI shown above, systemd.timesyncd is also not the case.I did heavy clean after initial installation, so many components are striped off.

author: SiliconWizard
author_rank: Super Contributor
timestamp: May 16, 2024, 10:59:40 pm
content: Quote from: Logan on May 16, 2024, 10:50:36 pmTry with a dash instead:systemctl status systemd-timesyncd

author: Logan
author_rank: Frequent Contributor
timestamp: May 16, 2024, 11:06:36 pm
content: You mean this?~$ dash$ systemctl status systemd.timesyncdUnit systemd.timesyncd.service could not be found.Looks the same.I also tried sudo, same result.

author: SiliconWizard
author_rank: Super Contributor
timestamp: May 16, 2024, 11:08:06 pm
content: No, read (or copy-paste) again the command line I posted. A dash instead of a dot in systemd-timesyncd

author: Logan
author_rank: Frequent Contributor
timestamp: May 16, 2024, 11:15:05 pm
content: Ahhhh...~$ systemctl status systemd-timesyncdUnit systemd-timesyncd.service could not be found.Same result with sudo.

author: amyk
author_rank: Super Contributor
timestamp: May 17, 2024, 02:43:07 am
content: Quote from: SiliconWizard on May 16, 2024, 10:39:12 pmI think PC RTCs were much more accurate in the days when they were not expected to be network-synced. I have some old PCs which drift at most a minute per year.

author: RoGeorge
author_rank: Super Contributor
timestamp: May 17, 2024, 06:34:04 am
content: Quote from: Logan on May 16, 2024, 10:37:32 pmLooks like it's not synced. You've been lucky to have a very good RTC.The ultimate test would be to physically disconnect the LAN cable/wireless, and see if it keeps the same accuracy.Question is, how much its frequency will change with time, with battery voltage, and with temperature.My Ubuntu machine reports this:Code:~$ timedatectl statusLocal time: Fri 2024-05-17 09:24:36 EESTUniversal time: Fri 2024-05-17 06:24:36 UTCRTC time: Fri 2024-05-17 06:24:36Time zone: Europe/Bucharest (EEST, +0300)System clock synchronized: yesNTP service: activeRTC in local TZ: no~$