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 only the first battery on multi-battery machines
Reported by xbones84 · filed Sep 15, 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
What happened
omarchy-battery-status reports on a single battery pack, so on machines with
more than one battery the power panel's text shows the state of whichever packupower -e lists first rather than the state of the machine.
The selection is here:
battery=$(upower -e 2>/dev/null | grep BAT | head -n 1)head -n 1 picks BAT1. On a Surface Book 2 that is the small tablet battery
(23.2 Wh design), not the 62.2 Wh base battery that supplies most of the
runtime. The SB2 also drains the base first and leaves the tablet pack parked,
so the pack that gets reported is typically the one sitting at a flat
percentage with power_now = 0 for hours.
The cycle_count and charge-threshold fallbacks have the same issue:
cycles=$(cat "$power_supply_path"/BAT*/cycle_count 2>/dev/null | head -1)What was expected
The figures in the power panel should describe the whole machine, and should
agree with the bar icon.
They currently don't, because the QML and the shell script disagree about the
data source. panels/power/Panel.qml reads UPower.displayDevice — UPower's
aggregate device, which sums energy across packs and is correct — for the
icon, batteryFraction, and the low-battery warning inservices/battery/Service.qml. Only the panel's text comes fromomarchy-battery-status.
The visible result is that the panel's hero percentage (Panel.qml:375,
from the script) and the progress bar directly beneath it (Panel.qml:408,
from batteryFraction) show two different numbers at the same time.
Steps to reproduce
On any machine with two batteries of different capacities:
- Unplug AC and let the machine discharge.
- Open the power panel.
- The large percentage and the progress bar fill disagree; "Battery size"
shows one pack's capacity; rate and time-remaining may be 0W and blank.
Observed on this machine while discharging at ~15 W:
$ upower -e | grep BAT
/org/freedesktop/UPower/devices/battery_BAT1
/org/freedesktop/UPower/devices/battery_BAT2
$ omarchy-battery-status --shell
percentage 80% # aggregate is 70.6%
state pending-charge # machine is discharging
rate 0W # actual draw 15.68 W
size 19Wh # actual pack 72.81 Wh
time # blank; actual ~3.3 h
cycles 86 # BAT1 only; BAT2 is at 129
$ omarchy-battery-status
Battery 80% · left · 0W / 19Whagainst the kernel's own numbers:
BAT1 tablet 19.72 Wh full (23.2 design) 80% 0 W 86 cycles
BAT2 base 53.09 Wh full (62.2 design) 68% 14.66 W 129 cycles
aggregate: 51.37 / 72.81 Wh = 70.6% draw 15.68 W ~3.3 h leftand against UPower's aggregate device, which the bar icon already uses:
$ upower -i /org/freedesktop/UPower/devices/DisplayDevice
state: discharging
energy: 51.85 Wh
energy-full: 72.81 Wh
energy-rate: 15.612 W
time to empty: 3.3 hours
percentage: 71.2127%Severity
Cosmetic rather than dangerous: the low-battery notification and the bar icon
both use UPower.displayDevice, so there's no risk of a surprise shutdown.
But every number in the panel text is wrong on this hardware, and it reads as
a frozen battery stuck at one percentage drawing 0 W.
Suggested fix
Sum across every present pack instead of selecting one. Reading power_now
from sysfs per pack and adding them preserves the existing trick of keeping
the rate instantaneous where UPower's energy-rate lags, andUPower.displayDevice can supply the aggregate state directly.
Worth handling in the same pass:
- packs that expose
charge_*(uAh) +voltage_nowrather thanenergy_* - a pack disappearing at runtime (the SB2 base detaches)
- reporting each pack's
cycle_count, since they age at different rates
I have a working local version doing this; happy to open a PR if useful.
System details
- Omarchy 4.0.3-1
- Microsoft Surface Book 2
- Intel Core i7-8650U / UHD Graphics 620 + GeForce GTX 1060 Mobile
- Kernel 7.2.3-arch1-3
- UPower 1.91.3
View raw text
## What happened
`omarchy-battery-status` reports on a single battery pack, so on machines with
more than one battery the power panel's text shows the state of whichever pack
`upower -e` lists first rather than the state of the machine.
The selection is here:
```bash
battery=$(upower -e 2>/dev/null | grep BAT | head -n 1)
```
`head -n 1` picks `BAT1`. On a Surface Book 2 that is the small tablet battery
(23.2 Wh design), not the 62.2 Wh base battery that supplies most of the
runtime. The SB2 also drains the base first and leaves the tablet pack parked,
so the pack that gets reported is typically the one sitting at a flat
percentage with `power_now` = 0 for hours.
The `cycle_count` and charge-threshold fallbacks have the same issue:
```bash
cycles=$(cat "$power_supply_path"/BAT*/cycle_count 2>/dev/null | head -1)
```
## What was expected
The figures in the power panel should describe the whole machine, and should
agree with the bar icon.
They currently don't, because the QML and the shell script disagree about the
data source. `panels/power/Panel.qml` reads `UPower.displayDevice` — UPower's
aggregate device, which sums energy across packs and is correct — for the
icon, `batteryFraction`, and the low-battery warning in
`services/battery/Service.qml`. Only the panel's *text* comes from
`omarchy-battery-status`.
The visible result is that the panel's hero percentage (`Panel.qml:375`,
from the script) and the progress bar directly beneath it (`Panel.qml:408`,
from `batteryFraction`) show two different numbers at the same time.
## Steps to reproduce
On any machine with two batteries of different capacities:
1. Unplug AC and let the machine discharge.
2. Open the power panel.
3. The large percentage and the progress bar fill disagree; "Battery size"
shows one pack's capacity; rate and time-remaining may be `0W` and blank.
Observed on this machine while discharging at ~15 W:
```
$ upower -e | grep BAT
/org/freedesktop/UPower/devices/battery_BAT1
/org/freedesktop/UPower/devices/battery_BAT2
$ omarchy-battery-status --shell
percentage 80% # aggregate is 70.6%
state pending-charge # machine is discharging
rate 0W # actual draw 15.68 W
size 19Wh # actual pack 72.81 Wh
time # blank; actual ~3.3 h
cycles 86 # BAT1 only; BAT2 is at 129
$ omarchy-battery-status
Battery 80% · left · 0W / 19Wh
```
against the kernel's own numbers:
```
BAT1 tablet 19.72 Wh full (23.2 design) 80% 0 W 86 cycles
BAT2 base 53.09 Wh full (62.2 design) 68% 14.66 W 129 cycles
aggregate: 51.37 / 72.81 Wh = 70.6% draw 15.68 W ~3.3 h left
```
and against UPower's aggregate device, which the bar icon already uses:
```
$ upower -i /org/freedesktop/UPower/devices/DisplayDevice
state: discharging
energy: 51.85 Wh
energy-full: 72.81 Wh
energy-rate: 15.612 W
time to empty: 3.3 hours
percentage: 71.2127%
```
## Severity
Cosmetic rather than dangerous: the low-battery notification and the bar icon
both use `UPower.displayDevice`, so there's no risk of a surprise shutdown.
But every number in the panel text is wrong on this hardware, and it reads as
a frozen battery stuck at one percentage drawing 0 W.
## Suggested fix
Sum across every present pack instead of selecting one. Reading `power_now`
from sysfs per pack and adding them preserves the existing trick of keeping
the rate instantaneous where UPower's `energy-rate` lags, and
`UPower.displayDevice` can supply the aggregate state directly.
Worth handling in the same pass:
- packs that expose `charge_*` (uAh) + `voltage_now` rather than `energy_*`
- a pack disappearing at runtime (the SB2 base detaches)
- reporting each pack's `cycle_count`, since they age at different rates
I have a working local version doing this; happy to open a PR if useful.
## System details
- Omarchy 4.0.3-1
- Microsoft Surface Book 2
- Intel Core i7-8650U / UHD Graphics 620 + GeForce GTX 1060 Mobile
- Kernel 7.2.3-arch1-3
- UPower 1.91.3
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.