Vero4k internal clock running late

Hello,
after 14 days 24/7 the time on my vero4k is now 30 seconds late. Is there a way to have the ntp service update the clock periodically?

Thanks in advance
Michael

It is normally configured to do exactly that.
If yours is not doing that then you might have a NTP connect problem. Suggest to update the Kernel logs either via MyOSMC or grab-logs -J -K

Just did the grab-logs command as indicated.

According to systemctl the ntp.service was “dead”. I added my local router’s IP-address to ntp.conf and had systemctl restart the service. Now the time is correct.
Will keep an eye on this.

Michael

I’m not sure if this is a bug, but it looks like ntp is not running as a result of a conflict with systemd-timesyncd during startup – though ntp can later be started manualy.

To get ntp back, disable systemd-timesyncd:

sudo systemctl disable systemd-timesyncd.service

Reboot to check if ntp is now working.

Did so. Rebooted. Checked. OK!

Thank you

It shouldn’t be necessary to do this. There is already a conditional check for other ntp time clients on the system in the file /lib/systemd/system/systemd-timesyncd.service.d/disable-with-time-daemon.conf which contains:

[Unit]
# don't run timesyncd if we have another NTP daemon installed
ConditionFileIsExecutable=!/usr/sbin/ntpd
ConditionFileIsExecutable=!/usr/sbin/openntpd
ConditionFileIsExecutable=!/usr/sbin/chronyd
ConditionFileIsExecutable=!/usr/sbin/VBoxService

/usr/sbin/ntpd exists on osmc by default so this condition file will prevent systemd-timesyncd.service from running at all.

I’m guessing that you’ve modified something on your system or installed something which has changed this, as I’m not seeing this issue on my own system.

1 Like

I reloaded Sam’s USB 4.9 image to a pendrive and this time ran no updates, so the image is totally unchanged.

It seems to be almost like some kind of race condition. Sometimes immediately after a reboot, I get this:

osmc@osmc:~$ systemctl status ntp
â—Ź ntp.service - Network Time Service
   Loaded: loaded (/lib/systemd/system/ntp.service; enabled; vendor preset: enabled)
   Active: inactive (dead)
     Docs: man:ntpd(8)
osmc@osmc:~$ systemctl status systemd-timesyncd
â—Ź systemd-timesyncd.service - Network Time Synchronization
   Loaded: loaded (/lib/systemd/system/systemd-timesyncd.service; enabled; vendor preset: enabled)
  Drop-In: /usr/lib/systemd/system/systemd-timesyncd.service.d
           └─disable-with-time-daemon.conf
   Active: inactive (dead)
Condition: start condition failed at Tue 2021-02-23 18:46:57 UTC; 2min 46s ago
           └─ ConditionFileIsExecutable=!/usr/sbin/ntpd was not met
     Docs: man:systemd-timesyncd.service(8)

Feb 23 18:46:57 osmc systemd[1]: Condition check resulted in Network Time Synchronization being skipped.

and other (significantly fewer) times I see this:

osmc@osmc:~$ systemctl status ntp
â—Ź ntp.service - Network Time Service
   Loaded: loaded (/lib/systemd/system/ntp.service; enabled; vendor preset: enabled)
   Active: active (running) since Tue 2021-02-23 18:44:17 UTC; 26s ago
     Docs: man:ntpd(8)
  Process: 2717 ExecStart=/usr/lib/ntp/ntp-systemd-wrapper (code=exited, status=0/SUCCESS)
 Main PID: 2723 (ntpd)
    Tasks: 2 (limit: 1714)
   Memory: 1.8M
   CGroup: /system.slice/ntp.service
           └─2723 /usr/sbin/ntpd -p /var/run/ntpd.pid -g -u 105:109

Feb 23 18:44:21 osmc ntpd[2723]: Soliciting pool server 3.121.254.221
Feb 23 18:44:21 osmc ntpd[2723]: Soliciting pool server 217.196.145.42
Feb 23 18:44:22 osmc ntpd[2723]: Soliciting pool server 185.144.161.170
Feb 23 18:44:22 osmc ntpd[2723]: Soliciting pool server 83.168.200.199
Feb 23 18:44:22 osmc ntpd[2723]: Soliciting pool server 162.159.200.1
Feb 23 18:44:23 osmc ntpd[2723]: Soliciting pool server 91.206.8.36
Feb 23 18:44:23 osmc ntpd[2723]: Soliciting pool server 37.58.57.238
Feb 23 18:44:24 osmc ntpd[2723]: Soliciting pool server 86.59.113.124
Feb 23 18:44:24 osmc ntpd[2723]: Soliciting pool server 2a01:4f9:c010:bf3::2
Feb 23 18:44:26 osmc ntpd[2723]: receive: Unexpected origin timestamp 0xe3dfcb8a.2100e011 does not match aorg 0000000000.00000000 from server@212.26.1
osmc@osmc:~$ systemctl status systemd-timesyncd
â—Ź systemd-timesyncd.service - Network Time Synchronization
   Loaded: loaded (/lib/systemd/system/systemd-timesyncd.service; enabled; vendor preset: enabled)
  Drop-In: /usr/lib/systemd/system/systemd-timesyncd.service.d
           └─disable-with-time-daemon.conf
   Active: inactive (dead)
     Docs: man:systemd-timesyncd.service(8)

There’s no pattern that I can discern. The only thing I do is check the status of each job, and then reboot.

Which Vero4K kernel are you running on?