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-4710GitHub issuePublicReceived

Battery panel only reads one battery on dual-battery laptops (e.g. ThinkPad T580)

Reported by Dhruv-145 · filed Aug 27, 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

Battery panel only reads one battery on dual-battery laptops (e.g. ThinkPad T580)revision 1 · captured 2026-10-04 12:03 UTC via poll

What happened

On a dual-battery ThinkPad (T580: BAT0 + BAT1), the battery panel (click the
battery icon in the bar) shows percentage, size, discharge rate, time
remaining, and cycle count for only one of the two batteries — the
numbers silently ignore the second battery entirely.

The bar's own percentage label (bar icon → right-click → "show percentage")
is correct: it reads UPower.displayDevice, which UPower aggregates across
both batteries. But the expanded panel disagrees with it, because it's
populated by a separate script, omarchy-battery-status, which does:

battery=$(upower -e 2>/dev/null | grep BAT | head -n 1)

head -n 1 always picks the first battery UPower lists (BAT0 on this
machine) and never looks at BAT1. Every field derived from $battery_info
in that script inherits the same problem: percentage, energy-full ("size"),
time-to-empty/full, and the sysfs power_now/current_now fallback used for
the live discharge rate. The cycle-count line has the identical bug
independently:

cycles=$(cat "$power_supply_path"/BAT*/cycle_count 2>/dev/null | head -1)

— which also only reads the first battery's cycle count.

What was expected

The panel should reflect both batteries combined (matching what the bar's
own percentage already does via UPower.displayDevice), or at minimum not
silently drop the second battery's contribution.

Steps to reproduce

  1. On a laptop with two battery power-supply devices (e.g. ThinkPad T580 with

BAT0 + BAT1), open the battery panel from the bar.
2. Compare the percentage shown in the panel against the bar's own
percentage label (toggle it on via right-click on the battery icon).
3. Compare against upower -i $(upower -e | grep DisplayDevice).

Observed vs. expected (captured on this machine)

Panel (omarchy-battery-status --shell, BAT0 only):

percentage	53%
state	discharging
rate	9.9W
size	29Wh
time	1h 48m
cycles	234
threshold	75-80%

upower -i for the DisplayDevice (both batteries aggregated):

energy:              16.52 Wh
energy-full:         84.31 Wh   (29.65 + 54.66)
percentage:          19.5944%
time to empty:       2.2 hours

BAT1 individually (completely absent from the panel's numbers):

capacity:            0%
energy-full:         54.66 Wh
cycle-count:         39
state:               pending-charge / not charging

So the panel reports 53% / 29Wh / 234 cycles while the true combined state is
~20% / 84Wh, and BAT1's 39 charge cycles are never surfaced anywhere in the
UI.

System details

  • Omarchy version: 4.0.0-1
  • CPU: Intel Core i5-8250U (Kaby Lake-R)
  • GPU: Intel UHD Graphics 620
  • Kernel: 7.1.8-arch1-3
  • UPower: 1.91.3
  • Machine: Lenovo ThinkPad T580, dual battery (BAT0 00UR891, BAT1 01AV427)

Suggested fix direction

In omarchy-battery-status, source from UPower's DisplayDevice (same
aggregate the bar already uses) instead of the first BAT* device, or
explicitly sum energy_now/energy_full/power_now across all BAT* in
/sys/class/power_supply and report per-battery cycle counts (e.g.
234, 39 or a max/primary label) rather than picking one at random via
head -1.

View raw text
## What happened

On a dual-battery ThinkPad (T580: BAT0 + BAT1), the battery panel (click the
battery icon in the bar) shows percentage, size, discharge rate, time
remaining, and cycle count for **only one of the two batteries** — the
numbers silently ignore the second battery entirely.

The bar's own percentage label (bar icon → right-click → "show percentage")
is correct: it reads `UPower.displayDevice`, which UPower aggregates across
both batteries. But the expanded panel disagrees with it, because it's
populated by a separate script, `omarchy-battery-status`, which does:

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

`head -n 1` always picks the first battery UPower lists (`BAT0` on this
machine) and never looks at `BAT1`. Every field derived from `$battery_info`
in that script inherits the same problem: percentage, energy-full ("size"),
time-to-empty/full, and the sysfs `power_now`/`current_now` fallback used for
the live discharge rate. The cycle-count line has the identical bug
independently:

```bash
cycles=$(cat "$power_supply_path"/BAT*/cycle_count 2>/dev/null | head -1)
```

— which also only reads the first battery's cycle count.

## What was expected

The panel should reflect both batteries combined (matching what the bar's
own percentage already does via `UPower.displayDevice`), or at minimum not
silently drop the second battery's contribution.

## Steps to reproduce

1. On a laptop with two battery power-supply devices (e.g. ThinkPad T580 with
   BAT0 + BAT1), open the battery panel from the bar.
2. Compare the percentage shown in the panel against the bar's own
   percentage label (toggle it on via right-click on the battery icon).
3. Compare against `upower -i $(upower -e | grep DisplayDevice)`.

## Observed vs. expected (captured on this machine)

Panel (`omarchy-battery-status --shell`, BAT0 only):
```
percentage	53%
state	discharging
rate	9.9W
size	29Wh
time	1h 48m
cycles	234
threshold	75-80%
```

`upower -i` for the DisplayDevice (both batteries aggregated):
```
energy:              16.52 Wh
energy-full:         84.31 Wh   (29.65 + 54.66)
percentage:          19.5944%
time to empty:       2.2 hours
```

BAT1 individually (completely absent from the panel's numbers):
```
capacity:            0%
energy-full:         54.66 Wh
cycle-count:         39
state:               pending-charge / not charging
```

So the panel reports 53% / 29Wh / 234 cycles while the true combined state is
~20% / 84Wh, and BAT1's 39 charge cycles are never surfaced anywhere in the
UI.

## System details

- Omarchy version: 4.0.0-1
- CPU: Intel Core i5-8250U (Kaby Lake-R)
- GPU: Intel UHD Graphics 620
- Kernel: 7.1.8-arch1-3
- UPower: 1.91.3
- Machine: Lenovo ThinkPad T580, dual battery (BAT0 00UR891, BAT1 01AV427)

## Suggested fix direction

In `omarchy-battery-status`, source from UPower's `DisplayDevice` (same
aggregate the bar already uses) instead of the first `BAT*` device, or
explicitly sum `energy_now`/`energy_full`/`power_now` across all `BAT*` in
`/sys/class/power_supply` and report per-battery cycle counts (e.g.
`234, 39` or a max/primary label) rather than picking one at random via
`head -1`.

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.