# Guest clock recovery after Mac sleep A host sleep can pause guest execution without advancing Linux's system clock by all the elapsed wall time. The virtual PL031 hardware clock can remain correct while `timedatectl` still reports `NTPSynchronized=yes` from an earlier successful network synchronization. Signed Touch ID approvals then appear to come from the future and are correctly rejected. Network timers and other applications can also be affected. When the Mac wakes, the app posts a local wake notification and the time zone bridge forwards `{"type":"wake"}` on the guest's time zone channel. The guest's time zone agent starts the recovery service right away. QEMU holds a message sent while the VM is still paused until it continues. The message only triggers the check; it carries no time. A guest package that predates it rejects the message and logs it, and older apps never send it. The guest clock recovery timer still checks every ten seconds of guest runtime, with one second of timer accuracy allowance, as a fallback. The service also runs shortly after guest boot. The helper only acts with the Try Omarchy host marker and the expected PL031 RTC, which Linux reaches through the UEFI firmware as `rtc-efi`. It reads the RTC through sysfs and advances system time only when it is more than five seconds behind. Whole-second RTC precision and slow samples are accounted for; samples taking over two seconds are rejected. It never writes to the RTC or moves system time backward. Small offsets and backward corrections remain the responsibility of network time synchronization. Following a forward step, it requests a restart of the already-running time-sync service and starts `try-omarchy-clock-refresh.service`. The refresh redraws Omarchy's bar clock in each desktop session (`omarchy-shell -q omarchy.clock refresh`), immediately and again just after the next minute. The bar's clock timer counts monotonic time. After the step, it can wait out the delay it armed before the step and miss that one minute. After that, it is aligned with the new time. The refresh runs as its own unit because it needs `runuser` and the user's Omarchy directory, which the recovery sandbox does not allow. This relies on the VM's virtual hardware clock tracking host time. It does not establish an independent trusted time source if the Mac clock is wrong. No network service, authentication approval, or guest application supplies the correction. The helper runs as root with only `CAP_SYS_TIME` retained. Signed approval verification and expiry windows are unchanged. ## Installation The `try-omarchy` package installs the helper (`/usr/lib/try-omarchy/guest-clock-recover`) and enables `try-omarchy-clock-recovery.timer` through its systemd preset. Nothing needs to be set up by hand. The helper acts only when the host credential carries `omarchy.qemu_virgl=1`, which the launcher always sends. Check the result with: ```sh date timedatectl show -p TimeUSec -p RTCTimeUSec -p NTPSynchronized systemctl status try-omarchy-clock-recovery.timer journalctl -u try-omarchy-clock-recovery.service -u try-omarchy-clock-refresh.service -b ``` After a real Mac sleep/wake cycle, compare system time with the hardware clock again, allow a timer interval, and test Touch ID authentication. A successful fingerprint read alone does not prove the guest accepted the signed approval. To disable only this recovery mechanism: ```sh sudo systemctl disable --now try-omarchy-clock-recovery.timer ``` Network time synchronization remains enabled.