# chronyd keeps adjusting clock; media stutters!

## kEiNsTeiN

Hi! I run chronyd on my laptop, the following is really anoying:

```
keinstein veit # tail -n 60 /var/log/messages | grep chronyd

Jun  4 16:55:34 keinstein chronyd[1820]: System clock wrong by -4.018629 seconds, adjustment started

Jun  4 17:03:36 keinstein chronyd[1820]: System clock wrong by 0.854332 seconds, adjustment started

Jun  4 17:11:40 keinstein chronyd[1820]: Selected source 192.53.103.108

Jun  4 17:12:22 keinstein chronyd[1820]: System clock wrong by -1.952140 seconds, adjustment started

Jun  4 17:17:19 keinstein chronyd[1820]: System clock wrong by 1.729793 seconds, adjustment started

Jun  4 17:24:20 keinstein chronyd[1820]: System clock wrong by 0.603590 seconds, adjustment started

Jun  4 17:26:35 keinstein chronyd[1820]: System clock wrong by 0.569769 seconds, adjustment started

Jun  4 17:28:51 keinstein chronyd[1820]: System clock wrong by 0.820677 seconds, adjustment started

Jun  4 17:35:27 keinstein chronyd[1820]: System clock wrong by -2.683511 seconds, adjustment started

Jun  4 17:51:21 keinstein chronyd[1820]: System clock wrong by -1.008806 seconds, adjustment started

Jun  4 18:03:44 keinstein chronyd[1820]: System clock wrong by 2.148409 seconds, adjustment started

Jun  4 18:09:28 keinstein chronyd[1820]: System clock wrong by -1.278455 seconds, adjustment started

Jun  4 18:25:29 keinstein chronyd[1820]: System clock wrong by -1.693797 seconds, adjustment started

Jun  4 18:32:23 keinstein chronyd[1820]: System clock wrong by 4.001210 seconds, adjustment started

Jun  4 18:33:28 keinstein chronyd[1820]: System clock wrong by -3.339595 seconds, adjustment started

Jun  4 18:42:41 keinstein chronyd[1820]: System clock wrong by 3.449086 seconds, adjustment started

Jun  4 18:44:56 keinstein chronyd[1820]: System clock wrong by 1.129968 seconds, adjustment started

Jun  4 18:47:12 keinstein chronyd[1820]: System clock wrong by -0.955802 seconds, adjustment started

Jun  4 18:49:29 keinstein chronyd[1820]: Selected source 192.53.103.104

Jun  4 18:49:34 keinstein chronyd[1820]: System clock wrong by -3.108900 seconds, adjustment started

Jun  4 19:03:13 keinstein chronyd[1820]: System clock wrong by 3.428178 seconds, adjustment started

Jun  4 19:07:30 keinstein chronyd[1820]: System clock wrong by -3.511069 seconds, adjustment started

Jun  4 19:12:12 keinstein chronyd[1820]: System clock wrong by 1.449090 seconds, adjustment started

Jun  4 19:15:24 keinstein chronyd[1820]: System clock wrong by -1.650627 seconds, adjustment started

Jun  4 19:25:10 keinstein chronyd[1820]: Selected source 192.53.103.108

Jun  4 19:26:03 keinstein chronyd[1820]: System clock wrong by 0.722389 seconds, adjustment started

Jun  4 19:32:46 keinstein chronyd[1820]: Selected source 195.145.119.188

Jun  4 19:33:31 keinstein chronyd[1820]: Selected source 192.53.103.104

Jun  4 19:33:48 keinstein chronyd[1820]: System clock wrong by -1.502215 seconds, adjustment started

Jun  4 19:39:22 keinstein chronyd[1820]: Selected source 192.53.103.108

Jun  4 19:39:22 keinstein chronyd[1820]: System clock wrong by 0.883055 seconds, adjustment started

Jun  4 19:45:10 keinstein chronyd[1820]: System clock wrong by 0.581848 seconds, adjustment started

Jun  4 19:46:26 keinstein chronyd[1820]: System clock wrong by 3.517098 seconds, adjustment started

Jun  4 19:47:30 keinstein chronyd[1820]: System clock wrong by -4.261497 seconds, adjustment started

Jun  4 19:53:21 keinstein chronyd[1820]: System clock wrong by 1.801323 seconds, adjustment started

Jun  4 20:00:16 keinstein chronyd[1820]: System clock wrong by 0.607563 seconds, adjustment started

Jun  4 20:04:46 keinstein chronyd[1820]: System clock wrong by 0.526637 seconds, adjustment started

Jun  4 20:11:10 keinstein chronyd[1820]: System clock wrong by 1.111758 seconds, adjustment started

Jun  4 20:13:38 keinstein chronyd[1820]: System clock wrong by -4.458827 seconds, adjustment started

Jun  4 20:19:25 keinstein chronyd[1820]: System clock wrong by -0.555790 seconds, adjustment started

Jun  4 20:25:16 keinstein chronyd[1820]: System clock wrong by 4.667642 seconds, adjustment started

Jun  4 20:27:33 keinstein chronyd[1820]: Selected source 192.53.103.104

Jun  4 20:29:41 keinstein chronyd[1820]: System clock wrong by -3.542381 seconds, adjustment started

Jun  4 20:37:35 keinstein chronyd[1820]: System clock wrong by 0.768933 seconds, adjustment started

Jun  4 20:45:33 keinstein chronyd[1820]: System clock wrong by -1.397792 seconds, adjustment started

Jun  4 20:53:32 keinstein chronyd[1820]: System clock wrong by -0.817127 seconds, adjustment started

Jun  4 21:01:35 keinstein chronyd[1820]: System clock wrong by 1.700956 seconds, adjustment started

Jun  4 21:10:48 keinstein chronyd[1820]: System clock wrong by 0.716283 seconds, adjustment started

Jun  4 21:13:04 keinstein chronyd[1820]: System clock wrong by 1.034364 seconds, adjustment started

Jun  4 21:17:28 keinstein chronyd[1820]: System clock wrong by -3.735652 seconds, adjustment started

Jun  4 21:22:14 keinstein chronyd[1820]: System clock wrong by 2.179840 seconds, adjustment started

Jun  4 21:24:33 keinstein chronyd[1820]: System clock wrong by 2.875460 seconds, adjustment started

Jun  4 21:25:39 keinstein chronyd[1820]: System clock wrong by -3.376241 seconds, adjustment started

Jun  4 21:32:37 keinstein chronyd[1820]: System clock wrong by 0.555898 seconds, adjustment started

Jun  4 21:34:53 keinstein chronyd[1820]: Selected source 192.53.103.108

Jun  4 21:35:34 keinstein chronyd[1820]: System clock wrong by -2.737046 seconds, adjustment started
```

