Skip to content

omamobile-omarchy 0.1.50: lock screen clock shows the right time on wake - #924

Open
iamteedoh wants to merge 2 commits into
derekross:mainfrom
iamteedoh:omarchy45-lock-clock
Open

iamteedoh wants to merge 2 commits into
derekross:mainfrom
iamteedoh:omarchy45-lock-clock

Conversation

@iamteedoh

Copy link
Copy Markdown

What and why

This goes on top of #920. It needs displayDark to reach the lock view, so the first commit here is that one.

After a wake the clock on my lock screen was still showing the time from before the phone slept, then caught up some seconds later. I saw about 20 seconds. I also saw it on the top bar and the home clock widget after unlocking.

The lock's clock is Quickshell's SystemClock with minute precision. In Quickshell's src/core/clock.cpp it sets the time and then starts one timer for the milliseconds left until the next minute. That timer doesn't count while the phone is asleep, so after a wake the clock keeps the old time until what was left of that minute runs out. That can be up to 60 seconds.

New patch 0032 turns the glance's clock off while the screen is dark and back on at a wake:

enabled: !glance.lock || !glance.lock.displayDark

Turning it on makes SystemClock read the time right away.

How I tested: I ran a second Quickshell on the phone with nothing but a minute precision SystemClock that logs every tick next to the real time. That one has no fix, so it shows what the clock does on its own.

before 0032 with 0032 (0.1.50 installed)
asleep 21:15:35 to 21:35:26, power button 22:00:08 to 22:08:10, power button
left on the minute timer at suspend 24.6 s at most 52.1 s at most
test clock's first tick after the wake 24.1 s of awake time later, it held 21:15 until then 51.75 s later, it held 22:00 until then
what I saw old time, about 20 s to catch up lock had the right time as soon as it lit, top bar had the old time for about 45 s after I unlocked

This only fixes the lock. The bar, the home clock widget and quick settings use SystemClock too and are still late after an unlock. Those have no wake signal to hang this on, so I left them alone. I can open an issue for that with the numbers if that helps.

Device and build

  • Phone: Pixel 7 Pro (cheetah), release 2026.11.15, Omarchy 4.5.0-3
  • Kernel release (uname -r): 7.3.0-rc6-omamobile-gda171eae4cb7
  • Packages changed, with versions: omamobile-omarchy 0.1.50

Checks (no phone needed)

  • tools/pr-check origin/main passes
  • tests/all passes
  • tests/packages passes (or the packages I touched: omamobile-omarchy, with the omarchy 4.5.0-3 aarch64 package)
  • Each changed package has its version bumped, and the new version is in the commit subject
  • Commits have area prefixes and bodies that say why; any AI help is a Co-Authored-By: or Assisted-by: trailer, never a Signed-off-by:

On the phone

  • I ran this on my own phone, booted into this build
  • Runbook steps passed (plan, step, result): none, there's no plan for this one
  • What I did not test: see below
  • Nothing in this change writes outside slot B and userdata, weakens the storage guard, or reads registers from userspace (AGENTS.md §1)

