feat(doctor): battery health readout (#80)
Some checks failed
Check / eval (push) Has been cancelled
Some checks failed
Check / eval (push) Has been cancelled
Report-only cycle_count + retained capacity (charge_* or energy_*) as % of design on system batteries; soft warn below 70% of design; skip when attrs missing. NOMARCHY_POWER_SUPPLY_ROOT for the checks.doctor fixture (test_power has no cycle/design attrs). Verified: V2 — nix flake check --no-build; checks.doctor green (fake BAT0 cycles/% + Device-scope ignore); local BAT0 smoke (energy_*).
This commit is contained in:
@@ -378,11 +378,10 @@ For contributors (and power users who will PR):
|
||||
## 10. Doctor and hardware health (current vs target)
|
||||
|
||||
**Today** (`nomarchy-doctor`): failed units, disk space, theme-state
|
||||
validity/git, generation age, snapper timer. **No** Wi‑Fi, GPU, fwupd,
|
||||
or fingerprint checks.
|
||||
|
||||
**Target checks** (queued, all read-only, each failure prints one fix
|
||||
command — same doctor contract):
|
||||
validity/git, generation age, snapper; hardware section self-gates per
|
||||
machine (NetworkManager, audio sink, GPU smoke, fprintd, fwupd, charge
|
||||
limit, battery health, hibernate/zram). All read-only; each ✖ prints one
|
||||
fix command.
|
||||
|
||||
| Check | Pass condition | Suggested fix line |
|
||||
|-------|----------------|--------------------|
|
||||
@@ -391,7 +390,9 @@ command — same doctor contract):
|
||||
| GPU accel | `glxinfo`/`vainfo` smoke (if installed) | check `hardwareProfile` / drivers |
|
||||
| Fingerprint | if USB VID matched / fprintd unit | `fprintd-enroll` or enable option |
|
||||
| fwupd | daemon active; optional “updates pending” warn | `fwupdmgr get-updates` |
|
||||
| Battery threshold | if laptop + limit set, sysfs writable | power docs |
|
||||
| Battery threshold | if laptop + limit set, sysfs reports it | power docs / restart charge-limit unit |
|
||||
| Battery health | cycle_count and/or charge\|energy_full÷design % when sysfs exports them | report-only (warn if <70% of design) |
|
||||
| Hibernate / zram | disk swap + resume=; zram active | docs/MIGRATION.md → Enabling hibernation |
|
||||
|
||||
## 11. Option quick reference
|
||||
|
||||
|
||||
Reference in New Issue
Block a user