Your message dated Mon, 28 Dec 2020 00:14:00 +0100 with message-id <[email protected]> and subject line Re: Bug#97349: hwclock doesn't adjust has caused the Debian Bug report #97349, regarding util-linux: [hwclock] conflict between clock drift and correction to be marked as done.
This means that you claim that the problem has been dealt with. If this is not the case it is now your responsibility to reopen the Bug report if necessary, and/or fix the problem forthwith. (NB: If you are a system administrator and have no idea what this message is talking about, this may indicate a serious mail system misconfiguration somewhere. Please contact [email protected] immediately.) -- 97349: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=97349 Debian Bug Tracking System Contact [email protected] with problems
--- Begin Message ---Package: util-linux Version: 2.10q-1 I have 2 complaints about hwclock: 1. Cosmetic problem: /etc/init.d/hwclock.sh is poorly formated since it uses tabs for indentation. In the case statement, most lines are indented 2 tab-stops and many lines wrap on an 80-column terminal since a tab is normally set to 8-spaces. The fix is to substitute 2 spaces for each tab. (In some cases you could substitute 4 spaces if no line wraps on an 80 col terminal.) 2. Here's the main problem: If one uncomments "hwclock --adjust ..." in /etc/init.d/hwclock.sh then your hardware clock may not get adjusted. (If you don't uncomment it, it doesn't get adjusted either so you can't win.) This is the case for people who turn off their Linux PCs more frequently than once a day (or share Linux/Windows on the same PC). Here's why it doesn't work: If an attempt is made to calibrate (to calculate the drift and write it into /etc/adjtime) and it's been less than 24 hours since the last attempted calibration, then no drift calibration is made (the secs/day drift value in /etc/adjtime is not changed). Now any use of --set or --systohc counts as a calibration attempt. Now --systohc happens per the hwclock.sh script every time you exit linux. So if you shutdown your PC at less than 24 hour intervals the drift value never gets changed. This is also true if you frequently switch between Windows and Linux on the same PC. This behavior doesn't seem to be documented anywhere. But at one time it was documented (probably in the man for hwclock) but I got a newer version and can't find the old documentation it. The 1998 manual makes no mention of any >24 hr. requirement as I've outlined above. However, I tried out using both --set and --systohc (within 24 hrs. of the last calibration) and the drift in /etc/adjtime doesn't change (there was an actual drift of over 100 sec./day). The times in /etc/adjtime do change (as they should) but the drift time (sec/day) doesn't change. So I'll wait 24+ hours and see if it works OK. It probably will. (I've commented out the --systohc in the script so I can "safely" shutdown my PC for the night.) If it fails to work after 24 hours, I'll send in a supplement to this bug report. Otherwise, assume that calibration works fine after 24 hrs. from the last calibration attempt. David Lawyer
--- End Message ---
--- Begin Message ---Version: 2.26.2-1 * David Lawyer <[email protected]> [201227 23:09]: > Package: util-linux > Version: 2.10q-1 [..] > 2. Here's the main problem: If one uncomments "hwclock --adjust ..." in > /etc/init.d/hwclock.sh then your hardware clock may not get adjusted. > (If you don't uncomment it, it doesn't get adjusted either so you > can't win.) This is the case for people who turn off their Linux PCs > more frequently than once a day (or share Linux/Windows on the same > PC). Here's why it doesn't work: > > If an attempt is made to calibrate (to calculate the drift and write it > into /etc/adjtime) and it's been less than 24 hours since the last > attempted calibration, then no drift calibration is made (the secs/day > drift value in /etc/adjtime is not changed). [..] > > This behavior doesn't seem to be documented anywhere. hwclock 2.26 once again documents this in hwclock(8), including lots of text on when to use --update-drift and its requirements. Thanks, Chris
--- End Message ---

