... I'm sure he's as keen as everyone else to find a solution to this problem.
Thanks for the replyThere isn't really a problem anymore ...
With the latest changes, ntpdate will no longer run twice at the same time.
The log entry shows this:
One stepping, two slewings and several seconds in between.
It might look strange inside the syslog, but it works.
If one wants to get rid of the multiple runs in short sequence, there is no other option as really making the ifup sync synchronous, but that would slow down boot for everybody.
E2 on the other hand can handle a time change at boot, it occurs with the default DVB sync too, at least if the box isn't networked.
Gesendet von meinem SM-N910F mit Tapatalk
I already offered birdman to make the necessary changes to the recipe, so that OpenViX gets a synchronous NTP sync btw.
Some other possible optimization would be to have ntpdate-sync create/delete flagfiles that indicate success (or fail) of the sync.
Currently E2 simply assumes that the call to ntpdate-sync is successful and the time WAS synced, but in reality it might as well fail and even if it succeeds, it only WILL (in the future) adjust the clock, relative to the time of calling it.
Gesendet von meinem SM-N910F mit Tapatalk
No - it doesn't, as enigma2 start up with an incorrect time (in the past) and starts to run scheduling items with this incorrect time.The log entry shows this:
One stepping, two slewings and several seconds in between.
It might look strange inside the syslog, but it works.
I'd be more than happy to wait an extra 2 or 3s for the time to be correct before enigma2 started, which is what Vix was always doing until your changes went in.If one wants to get rid of the multiple runs in short sequence, there is no other option as really making the ifup sync synchronous, but that would slow down boot for everybody.
No - it doesn't, as enigma2 start up with an incorrect time (in the past) and starts to run scheduling items with this incorrect time.
It's also very wrong for those who have multiple active interfaces.
I'd be more than happy to wait an extra 2 or 3s for the time to be correct before enigma2 started, which is what Vix was always doing until your changes went in.
The problem is: It's far more ... more like 15 seconds, some users even observed 30 sec.I'd vote for an extra 3 seconds boot time if it meant a 100% reliable (and predictable) solution.
I posted one in this thread earlier, I think.@birdman - if you have the time to code a foreground version of the initial time setup using ntpdate-sync I can test it extensively on my system and measure the delay on boot. The HD51 has a super-fast boot in any case as it takes no more than 35 seconds from completely powered off to initial channel tune. My GB Quad + takes about 90 seconds (IIRC) and the MB Twin takes forever...
I've just timed ntpdate -q on some systems here. Given that most of the time is spent waiting for network responses the speed of the system shouldn't make much difference.The problem is: It's far more ... more like 15 seconds, some users even observed 30 sec.
http://doolittle.icarus.com/ntpclient/
Then there is a coding issue inside E2 itselfNo - it doesn't, as enigma2 start up with an incorrect time (in the past) and starts to run scheduling items with this incorrect time.
lrwxrwxrwx 1 root root 22 Jan 14 13:48 S01fake-hwclock -> ../init.d/fake-hwclock
...
lrwxrwxrwx 1 root root 21 Jan 14 13:48 S67stb-hwclock -> ../init.d/stb-hwclock
root@duo2 ~ # cat /proc/stb/fp/rtc
1516644354
root@quad4k ~ # cat /proc/stb/fp/rtc
1516644367
root@solo2 ~ # cat /proc/stb/fp/rtc
1516644379
root@sf4008 ~ # cat /proc/stb/fp/rtc
1516644396
Or even less time...But, if that worries you then you could use ntpclient which will set the system time in 0.067s. Not as much checking as ntpdate, but good enough....
root@gmllaptop:/l......./ntpclient-2015# date 01231000; date; sleep 1; time ./ntpclient -h pool.ntp.org -c 1 -s; date
Tue 23 Jan 10:00:00 GMT 2018
Tue 23 Jan 10:00:00 GMT 2018
43121 66876.701 29653.0 5.8 -68.3 0.0 28267889
real 0m0.019s
user 0m0.000s
sys 0m0.004s
Tue 23 Jan 18:34:36 GMT 2018
Actually I would be fine with making it a SysVinit-Script ... it's also a system service unit in systemd.I posted one in this thread earlier, I think.
However, since running it from a sysvinit script rather than ifup changes it I'm about to produce a new version.
However, ntpdate itself can be run with a -p1 option to only get one sample, and then takes 0.7 seconds on my et8000.But, if that worries you then you could use ntpclient (from) which will set the system time in 0.067s. Not as much checking as ntpdate, but good enough....Code:http://doolittle.icarus.com/ntpclient/
root@et8000:~# time ntpdate -q -p 1 ntp.ubuntu.com
server 91.189.91.157, stratum 2, offset 0.000598, delay 0.11975
server 91.189.94.4, stratum 2, offset 0.000928, delay 0.04651
server 91.189.89.199, stratum 2, offset 0.001112, delay 0.04568
server 91.189.89.198, stratum 2, offset 0.001159, delay 0.04585
23 Jan 18:41:11 ntpdate[1397]: adjust time server 91.189.89.199 offset 0.001112 sec
real 0m0.740s
user 0m0.010s
sys 0m0.007s
So it could check that it has a route to the NTP server (which can be done without sending any packets - hopefully in python).It would need to start after networking and right after networking you can't be 100% sure networking is really fully up already (If networking doesn't get a DHCP reply within 3 seconds, it will background that, resulting in the very same problem).
Neither of my boxes has an RTC at all.We are discussing a problem that
- occurs with boxes from one vendor only, because it's actually a bug inside the driver not allowing access to the FP RTC
To annoy you even more:But, if that worries you then you could use ntpclient