Please help? Here's some useful stuff:

```
chronyc> tracking

Reference ID    : 192.53.103.108 (ptbtime1.ptb.de)

Stratum         : 2

Ref time (UTC)  : Mon Jun  4 19:43:33 2007

System time     : 0.000000 seconds fast of NTP time

Frequency       : 0.786 ppm fast

Residual freq   : -450.838 ppm

Skew            : 45.308 ppm

Root delay      : 1.295151 seconds

Root dispersion : 0.023056 seconds
```

```
chronyc> rtcdata

RTC ref time (UTC) : Mon Jun  4 19:45:45 2007

Number of samples  : 33

Number of runs     : 17

Sample span period : 114m

RTC is fast by     :    -2.594360 seconds

RTC gains time at  :    27.729 ppm
```

```
chronyc> sources

210 Number of sources = 6

MS Name/IP address           Stratum Poll LastRx Last sample

============================================================================

^+ bilbo.sul.t-online.de         2    8    157  -2860ms[-2519ms] +/- 4183ms

^+ ntp1.t-online.de              1    8    126  -2823ms[-2482ms] +/- 3560ms

^~ wrzx03.rz.uni-wuerzburg.d     2    7     32  -1931ms[-1931ms] +/- 2686ms

^? wrzx05.rz.uni-wuerzburg.d     0   10     32     +0us[   +0us] +/-    0us

^* ptbtime1.ptb.de               1    6     37  -1814ms[-1855ms] +/- 3275ms

^+ ptbtime2.ptb.de               1    6     25  -2046ms[-2046ms] +/- 3336ms

chronyc> sourcestats

210 Number of sources = 6

Name/IP Address            NP  NR  Span  Frequency   Freq Skew   Std Dev

========================================================================

bilbo.sul.t-online.de       9   5   32m     909.403    2340.397   483ms

ntp1.t-online.de           15   7   22m   -2778.244    2176.245   162ms

wrzx03.rz.uni-wuerzburg.d   9   4   819   -3550.109   11476.266   973ms

wrzx05.rz.uni-wuerzburg.d   0   0     0      -0.684    2000.000  4000ms

ptbtime1.ptb.de            10   5   826    -543.692    2029.354   172ms

ptbtime2.ptb.de             7   3   742    1598.684   17565.727   283ms
```

