You are not logged in.

#1 2022-04-01 12:16:18

RounakDutta
Member
From: West Bengal, India
Registered: 2022-02-11
Posts: 173
Website

[SOLVED] Time is not synchronized currently in my pc

When I installed arch during the installation it told me to do

 timedatectl set-ntp true 

And I did it!! I also verified it

timedatectl status 

But after installing everything in arch ( GUI , Window managers etc etc)
Whenever I do

 timedatectl status 

it shows

 [rounak@archissexy ~]$ timedatectl status
               Local time: Fri 2022-04-01 17:45:57 IST
           Universal time: Fri 2022-04-01 12:15:57 UTC
                 RTC time: Fri 2022-04-01 12:15:57
                Time zone: Asia/Kolkata (IST, +0530)
System clock synchronized: no
              NTP service: inactive
          RTC in local TZ: no
[rounak@archissexy ~]$ 

Any clue why it happens ?

Last edited by RounakDutta (2022-04-23 10:00:26)

Offline

#2 2022-04-01 13:21:48

Raynman
Member
Registered: 2011-10-22
Posts: 1,539

Re: [SOLVED] Time is not synchronized currently in my pc

There's a pre-installation step: https://wiki.archlinux.org/title/Instal … stem_clock
This makes sure the clock is correct in the live system that you use to perform the installation.

Then there's a post-installation section at the end, referring to general recommendations for the newly installed system, where you can find https://wiki.archlinux.org/title/Genera … ronization

So basically you should run the same command again for the new installation (or check out other NTP implementations).

Offline

#3 2022-04-01 14:36:28

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,739

Re: [SOLVED] Time is not synchronized currently in my pc

What does
timedatectl set-ntp true
do?  Recheck timedatectl status


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#4 2022-04-01 15:19:32

RounakDutta
Member
From: West Bengal, India
Registered: 2022-02-11
Posts: 173
Website

Re: [SOLVED] Time is not synchronized currently in my pc

ewaller wrote:

What does
timedatectl set-ntp true
do?  Recheck timedatectl status

I already did it. Once outside chroot and now inside my pc timedatectl set-ntp true doesn fix the problem but it is only a temporary fix. It gets disabled again sad

Last edited by RounakDutta (2022-04-01 15:24:37)

Offline

#5 2022-04-01 15:21:35

RounakDutta
Member
From: West Bengal, India
Registered: 2022-02-11
Posts: 173
Website

Re: [SOLVED] Time is not synchronized currently in my pc

Raynman wrote:

There's a pre-installation step: https://wiki.archlinux.org/title/Instal … stem_clock
This makes sure the clock is correct in the live system that you use to perform the installation.

Then there's a post-installation section at the end, referring to general recommendations for the newly installed system, where you can find https://wiki.archlinux.org/title/Genera … ronization

So basically you should run the same command again for the new installation (or check out other NTP implementations).

I did the pre installation step because it was well written in the installation_guide topic but I didn't give general recommendations a good look so

 timedatectl set-ntp true 
sudo pacman -S chrony 
sudo systemctl enable chronyd.service

SO doing this will fix my problem right?

Last edited by RounakDutta (2022-04-01 15:26:57)

Offline

#6 2022-04-01 15:33:05

Fixxer
Member
From: Poland
Registered: 2011-08-29
Posts: 210

Re: [SOLVED] Time is not synchronized currently in my pc

Probably it will be better to use built in systemd-timesyncd. Edit as root file /etc/systemd/timesyncd.conf and set, for example:

[Time]
NTP=time.google.com

Next:

systemctl enable --now systemd-timesyncd

Check timedatectl status, etc. Look for better, closer  university or government source NTP server.

Show also:

timedatectl timesync-status

Info:
https://wiki.archlinux.org/title/systemd-timesyncd .

Last edited by Fixxer (2022-04-01 15:42:51)

Offline

#7 2022-04-01 15:37:59

RounakDutta
Member
From: West Bengal, India
Registered: 2022-02-11
Posts: 173
Website

