PDA

View Full Version : System clock synchronisation stopped working



markwiering
2019-05-09, 11:22
Hello there,

I am using Kali Linux, but since I installed Manjaro Linux Xfce on a different partition, Kali Linux doesn't update the time any more at boot-up. When I go to https://time.is/ , it usually says "Your time is exact!", but when it does show an offset, like "Your clock is 7 seconds behind", I can usually fix that by rebooting my computer. Now, however, that stopped working. Even after rebooting my computer, my system clock was 7 seconds behind.

Just to test this, I used the date-command ( date --set 21:08:00 ) to set my date to a completely different time and then I rebooted again. The time, that didn't come close to the right time, didn't update. The hours and minutes were completely off. This was the moment that I knew for sure that the automatic time synchronisation had stopped working.

Some troubleshooting on the Internet gave me that I need to enable system time synchronisation with the command "timedatectl set-ntp 1", but doing so didn't so didn't make any difference. When I checked with "timedatectl status", I saw that my system clock still wasn't synchronised, not even after running "timedatectl set-ntp 1". This I considered to be very strange. How am I supposed to enable system synchronisation? Which command do I need to run for that?

I tried:
1. Running "timedatectl set-ntp 0", checking by "timedatectl status", again running "timedatectl set-ntp 1" and then check again by "timedatectl status": nothing changed.

2. Modifying the file /etc/ntp.conf by adding the following lines under "# You do need to talk to an NTP server or two (or three).
#server ntp.your-provider.example"
server 0.europe.pool.ntp.org
server 1.europe.pool.ntp.org
server 2.europe.pool.ntp.org
server 3.europe.pool.ntp.org

3. Running "apt install libnss-systemd": didn't do anything useful. It installed something (I don't know what), but the automatic system time synchronisation at boot-up still doesn't work.

4. Running "apt install ntpdate", followed by "ntpdate in.pool.ntp.org". This did correct my time, resulting in https://time.is/ saying "Your time is exact!", but I need this to happen at every boot-up, not when I think about running that command.

After installing Manjaro Linux Xfce on another partition, Manjaro Linux Xfce did change my bootloader, but Kali Linux still boots fine, so I cannot imagine that the bootloader change have caused the automatic system synchronisation to stop working. This must have another cause, but I don't know what cause and I also don't know how to solve this.

How do I restore the system in Kali Linux which automatically synchronises time after every boot-up?

markwiering
2019-06-01, 01:04
3425

Whenever I try enabling "Automatic Date & Time", it instantly jumps back to the left side, meaning that I cannot enable it.

Does anyone know what might cause this problem? Because I find it very frustrating having to run the command "ntpdate in.pool.ntp.org" after EVERY boot-up. I want this to be done automatically.

markwiering
2019-06-03, 19:37
Do I have to re-install my whole operating system, just to get the system time synchronisation working again?

I don't want to, honestly. I really hope there is a simpler way of solving this. The idea of having to spend more than an hour re-installing Kali Linux, and then several hours re-configuring Kali Linux to my liking... I hate it!

i0ntempest
2019-08-03, 12:29
Dunno if you're still having the problem, but if u do, uninstalling ntp should solve this problem.
systemd-timesyncd.service conflicts with ntp, that's why the auto time switch instantly jumps back if u enable it.

kippix
2019-11-03, 22:31
You need to start (also enable) ntp service.

nitheesh_daram
2019-11-22, 19:11
Dunno if you're still having the problem, but if u do, uninstalling ntp should solve this problem.
systemd-timesyncd.service conflicts with ntp, that's why the auto time switch instantly jumps back if u enable it.

thanks,this works for me!!!!!

knut erik
2019-12-14, 03:43
Hi, I installed Kali on my raspberry pi 4 and I have problem to get the right time setting, the time difference is like 13:40hrs, or lets say 10:20hrs. depending on how you look at it +/- 12 on the GMT/UTC, I am living in thailand and uses us english keyboard settings. now I learnd about time setting through the command ntpdate in.pool.ntp.org, so I tried to gett the correct time by calling this command. but It did not do any good as the program was not installed. I installed it and tried the command again but I did not get anny change in time. It seem to be the correct time but not for my location, as internet do not deny me access. and it also seem to be installed systemd-timesyncd.service, but I do not know how to use it. I guess what I should do is uninstall NTP and figure out systemd-timesyncd.service, with that I mean the location of the files specially the configuration files....?

liujustin604
2020-06-15, 20:23
If you add it to ~/,bashrc then it will sync every time you open terminal.

b1ackjack
2020-06-23, 03:40
Dunno if you're still having the problem, but if u do, uninstalling ntp should solve this problem.
systemd-timesyncd.service conflicts with ntp, that's why the auto time switch instantly jumps back if u enable it.

This solution worked for me.

nascimento.michel
2021-02-19, 17:24
Hello there,

I am using Kali Linux, but since I installed Manjaro Linux Xfce on a different partition, Kali Linux doesn't update the time any more at boot-up. When I go to https://time.is/ , it usually says "Your time is exact!", but when it does show an offset, like "Your clock is 7 seconds behind", I can usually fix that by rebooting my computer. Now, however, that stopped working. Even after rebooting my computer, my system clock was 7 seconds behind.

Just to test this, I used the date-command ( date --set 21:08:00 ) to set my date to a completely different time and then I rebooted again. The time, that didn't come close to the right time, didn't update. The hours and minutes were completely off. This was the moment that I knew for sure that the automatic time synchronisation had stopped working.

Some troubleshooting on the Internet gave me that I need to enable system time synchronisation with the command "timedatectl set-ntp 1", but doing so didn't so didn't make any difference. When I checked with "timedatectl status", I saw that my system clock still wasn't synchronised, not even after running "timedatectl set-ntp 1". This I considered to be very strange. How am I supposed to enable system synchronisation? Which command do I need to run for that?

I tried:
1. Running "timedatectl set-ntp 0", checking by "timedatectl status", again running "timedatectl set-ntp 1" and then check again by "timedatectl status": nothing changed.

2. Modifying the file /etc/ntp.conf by adding the following lines under "# You do need to talk to an NTP server or two (or three).
#server ntp.your-provider.example"
server 0.europe.pool.ntp.org
server 1.europe.pool.ntp.org
server 2.europe.pool.ntp.org
server 3.europe.pool.ntp.org

3. Running "apt install libnss-systemd": didn't do anything useful. It installed something (I don't know what), but the automatic system time synchronisation at boot-up still doesn't work.

4. Running "apt install ntpdate", followed by "ntpdate in.pool.ntp.org". This did correct my time, resulting in https://time.is/ saying "Your time is exact!", but I need this to happen at every boot-up, not when I think about running that command.

After installing Manjaro Linux Xfce on another partition, Manjaro Linux Xfce did change my bootloader, but Kali Linux still boots fine, so I cannot imagine that the bootloader change have caused the automatic system synchronisation to stop working. This must have another cause, but I don't know what cause and I also don't know how to solve this.

How do I restore the system in Kali Linux which automatically synchronises time after every boot-up?

I did uninstalled NTP then

sudo apt-get purge ntp

(after that)

sudo nano /etc/systemd/timesyncd.conf

(in this, you need to find)

#NTP=

(remove #. And add xx.pool.ntp.org)

NTP=xx.pool.ntp.org

(then)

sudo timedatectl set-ntp true
sudo timedatectl status

(NTP service: active
synchronized: yes
And you will see in the settings "Automatic Date & Time" is enabled automatically. Reboot to check.)

ingerulol
2021-04-20, 06:46
The solution that worked - i tried anything with NTPSync , tz-dpkg reconfigure , chrony and others

The simple answer is to delete one line :)))

timedatectl set-ntp true
ntpdate in.pool.ntp.org
20 Apr 09:14:47 ntpdate[5009]: adjust time server 5.189.141.35 offset +0.002168 sec

timedatect status
timedatectl status
Local time: Tue 2021-04-20 09:41:35 EEST
Universal time: Tue 2021-04-20 06:41:35 UTC
RTC time: n/a
Time zone: Europe/Bucharest (EEST, +0300)
System clock synchronized: yes
NTP service: active
RTC in local TZ: no

But my clocked showed me 2h less than UTC - 4:41 which was wrong on all standards
I opened the XFCE4-panel Clock

I deleted TIMEZONE GMT+2 and left it blank >> and from then , there is no issues here :)))