operating-system
operating-system copied to clipboard
RTC Clock Initialized Too Soon in Boot for ODROID-N2
Describe the issue you are experiencing
Once the ODroid-N2 finishes booting, the clock is off due to the RTC clock not being used. The problem is that the RTC clock is compiled as a module, but also relies on I2C (which is also a module). As such, the RTC cannot be used at the command line once the OS is booted, unless the modules are removed from memory and reloaded; unfortunately that causes /dev/rtc0 to remain (non-functionally) and /dev/rtc1 to be created.
This issue (and the errors it produces for me) is described here: https://forum.odroid.com/viewtopic.php?p=326351#p326351
Please compile the ODroid N2's kernel with:
CONFIG_AMLOGIC_I2C_MASTER = y
CONFIG_RTC_DRV_PCF8563 = y
Or it may now be something like this:
CONFIG_AMLOGIC_I2C_MASTER = y
CONFIG_RTC_DRV_MESON_VRTC = y
Or create udev rules and a systemd unit as described here: https://wiki.odroid.com/accessory/add-on_boards/rtc_shield#configuration
What operating system image do you use?
odroid-n2 (Hardkernel ODROID-N2/N2+)
What version of Home Assistant Operating System is installed?
8.2
Did you upgrade the Operating System.
No
Steps to reproduce the issue
- Flash image on ODroid N2 (note: I am NOT using ODroid N2+);
- Boot device;
- Note that http://homeassistant.local never finishes saying that it's "preparing";
- Open developer tools, look at 'log' HTTP call;
- Note that in the logs the clock is off;
- Open console to device;
- login;
- look at dmesg and the "Invalid argument" errors produced.
- Commands to hwclock always fail stating battery is low (my battery is NOT low; DMM measures the connection TO THE MOTHERBOARD as 3.36 volts) and while controlling the RTC it receives and, "Invalid argument" ...
Anything in the Supervisor logs that might be useful for us?
s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service fix-attrs successfully started
s6-rc: info: service legacy-cont-init: starting
cont-init: info: running /etc/cont-init.d/udev.sh
[07:35:09] INFO: Using udev information from host
cont-init: info: /etc/cont-init.d/udev.sh exited 0
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service legacy-services: starting
services-up: info: copying legacy longrun supervisor (no readiness notification)
services-up: info: copying legacy longrun watchdog (no readiness notification)
s6-rc: info: service legacy-services successfully started
[07:35:09] INFO: Starting local supervisor watchdog...
22-03-11 07:35:11 INFO (MainThread) [__main__] Initializing Supervisor setup
22-03-11 07:35:11 INFO (MainThread) [supervisor.docker.network] Can't find Supervisor network, creating a new network
22-03-11 07:35:11 INFO (MainThread) [supervisor.bootstrap] Initializing Supervisor Sentry
22-03-11 07:35:11 INFO (MainThread) [supervisor.bootstrap] Seting up coresys for machine: odroid-n2
22-03-11 07:35:11 INFO (SyncWorker_0) [supervisor.docker.supervisor] Attaching to Supervisor homeassistant/aarch64-hassio-supervisor with version 2022.05.3
22-03-11 07:35:11 INFO (SyncWorker_0) [supervisor.docker.supervisor] Connecting Supervisor to hassio-network
22-03-11 07:35:12 WARNING (SyncWorker_0) [supervisor.docker.interface] Can't find homeassistant/aarch64-hassio-supervisor for cleanup
22-03-11 07:35:12 INFO (MainThread) [supervisor.resolution.evaluate] Starting system evaluation with state CoreState.INITIALIZE
22-03-11 07:35:12 INFO (MainThread) [supervisor.resolution.evaluate] System evaluation complete
22-03-11 07:35:12 INFO (MainThread) [__main__] Setting up Supervisor
22-03-11 07:35:12 INFO (MainThread) [supervisor.api] Starting API on 172.30.32.2
22-03-11 07:35:12 INFO (MainThread) [supervisor.hardware.monitor] Started Supervisor hardware monitor
22-03-11 07:35:12 INFO (MainThread) [supervisor.dbus.manager] Load dbus interface io.hass.os
22-03-11 07:35:12 INFO (MainThread) [supervisor.dbus.manager] Load dbus interface org.freedesktop.systemd1
22-03-11 07:35:12 INFO (MainThread) [supervisor.dbus.manager] Load dbus interface org.freedesktop.login1
22-03-11 07:35:12 INFO (MainThread) [supervisor.dbus.manager] Load dbus interface org.freedesktop.hostname1
22-03-11 07:35:12 INFO (MainThread) [supervisor.dbus.manager] Load dbus interface org.freedesktop.timedate1
22-03-11 07:35:12 INFO (MainThread) [supervisor.dbus.manager] Load dbus interface org.freedesktop.NetworkManager
22-03-11 07:35:12 INFO (MainThread) [supervisor.dbus.manager] Load dbus interface de.pengutronix.rauc
22-03-11 07:35:12 INFO (MainThread) [supervisor.dbus.manager] Load dbus interface org.freedesktop.resolve1
22-03-11 07:35:12 INFO (MainThread) [supervisor.host.info] Updating local host information
22-03-11 07:35:12 WARNING (MainThread) [supervisor.host.info] Can't update host system information!
22-03-11 07:35:12 INFO (MainThread) [supervisor.host.services] Updating service information
22-03-11 07:35:12 INFO (MainThread) [supervisor.host.sound] Updating PulseAudio information
22-03-11 07:35:12 INFO (MainThread) [supervisor.host.manager] Host information reload completed
22-03-11 07:35:12 INFO (MainThread) [supervisor.host.network] Updating local network information
22-03-11 07:35:13 INFO (MainThread) [supervisor.host.network] Updating local network information
22-03-11 07:35:13 INFO (MainThread) [supervisor.host.apparmor] Loading AppArmor Profiles: {'hassio-supervisor'}
22-03-11 07:35:13 WARNING (MainThread) [supervisor.utils.whoami] Whoami service failed with SSL verification: Cannot connect to host services.home-assistant.io:443 ssl:True [SSLCertVerificationError: (1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate is not yet valid (_ssl.c:1129)')]
22-03-11 00:35:13 WARNING (MainThread) [supervisor.core] System time/date shift over more as 7days found!
22-03-11 00:35:13 INFO (MainThread) [supervisor.host.control] Setting new host datetime: 2022-06-19T16:52:22+00:00
22-03-11 00:35:13 CRITICAL (MainThread) [supervisor.core] Fatal error happening on load Task <coroutine object Core._adjust_system_datetime at 0xffff81e384c0>: DBus INT32 type "i" must be between -2147483648 and 2147483647
22-03-11 00:35:13 INFO (SyncWorker_0) [supervisor.docker.interface] Found ghcr.io/home-assistant/aarch64-hassio-cli versions: [<AwesomeVersion CalVer '2022.05.0'>]
22-03-11 00:35:14 INFO (SyncWorker_0) [supervisor.docker.interface] Attaching to ghcr.io/home-assistant/aarch64-hassio-cli with version 2022.05.0
22-03-11 00:35:14 INFO (MainThread) [supervisor.plugins.cli] Starting CLI plugin
22-03-11 00:35:14 INFO (SyncWorker_0) [supervisor.docker.cli] Starting CLI ghcr.io/home-assistant/aarch64-hassio-cli with version 2022.05.0 - 172.30.32.5
22-03-11 00:35:14 INFO (SyncWorker_0) [supervisor.docker.interface] Found ghcr.io/home-assistant/aarch64-hassio-dns versions: [<AwesomeVersion CalVer '2022.04.1'>]
22-03-11 00:35:14 INFO (SyncWorker_0) [supervisor.docker.interface] Attaching to ghcr.io/home-assistant/aarch64-hassio-dns with version 2022.04.1
22-03-11 00:35:14 INFO (MainThread) [supervisor.plugins.dns] Starting CoreDNS plugin
22-03-11 00:35:15 INFO (SyncWorker_0) [supervisor.docker.dns] Starting DNS ghcr.io/home-assistant/aarch64-hassio-dns with version 2022.04.1 - 172.30.32.3
22-03-11 00:35:15 INFO (MainThread) [supervisor.plugins.dns] Updated /etc/resolv.conf
22-03-11 00:35:15 INFO (SyncWorker_0) [supervisor.docker.interface] Found ghcr.io/home-assistant/aarch64-hassio-audio versions: [<AwesomeVersion CalVer '2022.05.0'>]
22-03-11 00:35:15 INFO (SyncWorker_0) [supervisor.docker.interface] Attaching to ghcr.io/home-assistant/aarch64-hassio-audio with version 2022.05.0
22-03-11 00:35:15 INFO (MainThread) [supervisor.plugins.audio] Starting Audio plugin
22-03-11 00:35:20 INFO (SyncWorker_0) [supervisor.docker.audio] Starting Audio ghcr.io/home-assistant/aarch64-hassio-audio with version 2022.05.0 - 172.30.32.4
22-03-11 00:35:20 INFO (SyncWorker_0) [supervisor.docker.interface] Found ghcr.io/home-assistant/aarch64-hassio-observer versions: [<AwesomeVersion CalVer '2021.10.0'>]
22-03-11 00:35:20 INFO (SyncWorker_0) [supervisor.docker.interface] Attaching to ghcr.io/home-assistant/aarch64-hassio-observer with version 2021.10.0
22-03-11 00:35:20 INFO (MainThread) [supervisor.plugins.observer] Starting observer plugin
22-03-11 00:35:20 INFO (SyncWorker_0) [supervisor.docker.observer] Starting Observer ghcr.io/home-assistant/aarch64-hassio-observer with version 2021.10.0 - 172.30.32.6
22-03-11 00:35:20 INFO (SyncWorker_0) [supervisor.docker.interface] Found ghcr.io/home-assistant/aarch64-hassio-multicast versions: [<AwesomeVersion CalVer '2022.02.0'>]
22-03-11 00:35:20 INFO (SyncWorker_0) [supervisor.docker.interface] Attaching to ghcr.io/home-assistant/aarch64-hassio-multicast with version 2022.02.0
22-03-11 00:35:20 INFO (MainThread) [supervisor.plugins.multicast] Starting Multicast plugin
22-03-11 00:35:21 INFO (SyncWorker_0) [supervisor.docker.multicast] Starting Multicast ghcr.io/home-assistant/aarch64-hassio-multicast with version 2022.02.0 - Host
22-03-11 00:35:21 WARNING (MainThread) [supervisor.jobs] 'Updater.fetch_data' blocked from execution, no supervisor internet connection
22-03-11 00:35:21 WARNING (MainThread) [supervisor.jobs] 'Updater.fetch_data' blocked from execution, no supervisor internet connection
22-03-11 00:35:21 INFO (MainThread) [supervisor.homeassistant.secrets] Loaded 0 Home Assistant secrets
22-03-11 00:35:21 INFO (SyncWorker_0) [supervisor.docker.interface] No version found for ghcr.io/home-assistant/odroid-n2-homeassistant
22-03-11 00:35:21 INFO (MainThread) [supervisor.homeassistant.core] No Home Assistant Docker image ghcr.io/home-assistant/odroid-n2-homeassistant found.
22-03-11 00:35:21 INFO (SyncWorker_0) [supervisor.docker.interface] Attaching to ghcr.io/home-assistant/odroid-n2-homeassistant with version landingpage
22-03-11 00:35:21 INFO (MainThread) [supervisor.homeassistant.core] Using preinstalled landingpage
22-03-11 00:35:21 INFO (MainThread) [supervisor.homeassistant.core] Starting HomeAssistant landingpage
22-03-11 00:35:21 INFO (MainThread) [supervisor.homeassistant.module] Update pulse/client.config: /data/tmp/homeassistant_pulse
22-03-11 00:35:21 INFO (SyncWorker_0) [supervisor.docker.homeassistant] Starting Home Assistant ghcr.io/home-assistant/odroid-n2-homeassistant with version landingpage
22-03-11 00:35:21 INFO (MainThread) [supervisor.os.manager] Detect Home Assistant Operating System 8.2 / BootSlot A
22-03-11 00:35:21 INFO (MainThread) [supervisor.jobs] 'StoreManager.update_repositories' blocked from execution, no supervisor internet connection
22-03-11 00:35:21 INFO (MainThread) [supervisor.addons] Found 0 installed add-ons
22-03-11 00:35:21 INFO (MainThread) [supervisor.backups.manager] Found 0 backup files
22-03-11 00:35:21 INFO (MainThread) [supervisor.discovery] Loaded 0 messages
22-03-11 00:35:21 INFO (MainThread) [supervisor.ingress] Loaded 0 ingress sessions
22-03-11 00:35:21 INFO (MainThread) [supervisor.resolution.check] Starting system checks with state CoreState.SETUP
22-03-11 00:35:21 INFO (MainThread) [supervisor.resolution.check] System checks complete
22-03-11 00:35:21 INFO (MainThread) [supervisor.resolution.evaluate] Starting system evaluation with state CoreState.SETUP
22-03-11 00:35:21 INFO (MainThread) [supervisor.resolution.evaluate] System evaluation complete
22-03-11 00:35:21 INFO (MainThread) [supervisor.jobs] 'ResolutionFixup.run_autofix' blocked from execution, system is not healthy
22-03-11 00:35:21 INFO (MainThread) [supervisor.resolution.evaluate] Starting system evaluation with state CoreState.SETUP
22-03-11 00:35:21 INFO (MainThread) [supervisor.resolution.evaluate] System evaluation complete
22-03-11 00:35:21 INFO (MainThread) [__main__] Running Supervisor
22-03-11 00:35:21 CRITICAL (MainThread) [supervisor.core] System is running in an unhealthy state and needs manual intervention!
22-03-11 00:35:21 INFO (MainThread) [supervisor.os.manager] Rauc: A - marked slot kernel.0 as good
22-03-11 00:35:21 INFO (MainThread) [supervisor.addons] Phase 'AddonStartup.INITIALIZE' starting 0 add-ons
22-03-11 00:35:21 INFO (MainThread) [supervisor.addons] Phase 'AddonStartup.SYSTEM' starting 0 add-ons
22-03-11 00:35:21 INFO (MainThread) [supervisor.addons] Phase 'AddonStartup.SERVICES' starting 0 add-ons
22-03-11 00:35:21 INFO (MainThread) [supervisor.core] Skiping start of Home Assistant
22-03-11 00:35:21 INFO (MainThread) [supervisor.addons] Phase 'AddonStartup.APPLICATION' starting 0 add-ons
22-03-11 00:35:21 INFO (MainThread) [supervisor.misc.tasks] All core tasks are scheduled
22-03-11 00:35:21 INFO (MainThread) [supervisor.core] Supervisor is up and running
22-03-11 00:35:21 INFO (MainThread) [supervisor.homeassistant.core] Home Assistant setup
22-03-11 00:35:21 WARNING (MainThread) [supervisor.jobs] 'Updater.fetch_data' blocked from execution, no supervisor internet connection
22-03-11 00:35:21 WARNING (MainThread) [supervisor.homeassistant.core] Error on Home Assistant installation. Retry in 30sec
22-03-11 00:35:21 INFO (MainThread) [supervisor.host.info] Updating local host information
22-03-11 00:35:21 WARNING (MainThread) [supervisor.jobs] 'Updater.fetch_data' blocked from execution, no supervisor internet connection
22-03-11 00:35:21 INFO (MainThread) [supervisor.resolution.check] Starting system checks with state CoreState.RUNNING
22-03-11 00:35:21 INFO (MainThread) [supervisor.resolution.checks.base] Run check for IssueType.DNS_SERVER_IPV6_ERROR/ContextType.DNS_SERVER
22-03-11 00:35:21 INFO (MainThread) [supervisor.jobs] 'CheckDNSServerIPv6Errors.run_check' blocked from execution, no supervisor internet connection
22-03-11 00:35:21 INFO (MainThread) [supervisor.resolution.checks.base] Run check for IssueType.PWNED/ContextType.ADDON
22-03-11 00:35:21 INFO (MainThread) [supervisor.jobs] 'CheckAddonPwned.run_check' blocked from execution, no supervisor internet connection
22-03-11 00:35:21 INFO (MainThread) [supervisor.resolution.checks.base] Run check for IssueType.TRUST/ContextType.SUPERVISOR
22-03-11 00:35:21 INFO (MainThread) [supervisor.resolution.checks.base] Run check for IssueType.DNS_SERVER_FAILED/ContextType.DNS_SERVER
22-03-11 00:35:21 INFO (MainThread) [supervisor.jobs] 'CheckDNSServerFailures.run_check' blocked from execution, no supervisor internet connection
22-03-11 00:35:21 INFO (MainThread) [supervisor.resolution.checks.base] Run check for IssueType.FREE_SPACE/ContextType.SYSTEM
22-03-11 00:35:21 INFO (MainThread) [supervisor.resolution.module] Create new suggestion SuggestionType.CREATE_FULL_BACKUP - ContextType.SYSTEM / None
22-03-11 00:35:21 INFO (MainThread) [supervisor.resolution.checks.base] Run check for IssueType.SECURITY/ContextType.CORE
22-03-11 00:35:21 INFO (MainThread) [supervisor.resolution.check] System checks complete
22-03-11 00:35:21 INFO (MainThread) [supervisor.resolution.evaluate] Starting system evaluation with state CoreState.RUNNING
22-03-11 00:35:21 WARNING (MainThread) [supervisor.host.info] Can't update host system information!
22-03-11 00:35:21 INFO (MainThread) [supervisor.host.services] Updating service information
22-03-11 00:35:21 INFO (MainThread) [supervisor.host.network] Updating local network information
22-03-11 00:35:22 INFO (MainThread) [supervisor.host.manager] Host information reload completed
22-03-11 00:35:22 WARNING (MainThread) [supervisor.utils.codenotary] rpc error: code = Unavailable desc = connection error: desc = "transport: authentication handshake failed: x509: certificate has expired or is not yet valid: current time 2022-03-11T07:35:22Z is before 2022-05-30T08:23:09Z"
22-03-11 00:35:22 INFO (MainThread) [supervisor.resolution.module] Create new issue IssueType.TRUST - ContextType.SYSTEM / None
22-03-11 00:35:22 INFO (MainThread) [supervisor.resolution.module] Create new suggestion SuggestionType.EXECUTE_INTEGRITY - ContextType.SYSTEM / None
22-03-11 00:35:22 INFO (MainThread) [supervisor.resolution.evaluate] System evaluation complete
22-03-11 00:35:22 INFO (MainThread) [supervisor.jobs] 'ResolutionFixup.run_autofix' blocked from execution, system is not healthy
22-03-11 00:35:51 WARNING (MainThread) [supervisor.jobs] 'Updater.fetch_data' blocked from execution, no supervisor internet connection
22-03-11 00:35:51 WARNING (MainThread) [supervisor.homeassistant.core] Error on Home Assistant installation. Retry in 30sec
22-03-11 00:36:21 WARNING (MainThread) [supervisor.jobs] 'Updater.fetch_data' blocked from execution, no supervisor internet connection
22-03-11 00:36:21 WARNING (MainThread) [supervisor.homeassistant.core] Error on Home Assistant installation. Retry in 30sec
22-03-11 00:36:51 WARNING (MainThread) [supervisor.jobs] 'Updater.fetch_data' blocked from execution, no supervisor internet connection
22-03-11 00:36:51 WARNING (MainThread) [supervisor.homeassistant.core] Error on Home Assistant installation. Retry in 30sec
22-03-11 00:37:21 WARNING (MainThread) [supervisor.jobs] 'Updater.fetch_data' blocked from execution, no supervisor internet connection
22-03-11 00:37:21 WARNING (MainThread) [supervisor.homeassistant.core] Error on Home Assistant installation. Retry in 30sec
22-03-11 00:37:51 WARNING (MainThread) [supervisor.jobs] 'Updater.fetch_data' blocked from execution, no supervisor internet connection
22-03-11 00:37:51 WARNING (MainThread) [supervisor.homeassistant.core] Error on Home Assistant installation. Retry in 30sec
22-03-11 00:38:21 WARNING (MainThread) [supervisor.jobs] 'Updater.fetch_data' blocked from execution, no supervisor internet connection
22-03-11 00:38:21 WARNING (MainThread) [supervisor.homeassistant.core] Error on Home Assistant installation. Retry in 30sec
22-03-11 00:38:51 WARNING (MainThread) [supervisor.jobs] 'Updater.fetch_data' blocked from execution, no supervisor internet connection
22-03-11 00:38:51 WARNING (MainThread) [supervisor.homeassistant.core] Error on Home Assistant installation. Retry in 30sec
22-03-11 00:39:21 WARNING (MainThread) [supervisor.jobs] 'Updater.fetch_data' blocked from execution, no supervisor internet connection
22-03-11 00:39:21 WARNING (MainThread) [supervisor.homeassistant.core] Error on Home Assistant installation. Retry in 30sec
22-03-11 00:39:51 WARNING (MainThread) [supervisor.jobs] 'Updater.fetch_data' blocked from execution, no supervisor internet connection
22-03-11 00:39:51 WARNING (MainThread) [supervisor.homeassistant.core] Error on Home Assistant installation. Retry in 30sec
22-03-11 00:40:21 WARNING (MainThread) [supervisor.jobs] 'Updater.fetch_data' blocked from execution, no supervisor internet connection
22-03-11 00:40:21 WARNING (MainThread) [supervisor.homeassistant.core] Error on Home Assistant installation. Retry in 30sec
22-03-11 00:40:51 WARNING (MainThread) [supervisor.jobs] 'Updater.fetch_data' blocked from execution, no supervisor internet connection
22-03-11 00:40:51 WARNING (MainThread) [supervisor.homeassistant.core] Error on Home Assistant installation. Retry in 30sec
22-03-11 00:41:21 WARNING (MainThread) [supervisor.jobs] 'Updater.fetch_data' blocked from execution, no supervisor internet connection
22-03-11 00:41:21 WARNING (MainThread) [supervisor.homeassistant.core] Error on Home Assistant installation. Retry in 30sec
22-03-11 00:41:51 WARNING (MainThread) [supervisor.jobs] 'Updater.fetch_data' blocked from execution, no supervisor internet connection
22-03-11 00:41:51 WARNING (MainThread) [supervisor.homeassistant.core] Error on Home Assistant installation. Retry in 30sec
Anything in the Host logs that might be useful for us?
N/A
System Health information
No response
Additional information
No response
Note: Once I fixed the time stored in the hardware RTC, this issue no longer occurs after reboot.
I don't think that compiled in is the problem here.
Note: Once I fixed the time stored in the hardware RTC, this issue no longer occurs after reboot.
Doesn't that prove that prove that the system is able to actually read the RTC?
One thing to note is that the RTC has a bit which essentially says when the system should not trust the RTC value (e.g. because it has never been set, or because the voltage dropped to low and it was not able to reliably run). If that is the case, you'll see an error in the kernel boot logs ("Host logs" in the frontend).
I don't think that compiled in is the problem here.
Note: Once I fixed the time stored in the hardware RTC, this issue no longer occurs after reboot.
Doesn't that prove that prove that the system is able to actually read the RTC?
One thing to note is that the RTC has a bit which essentially says when the system should not trust the RTC value (e.g. because it has never been set, or because the voltage dropped to low and it was not able to reliably run). If that is the case, you'll see an error in the kernel boot logs ("Host logs" in the frontend).
Correct, it did say that it couldn't trust the value due to the battery being low; however that's not exactly how the message reads. It says that the voltage is CURRENTLY low and as such cannot be relied upon. That is false, as I measured the voltage coming into the board and it was 3.3+v.
When I said that once I fixed the RTC value it worked, I failed to mention that I had to rmmod the RTC driver, then modprobe it, then use 'hwclock' with -f /dev/rtc1. Ideally this should have been able to be accomplished without having to do that. That does not seem like what a user should be expected to do in order to remediate their RTC battery dying, hence this issue.
There hasn't been any activity on this issue recently. To keep our backlog manageable we have to clean old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant OS version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.
I had issues while "preparing" HA due to certificate not valid because of the system time was not correct. The problem is still happening with HA 2022.9 and 2022.10. I'm not familiar with modules or linux kernel but seems that RTC si somehow useless at all, in my case i'm trying to use a different NTP server, as the default one is banned by my ISP.