Jump to content


Photo

Date problem (1923 after power loss)


  • Please log in to reply
10 replies to this topic

#1 gumball3000

  • Member
  • 10 posts

0
Neutral

Posted 25 July 2014 - 01:55

I am running OpenPLi on a VU Duo2.

 

When I un- and then re-plug the power, the date always reverts to the year 1923, and the whole box is very slow because of that (because of some timing problems I have read in this forum).

 

 

What I have done so far, but does not fix the problem:

 

+ I have a ntpdate script that works when I call it manually, and is executed on boot ( /etc/rcS.d/S42ntpdate.sh with:

[ -x /usr/bin/ntpdate ] && /usr/bin/ntpdate -b -s -u pool.ntp.org )
 

+ disabled enigma2 transponder time ( config.misc.useTransponderTime=false ) in /etc/enigma2/settings
 

+ ntpd is installed, but I cannot find any config nor startup script file (maybe this is causing the issue?)

 

How is it even possible, that the date reverts to 1923? Should not be 1970 the absolute minimum?

I also tried to write the correct time to the hw clock, with the "hwclock" command, but it is missing in OpenPLi.


Edited by gumball3000, 25 July 2014 - 01:56.


Re: Date problem (1923 after power loss) #2 gumball3000

  • Member
  • 10 posts

0
Neutral

Posted 25 July 2014 - 02:54

What I have learned so far:

 

+"/etc/rcS.d/S42ntpdate.sh" is created by the Enimga2 plugin "SystemTime"

But it seems this script does not get called during boot, or there is a problem, because the time does not get set until the plugin itself is started and starts its timer-based ntpdate calls.

 

+ntpd is never started and is not used

 

+it does not >always< jump to 1923 after a power loss, the time only seems to revert to 1923 when the whole box crashes/freezes by an yet unknown reason (happened 3 times so far). And it was also set to 1923 when I flashed OpenPLi and used it for the first time.

 

So the important question is: What causes this pre-1970 (1923) date to be set?


Edited by gumball3000, 25 July 2014 - 02:59.


Re: Date problem (1923 after power loss) #3 gumball3000

  • Member
  • 10 posts

0
Neutral

Posted 25 July 2014 - 03:59

The date jumps seem to go like that:

 

*cold boot after power loss*

1970 (epoch 0)

2014 (correct date)

1923 (negative timestamp) 

 

at this point the box becomes unusable slow because of the low-date timing issues



Re: Date problem (1923 after power loss) #4 gumball3000

  • Member
  • 10 posts

0
Neutral

Posted 25 July 2014 - 04:59

Okay so I have learned from this thread: http://openpli.org/f...ndpost&p=424638

 

This is a problem in the VU+ drivers, that do funny things if the date on the box is not correct. And for some reason the box doesn't boot in 1-1-1970 like any other linux machine, but with a date in 1958.

 

 

So my guess is: When a VU Duo2 crashes/freezes (of yet unknown cause) it may corrupt the system time / make it revert to the default value of 1923 (for my box, others seem to have 1958 etc). Because if I forcefully plug/unplug it ,it always seems to revert to 1970, not the strange one.

 

So my fix is:

 

+) deleted "/etc/rcS.d/S42ntpdate.sh" created by Engima2 SystemTime plugin

+) added "/etc/network/if-up.d/02ntpdate" which calls ntpdate

+) added "/etc/rcS.d/S01date" which points to "/etc/init.d/S01date" which sets the date to a valid one ( /bin/date -s "2014-03-28 09:26" )

 

 

Now the date is always set to "2014-03-28 09:26" on each boot, and if a LAN cable is plugged it will use ntpdate during boot.

If no LAN cable is plugged during boot, but afterwards, hopefully the SystemTime E2 plugin will refresh it.

 

Hopefully this will be useful for others :)


Edited by gumball3000, 25 July 2014 - 05:02.


Re: Date problem (1923 after power loss) #5 Dimitrij

  • PLi® Core member
  • 10,020 posts

+338
Excellent

Posted 25 July 2014 - 05:19

or update plugin SystemTime :)

http://openpli.org/f...ndpost&p=422043


GigaBlue UHD Quad 4K /Lunix3-4K/Solo 4K


Re: Date problem (1923 after power loss) #6 gumball3000

  • Member
  • 10 posts

0
Neutral

Posted 25 July 2014 - 05:33

Ahh, cool, thanks a lot! :)

I have 1.0-rc2 installed. This needs to be pushed to the official repository.

 

And a little feature request: An option to always set a static *good* date like "2014-01-01 01:00" during boot, before trying to use ntpdate, would be very helpful for those VU Duo2 boxes, so that they will not revert to these strange pre-1970 dates if ntpdate fails.


Edited by gumball3000, 25 July 2014 - 05:34.


Re: Date problem (1923 after power loss) #7 littlesat

  • PLi® Core member
  • 56,272 posts

+691
Excellent

Posted 25 July 2014 - 06:58

In the VU (drivers) indeed there is something strange. It should at least boot to 1970 i.s.o. 1923...


WaveFrontier 28.2E | 23.5E | 19.2E | 16E | 13E | 10/9E | 7E | 5E | 1W | 4/5W | 15W


Re: Date problem (1923 after power loss) #8 athoik

  • PLi® Core member
  • 8,458 posts

+327
Excellent

Posted 25 July 2014 - 15:27

In the VU (drivers) indeed there is something strange. It should at least boot to 1970 i.s.o. 1923...

 

This is happening when you are not loading the (closed sourced) drivers? Because if it still happens, the its not a drivers fault.


Wavefield T90: 0.8W - 1.9E - 4.8E - 13E - 16E - 19.2E - 23.5E - 26E - 33E - 39E - 42E - 45E on EMP Centauri DiseqC 16/1
Unamed: 13E Quattro - 9E Quattro on IKUSI MS-0916

Re: Date problem (1923 after power loss) #9 gumball3000

  • Member
  • 10 posts

0
Neutral

Posted 25 July 2014 - 18:18

This happened with the OpenPLi from a week ago or so. So it should have the latest closed source driver, I guess? Or do I need to install them manually?



Re: Date problem (1923 after power loss) #10 gumball3000

  • Member
  • 10 posts

0
Neutral

Posted 25 July 2014 - 21:23

Or: how do I install the open source drivers? Is that another package?



Re: Date problem (1923 after power loss) #11 athoik

  • PLi® Core member
  • 8,458 posts

+327
Excellent

Posted 25 July 2014 - 21:35

Without drivers you have a non usable (for watching tv) box. But without drivers loaded kernel should start with date 1970 something..
Wavefield T90: 0.8W - 1.9E - 4.8E - 13E - 16E - 19.2E - 23.5E - 26E - 33E - 39E - 42E - 45E on EMP Centauri DiseqC 16/1
Unamed: 13E Quattro - 9E Quattro on IKUSI MS-0916


1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users