2.6.8 Thinkpad T40, clock running too fast
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
I'm having a problem with the clock on my Thinkpad running too fast. My clock is gaining about 4 seconds every five minutes of operation. I'm actually not sure when this started because NTP has been fairly successful at keeping my clock under control, so I didn't really notice it until I spent some time operating disconnected... and then it became very obvious very quickly.
On October 15th, I "fixed" the problem by booting with "noapic" on the command line. Or I thought I fixed it anyway. I had to reboot yesterday for an unrelated issue (a "stuck" smb share that I couldn't figure out how to unmount) and the racing clock is back. I've booted with "noapic", "nolapic", "noapic nolapic" and no options at all, and the clock doesn't keep the time with any of them. I'm not sure if it's always too fast. I seem to remember that last month it was running too slow. I'll check with the various apic settings and see if it's consistent.
I'm not sure what information I need to provide, but you can find my kernel config at http://willden.org/~shawn/config-2.6.8. It's built from the Debian 2.6.8 tree, with a custom config. The CPU is a 1.6GHz Pentium M in a "Centrino" chipset.
What should I be looking at to track this down? I'm building a 2.6.9 kernel but I haven't found any reports of similar problems corrected by it, so I don't expect that to make a difference.
Thanks,
Shawn.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)
iD8DBQFBiA+J6d8WxFy/CWcRAjU4AKCnqPFgCTM618fcto+k89MrM3eptwCdHJ1I oXDUSfaXXcs8FR+rl4Hpzco=
=TPBi
-----END PGP SIGNATURE-----
Quoted 5 lines · Shawn Willden
I'm having a problem with the clock on my Thinkpad running too fast. My clock is gaining about 4 seconds every five minutes of operation. I'm actually not sure when this started because NTP has been fairly successful at keeping my clock under control, so I didn't really notice it until I spent some time operating disconnected... and then it became very obvious very quickly.
Does this go away if you disable cpufreq in your kernel config?
Also, looking at /proc/interrupts, does it look like you're getting more then ~1000 interrupts per second?
thanks
-john
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Thanks for the quick response, John.
Quoted 1 line · john stultz
Does this go away if you disable cpufreq in your kernel config?
I'll try that next.
Quoted 2 lines
Also, looking at
/proc/interrupts, does it look like you're getting more then ~1000 interrupts per second?
I don't think so. I'm not sure how to tell. Running the following:
prev=0
while true; do
cur=cat /proc/interrupts| grep timer|cut -d' ' -f 6 (( diff = $cur - $prev ))
echo $diff; prev=$cur
sleep 1
done
gives interrupt count differences that are between 1003 and 1222 per (rough) second. The mean is 1016 with a std deviation of 16. Running the same thing on another machine -- one without clock problems -- yields similar values.
Is there a better way to measure this?
Thanks
Shawn
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)
iD8DBQFBiCBf6d8WxFy/CWcRAlkFAKCIVLcrXdMENi41SZ4jwSNx5Ukg2ACgjRPW Ig1kUi1EwRw13ba+MVEVrFk=
=/KWj
-----END PGP SIGNATURE-----
Quoted 4 lines · Shawn Willden
Quoted 1 line · john stultz
Does this go away if you disable cpufreq in your kernel config?
I'll try that next.
Thanks, do let me know if it helps or not.
Quoted 13 lines
Quoted 2 lines
Also, looking at
/proc/interrupts, does it look like you're getting more then ~1000 interrupts per second?I don't think so. I'm not sure how to tell. Running the following:
prev=0
while true; do
cur=cat /proc/interrupts| grep timer|cut -d' ' -f 6(( diff = $cur - $prev ))
echo $diff; prev=$cur
sleep 1
done
Quoted 5 lines
gives interrupt count differences that are between 1003 and 1222 per (rough) second. The mean is 1016 with a std deviation of 16. Running the same thing on another machine -- one without clock problems -- yields similar values.
Is there a better way to measure this?
Not really, the problem is that the sleep call returns after so many timer ticks, so even if the wrong amount of time has passed, you'll see the same number of interrupts. It would be best if you checked the time on your watch, waited 5 minutes and checked again, or better, did something similar w/ ntpdate. I just wanted to eyeball it to make sure you weren't running away w/ way too many timer interrupts.
thanks
-john
PS: If you wouldn't mind, CC me next time.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Quoted 3 lines · john stultz
Not really, the problem is that the sleep call returns after so many timer ticks, so even if the wrong amount of time has passed, you'll see the same number of interrupts.
Ah, right. Nothing like measuring a ruler with itself.
Quoted 4 lines
It would be best if you checked the time
on your watch, waited 5 minutes and checked again, or better, did something similar w/ ntpdate. I just wanted to eyeball it to make sure you weren't running away w/ way too many timer interrupts.
I'll do that
Quoted 1 line
PS: If you wouldn't mind, CC me next time.
I am. BTW, in case you didn't see my other e-mail, I'm now running with 2.6.9 and cpufreq off. No significant change.
Shawn.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)
iD8DBQFBiC0o6d8WxFy/CWcRAv2RAJ9ZhrXkIAoiEpZ9PrFK+jAQLMKyhQCfXkai YhtDAgHFdjIR+WpV3XdG5Ss=
=kO2+
-----END PGP SIGNATURE-----
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Quoted 1 line · john stultz
Does this go away if you disable cpufreq in your kernel config?
Nope.
My 2.6.9 config is at http://willden.org/~shawn/config-2.6.9
cpufreq is turned off. APIC and local APIC are both turned off on the command line (noapic and nolapic).
Any ideas?
Thanks,
Shawn.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)
iD4DBQFBiCij6d8WxFy/CWcRAoBQAJUWR1c2HyOHHbYq+iM8FRh/n8S3AJwKhdOz 35b/Qmv3LxIDboFfXzoH2g==
=5D2Y
-----END PGP SIGNATURE-----
Quoted 1 line · Shawn Willden
Any ideas?
remove /etc/adjtime and reboot.
Signature · 4 lines
Stefan Seyfried "Any ideas, John?" "Well, surrounding them's out."