omarchy icon indicating copy to clipboard operation
omarchy copied to clipboard

Firmware update reports failure when no updates are available (fwupdmgr exit code 2)

Open AryanHamedani opened this issue 4 weeks ago • 4 comments

System details

ASUS Vivobook 15 X1502VA (i7-13620H, Intel graphics), Omarchy 4.5.0, fwupd

What's wrong?

Update > Firmware reports a failure when all firmware is already current:

Devices with no available firmware updates:
 • Internal SPI Controller (BIOS)
 • ...
No updatable devices

● Failed (exit code 2)! Press any key to close...

fwupdmgr update exits with code 2 when there is nothing to do ("No updatable devices"); that is its documented "nothing to do" status, not an error. bin/omarchy-update-firmware runs under set -e and ends with sudo fwupdmgr update, so an up-to-date machine shows the red failure line.

This is the same pattern #4503 fixed one line earlier for fwupdmgr refresh (with --force).

Steps: on a machine with no pending firmware updates, open Omarchy menu > Update > Firmware.

Expected: the script finishes successfully.

fwupdmgr get-updates; echo $? prints 2 on the same machine.

AryanHamedani avatar Nov 06 '26 05:11 AryanHamedani

Could the no-op case also show a neutral message such as Nothing to update or No firmware updates available, instead of the red Failed (exit code 2) message?

I see #17842 and #17857 already address the exit status. An explicit message would make it clearer that the check completed and there is nothing to install. No firmware updates available would also avoid implying that every device necessarily has the latest vendor firmware.

This should apply specifically to fwupdmgr update returning 2; other non-zero statuses should retain their existing behavior.

pershin-daniil avatar Nov 18 '26 09:11 pershin-daniil

I read the report and comments, the current firmware script on quattro, and the diffs of #17842 and #17857. GPT-6 in Codex (reasoning effort not exposed) classified this as a bug report, but the configured second classifier, deepseek-v4p1-flash, supplied no usable classification, so classification remains unsettled.

No worker tests or code-review second opinion ran, and no labels or code changes were made. This is waiting for a completed classification before verification.

omarchybot avatar Nov 19 '26 00:11 omarchybot

#17857 handles the exit status: fwupdmgr update returning 2 now ends the script successfully, so the red Failed (exit code 2) from the presentation wrapper becomes the usual green Done!. fwupdmgr's own no-op line stays above it, since that output is still shown.

I did not add a separate "Nothing to update" line because fwupdmgr already prints one for that exit code, and the other update commands end on the same green prompt without restating what happened. If you or the maintainer would rather see No firmware updates available in the firmware case, it is a one-line addition and I am glad to add it — say the word.

anandude avatar Nov 19 '26 04:11 anandude

Confirmed the exit-status handling bug on a disposable Omarchy worker using controlled fwupdmgr and sudo stand-ins. With update status 2, the current script exits 2 and the menu’s presentation wrapper shows the red failure; #17842 at 9dfc3f71e01bdbb8b8588c791cbcbc3e109a41e3 exits 0 and shows Done. Restoring the base script brings the failure back. Update statuses 1, 3 and 130 still pass through unchanged, and refresh failures still stop before update.

fwupdmgr update is the script’s final command, so its status becomes the script’s status even without set -e. The fwupd documentation defines 2 as a successful command with nothing to do. The worker had no fwupd installed, so these checks establish the shell and presentation behavior; no live firmware operation, hardware update or full PR suite was tested in this issue review.

GPT-6 in Codex (reasoning effort not exposed) reviewed this issue; Opus 5.5 High and muse-wonder via pi, thinking high found no actionable defect in the scoped fix. They agreed with the diagnosis; independence is not guaranteed. #17842 already links this issue, so no additional fix was opened. This is waiting on the maintainer’s decision on that PR. Additional neutral wording remains a presentation choice for the maintainer.

Before, with controlled update status 2:

Base: no updatable devices followed by Failed (exit code 2)

After, with the same controlled status and #17842’s script:

PR 17842: no updatable devices followed by Done

omarchybot avatar Nov 23 '26 07:11 omarchybot