Sign up ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

The clock applet drifts in time. Clock is set to "synchronize with internet ..." so it is correct at startup, but then if I stay inactive for some time, may be 5 min as well as 1 hour, the clock stops ticking. If I start to be active again, then the clock applet moves again, but the time is now late.

And it is not only the applet that is wrong, but the whole system date, because when I run date in a terminal, the time is also wrong.

Clarification : Sorry, may be my question was not clear. Here is my bug report to ubuntu :

Expected Behaviour :
Clock-applet displays the correct time,

Observed Behaviour :
Displayed time is drifting

How to reproduce :
If I get away from my computer for some times, the time displayed by the clock applet drifts. But the date command also show the wrong time. Moreover, sleep interval also get wrong. To debug this, I tested the following script :

while [[ true ]]
    date >> clocktest.log
    hwclock >> clocktest.log
    sleep 300

Must be run as root because of hwclock. Il launched it :

./ &

and got away from my computer

Here is the output log :

1 mardi 17 août 2010, 12:42:12 (UTC+0200)
2 mar. 17 août 2010 12:42:13 CEST -0.346882 secondes
3 mardi 17 août 2010, 12:47:13 (UTC+0200)
4 mar. 17 août 2010 12:57:13 CEST -0.080965 secondes
5 mardi 17 août 2010, 12:52:13 (UTC+0200)
6 mar. 17 août 2010 13:02:14 CEST -1.002776 secondes
7 mardi 17 août 2010, 12:57:18 (UTC+0200)
8 mar. 17 août 2010 13:07:18 CEST -0.063633 secondes
9 mardi 17 août 2010, 13:02:18 (UTC+0200)
10 mar. 17 août 2010 13:12:19 CEST -0.361501 secondes
11 mardi 17 août 2010, 13:07:19 (UTC+0200)
12 mar. 17 août 2010 13:17:20 CEST -0.987434 secondes

Line 1 and 2 show the first time through the loop.
Line 3 and 4 show the bug : while date (and sleep) thinks 5 minutes have elapsed, hwclock shows that 15 minutes have elapsed.

Line 5 to 12 shows normal behaviour, except now date is late by 10 minutes. Behaviour is normal because I was back at my desk using the computer.

Having clock applet displaying the wrong time is one thing, but having the whole system time wrong (since sleep gets confused too) is a major bug.

Hardware : It is a fujitsu siemens amilo xi 2550 notebook. It was working fine with ubuntu 8.04

share|improve this question
Does your computer go to sleep (suspend or hibernate)? does this also occur when you actively use the computer? does it occur when you disable the screensaver? – LassePoulsen Aug 17 '10 at 11:32
Computer does not go to suspend or hibernate, nor does the screen saver come up – shodanex Aug 18 '10 at 12:19
@shodanex: The issue is likely to be specific to your particular hardware (or virtual machine), so you should describe it. Also, does the clock still drift if you turn “synchronize with internet” off? – Gilles Aug 18 '10 at 12:41
@Gilles: I turned synchronize with internet because I was observing this drift. – shodanex Aug 18 '10 at 12:50
@shodanex: You should include this information (hardware model, absence of VM, happens with and without sync with internet) in your Ubuntu bug report. – Gilles Aug 18 '10 at 14:31

1 Answer 1

Your CMOS battery seems to be dying. Open the computer, and there's a little thing that looks like a large watch-battery on the motherboard. Replace that.

share|improve this answer
its a battery its either dead or alive. maybe but its a long shot that this is the problem. – myusuf3 Aug 17 '10 at 13:34
It is possible for a battery to be marginal, but the OP claim "so it is correct at startup" is (as yet) unsubstantiated and more information is needed to see if the "CMOS" RTC is bad or the soft system clock is weird. The distinction between the two is explained at – msw Aug 17 '10 at 15:31
I've had watch batteries drift when they were not-quite-dead. And I read correct at startup because of NTP to mean...well, that NTP was what's making it correct (ie, it's doing a sync at boot) – maco Aug 17 '10 at 19:05
This has nothing to do with a dying cmos clock. cmos clock seems to be just fine – shodanex Aug 18 '10 at 12:17

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.