zador.blood.stained Posted November 18, 2017 Posted November 18, 2017 .. and output of "udevadm info /dev/rtc0 --attribute-walk" ?
marcellom Posted November 18, 2017 Author Posted November 18, 2017 6 minutes ago, marcellom said: Good morning Zador this is the output /dev/rtc /dev/rtc0 maybe is needed do this as follow? To change the default RTC as e.g. used by hwclock create a file called /etc/udev/rules.d/99-rtc1.rules with e.g. the following contents: KERNEL=="rtc1", SUBSYSTEM=="rtc", DRIVER=="", ATTR{name}=="m41t00", SYMLINK="rtc", MODE="0666"
marcellom Posted November 18, 2017 Author Posted November 18, 2017 4 minutes ago, zador.blood.stained said: .. and output of "udevadm info /dev/rtc0 --attribute-walk" ? this Udevadm info starts with the device specified by the devpath and then walks up the chain of parent devices. It prints for every device found, all possible attributes in the udev rules key format. A rule to match, can be composed by the attributes of the device and the attributes from one single parent device. looking at device '/devices/i2c-1/1-0051/rtc/rtc0': KERNEL=="rtc0" SUBSYSTEM=="rtc" DRIVER=="" ATTR{date}=="2017-11-18" ATTR{name}=="rtc-pcf8563" ATTR{time}=="08:39:22" ATTR{since_epoch}=="1510994362" ATTR{hctosys}=="0" ATTR{max_user_freq}=="64" looking at parent device '/devices/i2c-1/1-0051': KERNELS=="1-0051" SUBSYSTEMS=="i2c" DRIVERS=="rtc-pcf8563" ATTRS{name}=="pcf8563" looking at parent device '/devices/i2c-1': KERNELS=="i2c-1" SUBSYSTEMS=="i2c" DRIVERS=="" ATTRS{name}=="aml_i2c_adap1"
zador.blood.stained Posted November 18, 2017 Posted November 18, 2017 Looks like RTC is configured correctly but nothing reads the time from it. The kernel should do it automatically if it's configured correctly, please also check the output of "grep RTC_HCTOSYS /boot/config-$(uname -r)" Edit: and "dmesg | grep -i rtc"
marcellom Posted November 18, 2017 Author Posted November 18, 2017 13 minutes ago, zador.blood.stained said: Looks like RTC is configured correctly but nothing reads the time from it. The kernel should do it automatically if it's configured correctly, please also check the output of "grep RTC_HCTOSYS /boot/config-$(uname -r)" Edit: and "dmesg | grep -i rtc" et voilà root@openmediavault:~# grep RTC_HCTOSYS /boot/config-$(uname -r) CONFIG_RTC_HCTOSYS=y CONFIG_RTC_HCTOSYS_DEVICE="rtc0" root@openmediavault:~# dmesg | grep -i rtc [ 3.073994] drivers/rtc/hctosys.c: unable to open rtc device (rtc0) [ 12.946414] rtc-pcf8563 1-0051: chip found, driver version 0.4.3 [ 12.947104] rtc-pcf8563 1-0051: rtc core: registered rtc-pcf8563 as rtc0
zador.blood.stained Posted November 18, 2017 Posted November 18, 2017 OK, so it tries to open /dev/rtc0 before it is registered. Not sure if there is an easy way to fix this on the kernel side. You could try putting "hwclock --hctosys" to /etc/rc.local (before "exit 0") so it would try to update the system time later. 1
marcellom Posted November 18, 2017 Author Posted November 18, 2017 Il try... thank you very much for your precious infos...
marcellom Posted November 18, 2017 Author Posted November 18, 2017 After the first reboot..time and date are correct..before for long time was default time and date (1970) Solved case? how i can test? unwiring lan cable?
marcellom Posted November 18, 2017 Author Posted November 18, 2017 I can trust my eyes.. I have disconnected router from internet... After that i have shutdown my odroid. At reboot (without internet ndp server cant' update the time, right?) time and date is correct... Do you think we can close the case with a "solved"? If is ok, ill write all in a post with entire procedure. and change the 3d objet with [solved]. Tell me that I'm not deluding.....
tkaiser Posted November 18, 2017 Posted November 18, 2017 31 minutes ago, marcellom said: At reboot (without internet ndp server cant' update the time, right?) time and date is correct... As it's on almostall systems with a working network connection since on Armbian NTP is active by default. Please update the first post with this important piece of information for others trying to solve the same problem that is only one for stand-alone systems without any network connection these days
marcellom Posted November 18, 2017 Author Posted November 18, 2017 Yes dear Tkaiser. What i want to do is start with a fresh and updated img and repeat the entire "procedure". After that, ill write a clean post with all steps, to post here and in OMV forum. Now i add Solved in the object EDIT BY ME: Is better wait after update try in the (now) updated OMV... Could I thanks everyone to help? Without you do not know how I would have done it!
marcellom Posted November 18, 2017 Author Posted November 18, 2017 Strange: sometime on reboot time and date is right, sometime is reset to 1970.RTC is brand new... but im thinking the battery is dead.Ok people... i need to understand.Ill write after battery. change.......
marcellom Posted November 20, 2017 Author Posted November 20, 2017 Now i can say that, after battery change...the problem remains. Randomly the data reset to 1970 after reboot. I need to try a new approach... As soon I find something that works I will write for others...or il give up if not. Someone need a RTC brand new? LOL
chrisf Posted November 20, 2017 Posted November 20, 2017 Do you still have the "fake-hwclock" package installed? Can you see any differences in the boot logs when it starts with the correct time and when it starts at 1970?
marcellom Posted November 20, 2017 Author Posted November 20, 2017 Hi Chrisf, no... is not installed..Logs? Good idea...
marcellom Posted November 21, 2017 Author Posted November 21, 2017 Nothing strange in the boot log Working and searching internet around this problem drivers/rtc/hctosys.c: unable to open rtc device (rtc0) and reset date at boot I understand (but maybe i wrong) that is a kernel problem fixed in some newer distributions and not present in olders. Read this So I think I have to wait to be solved in the new Debian distributions. I hope I'm wrong... but the fact that we do not find functional solutions supports my thesis.. Is hard to admit...but maybe actually i cant mount Odroid RTC in OMV.
marcellom Posted November 23, 2017 Author Posted November 23, 2017 Just to update this 3d: with OMV4 Arrakis the problem is the same...witH a little fun difference: date reset to 2016 and not to 1970...I think is better... no? LOL
Recommended Posts