maemo-leste / bugtracker

Issue tracking repository
62 stars 3 forks source link

Droid 4 Charging Issue #740

Open ekoninsp opened 1 month ago

ekoninsp commented 1 month ago

Dear Team, last week I powered my old Droid 4 and bring as my daily driver for few days.. I realized that my battery drain too fast (and after several calibrations). After checking and manually charge with external charger. i know that my battery is OK, then I found in : "/sys/class/power-supply/battery/voltage_max_design" value is 4200000 that mean on droid4 leste never charging exceed 4.2v right? (which means my battery never get full charged on leste).

as we know Droid 4 using 4.35v as charging voltage (full charged), like most recent mobile phone battery (CMIIW) because after some searching I found this : https://www.kernelconfig.io/config_battery_cpcap Battery driver for Droid 4 (voltage_max_design=4.35v) : https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/drivers/power/supply/cpcap-battery.c?h=v6.8.10 (ctrl+f -> Droid 4)

when I check kernel config on /boot : CONFIG_BATTERY_CPCAP = m (not "y"), is the problem here? I can not change /sys/class/power-supply/battery/voltage_max_design, since it was read only file system, maybe related with sysfs or dtb file (not sure). Do I have to recompile myself kernel? or apply a patch, I found there are some mod kernels that allow the user to change the sysfs.

IMbackK commented 1 month ago

Yes the default d4 battery (eb41) is a hvlipo type with a charge endpoint of 4.35. We reduced the default charge voltage to 4.2 due to the batteries being very degraded and some of them puffing up at 4.35 (altho personally i think this was an overraction)

anyhow you are supposed to be able to increase this by increasing /sys/class/power_supply/usb/constant_charge_voltage, however the fact that voltage_max_design is 4.2 on your device suggests something is wrong and you cannot increase the constant_charge_voltage in this case.

The device reads the maximum charge voltage from the nvmem in the battery this nvmem is located at /sys/bus/w1/devices/89-/89-/nvmem. if you dont have this file then for some reason the nvmem on your devices battery cannot be read.

Overall i do think you are barking (mostly) up the wrong tree here. The amount of capacity in a hvlipo above 4.2v is very small charging to 4.35 will only yield a very small increase in battery life. I dont know what "drains to fast" means to you but i would suggest that the unsatisfactory battery life is a result of a combination of these factors:

1. its very easy to break idle on leste, many applications, when open, or daemons when installed essentially distroy the battery life. you can check if you device idles ok by doing "sleep 20; cat /sys/class/power_supply/battery/power_avg" a value over 150000 indicates your device is not sleeping correctly.

2. Your battery is severly degraded. The last eb41 was manufactured in 2014, all of them have lost at least about half thair origial capacity at this point. the only remidy to this is buying a new cell (one from a polarcell BL-T5 is a good choice) and replaceing the eb41 cell with that

3. Your are expecting too mutch. At this point only RET works, but the d4 has another low power state (OFF) that is not used at all atm. Android uses this state and gets its power usage down to around 20mW when nothing is going on. leste can do at best 100mW, this is enough to idle around 2 days with some light usage, but not more, and any usage drops that down fast.

ekoninsp commented 1 month ago

Ok. Many Thank @IMbackK for your Reply.. I'll note it.

so the true story, I have already replace the battery with LG K7(if i not wrong) which on the label 3.85v 3000mah, that mean full charged voltage at 4.35 (cause i think it has the same spec with EB41).. after 1 or 2 calibration I only got about 800mah (which is to low right?), but when take it out and charge it with external charger into 4.35v and put it back i got around 2000++mah. that's why I concluded the battery was not fully charged. But based on your explanation maybe there is a possibility problem with the battery it self or also compatibility with droid4.. I will try further..

~regards

IMbackK commented 1 month ago

that is way to low. cpcap is pretty sesitive to battery internal resistance, if you have a too long lead it could make it think the battery is full/empty to early for calibration purposes