Proof Portal

Project overview

Omarchy

ProbeLabs65 findings · 95 requirements

A proof layer — requirements, tests and verified fixes — for two of Omarchy's subsystems: the application menu (launcher scripts, QML model, JSONC config, search and selection) and the lock screen (lock scripts, QML, PAM authentication). Scope is deliberately limited to those components of omacom/omarchy; the rest of the distribution is not covered.

Inbox
ReportR-4615GitHub issuePublicReceived

omarchy-battery-status reads only the first battery on dual-battery laptops

Reported by syntaxboybe · filed Aug 17, 2026Closed upstream on 2026-09-20 by bjarneo via an automated message, as a duplicate of #6885 (R-1856). GitHub close reason: completed.

Received and recorded verbatim. Nothing has been checked yet.

At a glance

1 · What is claimed?
Only the report text below — no validator has restated it as checkable claims yet.
2 · What does it affect?
Not yet mapped to any requirement or component.
3 · Is it reproducible?
No validation has been run yet.
4 · What remains unclear?
  • Not validated yet: no claims, no reproducer.
5 · What happens next?
Our staff decide whether the report is valid. Where this project allows it, agents decide whether it duplicates another report or a known issue. No decision has been recorded yet.

Original report

omarchy-battery-status reads only the first battery on dual-battery laptopsrevision 1 · captured 2026-10-04 12:03 UTC via poll

What happened

On a dual-battery laptop, the omarchy.power bar popup reports battery stats for only the internal battery (BAT0), not the combined system battery. The popup shows ~91% when the machine is really at ~42% and discharging, "Battery size" shows 14 Wh instead of 75 Wh, and "Time left" is blank.

The bar icon itself uses UPower.displayDevice (combined), so the icon fill and the popup percentage disagree.

Root cause

omarchy-battery-status selects the first BAT* device from upower -e:

battery=$(upower -e 2>/dev/null | grep BAT | head -n 1)   # /usr/bin/omarchy-battery-status:21

On a dual-battery machine this always resolves to BAT0 (internal), ignoring the external battery. The composite DisplayDevice is the correct source.

What was expected

The popup should report the combined battery state (UPower DisplayDevice), matching the icon's fill level.

Steps to reproduce

  1. On a laptop with two batteries (internal + external/swappable), open the power popup from the bar.
  2. Compare the popup percentage to upower -i /org/freedesktop/UPower/devices/DisplayDevice.

Evidence

Lenovo ThinkPad T480 (internal + swappable battery):

$ upower -e
/org/freedesktop/UPower/devices/battery_BAT0
/org/freedesktop/UPower/devices/battery_BAT1
...
/org/freedesktop/UPower/devices/DisplayDevice

BAT0 (internal, LGC 01AV489): fully-charged, 91%, energy-full 14.27 Wh, 322 cycles
BAT1 (external, SANYO 01AV427): discharging, 30%, energy-full 61.11 Wh, 111 cycles
DisplayDevice (combined):       discharging, 41.9%, energy-full 75.38 Wh, 1.7h to empty

The popup currently shows BAT0's values (91% / 14 Wh / blank time-left). It should show ~42% / 75 Wh / ~1h 42m.

Suggested fix

Prefer DisplayDevice and fall back to the first BAT* only when it is absent:

battery=$(upower -e 2>/dev/null | grep DisplayDevice | head -n 1)
[[ -z $battery ]] && battery=$(upower -e 2>/dev/null | grep BAT | head -n 1)

Caveat: DisplayDevice has no native-path, charge-cycles, or per-device charge-start/end-threshold fields, so the sysfs power_now shortcut and the cycle/threshold lookups must keep falling back to the BAT* globs (the existing [[ -z ... ]] fallback paths already handle this).

System

  • Omarchy 4.0.0-1
  • Lenovo ThinkPad T480 (dual battery)
View raw text
## What happened

On a dual-battery laptop, the `omarchy.power` bar popup reports battery stats for only the *internal* battery (BAT0), not the combined system battery. The popup shows ~91% when the machine is really at ~42% and discharging, "Battery size" shows 14 Wh instead of 75 Wh, and "Time left" is blank.

The bar icon itself uses `UPower.displayDevice` (combined), so the icon fill and the popup percentage disagree.

## Root cause

`omarchy-battery-status` selects the first `BAT*` device from `upower -e`:

```bash
battery=$(upower -e 2>/dev/null | grep BAT | head -n 1)   # /usr/bin/omarchy-battery-status:21
```

On a dual-battery machine this always resolves to BAT0 (internal), ignoring the external battery. The composite `DisplayDevice` is the correct source.

## What was expected

The popup should report the combined battery state (UPower `DisplayDevice`), matching the icon's fill level.

## Steps to reproduce

1. On a laptop with two batteries (internal + external/swappable), open the power popup from the bar.
2. Compare the popup percentage to `upower -i /org/freedesktop/UPower/devices/DisplayDevice`.

## Evidence

Lenovo ThinkPad T480 (internal + swappable battery):

```
$ upower -e
/org/freedesktop/UPower/devices/battery_BAT0
/org/freedesktop/UPower/devices/battery_BAT1
...
/org/freedesktop/UPower/devices/DisplayDevice

BAT0 (internal, LGC 01AV489): fully-charged, 91%, energy-full 14.27 Wh, 322 cycles
BAT1 (external, SANYO 01AV427): discharging, 30%, energy-full 61.11 Wh, 111 cycles
DisplayDevice (combined):       discharging, 41.9%, energy-full 75.38 Wh, 1.7h to empty
```

The popup currently shows BAT0's values (91% / 14 Wh / blank time-left). It should show ~42% / 75 Wh / ~1h 42m.

## Suggested fix

Prefer `DisplayDevice` and fall back to the first `BAT*` only when it is absent:

```bash
battery=$(upower -e 2>/dev/null | grep DisplayDevice | head -n 1)
[[ -z $battery ]] && battery=$(upower -e 2>/dev/null | grep BAT | head -n 1)
```

Caveat: `DisplayDevice` has no `native-path`, `charge-cycles`, or per-device `charge-start/end-threshold` fields, so the sysfs `power_now` shortcut and the cycle/threshold lookups must keep falling back to the `BAT*` globs (the existing `[[ -z ... ]]` fallback paths already handle this).

## System

- Omarchy 4.0.0-1
- Lenovo ThinkPad T480 (dual battery)

Validation

Not checked yet. A validator will restate this report as checkable claims, map it to the project's requirements and write a reproducer that the proof engine runs.

Linked

Not linked to any known issue, other report or change yet.

Decision

Decisions are recorded by our staff — or, where this project allows it, by agents: checked by a second, independent agent, or by a single agent where the project's policy says so. Any decision reached so far is shown below.

No decision has been recorded yet.