Power panel reports dead BAT0 (0% / 0W / Holding) on dual-battery ThinkPads
System details
- Omarchy 4.0.0-1
- Lenovo ThinkPad T460s (
20FN002KUS) - Dual battery: internal BAT0 (Sony 45N1111) + slice BAT1 (Sanyo 45N1775)
What's wrong?
The power widget reports 0% / 0W / Holding at 75–80% while the machine is actually charging the working pack at 99% / 2.2W / ~3 minutes to full.
This is the dual-battery head -n 1 bug (#6885, #7214, #7897), plus a second failure that DisplayDevice-based fixes do not cover: BAT0 is present but electrically dead (0 V, 0 Wh, pending-charge). UPower still counts its energy-full in the composite device, so DisplayDevice says ~49% and ~10 hours to full.
Evidence
$ upower -e | grep BAT
/org/freedesktop/UPower/devices/battery_BAT0
/org/freedesktop/UPower/devices/battery_BAT1
BAT0: present, 0 V, 0 Wh, 0%, pending-charge, energy-full 20.65 Wh
BAT1: charging, 12.3 V, 20.4 Wh, 99%, 2.2 W, ~3 min to full, energy-full 20.94 Wh
DisplayDevice: 49%, charging, 2.2 W, ~10 hours to full, energy-full 41.59 Wh
$ omarchy-battery-status --shell # packaged
percentage 0%
state holding
rate 0W
size 20Wh
Root cause in bin/omarchy-battery-status:
battery=$(upower -e 2>/dev/null | grep BAT | head -n 1)
Always BAT0. pending-charge on AC is treated as a charge-threshold hold. The panel icon uses UPower.displayDevice (49%), so the glyph and the numbers disagree, and both are wrong relative to the live pack.
Related PRs (#7138, #6845, #7186) switch to DisplayDevice or sum every present BAT*. On this hardware that still reports 49% / 41 Wh / 10 hours, because the dead cell's energy-full stays in the denominator.
What was expected
Follow packs that actually hold a charge (non-zero voltage/energy/current). Here that is BAT1: 99%, charging, 2.2W, 20Wh, 3m to full.
A healthy empty cell still shows voltage, so a real 0% pack is not dropped.
Steps to reproduce
- Dual-battery ThinkPad whose internal pack is present but at 0 V / 0 Wh.
- Open the power panel from the bar.
- Compare with
upower -ion BAT1 vs DisplayDevice vsomarchy-battery-status --shell.
Upstream note: the root cause here lives one layer below Omarchy. UPower's composite DisplayDevice sums every present pack's advertised energy-full, so a dead pack reporting 0V / 0Wh stored but its old energy_full poisons the denominator for every client (Omarchy panel, GNOME, KDE) — 20.65Wh corpse + 20.94Wh live pack near full reads as 49% / 9.6h-to-full. Omarchy can only work around it client-side (liveness split + rebuild, see #12789 stacked on #10392), which every desktop then reimplements badly.
The durable fix belongs at gitlab.freedesktop.org/upower/upower: exclude electrically-dead packs from the DisplayDevice EnergyFull denominator (no voltage, no stored energy, no current — never energy_full itself), and/or expose thresholds/cycles/source-pack list on DisplayDevice. There is prior art to check first: upstream issue #136 (DisplayDevice dropping to 0/1%) and branch wip/percentage-greater-100 (DisplayDevice % for invalid data).
I don't have a freedesktop GitLab account — would someone who does (cc @hilather @geirolafs) be willing to file it with the T460s upower -d dumps? Happy to provide the repro numbers and proposed predicate. LLM-assisted drafting disclosure: this comment was drafted with tool assistance and reviewed by me before posting.
My T480's internal pack died and I've pulled it, so it's running on the rear battery (BAT1) alone. With one pack, neither bug shows up, so I can't reproduce this. A replacement isn't coming soon either: I live in the middle of the Atlantic, where a loose lithium battery is apparently a serious hazard to ship, but the very same battery inside a laptop is totally fine.
I don't think I should file upstream either, since I couldn't answer maintainer follow-ups. You don't need a separate account though: gitlab.freedesktop.org lets you sign in with GitHub.
I checked this against the current quattro source. Nothing was run on hardware, because no worker has two batteries.
The script side is confirmed in source. bin/omarchy-battery-status:21 takes upower -e | grep BAT | head -n 1, which is always BAT0. On AC with a charge threshold set, BAT0's pending-charge state is reported as holding (bin/omarchy-battery-status:89-91). The size and cycles lines also read only the first pack. The bar glyph and the power panel read UPower.displayDevice instead (shell/plugins/services/battery/Service.qml:25, shell/plugins/panels/power/Panel.qml:29), so they show UPower's composite 49%, which still counts the dead pack's energy-full.
Two open pull requests cover the script:
- #10392 makes the script use DisplayDevice when there is more than one pack. That fixes the
head -n 1part, which #6885 also reports. On this hardware it would still show 49% and about ten hours to full. - #12789, a draft stacked on #10392, already says it fixes this issue. It leaves out packs with no voltage, stored energy or current, and rebuilds percentage, capacity and time from the live packs. Its test uses the numbers from this report. It will be reviewed and run on a worker as its own item.
Neither pull request changes the QML side. Even with both merged, the glyph and panel would still show DisplayDevice's 49% on this machine. Closed #7917 was the earlier attempt at that.
This is not a duplicate of #6885: that one is only the first-battery bug, and the dead-pack denominator is separate.
This was reviewed by Claude Opus 5.5 alone. Codex Medium answered the availability check, but no second opinion ran because today's review budget was used up. This now waits on the maintainer to decide on #10392 and #12789, and on whether the panel should get the same live-pack treatment.
I tested it on my T470s and it worked pretty well. More accurate than #10392
I rechecked quattro at c6be7abb9 and the linked fixes. The script still stops at the first battery marked power supply: yes (bin/omarchy-battery-status:44-52). The report does not show BAT0’s power supply field, so that detail needs confirming on the current system.
There is also a separate reason the panel can say “Holding”: shell/plugins/panels/power/Model.js:67 treats a charging device with an estimate of at least eight hours as held at a charge limit, once the initial charge-rate settling period ends. The reported DisplayDevice estimate of about ten hours meets that condition. A script-only fix leaves this panel path in place.
Since the earlier issue review, #15204 has added a candidate covering both the script and the panel’s icon/progress source when only one pack holds charge. It already links this issue. #12789 remains a script-only candidate and currently conflicts with quattro; its outstanding review findings are recorded there. Neither candidate changes the low-battery service’s use of DisplayDevice. No additional fix PR was opened here.
@naco-siren, please add the PR number and full commit tested, and whether your T470s had a present pack reporting 0 V and 0 Wh. The final head taken forward will still need confirmation from @hilather or a maintainer, with omarchy-battery-status --shell and unabridged upower -i output for BAT0, BAT1 and DisplayDevice.
This was source review only: no hardware reproduction, tests or screenshots were run in this session. GPT-6 in Codex (effort not exposed) reviewed it with Opus 5.5 High and muse-wonder via pi (thinking high). Opus identified the separate eight-hour Holding path; muse-wonder agreed with the broader assessment, whose independence is not guaranteed. The issue remains open, waiting on the maintainer to coordinate the existing fixes.