You are not logged in.
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
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
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
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
Last edited by RounakDutta (2022-04-01 15:24:37)
Offline
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
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
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
[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
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
Is it ok ?
Last edited by RounakDutta (2022-04-01 15:42:15)
Offline
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
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
But in archwiki here it is written that u have to enable ntp
https://wiki.archlinux.org/title/System … yncd#Usage
Offline
`timedatectl set-ntp true` just enables systemd-timesyncd. I'm guessing you didn't have permission when you did it.
Offline
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
`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
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
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 ? -
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
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
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
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
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
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
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
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
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
Marking the post as [SOLVED]
Offline