doc: diagnose problem with RTC interrupts on Linux

This commit updates the FAQ with a new entry.

chronyd's Linux RTC driver (rtc_linux.c) requires the following ioctl
requests to be functional:

  RTC_UIE_ON
  RTC_UIE_OFF

However, a Linux system's RTC driver does not necessarily implement them,
as noted in these previous commits:

  d66b2f2b24
  rtc: handle RTCs that don't support interrupts
  Tue Dec 10 17:45:28 2019 +0100

  bff3f51d13
  rtc: extend check for RTCs that don't support interrupts
  Thu Dec 12 12:50:19 2019 +0100

Fortunately, the Linux kernel can be built with software emulation of
these hardware requests, by enabling the following config variable:

  CONFIG_RTC_INTF_DEV_UIE_EMUL
    Provides an emulation for RTC_UIE if the underlying rtc chip
    driver does not expose RTC_UIE ioctls. Those requests generate
    once-per-second update interrupts, used for synchronization.

    The emulation code will read the time from the hardware
    clock several times per second, please enable this option
    only if you know that you really need it.

This commit records these facts for the benefit of the user.
This commit is contained in:
Michael Witten 2020-12-14 23:02:00 +00:00 committed by Miroslav Lichvar
parent e399d8dd1f
commit cd98516cae

View file

@ -597,6 +597,19 @@ things
Some other program running on the system might be using the device. Some other program running on the system might be using the device.
=== When I start `chronyd`, the log says `Could not enable RTC interrupt : Invalid argument` (or it may say `disable`)
Your real-time clock hardware might not support the required ioctl requests:
* `RTC_UIE_ON`
* `RTC_UIE_OFF`
A possible solution could be to build the Linux kernel with support for software
emulation instead; try enabling the following configuration option when building
the Linux kernel:
* `CONFIG_RTC_INTF_DEV_UIE_EMUL`
=== What if my computer does not have an RTC or backup battery? === What if my computer does not have an RTC or backup battery?
In this case you can still use the `-s` option to set the system clock to the In this case you can still use the `-s` option to set the system clock to the