Activity log for bug #1926911

Date Who What changed Old value New value Message
2021-05-02 19:58:04 Oliver Grawert bug added bug
2021-05-02 20:08:54 Oliver Grawert description There is a timing issue when using the CM4 with the official CM4 IO baseboard. The CM4 baseboard comes with a built in rtc and a battery holder by default, to enable it a devicetree overlay needs to be enabled and a matching module gets loaded ... $ tail -2 /run/mnt/ubuntu-seed/config.txt dtparam=i2c_vc=on dtoverlay=i2c-rtc,pcf85063a,i2c_csi_dsi,addr=0x51 $ lsmod | grep pcf85063 rtc_pcf85063 20480 0 When booting the kernel runs hctosys about 1.5sec into the boot, the rtc module only gets loaded about 10sec later though: $ dmesg|grep rtc [ 1.593561] hctosys: unable to open rtc device (rtc0) [ 10.767256] rtc-pcf85063 10-0051: registered as rtc0 Looking at the systemd journal the clock does not get set at all, only a network connection actually triggers setting of the clock (note the timestamps in the journal): --- Apr 26 10:27:53 ubuntu kernel: mmc0: SDHCI controller on fe340000.emmc2 [fe340000.emmc2] using ADMA Apr 26 10:27:53 ubuntu kernel: hctosys: unable to open rtc device (rtc0) Apr 26 10:27:53 ubuntu kernel: of_cfs_init Apr 26 10:27:53 ubuntu kernel: of_cfs_init: OK ... Apr 26 10:28:02 CM4 systemd[1]: Started Network Name Resolution. Apr 26 10:28:02 CM4 kernel: rtc-pcf85063 10-0051: registered as rtc0 Apr 26 10:28:02 CM4 systemd-udevd[459]: Using default interface naming scheme 'v245'. ... Apr 26 10:28:08 CM4 avahi.daemon[593]: Registering new address record for 192.168.2.32 on wlan0.IPv4. Apr 26 10:28:08 CM4 systemd-timesyncd[495]: Network configuration changed, trying to establish connection. May 02 17:14:17 CM4 systemd-timesyncd[495]: Initial synchronization to time server 91.189.89.199:123 (ntp.ubu> May 02 17:14:17 CM4 systemd[1]: Starting Online ext4 Metadata Check for All Filesystems... --- I think the loading of the rtc_pcf85063 module should trigger an additional hctosys call ... Just for the record, the hwclock works fine otherwise: $ sudo hwclock 2021-05-02 19:56:11.281975+00:00 There is a timing issue when using the CM4 with the official CM4 IO baseboard. The CM4 baseboard comes with a built in rtc and a battery holder by default, to enable it a devicetree overlay needs to be enabled and a matching module gets loaded ... $ tail -2 /run/mnt/ubuntu-seed/config.txt dtparam=i2c_vc=on dtoverlay=i2c-rtc,pcf85063a,i2c_csi_dsi,addr=0x51 $ lsmod | grep pcf85063 rtc_pcf85063 20480 0 When booting the kernel runs hctosys about 1.5sec into the boot, the rtc module only gets loaded about 10sec later though: $ dmesg|grep rtc [ 1.593561] hctosys: unable to open rtc device (rtc0) [ 10.767256] rtc-pcf85063 10-0051: registered as rtc0 Looking at the systemd journal the clock does not get set at all, only a network connection actually triggers setting of the clock (note the timestamps in the journal): --- Apr 26 10:27:53 ubuntu kernel: mmc0: SDHCI controller on fe340000.emmc2 [fe340000.emmc2] using ADMA Apr 26 10:27:53 ubuntu kernel: hctosys: unable to open rtc device (rtc0) Apr 26 10:27:53 ubuntu kernel: of_cfs_init Apr 26 10:27:53 ubuntu kernel: of_cfs_init: OK ... Apr 26 10:28:02 CM4 systemd[1]: Started Network Name Resolution. Apr 26 10:28:02 CM4 kernel: rtc-pcf85063 10-0051: registered as rtc0 Apr 26 10:28:02 CM4 systemd-udevd[459]: Using default interface naming scheme 'v245'. ... Apr 26 10:28:08 CM4 avahi.daemon[593]: Registering new address record for 192.168.2.32 on wlan0.IPv4. Apr 26 10:28:08 CM4 systemd-timesyncd[495]: Network configuration changed, trying to establish connection. May 02 17:14:17 CM4 systemd-timesyncd[495]: Initial synchronization to time server 91.189.89.199:123 (ntp.ubu> May 02 17:14:17 CM4 systemd[1]: Starting Online ext4 Metadata Check for All Filesystems... --- I think the loading of the rtc_pcf85063 module should trigger an additional hctosys call (preferably from the module itself, but worst case a udev rule calling out to hwclock --hctosys might work too)... Just for the record, the hwclock works fine otherwise: $ sudo hwclock 2021-05-02 19:56:11.281975+00:00
2021-05-03 09:49:48 Juerg Haefliger nominated for series Ubuntu Focal
2021-05-03 09:49:48 Juerg Haefliger bug task added linux-raspi (Ubuntu Focal)
2021-05-03 09:49:57 Juerg Haefliger linux-raspi (Ubuntu Focal): status New Confirmed
2021-05-03 10:32:39 Oliver Grawert bug watch added https://github.com/raspberrypi/linux/issues/4205
2021-05-03 10:34:14 Oliver Grawert bug task added ubuntu-core-initramfs
2021-05-03 11:02:58 Oliver Grawert bug watch added https://github.com/snapcore/core-initrd/issues/17
2021-05-03 15:45:11 Juerg Haefliger description There is a timing issue when using the CM4 with the official CM4 IO baseboard. The CM4 baseboard comes with a built in rtc and a battery holder by default, to enable it a devicetree overlay needs to be enabled and a matching module gets loaded ... $ tail -2 /run/mnt/ubuntu-seed/config.txt dtparam=i2c_vc=on dtoverlay=i2c-rtc,pcf85063a,i2c_csi_dsi,addr=0x51 $ lsmod | grep pcf85063 rtc_pcf85063 20480 0 When booting the kernel runs hctosys about 1.5sec into the boot, the rtc module only gets loaded about 10sec later though: $ dmesg|grep rtc [ 1.593561] hctosys: unable to open rtc device (rtc0) [ 10.767256] rtc-pcf85063 10-0051: registered as rtc0 Looking at the systemd journal the clock does not get set at all, only a network connection actually triggers setting of the clock (note the timestamps in the journal): --- Apr 26 10:27:53 ubuntu kernel: mmc0: SDHCI controller on fe340000.emmc2 [fe340000.emmc2] using ADMA Apr 26 10:27:53 ubuntu kernel: hctosys: unable to open rtc device (rtc0) Apr 26 10:27:53 ubuntu kernel: of_cfs_init Apr 26 10:27:53 ubuntu kernel: of_cfs_init: OK ... Apr 26 10:28:02 CM4 systemd[1]: Started Network Name Resolution. Apr 26 10:28:02 CM4 kernel: rtc-pcf85063 10-0051: registered as rtc0 Apr 26 10:28:02 CM4 systemd-udevd[459]: Using default interface naming scheme 'v245'. ... Apr 26 10:28:08 CM4 avahi.daemon[593]: Registering new address record for 192.168.2.32 on wlan0.IPv4. Apr 26 10:28:08 CM4 systemd-timesyncd[495]: Network configuration changed, trying to establish connection. May 02 17:14:17 CM4 systemd-timesyncd[495]: Initial synchronization to time server 91.189.89.199:123 (ntp.ubu> May 02 17:14:17 CM4 systemd[1]: Starting Online ext4 Metadata Check for All Filesystems... --- I think the loading of the rtc_pcf85063 module should trigger an additional hctosys call (preferably from the module itself, but worst case a udev rule calling out to hwclock --hctosys might work too)... Just for the record, the hwclock works fine otherwise: $ sudo hwclock 2021-05-02 19:56:11.281975+00:00 [Impact] At boot, the kernel does not synchronize the system clock from an RTC, if the driver that manages the RTC device is built as a module. [Test Case] $ dmesg|grep rtc [ 1.593561] hctosys: unable to open rtc device (rtc0) [ 10.767256] rtc-pcf85063 10-0051: registered as rtc0 [Where Problems Could Occur] Loading of the relevant RTC module (which then triggers a clock sync from the RTC) is handled by userspace. This could interfere with systemd (or some other entity) hat handles clock sync'ing which could yield unexpected results. [Original Description] There is a timing issue when using the CM4 with the official CM4 IO baseboard. The CM4 baseboard comes with a built in rtc and a battery holder by default, to enable it a devicetree overlay needs to be enabled and a matching module gets loaded ... $ tail -2 /run/mnt/ubuntu-seed/config.txt dtparam=i2c_vc=on dtoverlay=i2c-rtc,pcf85063a,i2c_csi_dsi,addr=0x51 $ lsmod | grep pcf85063 rtc_pcf85063 20480 0 When booting the kernel runs hctosys about 1.5sec into the boot, the rtc module only gets loaded about 10sec later though: $ dmesg|grep rtc [ 1.593561] hctosys: unable to open rtc device (rtc0) [ 10.767256] rtc-pcf85063 10-0051: registered as rtc0 Looking at the systemd journal the clock does not get set at all, only a network connection actually triggers setting of the clock (note the timestamps in the journal): --- Apr 26 10:27:53 ubuntu kernel: mmc0: SDHCI controller on fe340000.emmc2 [fe340000.emmc2] using ADMA Apr 26 10:27:53 ubuntu kernel: hctosys: unable to open rtc device (rtc0) Apr 26 10:27:53 ubuntu kernel: of_cfs_init Apr 26 10:27:53 ubuntu kernel: of_cfs_init: OK ... Apr 26 10:28:02 CM4 systemd[1]: Started Network Name Resolution. Apr 26 10:28:02 CM4 kernel: rtc-pcf85063 10-0051: registered as rtc0 Apr 26 10:28:02 CM4 systemd-udevd[459]: Using default interface naming scheme 'v245'. ... Apr 26 10:28:08 CM4 avahi.daemon[593]: Registering new address record for 192.168.2.32 on wlan0.IPv4. Apr 26 10:28:08 CM4 systemd-timesyncd[495]: Network configuration changed, trying to establish connection. May 02 17:14:17 CM4 systemd-timesyncd[495]: Initial synchronization to time server 91.189.89.199:123 (ntp.ubu> May 02 17:14:17 CM4 systemd[1]: Starting Online ext4 Metadata Check for All Filesystems... --- I think the loading of the rtc_pcf85063 module should trigger an additional hctosys call (preferably from the module itself, but worst case a udev rule calling out to hwclock --hctosys might work too)... Just for the record, the hwclock works fine otherwise: $ sudo hwclock 2021-05-02 19:56:11.281975+00:00
2021-05-07 19:26:08 Tim Gardner linux-raspi (Ubuntu Focal): status Confirmed Fix Committed
2021-05-11 10:19:31 Launchpad Janitor linux-raspi (Ubuntu): status New Confirmed
2021-06-04 08:38:34 Launchpad Janitor linux-raspi (Ubuntu Focal): status Fix Committed Fix Released