Ntp not working on new Vero V, and solution

Received my shiny new Vero V last week, so far have only done the OSMC updates and tweaked some of the config in the gui before it goes “live” to replace my Vero 4k.

Yesterday I noticed an ntp error every couple of hours in syslog, which can also be seen by checking the service status:

osmc@tim-verov:~$ systemctl status ntp.service
* ntp.service - Network Time Service
     Loaded: loaded (/lib/systemd/system/ntp.service; enabled; vendor preset: enabled)
     Active: active (running) since Wed 2025-04-09 18:03:03 AEST; 4 days ago
       Docs: man:ntpd(8)
    Process: 3136 ExecStart=/usr/lib/ntp/ntp-systemd-wrapper (code=exited, status=0/SUCCESS)
   Main PID: 3142 (ntpd)
      Tasks: 2 (limit: 3659)
     Memory: 1.9M
     CGroup: /system.slice/ntp.service
             `-3142 /usr/sbin/ntpd -p /var/run/ntpd.pid -g -u 105:108

Apr 13 18:03:03 tim-verov ntpd[3142]: leapsecond file ('/usr/share/zoneinfo/leap-seconds.list'): expired 107 days ago
Apr 13 21:03:03 tim-verov ntpd[3142]: frequency file /var/lib/ntp/ntp.drift.TEMP: Permission denied
Apr 14 01:03:03 tim-verov ntpd[3142]: frequency file /var/lib/ntp/ntp.drift.TEMP: Permission denied
Apr 14 03:03:03 tim-verov ntpd[3142]: frequency file /var/lib/ntp/ntp.drift.TEMP: Permission denied
Apr 14 05:03:03 tim-verov ntpd[3142]: frequency file /var/lib/ntp/ntp.drift.TEMP: Permission denied
Apr 14 07:03:03 tim-verov ntpd[3142]: frequency file /var/lib/ntp/ntp.drift.TEMP: Permission denied
Apr 14 11:03:03 tim-verov ntpd[3142]: frequency file /var/lib/ntp/ntp.drift.TEMP: Permission denied
Apr 14 13:03:03 tim-verov ntpd[3142]: frequency file /var/lib/ntp/ntp.drift.TEMP: Permission denied
Apr 14 16:03:03 tim-verov ntpd[3142]: frequency file /var/lib/ntp/ntp.drift.TEMP: Permission denied
Apr 14 17:03:03 tim-verov ntpd[3142]: frequency file /var/lib/ntp/ntp.drift.TEMP: Permission denied

Ownership of directory /var/lib/ntp doesn’t look right, i.e. ntp user has no write permission:

osmc@tim-verov:~$ ls -ld /var/lib/ntp
drwxr-xr-x 2 129 messagebus 4096 Sep 23  2020 /var/lib/ntp

Comparing that to my soon to be retired vero 4k:

osmc@tim-vero4k:~$ ls -ld /var/lib/ntp
drwxr-xr-x 2 ntp ntp 4096 Apr 14 17:38 /var/lib/ntp

So, changed ownership on the directory and restarted ntp service:

osmc@tim-verov:~$ sudo chown ntp:ntp /var/lib/ntp

osmc@tim-verov:~$ sudo systemctl restart ntp.service

osmc@tim-verov:~$ systemctl status ntp.service
* ntp.service - Network Time Service
     Loaded: loaded (/lib/systemd/system/ntp.service; enabled; vendor preset: enabled)
     Active: active (running) since Mon 2025-04-14 18:08:08 AEST; 6s ago
       Docs: man:ntpd(8)
    Process: 7317 ExecStart=/usr/lib/ntp/ntp-systemd-wrapper (code=exited, status=0/SUCCESS)
   Main PID: 7323 (ntpd)
      Tasks: 2 (limit: 3659)
     Memory: 1.1M
     CGroup: /system.slice/ntp.service
             `-7323 /usr/sbin/ntpd -p /var/run/ntpd.pid -g -u 105:108

