[chrony-users] Resume from suspend and default makestep configuration

[ Thread Index | Date Index | More chrony.tuxfamily.org/chrony-users Archives ]


Hello!

I need to say that default chrony configuration is unsuitable for
desktop or laptop users who needs to have precise time and not to be in
situation that laptop with running chrony has incorrect time, shifted by
more then 30 minutes.

How it may happen?

Default configuration of makestep is 1 3. Which means that slewing is
used after first 3 clock updates.

When laptop is put into S3 suspend or when is put into hibernation then
system RTC clock may be changed without system notice. When computer is
in hibernation, this may happen by booting another operating system.

When laptop is in S3 suspend state, RTC clock may be changed also by
UEFI / BIOS firmware (possible when it is buggy). And this happened to
me 2020-04-05. Day before was laptop put into suspend state and on Apr 5
I resumed it. UEFI firmware changed time by 3600 seconds forward (looks
like some DST change was applied directly in UEFI) and chrony put
following lines to the log:

chronyd[2480]: Forward time jump detected!
chronyd[2480]: System clock wrong by -3599.848440 seconds, adjustment started

And then system clock was incorrect, shifted by 1 hour until I figured
out that time is incorrect. (I figured it after few hours!)

Chrony changed system clock speed and was trying to synchronize. But
fixing such huge gap like 1 hour would take about 2 days...

It was because of that default 'makestep 1 3' configuration. Chrony is
not stopped during suspend or hibernate therefore for that 3600 seconds
forward jump detection (which happened when laptop was in S3) was use
slewing correction and not instant jump correct.

So basically this default configuration of chrony is unusable for laptop
or desktop users when they want to have correct time.

I would suggest to either change default configuration to 'makestep 1 -1'
or assuming that after resuming from suspend / hibernate, chrony should
behave like it was restarted. And therefore suck forward jump detection
done by clock update would be treated as in first clock update --
slewing would not be used and instead clock would jump.

What do you think about it? It is possible to change it? So default
chrony configuration would be suitable also for desktop / laptop users?

-- 
Pali Rohár
pali.rohar@xxxxxxxxx

-- 
To unsubscribe email chrony-users-request@xxxxxxxxxxxxxxxxxxxx 
with "unsubscribe" in the subject.
For help email chrony-users-request@xxxxxxxxxxxxxxxxxxxx 
with "help" in the subject.
Trouble?  Email listmaster@xxxxxxxxxxxxxxxxxxxx.


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/