Re: [SOLVED] Time is not synchronized currently in my pc

Fixxer wrote:

Probably it will be better to use built in systemd-timesyncd. Edit as root file /etc/systemd/timesyncd.conf and set, for example:

[Time]
NTP=time.google.com

Next:

systemctl enable --now systemd-timesyncd

Check timedatectl status, etc. Look for better, closer  university or government source NTP server.

Show also:

timedatectl timesync-status

Info:
https://wiki.archlinux.org/title/systemd-timesyncd .

 [rounak@archissexy ~]$ sudo systemctl disable systemd-timesyncd.service
Removed /etc/systemd/system/dbus-org.freedesktop.timesync1.service.
Removed /etc/systemd/system/sysinit.target.wants/systemd-timesyncd.service.
[rounak@archissexy ~]$ sudo vim /etc/systemd/timesyncd.conf
[rounak@archissexy ~]$ systemctl enable --now systemd-timesyncd
Created symlink /etc/systemd/system/dbus-org.freedesktop.timesync1.service → /usr/lib/systemd/system/systemd-timesyncd.service.
Created symlink /etc/systemd/system/sysinit.target.wants/systemd-timesyncd.service → /usr/lib/systemd/system/systemd-timesyncd.service.
[rounak@archissexy ~]$ timedatectl timesync-status
       Server: 216.239.35.0 (time.google.com)
Poll interval: 1min 4s (min: 32s; max 34min 8s)
         Leap: normal
      Version: 4
      Stratum: 1
    Reference: GOOG
    Precision: 1us (-20)
Root distance: 76us (max: 5s)
       Offset: -5.261ms
        Delay: 139.906ms
       Jitter: 0
 Packet count: 1
    Frequency: +17.861ppm
[rounak@archissexy ~]$ 

Offline

#8 2022-04-01 15:38:42

RounakDutta
Member
From: West Bengal, India
Registered: 2022-02-11
Posts: 173
Website

Re: [SOLVED] Time is not synchronized currently in my pc

Fixxer wrote:

Probably it will be better to use built in systemd-timesyncd. Edit as root file /etc/systemd/timesyncd.conf and set, for example:

[Time]
NTP=time.google.com

Next:

systemctl enable --now systemd-timesyncd

Check timedatectl status, etc. Look for better, closer  university or government source NTP server.

Show also:

timedatectl timesync-status

Info:
https://wiki.archlinux.org/title/systemd-timesyncd .

Is it ok ?

Last edited by RounakDutta (2022-04-01 15:42:15)

Offline

#9 2022-04-01 15:41:44

Fixxer
Member
From: Poland
Registered: 2011-08-29
Posts: 210

Re: [SOLVED] Time is not synchronized currently in my pc

Looks OK, but check:

timedatectl status

Be carefull not to mix several ntp programs, there can be only one of: ntp, chrony, systemd-timesyncd, whatever.

Offline

#10 2022-04-01 15:43:09

RounakDutta
Member
From: West Bengal, India
Registered: 2022-02-11
Posts: 173
Website

Re: [SOLVED] Time is not synchronized currently in my pc

Fixxer wrote:

Looks OK, but check:

timedatectl status

Be carefull not to mix several ntp programs, there can be only one of: ntp, chrony, systemd-timesyncd, whatever.

Umm I enabled it so should I disable it ?

 [rounak@archissexy ~]$ timedatectl status
               Local time: Fri 2022-04-01 21:12:38 IST
           Universal time: Fri 2022-04-01 15:42:38 UTC
                 RTC time: Fri 2022-04-01 15:42:38
                Time zone: Asia/Kolkata (IST, +0530)
System clock synchronized: yes
              NTP service: active
          RTC in local TZ: no
[rounak@archissexy ~]$ 

Offline

#11 2022-04-01 15:44:00

RounakDutta
Member
From: West Bengal, India
Registered: 2022-02-11
Posts: 173
Website

Re: [SOLVED] Time is not synchronized currently in my pc

