Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 368717 - hwclock and system clock wrong by several hours and minutes
Summary: hwclock and system clock wrong by several hours and minutes
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] baselayout (show other bugs)
Hardware: AMD64 Linux
: Normal major (vote)
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-25 17:06 UTC by Rolf Asmund
Modified: 2011-05-25 17:23 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Rolf Asmund 2011-05-25 17:06:24 UTC
The time is now 18:49

If I type
# hwclock --show --debug
I get 20:02 (date is correct). More precisely I get
hwclock from util-linux 2.19.1
Using /dev interface to clock.
Last drift adjustment done at 1306344720 seconds after 1969
Last calibration done at 1306344720 seconds after 1969
Hardware clock is on local time
Assuming hardware clock is kept in local time.
Waiting for clock tick...
/dev/rtc does not have interrupt functions. Waiting in loop for time from /dev/rtc to change
...got clock tick
Time read from Hardware Clock: 2011/05/25 20:02:21
Hw clock time : 2011/05/25 20:02:21 = 1306346541 seconds since 1969
Wed May 25 20:02:21 2011  -0.175469 seconds

If I type
# ntptime
I get 22:02 (Date still correct). More preciseliy I get
ntp_gettime() returns code 5 (ERROR)
  time d187df2d.2dc98000  Wed, May 25 2011 22:03:57.178, (.178856),
  maximum error 16000000 us, estimated error 16000000 us
ntp_adjtime() returns code 5 (ERROR)
  modes 0x0 (),
  offset 0.000 us, frequency 193.076 ppm, interval 1 s,
  maximum error 16000000 us, estimated error 16000000 us,
  status 0x41 (PLL,UNSYNC),
  time constant 7, precision 1.000 us, tolerance 500 ppm,

If I choose 'Adjust Date and Time' from the clock in the task bar, and then disables and enables the 'Set date and Time automatically', all clock's are fixed, EXCEPT THE HW-CLOCK (typing hwclock --show)

After a reboot all clocks are wrong again

Reproducible: Always

Steps to Reproduce:
1. Reboot and 
2. Check the clock using ntptime, hwclock or look at the clock in the taskbar
3. Compare with the Casio on your wrist



It's not a matter of time zone, because the error slowly increases over time. I think the error started when we changed to daylight saving. The bug also existed before I got the new baselayout.

(It's my first bug report on gentoo, because I can always find a solution in the bug database or the forum. This one really got me!)
Comment 1 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2011-05-25 17:23:03 UTC
Hello, this isn't a bug at all actually. There is inherent clock skew in hardware. That is why you need to use a syncing daemon like ntp, to sync your clock. Now, there is an option in /etc/conf.d/hwclock to sync the hardware clock on shutdown, this is probably what you are looking for.

I'm going to close this bug report, feel free to reopen if you think you need to but I kindly ask you you seek out support in the forums or IRC instead. Thanks!