System update widget renders a failed update check as "up to date"
System details
AMD Ryzen AI 7 350 / Radeon 860M, Omarchy 4.0.0-1, kernel 7.1.8-arch1-3, pacman-contrib 1.13.1-1. Two displays (eDP-1 2256x1504, DP-3 3840x2160), but see below — a second display is not required.
Verified against main at 7eca64e2: bin/omarchy-update-available and
shell/plugins/bar/widgets/SystemUpdate.qml are byte-identical to the installed
4.0.0 copies, so this is not fixed in 4.0.1 or 4.0.2.
What's wrong?
The system update widget shows no icon while an update is pending. It does not distinguish "no update" from "the check failed" — any non-zero exit from the check is rendered as up to date.
The bug
Four things chain together.
1. The widget exists more than once. shell/plugins/bar/Bar.qml:966 is
Variants { model: Quickshell.screens }, so each screen builds its own bar and
its own widget instances. Per #8221 an instance also exists transiently "while a
plugin reload overlaps the outgoing instance, which happens on single-monitor
machines too" — so this is not a multi-monitor-only bug.
2. Each instance runs its own check, and refreshes are fanned out on
purpose. SystemUpdate.qml gives every instance its own Process on a
Timer { triggeredOnStart: true }, and refresh goes through
BarWidget.broadcast(), which is documented to relay to peers because "a bar
surface exists per monitor". So one refresh becomes N concurrent
omarchy-update-available runs.
3. omarchy-update-available is not concurrency-safe. It calls
checkupdates (pacman-contrib), which syncs into one shared temp database,
${TMPDIR:-/tmp}/checkup-db-${UID}, and removes db.lck from a
trap ... INT TERM EXIT. Concurrent runs share that directory, so whichever
finishes first drops the other's lock; the loser's pacman -Sy fails, or its
pacman -Qu reads a half-synced database and prints nothing. Both pacman calls
are silenced (&> /dev/null, 2> /dev/null), so the failure is invisible and
the empty result is mapped to "up to date", exit 1.
4. The widget conflates that with "no update". SystemUpdate.qml:43:
onExited: function(exitCode) {
root.updateAvailable = exitCode === 0
}
With visible: updateAvailable, a check that failed for any reason renders as
"you are up to date". That is the wrong direction to fail in: it hides a pending
update rather than showing a spurious one, and it is silent.
Reproduce
The script-level race, with an update actually pending:
$ for i in 1 2; do (out=$(omarchy-update-available 2>&1); echo "run$i: exit=$? | $out") & done; wait
run2: exit=1 | Omarchy is up to date
run1: exit=0 | omarchy 4.0.0-1 -> 4.0.2-1
Observed in the bar: with omarchy 4.0.0-1 -> 4.0.2-1 pending, captures of both
bars in the same minute showed the icon present on eDP-1 and absent on DP-3.
To be straight about scope
- The missing icon is transient. It later returned on both bars without my doing anything to the widget. I could not reproduce that recovery on demand and cannot prove what caused it; the reload-overlap instantiation described in #8221 is a plausible explanation, not a demonstrated one.
- The shared-temp-database behaviour is arguably a
pacman-contribbug, and given how #6964 and #7015 were resolved you may prefer it fixed upstream incheckupdatesrather than worked around here. I am happy to take it there. - Defect 4 is Omarchy's regardless of where 3 is fixed, and it is the one that converts a failed check into a false reassurance. Fixing 4 alone would make the failure visible instead of silent.
Direction, not a prescription
Two separable pieces, and I did not want to presume the shape:
- Stop conflating a failed check with a negative result, so an errored check leaves the previous state or surfaces the error.
- Run the check once per shell rather than once per surface.
shell.qml:285caches service plugins in_servicesviacreateObject(serviceHost), one per shell rather than one per screen, reached throughserviceFor/firstPartyServiceFor, andomarchy.mediaalready ships askinds: ["service", "bar-widget"]— one service feeding N widgets is an existing shape. That removes the concurrency rather than locking around it, and drops N-1 redundant pacman syncs.
Same family as #7896 / #8221: a per-surface bar widget driving redundant system
work. Note #8771 already proposes test/shell.d/update-available-test.sh; a test
for this belongs in that file rather than a new one.
Happy to open a PR for either piece if you say which shape you want.
I searched open and closed issues and PRs and found nothing covering this; the
other open work on this script (#8771, #7167, #7398) is unrelated to the check's
concurrency, and no open PR touches SystemUpdate.qml.
— Drafted with Claude Code; findings verified against the repo at 7eca64e2.
I checked this against quattro at 988f44ea1. Both halves of the report still hold there. In bin/omarchy-update-available:31, checkupdates is piped through awk with stderr dropped and || true, so a failed check finds no update and falls through to "Omarchy is up to date" with exit 1. And shell/plugins/bar/widgets/SystemUpdate.qml:43 shows the icon only on exit 0, so a failed check hides it.
Two open pull requests cover this, and both are already being worked:
- #10066 is the fix for this issue, and it already says
Fixes #9798. It makes the checker exit 2 whencheckupdatesfails (anything other than its 0 for updates or 2 for none), and the widget keeps what it last showed on exit 2. It has been verified, is labelledverified, and CI is green. - #11480 fixes the race behind the failure by putting a
flockaroundcheckupdates. It is tracked under #11077. It was reproduced on a disposable Omarchy worker with a real pendingomarchyupdate and three callers started at once: onquattro, 10 of 15 checks reported up to date, on the branch 0 of 15, and with the lock reverted 8 of 15 again. It serializes the per-bar checks rather than running one check per shell, so each bar still does its own sync. Whether to move the check into a shared service, as you suggested, is the maintainer's call.
Together they fix both the silent failure and the race. Neither needs anything from you. This waits on the maintainer to decide on #10066 and #11480.
Reviewed by Claude Opus 5.5. No second opinion ran on this issue: the configured reviewer, Codex Medium, answers, but its daily review allowance was spent.
Same failure class, different trigger this time.
- Was on Omarchy 4.0.5-1, omarchy 4.0.5-1 -> 4.0.6-1 pending since 04:00.
- Shell started at 18:16:17, before Wi-Fi wlo1 finished activation.
- unshare -Urn omarchy-update-available exits 1 in 0.073 s and prints "Omarchy is up to date".
- The bar icon stayed hidden until a manual omarchy.system-update refresh ~2.5 h later.
- SystemUpdate.qml has no retry; the next check is 6 h later.
Neither #10066 nor #11480 fixes this: preserving state on failure leaves updateAvailable == false at startup, and flock only serializes callers. This needs a retry after a failed first check (e.g. on network-up or a short backoff), or at minimum a failure state that does not hide a pending update until the 6 h timer.
You're right. My earlier disposition was too broad. I rechecked current quattro at 3ac43659d: the widget still starts with updateAvailable: false, runs once immediately, then waits six hours. #10066 preserves the previous state on a recognized check failure, but at cold start that previous state is still false; #11480 only serializes callers. Neither retries when connectivity arrives.
I also checked the open pull requests touching SystemUpdate.qml or omarchy-update-available and found no separate cold-start retry. Your reproduction identifies an uncovered path, so this issue should stay open after those two PRs unless that retry is added.
One more cold-start data point, with a detail that may matter for the retry design.
Omarchy 4.0.4-1 (stable), Intel MacBook, single display, NetworkManager + Tailscale MagicDNS. 4.0.4-1 -> 4.0.6-1 pending; icon hidden after boot, manual check a few minutes later found it.
18:40:31 NetworkManager state is now CONNECTED_GLOBAL
18:40:34 SystemUpdate.qml: Handler was registered but will not be used ... (2 instances, 1 display)
18:40:35 checkupdates sync starts
18:40:35 systemd-resolved: degraded feature set ... for DNS server 100.100.100.100
18:40:46 systemd-resolved: Clock change detected. Flushing caches.
- NetworkManager reported global connectivity before the check and it still failed (DNS via Tailscale was still settling, NTP stepped the clock right after). So a retry triggered only by "network up" could fire too early; a short backoff after a failed check (e.g. 1/2/5 min) seems more robust.
- Possibly relevant on laptops: if the QML
Timercounts monotonic time, suspended time doesn't count toward the 6 h interval, so a failed first check could stay stale for days. A re-check on resume would cover that.
(Investigated and drafted with Claude Code; I reviewed the logs and text.)
The timing detail rules out treating CONNECTED_GLOBAL as readiness: DNS and clock setup can still be unsettled after NetworkManager reports global connectivity. For this cold-start path, a bounded retry after a recognized check failure is the stronger baseline, with resume as an additional trigger so suspend cannot stretch stale state for days. A network-up trigger by itself would be insufficient.
I rechecked this against quattro at 087f73d89 after the cold-start reports. They are right, and my earlier comment was wrong to say #10066 and #11480 together fix this issue.
What the source shows:
shell/plugins/bar/widgets/SystemUpdate.qml:11starts withupdateAvailable: false. TheTimerat line 47 checks once on start and then every six hours. Apart from that, only theomarchy.system-update refreshIPC runs a check. Nothing runs it again after a failure, on resume from suspend, or when the network comes up.- Nothing makes the session wait for the network.
install/config/enable-services.sh:12masksNetworkManager-wait-online.service, so a check that runs as the shell starts can race the network. If it fails,bin/omarchy-update-availablereports "up to date" with exit 1 and the icon stays hidden until the next timer tick. - With #10066 applied, a failed check exits 2 and the widget keeps its previous state. At cold start that state is
false, so the icon is still hidden. #11480 only serializes callers.
I did not open a fix, for two reasons. First, a retry needs #10066's exit-2 signal. On quattro a failed check and a real "up to date" both exit 1, so retrying on exit 1 would keep re-checking every machine that is up to date. Second, how to retry is a design choice for the maintainer: a bounded backoff after a failure, a re-check on resume, or both. betogrun's log above suggests a network-up trigger alone could fire too early. Whether suspended time counts toward the six-hour timer is not something the repository settles. I did not test it.
One thing to know before merging: #10066 says Fixes #9798. Merging it as it stands would close this issue while the cold-start case is still open.
This was checked by reading the source; nothing was run on a worker. Reviewed by Claude Opus 5.5, with a second opinion from Codex Medium. Codex reached the same reading on its own and added the wait-online mask. It could not fetch #10066's diff, so its view of that pull request rests on my description, which I checked against the diff. This waits on the maintainer to decide how the retry should work and where it lands.