Difference between revisions of "Problems with hwclock"

From ThinkWiki
Jump to: navigation, search
(Possible solutions)
Line 11: Line 11:
 
== Possible solutions ==
 
== Possible solutions ==
  
The '''hwclock''' command knows the parameter ''--directisa'' to access the system clock directly. To make this the default behavior, move /sbin/hwclock (or whereever it is located on your system) to '''/sbin/hwclock.dist''' and create the following shell script on the previous location:
+
=== Using the --directisa switch of hwclock(8) ===
 +
The '''hwclock''' command knows the parameter ''--directisa'' to access the system clock "directly" instead of accessing it by using /dev/rtc. There are several ways of doing this automatically. One is to move /sbin/hwclock (or whereever it is located on your system) to '''/sbin/hwclock.dist''' and create the following shell script, which you place at /sbin/hwclock
 +
 
 
<pre>#!/bin/sh
 
<pre>#!/bin/sh
 
/sbin/hwclock.dist --directisa $*</pre>
 
/sbin/hwclock.dist --directisa $*</pre>
 
Make the script executable (apply the same permissions you had for ''hwclock'' before) and keep your packaging system from overwriting it on updates.
 
Make the script executable (apply the same permissions you had for ''hwclock'' before) and keep your packaging system from overwriting it on updates.
 +
 +
Another way of doing this is editing the initscript of hwclock (e.g., /etc/init.d/hwclock.sh in Debian) so that "--directisa" is passed as a parameter
 +
 +
=== Compiling RTC-support into the kernel instead of as a module ===
 +
 +
Compiling RTC-support (CONFIG_RTC) into the kernel instead of compiling it as a module seems to work also. Tested on: 2.6.20.6 at Thinkpad {{Z61m}} 9450-3HG
  
 
== Affected Models ==
 
== Affected Models ==

Revision as of 22:21, 16 April 2007

This page discusses the problem with /dev/rtc on certain models.

Problem description

On bootup,a message like this shows up:

select() to /dev/rtc to wait for clock tick timed out


The RTC kernel driver can't handle the system clock.

Possible solutions

Using the --directisa switch of hwclock(8)

The hwclock command knows the parameter --directisa to access the system clock "directly" instead of accessing it by using /dev/rtc. There are several ways of doing this automatically. One is to move /sbin/hwclock (or whereever it is located on your system) to /sbin/hwclock.dist and create the following shell script, which you place at /sbin/hwclock

#!/bin/sh
/sbin/hwclock.dist --directisa $*

Make the script executable (apply the same permissions you had for hwclock before) and keep your packaging system from overwriting it on updates.

Another way of doing this is editing the initscript of hwclock (e.g., /etc/init.d/hwclock.sh in Debian) so that "--directisa" is passed as a parameter

Compiling RTC-support into the kernel instead of as a module

Compiling RTC-support (CONFIG_RTC) into the kernel instead of compiling it as a module seems to work also. Tested on: 2.6.20.6 at Thinkpad Z61m 9450-3HG

Affected Models

Affected Operating Systems

  • Linux, all flavours. Tested with kernel 2.6.18, 2.6.19, 2.6.20.6