Deactivate NTP via DBUS

I want to deactivate the NTP in the Host OS and only activate it manually (to avoid corruption of my RTC).

I found this line of code to query the timedatectl properties:

DBUS_SYSTEM_BUS_ADDRESS=unix:path=/host_run/dbus/system_bus_socket \  
  dbus-send \
  --system \
  --print-reply \
  --reply-timeout=2000 \
  --type=method_call \
  --dest=org.freedesktop.timedate1 \
  /org/freedesktop/timedate1  \
  org.freedesktop.DBus.Properties.GetAll \

and I want to modify it to call the method SetNTP that i found the the timedated freedesktop documentation.

How do i modify the DBUS command to call the method SetNTP and how do I pass the parameter true or false?


This doesn’t answer the question, but it it helps, since this thread was created we’ve added more details to the documentation regarding time management on balenaOS:

I am reaching out to the OS team in case they have further advice. For example, it’s possible to specify a list of NTP servers via the ntpServers entry in config.json, and I wonder what happens if invalid servers are specified…

We are using chrony as the NTP daemon for quite a while now.
I guess it could be possible to ask the hostOS systemd via dbus to disable the chrony daemon if needed. That should disable NTP.

Hi there,

Would you mind detailing a little bit more about the concern with running NTP with an RTC? I have not heard of NTP disciplining an RTC causing corruption issues, and would love to learn more about your use case or this failure mode.