tools/phone-install-package took it from 0.1.49 (#920's build) to 0.1.50, the hook reported 30 applied and 1 file changed, and omamobile-omarchy-patches verify is ok. Same as in #920, my phone is on Wi-Fi with a sudo user, so I ran phone-install-package and phone-smoke with PHONE_SSH set to a small ssh + sudo wrapper.

The not ok row in the report is omamobile-modem.service, which was already failed on this phone before this change.

I added a test for the clock to test/lock-glance.qml (it skips on a family without 0032) and a check to test/port45.py. One thing I ran into: test/lock-glance isn't run on the 4.5 path, and when I ran it by hand against the patched 4.5 files test_computer_lock_unchanged fails. It fails the same way without this patch, so it's not from this change. I didn't look into why.

Not tested:

  • a double tap wake with 0032. I used the power button.
  • getting 0.1.50 through omarchy update. I used tools/phone-install-package.
  • 4.0.6, didn't touch it
tools/phone-smoke report

phone-smoke: cheetah

Kernel 7.3.0-rc6-omamobile-gda171eae4cb7, tools at bf06e8f, 2026-11-19T03:09Z.

Check Result Detail
boot (required) ok kernel 7.3.0-rc6-omamobile-gda171eae4cb7, slot b, up 43811s
storage guard (required) ok 55 partitions; only userdata and slot b's boot images writable
root (required) ok ext4 on userdata, 437G free
kernel health (required) ok no oops or BUG; 0 WARN, 125 error lines in dmesg (125 known, of them UFS dme-set 0x4021 (s2idle) x5, 0 new)
systemd units not ok failed: omamobile-modem.service
USB gadget (required) ok bound to 11210000.usb
display ok card2-DSI-1 connected, 1440x3120
GPU ok render node on panthor
session (required) ok Hyprland and the Omarchy shell running
lock ok PAM file present, the shell can lock (passwordPam true, locked false)
touch ok Synaptics TouchComm Touchscreen
buttons ok gpio-keys
Wi-Fi ok wlp1s0 on brcmfmac, link up
Bluetooth ok hci0, powered true
battery ok 89% Discharging, 27 °C
sound cards ok googleaocsndcar
sensors ok Accelerometer AmbientLight Proximity
cameras skip no libcamera tools
thermal ok hottest zone 52 °C

Packages: hyprland 0.57.0-3.3, libcamera 0.7.2-4.23, mesa 1:26.2.4-1.4, omacam 0.3.3-1, omamessages 0.2.2-1, omamobile-apps 0.2.3-1, omamobile-audio 0.5.18-1, omamobile-boot-update 0.1.0-1, omamobile-device-cheetah 0.1.60-1, omamobile-fingerprint 0.1.17-1, omamobile-firstboot 0.1.6-1, omamobile-gnss 0.2.10-1, omamobile-keyring 20261026-1, omamobile-mirror 0.1.1-1, omamobile-mmd 0.1.4-1, omamobile-modem 0.1.26-1, omamobile-modem-sit 0.3.43-1, omamobile-omarchy 0.1.50-1, omamobile-owl-widgets 0.1.2-1, omamobile-sensors 0.2.1-1, omamobile-settings 0.1.2-1, omamobile-shell 0.2.132-1, omamobile-voice 0.1.0-1, omaphone 0.2.3-1, omarchy 4.5.0-3, omatel-agent 0.2.4-2, quickshell 0.3.2.r7.g2b4501a-1

…3 is missing

On Omarchy 4.5 the battery on my lock screen showed the old level after
a wake and took 8 to 13 seconds to catch up.

Patch 0023 for 4.0.6 passes wakeSerial, blankSerial and displayDark into
the LockView in Service.qml. The 4.5 version of 0023 doesn't have those
3 lines, so the lock view never knows the screen went dark or woke up. I
added them back.

Tested on my Pixel 7 Pro. Before, the lock didn't read the battery on
wake. With the 3 lines it reads it right away and the level is right as
soon as the screen lights.

Also added a check for the 3 lines to test/port45.py since the one in
test/patches.py only runs for 4.0.6.

Assisted-by: Claude
After a wake the clock on my lock screen was still showing the time from
before the phone slept. I saw it take about 20 seconds to catch up. It
depends on when in the minute the phone went to sleep, so it can be up
to a minute.

Quickshell's SystemClock waits for the next minute on a timer, and that
timer doesn't count while the phone is asleep. So after a wake it keeps
the old time until what was left of that minute runs out.

New patch 0032 turns the lock's clock off while the screen is dark and
back on at a wake. Turning it on makes it read the time right away. It
needs displayDark from 0023, so this goes on top of derekross#920.

Tested on my Pixel 7 Pro. The lock showed the right time as soon as it
lit. The top bar still had the old time for about 45 seconds after I
unlocked, since this only fixes the lock.

Assisted-by: Claude
@iamteedoh

Copy link
Copy Markdown
Author

One question for the reviewers about the other clocks.

The top bar, the home clock widget and quick settings use the same SystemClock and are still late after an unlock. On my test the top bar took about 45 seconds to catch up. I didn't touch them here because they don't get a wake signal like the lock does.

I see two ways to fix it:

  1. Add a wake signal in omamobile-shell that those plugins can listen to, and have them turn their clock off and on when it fires, same as 0032 does for the lock. omamobile-sleepd already knows when the phone resumes.
  2. Fix SystemClock in Quickshell so it handles a suspend by itself. That would fix every clock at once, but it's a different project.

The agenda widget uses hour precision, so by the same code it could be off for a lot longer. I haven't measured that one.

Which way would you want it, or something else? I'm happy to work on it if that's ok with you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant