Re: [chrony-dev] [PATCH] rtc (linux): Help the user diagnose a problem with RTC UIE ioctl requests |
[ Thread Index |
Date Index
| More chrony.tuxfamily.org/chrony-dev Archives
]
- To: chrony-dev@xxxxxxxxxxxxxxxxxxxx
- Subject: Re: [chrony-dev] [PATCH] rtc (linux): Help the user diagnose a problem with RTC UIE ioctl requests
- From: Miroslav Lichvar <mlichvar@xxxxxxxxxx>
- Date: Mon, 7 Dec 2020 09:52:48 +0100
- Authentication-results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=mlichvar@xxxxxxxxxx
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1607331172; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=j9vFls0sd6zI7hXnRKb3jWqs7AyAx5KThygjuyauTPM=; b=JZBKwio17d3Rp+3CbQmqJI/r2tVcq3Z3yHl7+gUgb1nUNe3FWAWoNHb1zOLs7Jc8ufv3II TAwRx+8Ie+jFGhhcKGZwQYnJQJD+pyc3giL3VPXEq3UBqfxFIW8V/Uktcot6GgGJmmZrFr n1/6i6pM75kPn9K+VtOPHY/fSTOp9K0=
On Sun, Dec 06, 2020 at 01:00:00PM -0000, Michael Witten wrote:
> --- a/doc/faq.adoc
> +++ b/doc/faq.adoc
> @@ -587,12 +587,17 @@ is started after it has run.
> === I just keep getting the `513 RTC driver not running` message
>
> For the real-time clock support to work, you need the following three
> -things
> +things:
>
> * an RTC in your computer
> * a Linux kernel with enabled RTC support
> * an `rtcfile` directive in your _chrony.conf_ file
>
> +Your real-time clock hardware might not support the required ioctl requests;
> +it might be necessary to build the Linux kernel with support for software
> +emulation instead (try enabling the following build-time option:
> +`CONFIG_RTC_INTF_DEV_UIE_EMUL`).
I like this.
> --- a/rtc_linux.c
> +++ b/rtc_linux.c
> @@ -518,6 +518,14 @@ RTC_Linux_Initialise(void)
> /* Make sure the RTC supports interrupts */
> if (!switch_interrupts(1) || !switch_interrupts(0)) {
> close(fd);
> + LOG(LOGS_WARN, "The RTC driver could not be initialised.");
> +#if DEBUG > 0
> + LOG(LOGS_INFO,
> + "Your real-time clock hardware might not support the required "
> + "ioctl requests; it might be necessary to build the Linux kernel "
> + "with support for software emulation instead: When configuring the "
> + "kernel, enable this option: CONFIG_RTC_INTF_DEV_UIE_EMUL");
> +#endif
> return 0;
> }
The switch_interrupts() function should log an error message when the
driver doesn't support interrupts. Instead of adding more log messages
to explain the error, I'd prefer a new question in the FAQ
specifically for the error message.
There are many other error messages that can be generated. I think the
documentation is a better place than the system log to describe the
issues and provide potential solutions.
--
Miroslav Lichvar
--
To unsubscribe email chrony-dev-request@xxxxxxxxxxxxxxxxxxxx with "unsubscribe" in the subject.
For help email chrony-dev-request@xxxxxxxxxxxxxxxxxxxx with "help" in the subject.
Trouble? Email listmaster@xxxxxxxxxxxxxxxxxxxx.