From cd98516cae6bf6d28dea3ed800f1b167598d3b4f Mon Sep 17 00:00:00 2001 From: Michael Witten Date: Mon, 14 Dec 2020 23:02:00 +0000 Subject: [PATCH] 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: d66b2f2b2423bfbd3de4d69895024dac7eefb306 rtc: handle RTCs that don't support interrupts Tue Dec 10 17:45:28 2019 +0100 bff3f51d13c3f41e2ead2cfff5bfe0b8c22ef44a 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. --- doc/faq.adoc | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/doc/faq.adoc b/doc/faq.adoc index 9d2c109..bf9d277 100644 --- a/doc/faq.adoc +++ b/doc/faq.adoc @@ -597,6 +597,19 @@ things 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? In this case you can still use the `-s` option to set the system clock to the