But in archwiki here it is written that u have to enable ntp
https://wiki.archlinux.org/title/System … yncd#Usage

Offline

#12 2022-04-01 15:47:39

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,466

Re: [SOLVED] Time is not synchronized currently in my pc

`timedatectl set-ntp true` just enables systemd-timesyncd. I'm guessing you didn't have permission when you did it.

Offline

#13 2022-04-01 15:49:44

loqs
Member
Registered: 2014-03-06
Posts: 17,196

Re: [SOLVED] Time is not synchronized currently in my pc

Do you still have chrony enabled in addition to systemd-timesyncd?  As the wiki page you link to covers systemd-timesyncd uses Simple Network Time Protocol as opposed to Network Time Protocol used by chrony.

Offline

#14 2022-04-01 15:52:34

RounakDutta
Member
From: West Bengal, India
Registered: 2022-02-11
Posts: 173
Website

Re: [SOLVED] Time is not synchronized currently in my pc

Scimmia wrote:

`timedatectl set-ntp true` just enables systemd-timesyncd. I'm guessing you didn't have permission when you did it.

Oh lol so I did

 
sudo systemctl enable systemd-timesyncd.service

Then in "/etc/systemd/timesyncd.conf" I changed uncommented the NTP and fallback NTP to

 
[Time]
NTP=time.google.com

and then

 timedatectl set-ntp true 

It got fixed !!!!
Thank you so much for your time and patience !!

Last edited by RounakDutta (2022-04-01 15:53:19)

Offline

#15 2022-04-01 15:52:59

Fixxer
Member
From: Poland
Registered: 2011-08-29
Posts: 210

Re: [SOLVED] Time is not synchronized currently in my pc

But in archwiki here it is written that u have to enable ntp

NTP means infrasctructure, methods to provide / share / distribute time from servers to other computers (clients).

NTP service:

It means one of clients I've mentioned above, choose one of them. It's ok.

Offline

#16 2022-04-01 15:54:19

RounakDutta
Member
From: West Bengal, India
Registered: 2022-02-11
Posts: 173
Website

Re: [SOLVED] Time is not synchronized currently in my pc

Fixxer wrote:

But in archwiki here it is written that u have to enable ntp

NTP means infrasctructure, methods to provide / share / distribute time from servers to other computers (clients).

NTP service:

It means one of clients I've mentioned above, choose one of them. It's ok.

Is this ok ? -

RounakDutta wrote:
Scimmia wrote:

`timedatectl set-ntp true` just enables systemd-timesyncd. I'm guessing you didn't have permission when you did it.

Oh lol so I did

 
sudo systemctl enable systemd-timesyncd.service

Then in "/etc/systemd/timesyncd.conf" I changed uncommented the NTP and fallback NTP to

 
[Time]
NTP=time.google.com

and then

 timedatectl set-ntp true 

It got fixed !!!!
Thank you so much for your time and patience !!

Offline

#17 2022-04-01 15:55:49

RounakDutta
Member
From: West Bengal, India
Registered: 2022-02-11
Posts: 173
Website

Re: [SOLVED] Time is not synchronized currently in my pc

time.google.com works but I can also add this

 /etc/systemd/timesyncd.conf
[Time]
NTP=0.arch.pool.ntp.org 1.arch.pool.ntp.org 2.arch.pool.ntp.org 3.arch.pool.ntp.org
FallbackNTP=0.pool.ntp.org 1.pool.ntp.org 0.fr.pool.ntp.org

Offline

#18 2022-04-01 16:00:56

loqs
Member
Registered: 2014-03-06
Posts: 17,196

Re: [SOLVED] Time is not synchronized currently in my pc

RounakDutta wrote:

time.google.com works but I can also add this

 /etc/systemd/timesyncd.conf
