Proof Portal
Omarchy
ProbeLabs65 findings · 95 requirementsA 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.
omarchy-battery-status reports wrong percentage on dual-battery laptops (reads only BAT0)
Reported by nick-terrant · filed Sep 4, 2026Closed upstream on 2026-09-20 by bjarneo via an automated message, as a duplicate of #6885 (R-1856). GitHub close reason: completed.
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
Summary
On dual-battery laptops (e.g. ThinkPad T480 with internal + removable battery), omarchy-battery-status only reads the first battery (BAT0), so the power panel percentage is wrong for long stretches — while the bar/panel icon (which uses UPower's combined DisplayDevice) shows the correct, lower level. The two indicators visibly contradict each other.
System details
- Omarchy: 4.0.2-1
- Machine: Lenovo ThinkPad T480 (20L6S77E00) — dual battery: internal BAT0 (24 Wh design) + removable BAT1 (47.5 Wh)
- Kernel: 7.1.9-arch1-2 · Hyprland 0.56.2
- Debug log:
/tmp/omarchy-debug.log(attached)
Steps to reproduce
- Use a dual-battery ThinkPad on battery power.
- Observe the battery icon in the bar (low level) vs the percentage in the power panel (stuck near 98%).
What happened
BAT0 (small internal battery) stays full and idle while BAT1 (large removable battery) drains first — standard ThinkPad behavior. Real state at the time of reporting:
$ upower -i /org/freedesktop/UPower/devices/DisplayDevice
state: discharging
energy: 24.76 Wh
energy-full: 66.01 Wh
percentage: 37.5095% <- real combined level
time to empty: 3.2 hours
$ upower -i /org/freedesktop/UPower/devices/battery_BAT0 | grep -E 'percentage|state'
state: fully-charged
percentage: 98% <- what the panel shows
$ upower -i /org/freedesktop/UPower/devices/battery_BAT1 | grep -E 'percentage|state'
state: discharging
percentage: 14%
$ omarchy-battery-status --shell
percentage 98% <- wrong: BAT0 only
state fully-chargedThe icon uses Quickshell's UPower.displayDevice (combined, correct), while the panel's percentage/size/time text comes from omarchy-battery-status (BAT0 only, wrong) — hence "icon shows low battery, number says 98%".
Root cause
In omarchy-battery-status:
battery=$(upower -e 2>/dev/null | grep BAT | head -n 1)This picks the first BAT device and ignores the rest, so percentage, state, time, rate, and size all describe only BAT0.
Suggested fix
Use UPower's DisplayDevice (which already aggregates all batteries) for percentage/state/time/rate/size, or sum energy_now/energy_full across all BAT* devices, e.g.:
battery=$(upower -e 2>/dev/null | grep -m1 DisplayDevice)(Per-device details like cycle count and charge thresholds can still come from the first BAT.)
Expected behavior
Panel percentage matches the icon and the true combined charge (37.5% in the example above), and low-battery warnings reflect the real remaining capacity.
View raw text
## Summary
On dual-battery laptops (e.g. ThinkPad T480 with internal + removable battery), `omarchy-battery-status` only reads the **first** battery (`BAT0`), so the power panel percentage is wrong for long stretches — while the bar/panel icon (which uses UPower's combined `DisplayDevice`) shows the correct, lower level. The two indicators visibly contradict each other.
## System details
- Omarchy: 4.0.2-1
- Machine: Lenovo ThinkPad T480 (20L6S77E00) — dual battery: internal BAT0 (24 Wh design) + removable BAT1 (47.5 Wh)
- Kernel: 7.1.9-arch1-2 · Hyprland 0.56.2
- Debug log: `/tmp/omarchy-debug.log` (attached)
## Steps to reproduce
1. Use a dual-battery ThinkPad on battery power.
2. Observe the battery icon in the bar (low level) vs the percentage in the power panel (stuck near 98%).
## What happened
BAT0 (small internal battery) stays full and idle while BAT1 (large removable battery) drains first — standard ThinkPad behavior. Real state at the time of reporting:
```
$ upower -i /org/freedesktop/UPower/devices/DisplayDevice
state: discharging
energy: 24.76 Wh
energy-full: 66.01 Wh
percentage: 37.5095% <- real combined level
time to empty: 3.2 hours
$ upower -i /org/freedesktop/UPower/devices/battery_BAT0 | grep -E 'percentage|state'
state: fully-charged
percentage: 98% <- what the panel shows
$ upower -i /org/freedesktop/UPower/devices/battery_BAT1 | grep -E 'percentage|state'
state: discharging
percentage: 14%
$ omarchy-battery-status --shell
percentage 98% <- wrong: BAT0 only
state fully-charged
```
The icon uses Quickshell's `UPower.displayDevice` (combined, correct), while the panel's percentage/size/time text comes from `omarchy-battery-status` (BAT0 only, wrong) — hence "icon shows low battery, number says 98%".
## Root cause
In `omarchy-battery-status`:
```bash
battery=$(upower -e 2>/dev/null | grep BAT | head -n 1)
```
This picks the first BAT device and ignores the rest, so `percentage`, `state`, `time`, `rate`, and `size` all describe only BAT0.
## Suggested fix
Use UPower's `DisplayDevice` (which already aggregates all batteries) for percentage/state/time/rate/size, or sum `energy_now`/`energy_full` across all `BAT*` devices, e.g.:
```bash
battery=$(upower -e 2>/dev/null | grep -m1 DisplayDevice)
```
(Per-device details like cycle count and charge thresholds can still come from the first BAT.)
## Expected behavior
Panel percentage matches the icon and the true combined charge (37.5% in the example above), and low-battery warnings reflect the real remaining capacity.
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.