Posts by agb

    By any chance do you know how to disable fake clock.? I tried to access nano /lib/udev/hwclock-set to disable commands but it seems like that location doesn't exist in libreelect.

    Have a look at post #12 in this thread.

    I believe Millhouse explained the default time setting - it is derived from the build date/time [either kernel or LE, can't remember which].
    Have a look in the journal [journalctl] - there should be something about time changes in there - my original point was that the time change occurred too late - after kodi ran.
    Also have a look at the discussion in the feature request I linked above - I'm going to try adding a RTC module, since it seems unlikely the LE is going to change in this area.

    PS. Also, you may want to enable the option "wait for network" in the LibreELEC settings add-on - as suggested by lrusak a few messages back.
    PPS. OSMC seems to sync. the time before starting kodi, but LE doesn't [always].

    Correct time is a good thing but is also cosmetic to the Kodi GUI so there is no reason to make Kodi start depend upon it. From a support perspective this would make things worse given that some routers act as bad/misconfigured NTP servers, users have a habit of adding typos to their input, and some ISP's blocking port 123 (lord knows why, but it happens).

    As 99% of NTP issues are seen on Raspberry Pi .. the cure is adding an RTC card not adding workarounds to the OS.

    Hmmm. It may be 'cosmetic' to you...but if Kodi starts before the clock is in sync, my network mounts fail.
    Interestingly, OSMC doesn't exhibit the problem - only difference being that I do the network mounts via /etc/fstab, rather than systemd [although I understand systemd handles fstab under the covers].
    Perhaps make it possible to configure whether Kodi uses or does what it currently does?
    This would mean actually implementing though, which you appear reluctant to support.

    PS I am aware there are workarounds for the mount failures. I have to use them :-}
    PPS I don't think my proposal is a workaround, rather a solution...
    I just reread my last reply, I wasn't being snarky, honest :-}
    Since LE already has an option "wait for network" in the LibreELEC settings add-on, perhaps
    another option "wait for clock synchronised" could be added, so people who don't care
    about the functionality needn't specify it.

    Extract from systemd.special


    Services responsible for synchronizing the system clock from a remote source (such as NTP client implementations) should pull in this target and order themselves before it. All services where correct time is essential should be ordered after this unit, but not pull it in. systemd automatically adds dependencies of type After= for this target unit to all SysV init script service units with an LSB header referring to the "$time" facility.

    LE currently has Kodi depend on, but there can be a variable delay before the clock is sync'd. Implementing and having Kodi depend on it would would avoid problems with e.g. mounting network shares.

    The weird thing is system time was right. It was Cron had the wrong time.

    I had a similar problem in the way back with NPVR not recording, that one was because the PC BIOS clock somehow reset itself to the wrong time, but the NPVR guide had the correct time. I never figured out how that happened and the same PC has been running without any problems for several years since.

    Here's the tail of my journal with #1001.

    Oct 01 00:44:39 LibreELEC systemd[1]: Reached target Network is Online.
    Oct 01 00:44:39 LibreELEC connmand[407]: ntp: time slew +116391.088628 s
    Oct 02 09:04:30 LibreELEC systemd[1]: Starting Kodi Media Center...
    Oct 02 09:04:30 LibreELEC systemd[1]: Time has been changed
    Oct 02 09:04:30 LibreELEC kodi-config[689]: chmod: /storage/.kodi/addons/*/bin/*
    : No such file or directory
    Oct 02 09:04:30 LibreELEC systemd[1]: Started Kodi Media Center.

    Note the initial timestamps - kernel build time.
    On this occasion, 'Starting Kodi Media Center...' occurs after the clock is corrected.
    On other occasions it occurs before, there can be a variance of a few seconds.
    When it occurs before, my network mounts fail, because the Windows server
    doesn't like the clock difference.

    > Is there a way to force cron to wait for the time to set after a reboot?
    This is basically the same question I have been asking wrt mounting shares & time syncronisation :-}
    I think *ought* to be the answer, but systemd in LE doesn't seem to use/invoke it.

    PS If you add 'debugging' to cmdline.txt you get a raft of messages about connman and whatnot in the journal. I must confess I haven't found them very helpful :-{

    > I have no idea why it says Sept 29!
    Almost certainly because the time hasn't yet been sync'd :-} as per other threads...
    That date is the kernel build date of #929.
    So cron is starting before the clock is right - confirmed by the message about time disparity.

    Done all that, wouldn't be investigating otherwise :-}

    LibreELEC:~ # connmanctl clock
    Time = 1475274100
    TimeUpdates = auto
    Timezone = Europe/Belfast
    TimezoneUpdates = auto
    Timeservers = [ ]
    [not quite sure where Belfast came from, I set it to Europe/London]

    I don't think that's quite how it works, but no point arguing about it :-}
    For the purpose of this discussion, the problem is that the Pi doesn't set its clock to the correct time before the network mounts are attempted.
    I've started another thread about Time synchronisation.

    As has been discussed recently in this thread LibreELEC
    and various other places, there are issues with LE time synchronisation.
    Systemd has a target '' which does not appear to be used in LE.
    Is this by design or... ?

    I am running the Milhouse Krypton builds, currently #929.