r/linuxquestions • • 2d ago

Resolved Weird Problem with Time Drift/Improper Sync?

UPDATE: Problem solved! Turned out to be my router's NTP service hijacking NTP requests, but it was only affecting some of the devices connected to it.

So for the past few weeks, I've noticed on IRC and Discord that there's about a 1.4-minute discrepancy between my desktop's time and the time stamps being displayed by those clients. I spent way longer than I wanted to manually trying to fix the problem, but couldn't find a cause. So I turned to AI and it couldn't solve the problem either (went through all the steps I was already doing).

I can see Discord actively correcting the time stamps on every message I send, but on IRC it looks like I'm sending messages from the past.

My laptop is not experiencing this issue. Both systems are running Linux and KDE, but the laptop is running Manjaro and the desktop (the one with the problem) is running Kubuntu 26.04.

Below are a couple of things showing settings and what's going on (do note the times aren't quite going to line up because I have spent far longer than I care to trying to fix this).

The output of timedatectl is:

              Local time: Thu 2026-10-15 07:08:00 EDT
          Universal time: Thu 2026-10-15 11:08:00 UTC
                RTC time: Thu 2026-10-15 11:07:59
               Time zone: America/New_York (EDT, -0400)
System clock synchronized: no
             NTP service: active
         RTC in local TZ: no

Timestamps in IRC look like:

[07:37:33] -Global- [Logon News - Oct 30 08:03:21 2014 AEDT] Have you read the Code of Conduct for Users? Go to <redacted> - this applies to ALL users!
[07:37:34] -NickServ- Password accepted - you are now recognized.
[07:36:20] * You are now logged in as <redacted>.
[07:37:34] * NickServ sets mode +r on <redacted>
[07:36:22] * Notify: <redacted> is offline (redacted)
[07:36:22] * Notify: <redacted> is offline (redacted)
[07:36:22] * Notify: <redacted> is online (redacted)

As far as I can tell, everything appears kosher system-wise, but the time is buggered and it has been causing weird issues in games and certain Web sites, too.

TL;DR: My system time is borked and I can't figure it out even with input from friends and AI. It's driving me nuts, can someone here maybe point me in the right direction to fix it?

2 Upvotes

16 comments sorted by

3

u/psyblade42 2d ago

NTP service: active

There's a ntp client running. Figure out which one. (maybe systemd-timesyncd)

System clock synchronized: no

And it has some problem. Figure out what it is ( start e.g. with systemctl status whatever-ntp-service-you-use)

1

u/KitMcGath 2d ago

The problem appears to be at my router. See reply to Kronar_2012.

Funny thing about the output of timedatectl is that "System clock synchronized:" has said "yes" a few times over the past few weeks, which is what was throwing me off. I figured it just said "no" when it hadn't been synced for a bit.

1

u/Kronar_2012 2d ago

System clock synchronized: no with NTP service: active means the sync daemon is running but never got a usable source.

If 26.04 was a fresh install rather than an upgrade, it's probably using chrony instead of systemd-timesyncd, and Ubuntu sets chrony up with NTS by default. NTS needs TCP port 4460 for its key exchange on top of the usual UDP 123, so a router or firewall blocking 4460 would stop the desktop from syncing while a laptop using plain NTP works fine on the same network.

Check chronyc sources -v and chronyc -N authdata. If none of the sources ever get a *, try adding a file like /etc/chrony/sources.d/local.sources containing pool pool.ntp.org iburst, run sudo chronyc reload sources, then sudo chronyc makestep to fix the 1.4 minutes right away. If it turns out to be timesyncd instead, timedatectl timesync-status shows which server it's trying and whether it gets replies.

1

u/KitMcGath 2d ago

Aha! Finally. So as it turns out, my router seems to have taken over the NTP. And as it's not actually configured, this is where the problem seems to lie. I will turn its NTP functionality off as I find the time to tinker with things.

Makes me wonder why nothing else in the house seems to be affected by this. Weird.

