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

omarchy-battery-status only reads first battery on dual-battery ThinkPads

Reported by tahmidft · filed Sep 2, 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 only reads first battery on dual-battery ThinkPadsrevision 1 · captured 2026-10-04 12:03 UTC via poll

Summary

On dual-battery ThinkPads, the power bar popup reports only the first battery's capacity (e.g. 26 Wh) instead of the combined total (~44 Wh). Both batteries are present and readable via sysfs, but omarchy-battery-status stops at the first BAT* device.

System

  • Omarchy version: 4.0.1-1
  • Machine: Lenovo ThinkPad 20L5000UUS (dual-battery)
  • Kernel: Linux 7.1.9-arch1-2 x86_64

Batteries detected

BatteryModelCapacity %Energy nowEnergy full
BAT001AV42121%5.46 Wh26.60 Wh
BAT101AV4245%0.78 Wh17.25 Wh
Combined—~14%6.24 Wh43.85 Wh

Steps to reproduce

  1. Use a ThinkPad (or other machine) with two batteries (BAT0 + BAT1 under /sys/class/power_supply/).
  2. Open the Omarchy shell power popup (bar widget omarchy.power).
  3. Observe the Battery size field, or run omarchy-battery-status.

Expected behavior

Battery size, percentage, charge/discharge rate, and related stats should aggregate across all present BAT* devices — showing ~44 Wh total capacity on this machine.

Actual behavior

Only BAT0 is queried. The popup shows 26 Wh (BAT0's energy_full alone).

Root cause

In /usr/share/omarchy/bin/omarchy-battery-status, only the first UPower battery device is used:

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

All downstream fields (percentage, capacity, power_rate, time_remaining) are derived from that single device. Cycle count and charge thresholds already iterate BAT* in places, but the core stats do not.

The Quickshell power panel (plugins/panels/power/Panel.qml) calls omarchy-battery-status --shell for the popup stats; the bar icon percentage comes from UPower.displayDevice, which may aggregate correctly, but the Wh figure does not.

Suggested fix

Iterate all BAT* power supplies (or all UPower battery devices) and sum energy_now, energy_full, and power_now for capacity/rate; compute percentage as energy_now / energy_full across the combined totals.

View raw text
## Summary

On dual-battery ThinkPads, the power bar popup reports only the first battery's capacity (e.g. **26 Wh**) instead of the combined total (~**44 Wh**). Both batteries are present and readable via sysfs, but `omarchy-battery-status` stops at the first `BAT*` device.

## System

- **Omarchy version:** 4.0.1-1
- **Machine:** Lenovo ThinkPad 20L5000UUS (dual-battery)
- **Kernel:** Linux 7.1.9-arch1-2 x86_64

## Batteries detected

| Battery | Model   | Capacity % | Energy now | Energy full |
|---------|---------|------------|------------|-------------|
| BAT0    | 01AV421 | 21%        | 5.46 Wh    | 26.60 Wh    |
| BAT1    | 01AV424 | 5%         | 0.78 Wh    | 17.25 Wh    |
| **Combined** | —  | ~14%       | 6.24 Wh    | **43.85 Wh** |

## Steps to reproduce

1. Use a ThinkPad (or other machine) with two batteries (`BAT0` + `BAT1` under `/sys/class/power_supply/`).
2. Open the Omarchy shell power popup (bar widget `omarchy.power`).
3. Observe the **Battery size** field, or run `omarchy-battery-status`.

## Expected behavior

Battery size, percentage, charge/discharge rate, and related stats should aggregate across all present `BAT*` devices — showing ~44 Wh total capacity on this machine.

## Actual behavior

Only BAT0 is queried. The popup shows **26 Wh** (BAT0's `energy_full` alone).

## Root cause

In `/usr/share/omarchy/bin/omarchy-battery-status`, only the first UPower battery device is used:

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

All downstream fields (`percentage`, `capacity`, `power_rate`, `time_remaining`) are derived from that single device. Cycle count and charge thresholds already iterate `BAT*` in places, but the core stats do not.

The Quickshell power panel (`plugins/panels/power/Panel.qml`) calls `omarchy-battery-status --shell` for the popup stats; the bar icon percentage comes from `UPower.displayDevice`, which may aggregate correctly, but the Wh figure does not.

## Suggested fix

Iterate all `BAT*` power supplies (or all UPower battery devices) and sum `energy_now`, `energy_full`, and `power_now` for capacity/rate; compute percentage as `energy_now / energy_full` across the combined totals.

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.