Disabling access to RTC

hey @nmaas87 If you are sure about the RTC, maybe you can give a try to stop the chronyd service.

What I would suggest trying taling to the hostOS systemd service over the dbus (as some examples are in https://docs.resin.io/learn/develop/runtime/#dbus-communication-with-host-os ) and stoppding the service like that. Similar thing was discussed in another thread about restarting units, in this case the stopping would be, using dbus-send:

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.systemd1 \
    /org/freedesktop/systemd1 \
    org.freedesktop.systemd1.Manager.StopUnit \
    string:<servicename>.service \
    string:replace

or using gdbus:

DBUS_SYSTEM_BUS_ADDRESS=unix:path=/host/run/dbus/system_bus_socket \
  gdbus call --system \
    --dest org.freedesktop.systemd1 \
    --object-path /org/freedesktop/systemd1 \
    --method org.freedesktop.systemd1.Manager.StopUnit \
    "<servicename>.service" \
    "replace"

where the <servicename> would be chronyd in your case.

Putting this into your container’s start script (that is called by CMD) would ensure that the service is stopped when your application starts up (either at app start, or device reboot), and before any of your other codes would run, I guess?

Definitely have to test it out, in case there are any side effects that might affect some other parts of the system. Don’t know any off-hand, though, @zubairlk might have some ideas…

It is indeed quite niche. And too bad that the Pi series don’t have 2 usable I2C buses at least :slight_smile: