Timedatectl when first starting laptop

[demo@Manjaro ~]$ systemctl status ntpd.service --no-pager
● ntpd.service - Network Time Service
     Loaded: loaded (/usr/lib/systemd/system/ntpd.service; enabled; preset: disabled)
     Active: active (running) since Sat 2023-06-03 22:27:28 EDT; 47min ago
    Process: 454 ExecStart=/usr/bin/ntpd -g -u ntp:ntp (code=exited, status=0/SUCCESS)
   Main PID: 459 (ntpd)
      Tasks: 2 (limit: 18726)
     Memory: 2.8M
        CPU: 245ms
     CGroup: /system.slice/ntpd.service
             └─459 /usr/bin/ntpd -g -u ntp:ntp

Jun 03 22:27:28 Manjaro ntpd[459]: Listen normally on 2 lo 127.0.0.1:123
Jun 03 22:27:28 Manjaro ntpd[459]: Listen normally on 3 lo [::1]:123
Jun 03 22:27:28 Manjaro ntpd[459]: Listening on routing socket on fd #20 for interface updates
Jun 03 22:27:28 Manjaro ntpd[459]: kernel reports TIME_ERROR: 0x41: Clock Unsynchronized
Jun 03 22:27:28 Manjaro ntpd[459]: kernel reports TIME_ERROR: 0x41: Clock Unsynchronized
Jun 03 22:27:28 Manjaro systemd[1]: Started Network Time Service.
Jun 03 22:27:34 Manjaro ntpd[459]: Listen normally on 4 wlan0 192.168.68.31:123
Jun 03 22:27:34 Manjaro ntpd[459]: Listen normally on 5 wlan0 [fe80::9501:30fc:92ab:2567%2]:123
Jun 03 22:27:34 Manjaro ntpd[459]: new interface(s) found: waking up resolver
Jun 03 22:30:54 Manjaro ntpd[459]: ntpd: daemon failed to notify parent!

yeah I’m going to bed.
I will pick this up in the morning.
Thanks for trying to help.

This morning I have this:

[demo@Manjaro ~]$ systemctl status ntpd.service --no-pager
● ntpd.service - Network Time Service
     Loaded: loaded (/usr/lib/systemd/system/ntpd.service; enabled; preset: disabled)
     Active: active (running) since Sat 2023-06-03 22:27:28 EDT; 11h ago
    Process: 454 ExecStart=/usr/bin/ntpd -g -u ntp:ntp (code=exited, status=0/SUCCESS)
   Main PID: 459 (ntpd)
      Tasks: 2 (limit: 18726)
     Memory: 2.8M
        CPU: 278ms
     CGroup: /system.slice/ntpd.service
             └─459 /usr/bin/ntpd -g -u ntp:ntp

Jun 03 22:30:54 Manjaro ntpd[459]: ntpd: daemon failed to notify parent!
Jun 04 09:54:42 Manjaro ntpd[459]: Deleting interface #4 wlan0, 192.168.68.31#123, interface stats: received=128, sent=129…=3082 secs
Jun 04 09:54:42 Manjaro ntpd[459]: 108.61.23.93 local addr 192.168.68.31 -> <null>
Jun 04 09:54:42 Manjaro ntpd[459]: 158.51.134.123 local addr 192.168.68.31 -> <null>
Jun 04 09:54:42 Manjaro ntpd[459]: 108.61.56.35 local addr 192.168.68.31 -> <null>
Jun 04 09:54:42 Manjaro ntpd[459]: 104.167.241.253 local addr 192.168.68.31 -> <null>
Jun 04 09:54:42 Manjaro ntpd[459]: Deleting interface #5 wlan0, fe80::9501:30fc:92ab:2567%2#123, interface stats: received…=3082 secs
Jun 04 09:54:48 Manjaro ntpd[459]: Listen normally on 6 wlan0 192.168.68.31:123
Jun 04 09:54:48 Manjaro ntpd[459]: Listen normally on 7 wlan0 [fe80::9501:30fc:92ab:2567%2]:123
Jun 04 09:54:48 Manjaro ntpd[459]: new interface(s) found: waking up resolver
Hint: Some lines were ellipsized, use -l to show in full.

Trying it with just ntp.service gives me this:

[demo@Manjaro ~]$ systemctl status ntp.service --no-pager
Unit ntp.service could not be found.

One more thing:

[demo@Manjaro ~]$ timedatectl
               Local time: Sun 2023-06-04 10:01:32 EDT
           Universal time: Sun 2023-06-04 14:01:32 UTC
                 RTC time: Sun 2023-06-04 14:01:31
                Time zone: America/New_York (EDT, -0400)
System clock synchronized: yes
              NTP service: inactive
          RTC in local TZ: no

Choose which one you want to run (either ntpd OR systemd-timesyncd) but not both of them.

That is fine with me.
But which on should I run?
And which one will work when the laptop starts is the problem?
Thanks

It’s ntpd.service, not ntp.service.

I was going by this from above.
I am using the ntpd.service and it isn’t working correctly.

So should I disable the ntpd.service and try the ntp service.
What is recommended for Manjaro?

OK I think I fixed it.
I disabled ntpd.service
enabled ntpdate.service and rebooted.
After about 2 minutes I got this.

[demo@Manjaro ~]$ timedatectl
               Local time: Sun 2023-06-04 15:07:30 EDT
           Universal time: Sun 2023-06-04 19:07:30 UTC
                 RTC time: Sun 2023-06-04 19:07:30
                Time zone: America/New_York (EDT, -0400)
System clock synchronized: yes
              NTP service: active
          RTC in local TZ: no

Sorry for the typo, should have been ntpd.service, you guys got that haha

I’d say its an open choice, considering the KDE distro has chosen one, and XFCE the other.

Good enough workaround if diagnosing the problem with ntpd is too hard.

FWIW, I have both ntpd.service and ntpdate.service disabled:

$ systemctl status ntpd.service
○ ntpd.service - Network Time Service
Loaded: loaded (/usr/lib/systemd/system/ntpd.service; disabled; preset: disabled)
Active: inactive (dead)
$ systemctl status ntpdate.service
○ ntpdate.service - One-Shot Network Time Service
Loaded: loaded (/usr/lib/systemd/system/ntpdate.service; disabled; preset: disabled)
Active: inactive (dead)

…and use timedatectl:

$ timedatectl show
Timezone=Africa/Johannesburg
LocalRTC=no
CanNTP=yes
NTP=yes
NTPSynchronized=yes
TimeUSec=Mon 2023-06-05 08:39:47 SAST
RTCTimeUSec=Mon 2023-06-05 08:39:47 SAST

And I don’t seem to have a problem.

I haven’t tried disabling both to see what happens.
If you don’t have either running , how does it work to sync the time?

AFAIK timedatectl does that…

:man_shrugging:t4:

Disabling ntpd.service allows systemd-timesyncd.service to run, if it is enabled

1 Like