I don't know how it knows the network is alive since systemd-timesyncd apparently normally uses systemd-networkd to determine that and systemd-networkd is not running in Raspbian. I couldn't figure it out but maybe you know?DougieLawson wrote: ↑Sat Sep 14, 2019 10:17 pmOnce the network is alive systemd-timesyncd gets the time from an internet time server. It then polls, infrequently, to keep the clock close to the local time of day.
I'm a fan of NTP as well. It has the same problem though with Buster. Something is off in the timing somewhere. I've got other computers running linux that never have the desktop come alive and not have the time synchronized. They are running NTP though.DougieLawson wrote: ↑Tue Sep 17, 2019 4:39 pmIt's highly likely that the first attempt for timesyncd to get the time could fail. I've not looked at the dependencies as I've disabled it in favour of good old NTP on all of my systems.
I don't think that systemd-timesyncd "uses systemd-networkd" to decide whether the network is up. Most likely, systemd-timesyncd simply tries to connect to the time server it wants to use (see /etc/systemd/timesyncd.conf). If it works, bingo! If not...network isn't up yet. I see it fail and take a while here as well.knute wrote: ↑Tue Sep 17, 2019 2:53 pm
I don't know how it knows the network is alive since systemd-timesyncd apparently normally uses systemd-networkd to determine that and systemd-networkd is not running in Raspbian. I couldn't figure it out but maybe you know?
...
The only question I have left is how does systemd-timesyncd know when the network is up?
Code: Select all
#!/bin/bash
while [ 1 ]
do
ping -c 1 -W 1 0.us.pool.ntp.org
if [ $? -eq 0 ]
then
break
fi
sleep 1
done
sudo systemctl restart systemd-timesyncd
Agree. I wasn't trying to make light of the issue, just my position on it for my use case.
More often than not, I only notice the clock hasn't synced when I try to use a Web browser. Since security certificates rely on time, you can't do anything until the clock properly sets, and sometimes that's quite the nuisance, sitting there waiting.RonR wrote: ↑Wed Sep 18, 2019 6:04 pm
My concern is that a workaround is necessary. An application (and especially a user sitting at a keyboard ) shouldn't have to first check (or risk getting a failure) that the system time is valid before running something (like 'apt' for example). An O/S should ensure that the user environment is ready before presenting it.