Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
trouble with Kernel - systemd - openntpd
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
augustin2
Apprentice
Apprentice


Joined: 16 Mar 2012
Posts: 244
Location: France

PostPosted: Tue Dec 31, 2013 2:10 pm    Post subject: trouble with Kernel - systemd - openntpd Reply with quote

Hi,
I am trying to understand how synchronise at boot time with openntpd and I need help.

I have a gnome3 desktop and I use systemd.
Openndtp is installed
Here is my /etc/conf.d/hwclock
Quote:
clock="local"
clock_hctosys="NO"
clock_systohc="YES"
clock_args="
"

my kernel config has
Quote:
CONFIG_RTC_LIB=y
CONFIG_RTC_HCTOSYS=y
CONFIG_RTC_SYSTOHC=y
CONFIG_RTC_HCTOSYS_DEVICE="rtc 0"


I have enabled the service at boot with
Code:
systemctl enable ntpd.service


I have informed the system that I use local time for hwc with
Code:
timedatectl set-local-rtc 1


I cannot see any time synchronisation at boot. For example if I set a wrong time (let's say 20 minutes in advance) using the graphical interface gnome3 I still have the same time after rebooting.

More over, let's say it is now 14:00 (local time). If I use the graphical interface to set the time at 14:20 I can see that both hwclock and system clock are equal to 14:20

Code:
localhost kitsune # date
mar. déc. 31 14:20:03 CET 2013

localhost kitsune # hwclock --localtime --show
mar. 31 déc. 2013 14:20:21 CET  -0.531543 secondes


I can reset sytem time without changing hwclock with
Code:
ntpd -sd


Now I have a discrepancy between the 2 times . No problem, it is what I wanted for my test.

Code:
localhost kitsune # date
mar. déc. 31 14:02:53 CET 2013

localhost kitsune # hwclock --localtime --show
mar. 31 déc. 2013 14:22:31 CET  -0.531543 secondes


If I restart in this situation, according to what is set in /etc/conf.d/hwclock, I expect to see the hwclock set at the system time at shutdown (that is to say 14:02) and restart with the last system clock but, unfortunately, I have both times with the wrong 14:22 (around) value.

It means that contrarily to the clock_systohc="YES" set both in kernel and /etc/conf.d/hwclock it appears that the hwclock is not corrected at shutdown.
It means also that there is no time sync at boot time.

Could somebody help me making all that clearer ?
Back to top
View user's profile Send private message
fturco
l33t
l33t


Joined: 08 Dec 2010
Posts: 762
Location: Italy

PostPosted: Tue Dec 31, 2013 3:37 pm    Post subject: Reply with quote

As far as I know /etc/conf.d/hwclock is not used by systemd. You should consider it only if you stick with OpenRC.
Back to top
View user's profile Send private message
augustin2
Apprentice
Apprentice


Joined: 16 Mar 2012
Posts: 244
Location: France

PostPosted: Tue Dec 31, 2013 4:21 pm    Post subject: Reply with quote

Thank you for answering.
Removing /etc/conf.d/hwclock doesn't seem to change anything.

hwclock is not set to sysclock at shutdown but sysclock is set to hwclock at boot.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum