2004-04-06 17:34:33

by Mariusz Kozłowski

[permalink] [raw]
Subject: odd clock thing...

Hi,

I have linux running my laptop Sony VAIO PCG-FR285M. A few weeks ago I
compiled in to kernel CPU frequency scalling. I configured a few rules for
cpufreqd and since then I see strange behaviour of the clock in this machine.
First it was running slower than normal watch... i thought it has something
to do with the hardware. But later on I observed that when the machine is off
its clock runs perfectly fine. Now when the time zone has changed (I live in
Poland) the clock started to run faster than normal watch. Now when I power
off the machine time runs fine... I mean it was off for about a week and
surprise... the time was still late but the same amount of time when I
powered the machine off. So i guess it is not hardware related. What might be
causing this? Anyway I am not shure if it is a coincidence that this happened
when I compiled in CPU frequency scalling stuff and it is kernel related or
whether it is caused by some buggy user level software because I emerge
system && emerge world once or twice a week. I might add that when the clock
runs odd the machine is not powered from battery. It runs AC power supply so
the CPU uses its full frequency (2.4GHz). (I didn't test what is going on
with battery).

BTW. The clock was getting late approx. 1h a day.

Here is some more info:

Linux laptop 2.6.4-gentoo-r1 #4 Tue Apr 6 12:54:59 CEST 2004 i686 Intel(R)
Pentium(R) 4 CPU 2.40GHz GenuineIntel GNU/Linux

Gnu C 3.3.3
Gnu make 3.80
util-linux 2.12
mount 2.12
module-init-tools 3.0
e2fsprogs 1.35
pcmcia-cs 3.2.7
Linux C Library 2.3.3
Dynamic linker (ldd) 2.3.3
Procps 3.2.1
Net-tools 1.60
Kbd 1.12
Sh-utils 5.2.0
Modules Loaded sg floppy radeonfb orinoco_cs orinoco hermes ds
yenta_socket pcmcia_core parport_pc lp parport ide_cd sr_mod cdrom

Regards,

Mariusz Kozlowski


Attachments:
(No filename) (1.94 kB)
config (29.41 kB)
Download all attachments

2004-04-07 18:39:58

by john stultz

[permalink] [raw]
Subject: Re: odd clock thing...

On Tue, 2004-04-06 at 11:04, Mariusz Koz?owski wrote:
> I have linux running my laptop Sony VAIO PCG-FR285M. A few weeks ago I
> compiled in to kernel CPU frequency scalling. I configured a few rules for
> cpufreqd and since then I see strange behaviour of the clock in this machine.
> First it was running slower than normal watch... i thought it has something
> to do with the hardware. But later on I observed that when the machine is off
> its clock runs perfectly fine. Now when the time zone has changed (I live in
> Poland) the clock started to run faster than normal watch. Now when I power
> off the machine time runs fine... I mean it was off for about a week and
> surprise... the time was still late but the same amount of time when I
> powered the machine off. So i guess it is not hardware related. What might be
> causing this? Anyway I am not shure if it is a coincidence that this happened
> when I compiled in CPU frequency scalling stuff and it is kernel related or
> whether it is caused by some buggy user level software because I emerge
> system && emerge world once or twice a week. I might add that when the clock
> runs odd the machine is not powered from battery. It runs AC power supply so
> the CPU uses its full frequency (2.4GHz). (I didn't test what is going on
> with battery).
>
> BTW. The clock was getting late approx. 1h a day.


Very odd. I looked at the dmesg you sent me and it looks like you're
using the ACPI PM timesource. There is an open bug (link below) against
it and I'm not sure if we're dealing with odd hardware or some other
side effect is causing the issue.

If you disable cpufreq does it go away? You might want to try disabling
the ACPI PM timer code (under the Power Management->ACPI menu) and see
if that resolves it.

For more details, check this bug:
http://bugme.osdl.org/show_bug.cgi?id=2375

thanks
-john


2004-04-10 13:23:39

by Mariusz Kozłowski

[permalink] [raw]
Subject: Re: odd clock thing...

Dnia ?ro 7. kwietnia 2004 20:39, napisa?e?:
> Very odd. I looked at the dmesg you sent me and it looks like you're
> using the ACPI PM timesource. There is an open bug (link below) against
> it and I'm not sure if we're dealing with odd hardware or some other
> side effect is causing the issue.
>
> If you disable cpufreq does it go away? You might want to try disabling
> the ACPI PM timer code (under the Power Management->ACPI menu) and see
> if that resolves it.
>
> For more details, check this bug:
> http://bugme.osdl.org/show_bug.cgi?id=2375

Hi John,

I did what you told me to do. I disabled ACPI PM time source. There is a
significant change. The system clock is running still too fast but it is a
very small difference. After 24 hours the difference is 2 minutes ahead. I
don't know what to think about it. Is it precise enough or should I do some
more tests. As far as I remember the system clock on this machine was runnig
perfectly fine so that even after one week it was still in sync with other
electronic clocks I have. I think I'll try to disable CPUfreq and see if it
helps.

Thanks for helping out,

Mariusz

2004-04-29 13:44:42

by Andy Whitcroft

[permalink] [raw]
Subject: Re: odd clock thing...

--On 10 April 2004 15:26 +0200 Mariusz Koz?owski <[email protected]>
wrote:

> I did what you told me to do. I disabled ACPI PM time source. There is a
> significant change. The system clock is running still too fast but it is
> a very small difference. After 24 hours the difference is 2 minutes
> ahead. I don't know what to think about it. Is it precise enough or
> should I do some more tests. As far as I remember the system clock on
> this machine was runnig perfectly fine so that even after one week it
> was still in sync with other electronic clocks I have. I think I'll try
> to disable CPUfreq and see if it helps.

I think if your system clock is as good as 2 minutes per day you are
'normal'. System clocks are generally very stable but not very accurate,
ie. they will consistently gain or lose the same ammount per day, but not
be that good. That is one of the reasons NTP is very effective on a
system, it can figure out how rubbish your clock is and correct for it
because of that stability.

-apw