id = 1762 title = "Linux RTC issues possibly with RTC_UIE_ON, RTC_UIE_OFF" state = "opened" created_at = "2023-07-14T17:27:02.151Z" closed_at = "n/a" labels = ["target: i386"] url = "https://gitlab.com/qemu-project/qemu/-/issues/1762" host-os = "Slackware64-current, Arch Linux, Linux Mint 21.1" host-arch = "x86_64" qemu-version = "n/a" guest-os = "Slackware64-current, Arch Linux, Linux Mint 21.1" guest-arch = "x86_64" description = """Running: ``` hwclock --hctosys ``` as root, under the running VM using a UEFI bios image, I get: ``` hwclock: select() to /dev/rtc0 to wait for clock tick timed out ``` When running the same command on the same disk image but without UEFI, that is, just using the SeaBIOS bios, everything works fine. Running ``` hwclock --hctosys --directisa ``` works fine, too. Running the (compiled) kernel test utility: ``` /usr/src/linux/tools/testing/selftests/rtc/rtctest.c ``` ``` TAP version 13 1..8 # Starting 8 tests from 2 test cases. # RUN rtc.date_read ... # rtctest.c:49:date_read:Current RTC date/time is 10/07/2023 14:02:11. # OK rtc.date_read ok 1 rtc.date_read # RUN rtc.date_read_loop ... # rtctest.c:88:date_read_loop:Continuously reading RTC time for 30s (with 11ms breaks after every read). # rtctest.c:115:date_read_loop:Performed 2752 RTC time reads. # OK rtc.date_read_loop ok 2 rtc.date_read_loop # RUN rtc.uie_read ... # uie_read: Test terminated by timeout # FAIL rtc.uie_read not ok 3 rtc.uie_read # RUN rtc.uie_select ... # rtctest.c:164:uie_select:Expected 0 (0) != rc (0) # uie_select: Test terminated by assertion # FAIL rtc.uie_select not ok 4 rtc.uie_select # RUN rtc.alarm_alm_set ... # rtctest.c:202:alarm_alm_set:Alarm time now set to 14:02:52. # rtctest.c:214:alarm_alm_set:Expected 0 (0) != rc (0) # alarm_alm_set: Test terminated by assertion # FAIL rtc.alarm_alm_set not ok 5 rtc.alarm_alm_set # RUN rtc.alarm_wkalm_set ... # rtctest.c:258:alarm_wkalm_set:Alarm time now set to 10/07/2023 14:02:57. # rtctest.c:268:alarm_wkalm_set:Expected 0 (0) != rc (0) # alarm_wkalm_set: Test terminated by assertion # FAIL rtc.alarm_wkalm_set not ok 6 rtc.alarm_wkalm_set # RUN rtc.alarm_alm_set_minute ... # rtctest.c:304:alarm_alm_set_minute:Alarm time now set to 14:03:00. # rtctest.c:316:alarm_alm_set_minute:Expected 0 (0) != rc (0) # alarm_alm_set_minute: Test terminated by assertion # FAIL rtc.alarm_alm_set_minute not ok 7 rtc.alarm_alm_set_minute # RUN rtc.alarm_wkalm_set_minute ... # rtctest.c:360:alarm_wkalm_set_minute:Alarm time now set to 10/07/2023 14:05:00. # rtctest.c:370:alarm_wkalm_set_minute:Expected 0 (0) != rc (0) # alarm_wkalm_set_minute: Test terminated by assertion # FAIL rtc.alarm_wkalm_set_minute not ok 8 rtc.alarm_wkalm_set_minute # FAILED: 2 / 8 tests passed. # Totals: pass:2 fail:6 xfail:0 xpass:0 skip:0 error:0 #""" reproduce = "n/a" additional = "n/a"