I figured that since "t-online" is my ISP, their NTP servers might be closer to me. Then I also live in wuerzburg (therefore my university's one), and at last, the stratum 1 servers with attached atomic clock in braunschweig germany.

The weird part is, that even after chrony switches the timesource, it keeps adjusting to huge differences. Maybe my RTC is super-broken?

What should I do?

thx

----------

## kEiNsTeiN

*bump*

----------

## mimosinnet

I have just installed chrony, and this is what I get:

```
# cat /var/log/messages | grep -e "System clock wrong"

Jun  9 12:57:45 mimosinnet chronyd[5231]: System clock wrong by 383.046604 seconds, adjustment started

Jun  9 12:57:45 mimosinnet chronyd[5231]: System clock wrong by 383.046604 seconds, adjustment started

Jun  9 17:18:49 mimosinnet chronyd[5232]: System clock wrong by 383.124364 seconds, adjustment started

Jun  9 17:18:49 mimosinnet chronyd[5232]: System clock wrong by 383.124364 seconds, adjustment started

Jun 11 06:51:09 mimosinnet chronyd[5226]: System clock wrong by 383.761834 seconds, adjustment started

Jun 11 06:51:09 mimosinnet chronyd[5226]: System clock wrong by 383.761834 seconds, adjustment started

Jun 11 07:35:34 mimosinnet chronyd[5303]: System clock wrong by 383.791321 seconds, adjustment started

Jun 11 07:35:34 mimosinnet chronyd[5303]: System clock wrong by 383.791321 seconds, adjustment started

Jun 11 19:29:52 mimosinnet chronyd[5225]: System clock wrong by 384.004369 seconds, adjustment started

Jun 11 19:29:52 mimosinnet chronyd[5225]: System clock wrong by 384.004369 seconds, adjustment started

Jun 12 10:33:07 mimosinnet chronyd[5226]: System clock wrong by 384.316282 seconds, adjustment started

Jun 12 10:33:07 mimosinnet chronyd[5226]: System clock wrong by 384.316282 seconds, adjustment started
```

These are bigger differences than yours. This is what I have in my chrony configuration file that may be relevant to you:

```
#######################################################################

### AVOIDING POTENTIALLY BOGUS CHANGES TO YOUR CLOCK

#

# To avoid changes being made to your computer's gain/loss compensation

# when the measurement history is too erratic, you might want to enable

# one of the following lines.  The first seems good for dial-up (or

# other high-latency connections like slow leased lines), the second

# seems OK for a LAN environment.

maxupdateskew 100

! maxupdateskew 5
```

And the same measures you have provided in case they are useful to you:

```
chronyc> tracking

Reference ID    : 84.16.231.213 (waterproof.li)

Stratum         : 3

Ref time (UTC)  : Tue Jun 12 09:04:56 2007

System time     : 248.248375 seconds slow of NTP time

Frequency       : 25.152 ppm slow

Residual freq   : -0.115 ppm

Skew            : 2.040 ppm

Root delay      : 0.061768 seconds

Root dispersion : 0.034866 seconds

chronyc> rtcdata

513 No RTC driver

chronyc> sources

210 Number of sources = 1

MS Name/IP address           Stratum Poll LastRx Last sample

============================================================================

^* waterproof.li                 2    8     10   +188us[ +295us] +/-   71ms
```

On the other hand, I am having an issue with this log message:

```
# grep -e "Could not open dump file" /var/log/problem.log

Jun  8 13:08:19 mimosinnet chronyd[7198]: Could not open dump file /var/log/chrony/131.211.84.189.dat

Jun  9 02:23:49 mimosinnet chronyd[5232]: Could not open dump file /var/log/chrony/84.16.227.199.dat

Jun  9 12:55:34 mimosinnet chronyd[5231]: Could not open dump file /var/log/chrony/194.58.197.7.dat

Jun 11 06:48:59 mimosinnet chronyd[5226]: Could not open dump file /var/log/chrony/213.133.98.226.dat

Jun 11 07:33:23 mimosinnet chronyd[5303]: Could not open dump file /var/log/chrony/212.77.176.178.dat

Jun 11 19:26:38 mimosinnet chronyd[5225]: Could not open dump file /var/log/chrony/82.195.149.117.dat

Jun 12 10:30:57 mimosinnet chronyd[5226]: Could not open dump file /var/log/chrony/84.16.231.213.dat
```

I believe this is related with the server I have defined in chrony.conf:

```
### SPECIFY YOUR NTP SERVERS

# Most computers using chrony will send measurement requests to one or

# more 'NTP servers'.  You will probably find that your Internet Service

# Provider or company have one or more NTP servers that you can specify.

# Failing that, there are a lot of public NTP servers.  There is a list

# you can access at

# http://www.eecis.udel.edu/~mills/ntp/servers.htm.

server europe.pool.ntp.org
```

Could you check if you get similar messages and give me the servers you have chosen? Thanks!

----------

## kEiNsTeiN

I believe your chronyd just doesn't have access rights to the dump files, check file permessions.

but that doesn't correspond to my problem  :Very Happy: 

anyone?

ps: sorry can't give you any more information, I'm not at mny pc right now...

----------

## PaulBredbury

I would suggest switching to ntp, which automatically handles "clock drift".

----------

## mimosinnet

 *kEiNsTeiN wrote:*   

> but that doesn't correspond to my problem 

 

Sorry!   :Embarassed:   I thought that maxupdateskew could be related, as the time differences are bigger in my case and I do not get so many adjustment messages. Next time!   :Very Happy: 

----------

## Lucipher

I'm having the same problem. I've changed to openntp.

The last chrony update was in the middle of 2005, so it seems to be dead!

----------