Apr 14 18:08:11 tim-verov ntpd[7323]: Soliciting pool server 139.99.135.247
Apr 14 18:08:12 tim-verov ntpd[7323]: Soliciting pool server 162.159.200.123
Apr 14 18:08:12 tim-verov ntpd[7323]: Soliciting pool server 27.124.125.251
Apr 14 18:08:12 tim-verov ntpd[7323]: Soliciting pool server 27.124.125.252
Apr 14 18:08:12 tim-verov ntpd[7323]: Soliciting pool server 194.195.249.28
Apr 14 18:08:13 tim-verov ntpd[7323]: Soliciting pool server 162.159.200.1
Apr 14 18:08:13 tim-verov ntpd[7323]: Soliciting pool server 119.18.6.37
Apr 14 18:08:13 tim-verov ntpd[7323]: Soliciting pool server 13.55.50.68
Apr 14 18:08:14 tim-verov ntpd[7323]: Soliciting pool server 27.124.125.250
Apr 14 18:08:14 tim-verov ntpd[7323]: Soliciting pool server 110.232.114.22

So, no more errors, and about 90 minutes later there is an ntp.drift file:

osmc@tim-verov:/var/lib/ntp$ ls -l
total 4
-rw-r--r-- 1 ntp ntp 7 Apr 14 19:08 ntp.drift
1 Like

I am seeing the same thing on both of my Vero Vs. I changed the folder permissions and the errors went away.

Jeff

1 Like

Seeing the same thing also, so corrected permissions. Looks like the install script for OSMC/Vero-V needs correcting, so as to set the correct permissions on /var/lib/ntp

1 Like

From when is your install/build? Can check with grab-logs -P -I

My permissions are correct but my build is very old

osmc@osmc-verov:~$ ls -ld /var/lib/ntp
drwxr-xr-x 2 ntp ntp 4096 Apr 15 20:47 /var/lib/ntp

I’m having the same issue and corrected permissions.

osmc@HTPC:~$ ls -ld /var/lib/ntp
drwxr-xr-x 2 129 messagebus 4096 Sep 23  2020 /var/lib/ntp

Result of grab-logs -P -I:

Grabbing log UNAME ...
Grabbing log cmdline ...
Grabbing log Debian version ...
Grabbing log OSMC Build Information ...
Writing logs to temp file ...
Logs created on: 2025-04-15 18:45:55 - (Uptime = 763.75)

0wwkXuO5  :  UNAME
0wwYYuO5  :  cmdline
m4ls932a  :  Debian version
ps9k90Ws  :  OSMC Build Information


====================== UNAME =================== 0wwkXuO5
Linux HTPC 4.9.269-80-osmc #1 SMP PREEMPT Sun Mar 2 14:02:42 UTC 2025 aarch64 GNU/Linux

---------------------- UNAME END --------------- 0wwkXuO5


====================== cmdline =================== 0wwYYuO5
console=ttyS0,921600 earlycon=aml-uart,0xfe07a000 ramoops.pstore_en=1 ramoops.record_size=0x8000 ramoops.console_size=0x4000 logo=osd0,loaded,0x7f800000 vout=1080p60hz,enable hdmitx=,444,8bit hdmimode=1080p60hz cvbsmode=576cvbs osmc.root_wants_resize= mac=94:cc:04:60:0b:26 systemd.unified_cgroup_hierarchy=0 root=/dev/osmcroot rootfstype=ext4 quiet console=tty0 osmcdev=vero5

---------------------- cmdline END --------------- 0wwYYuO5


====================== Debian version =================== m4ls932a
11.11

---------------------- Debian version END --------------- m4ls932a


====================== OSMC Build Information =================== ps9k90Ws
OSMC filesystem assembled on jenkins at Mon 11 Dec 2023 02:00:44 AM UTC using Debootstrap version 1.0.123+deb11u1

---------------------- OSMC Build Information END --------------- ps9k90Ws

Had the same issue, thanks for this quick fix!

It would be nice if it would respect dhcp option 42 though.

1 Like

Linux osmc-v 4.9.269-81-osmc #1 SMP PREEMPT Mon Mar 17 09:44:05 UTC 2025 aarch64 GNU/Linux

OSMC filesystem assembled on jenkins at Mon 07 Aug 2023 03:24:13 PM UTC using Debootstrap version 1.0.123+deb11u1

1 Like
osmc@tim-verov:~$ grab-logs -P -I
Grabbing log UNAME ...
Grabbing log cmdline ...
Grabbing log Debian version ...
Grabbing log OSMC Build Information ...
Writing logs to temp file ...
Logs created on: 2025-04-16 17:54:23 - (Uptime = 160349.94)

0wwkXuO5  :  UNAME
0wwYYuO5  :  cmdline
m4ls932a  :  Debian version
ps9k90Ws  :  OSMC Build Information


====================== UNAME =================== 0wwkXuO5
Linux tim-verov 4.9.269-80-osmc #1 SMP PREEMPT Sun Mar 2 14:02:42 UTC 2025 aarch64 GNU/Linux

---------------------- UNAME END --------------- 0wwkXuO5


====================== cmdline =================== 0wwYYuO5
console=ttyS0,921600 earlycon=aml-uart,0xfe07a000 ramoops.pstore_en=1 ramoops.record_size=0x8000 ramoops.console_size=0x4000 logo=osd0,loaded,0x7f800000 vout=1080p60hz,enable hdmitx=,444,8bit hdmimode=1080p60hz cvbsmode=576cvbs osmc.root_wants_resize= mac=94:CC:04:60:0E:36 systemd.unified_cgroup_hierarchy=0 root=/dev/osmcroot rootfstype=ext4 quiet console=tty0 osmcdev=vero5

---------------------- cmdline END --------------- 0wwYYuO5


====================== Debian version =================== m4ls932a
11.11

---------------------- Debian version END --------------- m4ls932a


====================== OSMC Build Information =================== ps9k90Ws
OSMC filesystem assembled on jenkins at Sun 02 Mar 2025 04:10:15 PM UTC using Debootstrap version 1.0.123+deb11u1

---------------------- OSMC Build Information END --------------- ps9k90Ws

Ok it’s not realted to the built then.
So super strange. Seems to be that @sam_nazarko must use his magic powers to understand why some systems have wrong permissions

Any ideas @sam_nazarko why the permissions were set incorrectly on /var/lib/ntp ? and how this could be corrected ?

Hi @thebream

Thanks for the report. It’s interesting.

If you ordered the Vero V recently, it’s a long standing issue hence it still being present with a fairly monitor filesystem:

OSMC filesystem assembled on jenkins at Sun 02 Mar 2025 04:10:15 PM UTC using Debootstrap version 1.0.123+deb11u1

From the top of my head, it could be two problems:

  • Bad postinst not setting permissions probably. This was a known Debian issue in the past.
  • Some sort of kernel configuration missing / not set which isn’t allowing NTP to set the permissions.

It can obviously be fixed, but will need some investigation.

Anyone got a Pi up and running on latest OSMC that can quickly check if it’s an issue there too? It will be a few days before I can directly test on a PI otherwise.

1 Like

On a RPi4 here with latest greatest OSMC from staging this is not an issue.
On a VeroV shipped in January with OSMC from staging the device is affected.

1 Like

Perfect, thanks @JimKnopf

1 Like

FWIW, here are my order details:
Order number: 71223
Date: March 25, 2025

And, just to be a little pendantic, the permissions are ok, it’s the ownership that is is wrong. The file in my example is owned by uid 129 (which does not exist in /etc/passwd, so no name shown in “ls”), and gid 104 (“messagebus” in /etc/group).

