H2 Time Clock Issues

Post Reply
rsisson2
Posts: 2
Joined: Wed Feb 20, 2019 11:58 pm
languages_spoken: english
ODROIDs: H2, Xu4, HC2
Has thanked: 0
Been thanked: 0
Contact:

H2 Time Clock Issues

Unread post by rsisson2 » Thu Feb 21, 2019 12:23 am

When using Pfsense the time clock won't work correctly. It keeps losing time. I have yet to see this issue with an OS other than FREEBSD. The main reason i purchased it was to use as a Pfsense Firewall. I have worked around it by updating how often NTP checks to fix the time but it makes logging useless. I do have the Battery, i have tried to restore bios defaults and nothing will fix it. Any thoughts?

User avatar
odroid
Site Admin
Posts: 31852
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID
Has thanked: 89 times
Been thanked: 255 times
Contact:

Re: H2 Time Clock Issues

Unread post by odroid » Thu Feb 21, 2019 11:03 am

There has been no RTC clock issue with BIOS V1.00, 1,01, 1.02 and 1.03 with Ubuntu kernel.
I have no idea how FREEBSD handles the hardware RTC though.
Do you have a DMM to measure the battery voltage?

rsisson2
Posts: 2
Joined: Wed Feb 20, 2019 11:58 pm
languages_spoken: english
ODROIDs: H2, Xu4, HC2
Has thanked: 0
Been thanked: 0
Contact:

Re: H2 Time Clock Issues

Unread post by rsisson2 » Fri Mar 08, 2019 11:57 pm

I will check the voltage on it tonight but i know the battery works correctly as the other settings are saved in bios.

User avatar
venkatbo
Posts: 526
Joined: Mon Feb 25, 2013 3:10 pm
languages_spoken: english
ODROIDs: C0/C1+/C2; U3+; XU3-Lite/XU4; H2; VU/VU7+; Touchscreen Show TFT Cloudshell SmartPower mAHRS DAC GPS Multiscope Ocam
Location: Bay Area, California
Has thanked: 0
Been thanked: 4 times
Contact:

Re: H2 Time Clock Issues

Unread post by venkatbo » Sun Mar 31, 2019 8:13 am

@rsisson2,

I'm trying to get pfsense to install on the eMMC, but using auto and manual (efi) partitioning, I can get it to install on the SATA drive but not eMMC...

Were you able to get it to install properly on the eMMC?
If so, could you suggest steps.

thanks

johnsond
Posts: 2
Joined: Thu Jul 11, 2019 6:00 pm
languages_spoken: english
Has thanked: 0
Been thanked: 2 times
Contact:

Re: H2 Time Clock Issues

Unread post by johnsond » Thu Jul 11, 2019 6:09 pm

I fixed this on my Odroid-H2 with the following;
First I noticed that 1 second seemed to take around 6-9 seconds to tick over, ntpupdate worked but ntpd rejected all peers and time lagged by a few minutes after only 10mins real-life time. The RTC circuit with battery worked fine in BIOS but the OS was slow.

I checked the timecounter settings.

Code: Select all

2.4.4-RELEASE][admin@pfsense]/var/etc: sysctl -a | grep timecounter 
kern.timecounter.tsc_shift: 1
kern.timecounter.smp_tsc_adjust: 0
kern.timecounter.smp_tsc: 1
kern.timecounter.invariant_tsc: 1
kern.timecounter.fast_gettime: 1
kern.timecounter.tick: 1
kern.timecounter.choice: ACPI-fast(900) HPET(950) i8254(0) TSC-low(1000) dummy(-1000000)
kern.timecounter.hardware: TSC-low
kern.timecounter.alloweddeviation: 5
kern.timecounter.stepwarnings: 0
kern.timecounter.tc.ACPI-fast.quality: 900
kern.timecounter.tc.ACPI-fast.frequency: 3579545
kern.timecounter.tc.ACPI-fast.counter: 1790047900
kern.timecounter.tc.ACPI-fast.mask: 4294967295
kern.timecounter.tc.HPET.quality: 950
kern.timecounter.tc.HPET.frequency: 19200000
kern.timecounter.tc.HPET.counter: 617809080
kern.timecounter.tc.HPET.mask: 4294967295
kern.timecounter.tc.i8254.quality: 0
kern.timecounter.tc.i8254.frequency: 1193182
kern.timecounter.tc.i8254.counter: 34833
kern.timecounter.tc.i8254.mask: 65535
kern.timecounter.tc.TSC-low.quality: 1000
kern.timecounter.tc.TSC-low.frequency: 1486625415
kern.timecounter.tc.TSC-low.counter: 1490458679
kern.timecounter.tc.TSC-low.mask: 4294967295
The important parts for me;
kern.timecounter.choice: ACPI-fast(900) HPET(950) i8254(0) TSC-low(1000) dummy(-1000000)
kern.timecounter.hardware: TSC-low

TCS-low I thought might have something to do with it. So I changed to ACPI-fast

Code: Select all

