On Thursday, September 20, 2007 at 11:20:15 +0200, Ondrej Certik wrote:
> Where is the real problem, that it doesn't work for me without the
> --directisa? Is it a kernel problem, or a hardware problem?
Well, I don't know. There are several possible scenarios. Maybe a
misdesigned RTC chip (generally integrated in the chipset), or poor
design of the motherboard. The interrupt is absent, or not routed to the
processor, or used for something else, or... the kernel misdetected the
chip, and didn't do some required initialisation. Or something else...
Really I don't know, and your 2 machines could even have 2 different
problems hidden under the same timeout symptom.
> Well, definitely /usr/share/doc/util-linux/README.Debian.hwclock needs
> to be updated, explaining the current situation and workarounds. This
> can be done immediatelly.
What about:
| Bugs: The /dev/rtc interrupt lacks on some not completely PC
| compatible machines. The symptoms in hwclock are either a degraded
| precision, or even the complete failure to read and write the clock.
| Diagnose running hwclock in --debug mode and look for messages about
| interrupts and timeouts. The usual solution is to always use the
| hwclock --directisa option, and to setup HWCLOCKPARS="--directisa"
| into the /etc/init.d/hwclock.sh startup script. But better don't use
| --directisa on machines not requiring it: if it works, the /dev/rtc
| interrupt works better.
> detect if hwclock works during install and fix it automatically if it
> doesn't.
Perhaps something like the following, to detect both cases where
interrupt lacks (the fallback to a far inferior method, and the timeout
total failure).
| #!/bin/sh
|
| # detect signs of lacking /dev/rtc interrupt
| function interrupt_failure () {
| LC_ALL=C /sbin/hwclock --show --debug 2>&1 | \
| grep -q "does not have interrupt functions\|to wait for clock tick
timed out"
| }
|
| if interrupt_failure; then
| echo "--directisa is recommended or required"
| else
| echo "/dev/rtc interrupt works OK"
| fi
Alain.
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]