Also FWIW, I mentioned in my original post that I had “done the OSMC updates” - I would have checked for updates, but according to /var/log/apt/history.log there have been no updates applied (all I can see is that I have installed rsyslog, logrotate and rsync), i.e. the system was already “up to date” when I fired it up.

Interesting…

On one test system I’ve got:

-rw-r--r-- 1 ntp ntp 8 Apr 17 11:23 /var/lib/ntp/ntp.drift

And:

cat /etc/osmc_build_info 
OSMC filesystem assembled on jenkins at Tue 28 May 2024 12:40:35 AM UTC using Debootstrap version 1.0.123+deb11u1

This is a relatively old root filesystem.

I can’t upgrade NTP:

root@osmc:/home/osmc# apt-get install ntp
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
ntp is already the newest version (1:4.2.8p15+dfsg-1).
ntp set to manually installed.

Here’s the build info from 2 of my systems wherre the filesystem ownership was wrong.

osmc@Kodi-Florida:~/.kodi/temp$ cat /etc/osmc_build_info
OSMC filesystem assembled on jenkins at Mon 07 Aug 2023 03:24:13 PM UTC using Debootstrap version 1.0.123+deb11u1

osmc@Kodi-BR:~/.kodi/temp$ cat /etc/osmc_build_info
OSMC filesystem assembled on jenkins at Mon 07 Aug 2023 03:24:13 PM UTC using Debootstrap version 1.0.123+deb11u1
osmc@Kodi-BR:~/.kodi/temp$

These were both off the same order. I have a newer Vero V from late last year. I’ll check it when I get time.

Thanks,

Jeff

I got my new Vero V out of the box.

osmc@osmc:~$ cat /etc/osmc_build_info
OSMC filesystem assembled on jenkins at Mon 11 Dec 2023 02:00:44 AM UTC using Debootstrap version 1.0.123+deb11u1

Here’s the default ownership:

drwxr-xr-x 2 129 messagebus 4096 Sep 23 2020 /var/lib/ntp

I changed ownership and all is well.

Thanks,

Jeff

1 Like

Not sure if this is helpful, but I appear to have a different OSMC build but the same directory ownership problem:

osmc@osmc:/var/lib/ntp$ cat /etc/osmc_build_info
OSMC filesystem assembled on jenkins at Sun 02 Mar 2025 04:10:15 PM UTC using Debootstrap version 1.0.123+deb11u1

osmc@osmc:/var/lib/ntp$ ll
total 8
drwxr-xr-x  2  129 messagebus 4096 Sep 23  2020 .
drwxr-xr-x 18 root root       4096 Apr 16 16:57 ..

Vero V that was installed out of the box last week.

Still thinking.

@JimKnopf reports that reinstallation of ntp (sudo apt-get install --reinstall ntp) fixes the issue. So I think we can just fix ownership in network-osmc which should work for new and existing installs.

Newer versions of Debian use systemd-timesyncd, which is why this is probably not a massively reported issue. And existing installations… exist…

See

Notice the conditional, because maybe systemd-timesyncd will be sufficient enough in the next Debian release. We’ve already had requests to make it installable which is why we made it a conditional dependency here:

I’d welcome some opinions on such a change.

To test this update:

  1. Login via the command line
  2. Run the following command to add the staging repository:
    echo 'deb http://apt.osmc.tv bullseye-devel main' | sudo tee /etc/apt/sources.list.d/osmc-devel.list
  3. Run the following commands to update: sudo apt-get update && sudo apt-get dist-upgrade && reboot
  4. Your system should have have received the update.

Please see if the issue is resolved.

I also recommend you remove /etc/apt/sources.list.d/osmc-devel.list after updating.

This will deactivate the staging repository. You can do so with the following command:
sudo rm /etc/apt/sources.list.d/osmc-devel.list.

Please note that we will automatically disable this update channel after 14 days on your device in case you forget to do so to ensure that your system reverts to the stable update channel.

1 Like