Adjusting Real-Time Clock (RTC) Limits on Linux

On Linux systems normal user processes cannot set the RTC rate higher that 64 Hertz by default. Even if the root sets the rate higher users still cannot invoke periodic interrupts in their processes. This is a real pain sometimes. To change the limit frequency, you need to edit one kernel file and recompile the kernel. The file is "rtc.c" and it is located (for example in) directory: $KERNELSOURCE/drivers/char/

On my box this is:

/usr/src/linux-2.2.12/drivers/char/rtc.c

To change the maximum frequency to 8192 Hz (the highest possible value) you need to replace all instances of text "64" with "8192". If this is too high, use your own value. On most hardware (Pentium and up) the cost of using rates higher than 64 Hz is insignificant.

Once this is done normal users can set the RTC to use a lot higher rates than 64 Hz (and also use the periodic interrupts at that rate).

These instructions apply to x86 Linux boxes (and possibly some others).

For more information on RTC see file $KERNELSOURCE/Documentation/rtc.txt.


Made by
Tommi Ilmonen

Last update 19.11.1999