I installed my DietPi again and new after some problems after the last DietPi-Update.
I have already installed Nginx and other software. After I started the install process the time sync process started. I think it started with this command "systemctl start systemd-timesyncd ". 60 seconds after this an error message occurs and told me to restart the process or change anything in the NTP Config. I canceled the process and the installation started for the software.
How can I solve the error message of DietPi? What can I do?
I used the command "systemctl start systemd-timesyncd " manually and there was no error message!
It seems on my 4B the timesync service gets stopped after a while:
â—‹ systemd-timesyncd.service - Network Time Synchronization
Loaded: loaded (/lib/systemd/system/systemd-timesyncd.service; enabled; preset: enabled)
Active: inactive (dead) since Mon 2023-10-16 01:25:07 UTC; 14h ago
Duration: 2.843s
Docs: man:systemd-timesyncd.service(8)
Main PID: 1266071 (code=exited, status=0/SUCCESS)
Status: "Idle."
CPU: 177ms
Oct 16 01:25:04 DietPi systemd[1]: Starting systemd-timesyncd.service - Network Time Synchronization...
Oct 16 01:25:04 DietPi systemd[1]: Started systemd-timesyncd.service - Network Time Synchronization.
Oct 16 01:25:06 DietPi systemd-timesyncd[1266071]: Contacted time server 176.221.42.125:123 (0.debian.pool.ntp.org).
Oct 16 01:25:06 DietPi systemd-timesyncd[1266071]: Initial clock synchronization to Mon 2023-10-16 01:25:06.320526 UTC.
Oct 16 01:25:07 DietPi systemd[1]: Stopping systemd-timesyncd.service - Network Time Synchronization...
Oct 16 01:25:07 DietPi systemd[1]: systemd-timesyncd.service: Deactivated successfully.
Oct 16 01:25:07 DietPi systemd[1]: Stopped systemd-timesyncd.service - Network Time Synchronization.
And my time gets out of sync over and over again and I don’t know why. My timesync is set to boot and daily. I do use some low voltage settings (conservative down to 300 MHz), but I would expect it to hold the time at least. It constantly resets to the wrong time (about 1 hour early).
My system is set to UTC, but I’m located in Germany. Right now it’s 19:11, but my Pi suddenly shows 04:05 PM. I still suspect issues with the time zones. /boot/dietpi/func/run_ntpd 1 will fix the problem temporary, and add the missing hour back.
It will happen again, would love some advice how to debug this issue.
Time sync is done once a day. But your CPU frequency is to low. It needs to be at least 600 and not below. otherwise your system will be to slow to calculate accurate system time and you will run out of sync shortly. It’s a know behaviour for RPi4
Thanks for the explanation. So turning it down to hourly should be fine compromise if I don’t need very accurate times. I rather have it run on low power mode. Thanks.
I have a feature request/idea, not sure how easy to achieve. Can we have a configurable delay before the time (e.g. 5 mins) is sync-ed on boot time?
Every time I have power outage, my Pi completes it boot sequence before my modem has time to reconnect to the internet. As a result, the time will be wrong until the next day (currently have the time sync to boot + daily).
The next best option for me is to change the sync to boot + hourly, but a configurable delay would be perfect.