iPad 6: no charging with a nearly empty battery

Aperta
#337 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
linux
Ambito
embedded-iot

Direzione di ricerca

Start by reading the D2365 driver paths that access registers 0x189, 0x18a and 0xa00-0xa03; the issue does not name their file. When the battery is nearly empty, capture those registers and battery current every 5 seconds, including after moving to a wall adapter, using i2ctransfer or a driver debug read. Compare the readings with iOS behavior near empty to identify what charging behavior needs investigation.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

What happens

An iPad 6 (J71b) running Orchard with a nearly empty battery does not charge. The battery keeps losing charge on every power source, including a wall adapter and a Mac USB-C port that both charged it correctly during bring-up. In iPadOS the same iPad charges normally on the same adapter.

Readings at 0 % (Mac USB-C port):

Discharging cap=0% V=3653000 I=-132000 online=1 limit=1500000 type=[C]
Discharging cap=0% V=3643000 I=-279000 online=1 limit=1500000 type=[C]

The battery lost 130-900 mA depending on screen activity, and its voltage dropped from 3.75 V to 3.64 V within minutes. The gauge reported health "Dead", which is its low-charge flag (SOC1/SOCF), not a fault.

What works

The same kernel (7.3.0-rc1-orchard-apple-16k) charges at 37 % on a Mac port: +665 mA, limit 2.4 A. It keeps charging after three suspend/wake cycles (RTC wake after 15 s). Every wake kept the 2.4 A grant.

What is ruled out

  • The input limit: the driver reads back each write to the D2365 input-limit register (0xa03) and checks it every second. 1.5 A really was in the chip at 0 %. "battery outside the charging window" was not logged, so the 500 mA fallback was not used.
  • Sleep: see above. The 25 s sleep loop at empty battery (fixed in omarchy-a#145) was not what stopped charging.
  • Register layout: the D2207/D2089/D2355 refactors kept the D2365 addresses (connection 0x189, charger state 0x18a, input limit 0xa03).

What is left

Charging stops only with a nearly empty battery. The likely cause is that the D2365 behaves differently near empty (charger state, precharge or safety timer) and the driver does not do what iOS's AppleD2365PMUPowerSource / AppleARMPMUCharger do there.

Next step

When the battery is next low, log the charger state register 0x18a (bits 1:0 charging, bit 2 charge end, bit 4 timeout), 0x189 and 0xa00-0xa03, along with the battery current, every 5 s. Keep logging after moving the iPad to a wall adapter. All of this is read-only. The PMIC's regmap debugfs registers file returns nothing for these registers on this kernel, so the read needs i2ctransfer (i2c-tools, not in the image) or a debug read in the driver. Then compare with what iOS does near empty.

Lingua principale
Python
Stelle
102
Fork
27
Merge medio
10h 43m
PR unite (30g)
293

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di OrchardLinux/orchard

Tutte le issue di OrchardLinux/orchard

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.