HansDampf Posted November 14, 2015 Posted November 14, 2015 After a reboot of my cubietruck has the wrong date and time !? 26-Sep-2012 I updated the time with: sudo dpkg-reconfigure tzdata Select Europe and Berlin but nothing changed. Then i set the time manually. That worked but can not the deal. What is wrong with my cubie? hwclock: select() to /dev/rtc0 to wait for clock tick timed out: No such file or directory ntpq -p: ntpq: read: Connection refused In the moment i have the correct time, becaus i set it manually, but the wrong date :-( Edit: Okay, i do it now that way: date -s "14 Nov 2015 10:58:00" But how can it be that the date and time is wrong after a reboot?
zador.blood.stained Posted November 14, 2015 Posted November 14, 2015 What exact board do you have? What OS and kernel version (uname -r) do you use? Output of these commands should give some extra information: dmesg | grep -i rtc ls -l /dev/rtc* hwclock --test -D
HansDampf Posted November 15, 2015 Author Posted November 15, 2015 Thank you for your support! Here are the output. uname -r 3.4.109-sun7i dmesg | grep -i rtc [ 1.567554] sunxi-rtc sunxi-rtc: rtc core: registered rtc as rtc0 [ 3.468428] sunxi-rtc sunxi-rtc: setting system clock to 2021-09-26 17:55:49 ls -l /dev/rtc* crw------- 1 root root 254, 0 Sep 26 2021 /dev/rtc0 hwclock --test -D hwclock from util-linux 2.20.1 Using /dev interface to clock. Last drift adjustment done at 1632678917 seconds after 1969 Last calibration done at 1632678917 seconds after 1969 Hardware clock is on UTC time Assuming hardware clock is kept in UTC time. Waiting for clock tick... ...got clock tick Time read from Hardware Clock: 2021/09/27 11:57:45 Hw clock time : 2021/09/27 11:57:45 = 1632743865 seconds since 1969 Mon 27 Sep 2021 01:57:45 PM CEST -1.271569 seconds Strange is that i can set the date after reboot and now the result for date is: Sun Nov 15 13:59:48 CET 2015 But as you can see something is wrong with my hardwareclock. How can i solve this?
zador.blood.stained Posted November 15, 2015 Posted November 15, 2015 So what OS do you use? Debian Wheezy/Debian Jessie/Ubuntu Trusty? If you are using Jessie, what is output of "readlink /proc/1/exe"? Try to write time to rtc manually (set right system date and run "hwclock -w") and see if it survives reboot.
HansDampf Posted November 15, 2015 Author Posted November 15, 2015 System is Debian Wheezy. But right now after hwclock -w everything seems fine :-) I have to check a reboot later. So i will possible be back. Edit: Perfect, after a reboot the hardware clock and system clock match ! Thank you for your help :-)
PaulofOz Posted February 14, 2017 Posted February 14, 2017 I run Armbian Jessie server on OPi PC+ using flightawares adsb tracker. Flightaware is telling me I have not fead data for 2 days+. This seems to coincide with an Update/Upgrade I did around the 6th Feb. Flightaware are telling me : This feeder last checked in in February 2017. The system clock off by 2 days, 6 hours, 24 minutes. Please set your system clock to the correct time. Maybe try 'sudo /etc/init.d/ntp restart' or look into why ntpd has been unable to set the system clock to the correct time. Restarting ntp does not solve the problem. opi@orangepipcplus:~$ dmesg | grep -i rtc[ 3.166668] [RTC] WARNING: Rtc time will be wrong!![ 3.176417] [RTC] WARNING: use *internal OSC* as clock source[ 3.187456] sunxi-rtc sunxi-rtc: rtc core: registered sunxi-rtc as rtc0[ 7.258064] systemd[1]: RTC configured in localtime, applying delta of 600 minutes to system time. opi@orangepipcplus:~$ ls -l /dev/rtc*lrwxrwxrwx 1 root root 4 Feb 14 21:17 /dev/rtc -> rtc0crw------- 1 root root 254, 0 Feb 14 21:17 /dev/rtc0 opi@orangepipcplus:~$ sudo hwclock --test -Dhwclock from util-linux 2.25.2Using the /dev interface to the clock.Last drift adjustment done at 1487030466 seconds after 1969Last calibration done at 1487030466 seconds after 1969Hardware clock is on local timeAssuming hardware clock is kept in local time.Waiting for clock tick......got clock tickTime read from Hardware Clock: 1970/01/01 01:30:03Hw clock time : 1970/01/01 01:30:03 = -30597 seconds since 1969Thu 01 Jan 1970 01:30:03 AM AEST -2.096749 seconds Can somebody please offer me suggestions to correct this.
gnasch Posted February 15, 2017 Posted February 15, 2017 OpiPcPlus is not equipped with a hardware clock. so your hwclock --test -D will always come up with a date 1.Jan.1970 + uptime. when ntp starts and the difference between the system clock and network servers is too high, it will not step the system clock. Usually on boot there is a call to ntpdate which will step the clock from the net. then ntpd is started and will keep time monotonous and synced to network time. Never had any problem with armbian and this mechanism. Is your network only ready very late in the boot process? hth, gnasch
zador.blood.stained Posted February 15, 2017 Posted February 15, 2017 OpiPcPlus is not equipped with a hardware clock. H3 does include RTC, but this board doesn't expose any option to use a backup battery for it. Additionally there may be a problem with RTC clock source configuration in the legacy kernel, but I don't think anybody is interested in investigating it (at least for the legacy kernel) 1
PaulofOz Posted February 19, 2017 Posted February 19, 2017 PZW opi@orangepipcplus:~$ sudo timedatectl Local time: Mon 2017-02-20 08:34:51 AEDT Universal time: Sun 2017-02-19 21:34:51 UTC RTC time: Thu 1970-01-01 15:15:24 Time zone: Australia/Melbourne (AEDT, +1100) Network time on: yesNTP synchronized: yes RTC in local TZ: yesWarning: The system is configured to read the RTC time in the local time zone. This mode can not be fully supported. It will create various problems with time zone changes and daylight saving time adjustments. The RTC time is never updated, it relies on external facilities to maintain it. If at all possible, use RTC in UTC by calling 'timedatectl set-local-rtc 0'.opi@orangepipcplus:~$ timedatectl set-local-rtc 0Failed to set local RTC: The name org.freedesktop.PolicyKit1 was not provided by any .service filesopi@orangepipcplus:~$
Recommended Posts