sysctl -w kern.timecounter.hardware=ACPI-fast
After several executions of the date command it was evident that this was the one to use. So I swapped permanently.
System -> Advanced -> System Tunables
+Add New
Tunable Name: kern.timecounter.hardware
Value: ACPI-fast
Description: TSC-low doesn't work on Odroid-H2

NTP Before Change

Code: Select all

[2.4.4-RELEASE][admin@pfsense]/var/etc: ntpq
ntpq> as
ind assid status  conf reach auth condition  last_event cnt
===========================================================
  1 24182  8811   yes  none  none    reject    mobilize  1
  2 24183  8811   yes  none  none    reject    mobilize  1
  3 24184  8811   yes  none  none    reject    mobilize  1
  4 24185  8811   yes  none  none    reject    mobilize  1
  5 24186  9014   yes   yes  none    reject   reachable  1
  6 24187  1014    no   yes  none    reject   reachable  1
  7 24188  1014    no   yes  none    reject   reachable  1
  8 24189  1014    no   yes  none    reject   reachable  1
  9 24190  1014    no   yes  none    reject   reachable  1
 10 24191  1014    no   yes  none    reject   reachable  1
 11 24192  1014    no   yes  none    reject   reachable  1
 12 24193  1014    no   yes  none    reject   reachable  1
 13 24194  1014    no   yes  none    reject   reachable  1
 14 24195  1014    no   yes  none    reject   reachable  1
 15 24196  1014    no   yes  none    reject   reachable  1
 16 24197  1014    no   yes  none    reject   reachable  1
 17 24198  1014    no   yes  none    reject   reachable  1
 18 24199  1014    no   yes  none    reject   reachable  1
 19 24200  1014    no   yes  none    reject   reachable  1
 20 24201  1014    no   yes  none    reject   reachable  1
 21 24202  1014    no   yes  none    reject   reachable  1
NTP After Change

Code: Select all

[2.4.4-RELEASE][admin@pfsense]/var/etc: ntpq
ntpq> as
ind assid status  conf reach auth condition  last_event cnt
===========================================================
  1 24182  8811   yes  none  none    reject    mobilize  1
  2 24183  8811   yes  none  none    reject    mobilize  1
  3 24184  8811   yes  none  none    reject    mobilize  1
  4 24185  8811   yes  none  none    reject    mobilize  1
  5 24186  961a   yes   yes  none  sys.peer    sys_peer  1
  6 24190  141a    no   yes  none candidate    sys_peer  1
  7 24203  1414    no   yes  none candidate   reachable  1
  8 24204  141a    no   yes  none candidate    sys_peer  1
  9 24205  1414    no   yes  none candidate   reachable  1
 10 24206  1414    no   yes  none candidate   reachable  1
 11 24207  1414    no   yes  none candidate   reachable  1
 12 24208  1414    no   yes  none candidate   reachable  1
NTP now syncs and the system tunable should mean it survives a reload.

HTH
These users thanked the author johnsond for the post (total 2):
odroid (Tue Aug 06, 2019 8:15 am) • Mullcom (Sat Aug 17, 2019 7:04 pm)

dreamnid
Posts: 1
Joined: Tue Aug 06, 2019 5:20 am
languages_spoken: english
ODROIDs: H2 HC2
Has thanked: 0
Been thanked: 0
Contact:

Re: H2 Time Clock Issues

Unread post by dreamnid » Tue Aug 06, 2019 5:25 am

Thanks for posting the fix, @johnsond!
I was going crazy with wondering why my VMs times were off by a week. Found out it was due to pfsense which I had setup on my new Odriod H2 2 weeks ago.

User avatar
Mullcom
Posts: 85
Joined: Sun Jun 30, 2019 1:41 am
languages_spoken: english
Has thanked: 46 times
Been thanked: 2 times
Contact:

Re: H2 Time Clock Issues

Unread post by Mullcom » Sat Aug 17, 2019 7:05 pm

You saved me!!

I did Troubleshooting this in days! And have try to figure out why clock is slow. And why it not update time automatically.

Big thx for this information.

Beem my message up with phone.


User avatar
Mullcom
Posts: 85
Joined: Sun Jun 30, 2019 1:41 am
languages_spoken: english
Has thanked: 46 times
Been thanked: 2 times
Contact:

Re: H2 Time Clock Issues

Unread post by Mullcom » Sat Aug 17, 2019 7:17 pm

venkatbo wrote:@rsisson2,

I'm trying to get pfsense to install on the eMMC, but using auto and manual (efi) partitioning, I can get it to install on the SATA drive but not eMMC...

Were you able to get it to install properly on the eMMC?
If so, could you suggest steps.

thanks
I install Pfsense with USB drive to eMMC disk. No problem at all to get everything up. The issue I have was time that was slow..

Installing process flow like running Water.

Do you still have problem?

Beem my message up with phone.


johnsond
Posts: 2
Joined: Thu Jul 11, 2019 6:00 pm
languages_spoken: english
Has thanked: 0
Been thanked: 2 times
Contact:

Re: H2 Time Clock Issues

Unread post by johnsond » Fri Aug 23, 2019 7:44 am

@Mullcom @dreamnid

Happy to help. :)

Post Reply

Return to “Issues”

Who is online

Users browsing this forum: No registered users and 1 guest