Gentoo Archives: gentoo-amd64

From: Thanasis <thanasis@××××××××××.org>
To: gentoo-amd64@l.g.o
Subject: Re: [gentoo-amd64] Re: hardware clock often doesn't sync to system on shutdown
Date: Mon, 15 Sep 2008 14:47:55
Message-Id: 48CE7530.2090909@asyr.hopto.org
In Reply to: [gentoo-amd64] Re: hardware clock often doesn't sync to system on shutdown by Duncan <1i5t5.duncan@cox.net>
1 on 09/15/2008 11:49 AM Duncan wrote the following:
2 > Thanasis <thanasis@××××××××××.org> posted 48CD973B.6080308@××××××××××.org,
3 > excerpted below, on Mon, 15 Sep 2008 01:59:07 +0300:
4 >
5 >> Thanks to your guidance, I found out that I had a large "systematic
6 >> drift rate" in /etc/adjtime file. This must have been the reason why the
7 >> hwclock was set behind. So I've set the drift to zero (actually just
8 >> deleted the file and let the system create a new one) and I hope things
9 >> will be ok now. :-)
10 >
11 > Are you on baselayout-1 still or -2 (which is still ~arch)? IDR the
12 > details on baselayout-1, but at least with -2, you can set it not to use
13 > the adjtime file at all. If you're on -2 and can't find the details
14 > yourself, post to that effect and I'll try to find them for you from this
15 > end.
16 >
17 > Particularly if you're having trouble with the clock interrupt failing
18 > (as you mentioned you are), if you sync via NTP, that file can cause more
19 > problems than it solves, because the system keeps deciding the clock
20 > isn't working right and setting a larger adjustment, which fights what
21 > ntpd is already doing. Thus if you're running ntpd anyway, it's best to
22 > disable use of that file entirely, /especially/ if as I said your acpi or
23 > whatever is screwing it. If you're still on baselayout-1 and can't
24 > figure out how to disable adjtime, it may be worth putting a rm in /etc/
25 > conf.d/local (make it conditional on there actually being a file to rm,
26 > so the rm doesn't error out if it's not there, and ensure the local
27 > service is in your initlevels as appropriate) for both local_start and
28 > stop, so it's regularly removed before it starts getting to be too big of
29 > a problem.
30 >
31 # equery l |grep baselayout
32 sys-apps/baselayout-1.12.11.1
33
34 So I'm on baselayout-1.
35 I attach the /etc/init.d/clock which shows a local "readonly" variable
36 that controls a "--noadjfile" option.
37 What does the following test do?
38
39 if ! touch /etc/adjtime 2>/dev/null ; then
40 readonly="yes"
41 elif [[ ! -s /etc/adjtime ]] ; then
42 echo "0.0 0 0.0" > /etc/adjtime
43 fi

Attachments

File name MIME type
clock text/plain

Replies

Subject Author
Re: [gentoo-amd64] Re: hardware clock often doesn't sync to system on shutdown Sebastian Redl <sebastian.redl@×××××××××××.at>