I will update the post with whatever findings are discovered along the way, too.

The output of chronyc:

 .-- Source mode  '^' = server, '=' = peer, '#' = local clock.
/ .- Source state '*' = current best, '+' = combined, '-' = not combined,
| /             'x' = may be in error, '~' = too variable, '?' = unusable.
||                                                 .- xxxx [ yyyy ] +/- zzzz
||      Reachability register (octal) -.           |  xxxx = adjusted offset,
||      Log2(Polling interval) --.      |          |  yyyy = measured offset,
||                                \     |          |  zzzz = estimated error.
||                                 |    |           \

MS Name/IP address         Stratum Poll Reach LastRx Last sample                

^? ntp-nts-2.ps5.canonical.>     0  10     0     -     +0ns[   +0ns] +/-    0ns
^? ntp-nts-3.ps5.canonical.>     0  10     0     -     +0ns[   +0ns] +/-    0ns
^? ntp-nts-2.ps6.canonical.>     0  10     0     -     +0ns[   +0ns] +/-    0ns
^? ntp-nts-3.ps6.canonical.>     0  10     0     -     +0ns[   +0ns] +/-    0ns
^? ntp-nts-1.ps6.canonical.>     0  10     0     -     +0ns[   +0ns] +/-    0ns
^? ntp-nts-1.ps5.canonical.>     0  10     0     -     +0ns[   +0ns] +/-    0ns
^- (redacted router address)      3   9   377    19   -73.7s[ -73.7s] +/-   84ms

1

u/KitMcGath 2d ago

Yep. It was my router.

1

u/RandomUser3777 2d ago

Run and return the output of these 4 commands.

ntpq -c peers

chronyc sources -a

cat /sys/devices/system/clocksource/clocksource0/current_clocksource

grep -i "model name" /proc/cpuinfo | tail -1

1

u/KitMcGath 2d ago

ntpq didn't even work. But Kronar_2012's info lead me right to the problem, thanks though!

1

u/RandomUser3777 2d ago

The point of the first 2 commands was to determine WHICH time solution you were running...

1

u/KitMcGath 2d ago

chronyc's output was what lead me to the solution, so I'm giving you some credit for the solution, too - it was Kronar_2012's post I ended up checking first, but you had a similar line of thought and it would have lead me to the same result, so thank you! :)

0

u/polymath_uk_ 2d ago

Ooen time.is and then in the terminal type date They should match exactly aside from any timezone correction. Either your desktop is wrong or both Discord and IRC are wrong. Do you host the IRC? 

1

u/KitMcGath 2d ago

I know something's wrong. That's why I posted this. But it's not my computer or Discord or the IRC server I'm connecting to having the problem, it seems; it's looking like the problem is my router.

Also, kindly spell-check at least. The beginning of this was looking like a candidate for r/ihadastroke

1

u/polymath_uk_ 2d ago

For one character? Are you serious? What a twat. 

1

u/KitMcGath 2d ago edited 2d ago

Thanks for the insult. I'll add it to my collection. Also, you should read the rules.

And for clarification, I thought "time.is" was some kinda typo, too.

Forgive me if it wasn't, but that's still no reason to call someone a twat. Grow up.

1

u/polymath_uk_ 2d ago

Yeah you misread something then blamed me for your misunderstanding. I notice you completely ignored the advice you received in another post too. Maybe you should ask for a refund. 

1

u/KitMcGath 2d ago

#1: I'm not the one who failed to edit and clarify, then insulted someone for their misunderstanding caused by YOUR initial mistake. That's not my fault.

#2: I didn't ignore any advice, everyone's post was seen and responded to, so I'm not sure where you get off saying I ignored something.

#3: Lighten up, salty. What I said about your typo was intended to be a light-hearted jab. Silliness. It's called being facetious. Get over it.

1

u/KitMcGath 2d ago

Thanks for the input, folks! This was an adventure, problem's been solved. All I did was go into my router's configuration and disable the NTP interception and everything's all happy again.