Gentoo Archives: gentoo-user

From: Dale <rdalek1967@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] hwclock <--> sysclock and the ntp-client
Date: Mon, 06 Feb 2012 18:47:40
Message-Id: 4F301FFD.5050103@gmail.com
In Reply to: [gentoo-user] hwclock <--> sysclock and the ntp-client by meino.cramer@gmx.de
1 meino.cramer@×××.de wrote:
2 > Hi,
3 >
4 > to get the correct system time I use ntp-client in the boot process.
5 > Furthermore in /etc/conf.d/hwclock I set:
6 >
7 > # Set CLOCK to "UTC" if your Hardware Clock is set to UTC (also known as
8 > # Greenwich Mean Time). If that clock is set to the local time, then
9 > # set CLOCK to "local". Note that if you dual boot with Windows, then
10 > # you should set it to "local".
11 > clock="UTC"
12 >
13 > # If you want to set the Hardware Clock to the current System Time
14 > # (software clock) during shutdown, then say "YES" here.
15 > # You normally don't need to do this if you run a ntp daemon.
16 > clock_systohc="YES"
17 >
18 > # If you want to set the system time to the current hardware clock
19 > # during bootup, then say "YES" here. You do not need this if you are
20 > # running a modern kernel with CONFIG_RTC_HCTOSYS set to y.
21 > # Also, be aware that if you set this to "NO", the system time will
22 > # never be saved to the hardware clock unless you set
23 > # clock_systohc="YES" above.
24 > clock_hctosys="NO"
25 >
26 > # If you wish to pass any other arguments to hwclock during bootup,
27 > # you may do so here. Alpha users may wish to use --arc or --srm here.
28 > clock_args=""
29 >
30 > In the kernel config file I had set:
31 >
32 > CONFIG_RTC_HCTOSYS=y
33 > CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
34 >
35 > I would exspect that after a reboot of the system which system time is
36 > correctly set via ntp-client that the hwclock and system time only
37 > differ in a small amount of time.
38 >
39 > But:
40 > solfire:/home/mccramer>hwclock
41 > Mon Feb 6 19:05:11 2012 -0.172569 seconds
42 > solfire:/home/mccramer>date
43 > Mon Feb 6 18:49:37 CET 2012
44 > solfire:/home/mccramer>
45 >
46 > Is there anything else which I have to tweak to acchieve what I want?
47 >
48 > Thank you very much in advance for any help!
49 >
50 > Best regards,
51 > mcc
52 >
53 > PS: I need a correct hwclock since I want to wake the system via the
54 > hwclock.
55 >
56 >
57 >
58 >
59
60
61 I ran into some issues when I rebooted and I had to set both
62 clock_systohc & clock_hctosys to yes. That worked for me at least. One
63 sets the BIOS at shutdown and the other loads from the BIOS when
64 rebooting.
65
66 Yours may need something else but if nothing else works, try that.
67
68 Dale
69
70 :-) :-)
71
72 --
73 I am only responsible for what I said ... Not for what you understood or
74 how you interpreted my words!
75
76 Miss the compile output? Hint:
77 EMERGE_DEFAULT_OPTS="--quiet-build=n"

Replies

Subject Author
Re: [gentoo-user] hwclock <--> sysclock and the ntp-client Michael Mol <mikemol@×××××.com>