[Time]
NTP=0.arch.pool.ntp.org 1.arch.pool.ntp.org 2.arch.pool.ntp.org 3.arch.pool.ntp.org
FallbackNTP=0.pool.ntp.org 1.pool.ntp.org 0.fr.pool.ntp.org
NTP=0.arch.pool.ntp.org 1.arch.pool.ntp.org 2.arch.pool.ntp.org 3.arch.pool.ntp.org

Is the default list for the pool assigned to Arch and equivalent to the unedited

#NTP=
#FallbackNTP=0.arch.pool.ntp.org 1.arch.pool.ntp.org 2.arch.pool.ntp.org 3.arch.pool.ntp.org

Note as it is a pool the server you get is not fixed.

Last edited by loqs (2022-04-01 16:02:16)

Offline

#19 2022-04-01 16:02:25

RounakDutta
Member
From: West Bengal, India
Registered: 2022-02-11
Posts: 173
Website

Re: [SOLVED] Time is not synchronized currently in my pc

loqs wrote:
RounakDutta wrote:

time.google.com works but I can also add this

 /etc/systemd/timesyncd.conf
[Time]
NTP=0.arch.pool.ntp.org 1.arch.pool.ntp.org 2.arch.pool.ntp.org 3.arch.pool.ntp.org
FallbackNTP=0.pool.ntp.org 1.pool.ntp.org 0.fr.pool.ntp.org
NTP=0.arch.pool.ntp.org 1.arch.pool.ntp.org 2.arch.pool.ntp.org 3.arch.pool.ntp.org

Is the default list for the pool assigned to Arch and equivalent to the unedited

NTP=
FallbackNTP=0.pool.ntp.org 1.pool.ntp.org 0.fr.pool.ntp.org

Note as it is a pool the server you get is not fixed.

ic so I can use google servers as well as arch servers if I dont want to use google services.

Offline

#20 2022-04-01 16:15:24

RounakDutta
Member
From: West Bengal, India
Registered: 2022-02-11
Posts: 173
Website

Re: [SOLVED] Time is not synchronized currently in my pc

This is my output

 [rounak@archissexy ~]$ cat /etc/systemd/timesyncd.conf
#  This file is part of systemd.
#
#  systemd is free software; you can redistribute it and/or modify it under the
#  terms of the GNU Lesser General Public License as published by the Free
#  Software Foundation; either version 2.1 of the License, or (at your option)
#  any later version.
#
# Entries in this file show the compile time defaults. Local configuration
# should be created by either modifying this file, or by creating "drop-ins" in
# the timesyncd.conf.d/ subdirectory. The latter is generally recommended.
# Defaults can be restored by simply deleting this file and all drop-ins.
#
# See timesyncd.conf(5) for details.

[Time]
NTP=0.arch.pool.ntp.org 1.arch.pool.ntp.org 2.arch.pool.ntp.org 3.arch.pool.ntp.org
FallbackNTP=0.arch.pool.ntp.org 1.arch.pool.ntp.org 2.arch.pool.ntp.org 3.arch.pool.ntp.org
#RootDistanceMaxSec=5
#PollIntervalMinSec=32
#PollIntervalMaxSec=2048
#SaveIntervalSec=60
[rounak@archissexy ~]$ 

and

 [rounak@archissexy ~]$ timedatectl show-timesync --all
LinkNTPServers=
SystemNTPServers=0.arch.pool.ntp.org 1.arch.pool.ntp.org 2.arch.pool.ntp.org 3.arch.pool.ntp.org
FallbackNTPServers=0.arch.pool.ntp.org 1.arch.pool.ntp.org 2.arch.pool.ntp.org 3.arch.pool.ntp.org
ServerName=2.arch.pool.ntp.org
ServerAddress=152.67.1.129
RootDistanceMaxUSec=5s
PollIntervalMinUSec=32s
PollIntervalMaxUSec=34min 8s
PollIntervalUSec=1min 4s
NTPMessage={ Leap=0, Version=4, Mode=4, Stratum=3, Precision=-24, RootDelay=65.002ms, RootDispersion=79.299ms, Reference=80C717D9, OriginateTimestamp=Fri 2022-04-01 21:42:03 IST, ReceiveTimestamp=Fri 2022-04-01 21:42:03 IST, TransmitTimestamp=Fri 2022-04-01 21:42:03 IST, DestinationTimestamp=Fri 2022-04-01 21:42:03 IST, Ignored=no, PacketCount=2, Jitter=81us }
Frequency=0
[rounak@archissexy ~]$ cat /etc/systemd/timesyncd.conf
#  This file is part of systemd.
#
#  systemd is free software; you can redistribute it and/or modify it under the
#  terms of the GNU Lesser General Public License as published by the Free
#  Software Foundation; either version 2.1 of the License, or (at your option)
#  any later version.
#
# Entries in this file show the compile time defaults. Local configuration
# should be created by either modifying this file, or by creating "drop-ins" in
# the timesyncd.conf.d/ subdirectory. The latter is generally recommended.
# Defaults can be restored by simply deleting this file and all drop-ins.
#
# See timesyncd.conf(5) for details.

[Time]
NTP=0.arch.pool.ntp.org 1.arch.pool.ntp.org 2.arch.pool.ntp.org 3.arch.pool.ntp.org
FallbackNTP=0.arch.pool.ntp.org 1.arch.pool.ntp.org 2.arch.pool.ntp.org 3.arch.pool.ntp.org
#RootDistanceMaxSec=5
#PollIntervalMinSec=32
#PollIntervalMaxSec=2048
#SaveIntervalSec=60

I am marking the post as [SOLVED] if this configuration is correct.

Last edited by RounakDutta (2022-04-01 16:16:19)

Offline

#21 2022-04-01 16:20:49

RounakDutta
Member
From: West Bengal, India
Registered: 2022-02-11
Posts: 173
Website

Re: [SOLVED] Time is not synchronized currently in my pc

loqs wrote:

Do you still have chrony enabled in addition to systemd-timesyncd?  As the wiki page you link to covers systemd-timesyncd uses Simple Network Time Protocol as opposed to Network Time Protocol used by chrony.

I disabled chrony and uninstalled it
sudo systemctl disable chrony
sudo pacman -Rns chrony

Offline

#22 2022-04-01 18:52:37

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,447
Website

Re: [SOLVED] Time is not synchronized currently in my pc

FWIW, I've never understood the purpose of running any ntp as a systemd service.  I run an ntp sync every few weeks and at most it adjusts my clock a small fraction of a second - I'm not sure why I'd need that constantly running in the background.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#23 2022-04-01 19:15:34

dogknowsnx
Member
Registered: 2021-04-12
Posts: 648

Re: [SOLVED] Time is not synchronized currently in my pc

Trilby wrote:

FWIW, I've never understood the purpose of running any ntp as a systemd service.  I run an ntp sync every few weeks and at most it adjusts my clock a small fraction of a second - I'm not sure why I'd need that constantly running in the background.

I know that +1-posts are frowned upon, but here I feel compelled to agree and make it a point...


Notifications for Arch Linux package updates
RI - Rest your Eyes and Self

"We are eternal, all this pain is an illusion" - Maynard James Keenan

Offline

#24 2022-04-02 01:02:15

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,739

Re: [SOLVED] Time is not synchronized currently in my pc

Because I have many mobile embedded systems on a reasonably large area mesh wireless network.  They are all recording multiple video channels with real time metadata collected from dozens of sensors. We need to time tie everything that happens over the couple hundred square mile network so we can generate a single timeline in which every video frame, and the associated metadata, from every device can be placed on a common monotonic time line.  The network has an NTP server to which everyone syncs.  It pays the bills.

As to my laptop, meh.  As long as I am within several seconds, I will survive.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#25 2022-04-23 10:00:14

RounakDutta
Member
From: West Bengal, India
Registered: 2022-02-11
Posts: 173
Website

Re: [SOLVED] Time is not synchronized currently in my pc

Marking the post as [SOLVED]

Offline

Board footer

Powered by FluxBB