I've noticed a lot of posts on the subreddit recently complaining about lag when under a claimed particular battery percentage. This will explain the functional reason and allow some insight into perhaps modification using root.
I got my A7 new only a few months ago so my battery hasn't degraded enough to have the issue yet. I did notice the lagging symptom before I ran my battery flat recently. I've got an interest in battery life after modding around on my last device a Sony Z3C and since then the A7 too.
From experience I know /sys/class/power_supply/bms/device/v_cutoff_uv 3200000 is the voltage threshold at which my Z3C shuts down. Battery configuration varies a lot by models, the A7 lacks this writable file.
On the A7 I found these related writable files in /sys/class/power_supply/bcl/device/
high_threshold_ua 4200000
low_threshold_ua 3400000
vph_high_thresh_uv 35000000
vph_low_thresh_uv 3300000
Google search provides this generic related documentation. The initial description paragraphs translated in lay terms describes a CPU throttling function based on battery voltage and current load limits. https://android.googlesource.com/ke...mentation/devicetree/bindings/arm/msm/bcl.txt
Of direct interest is "vph-low-threshold-uv: The battery voltage threshold below which the BCL driver starts monitoring the battery current thresholds and mitigates the CPU on the event of high load."
Also "vph-high-threshold-uv: The battery voltage threshold above which the BCL driver clears the previously applied mitigation, disables the battery current monitoring, and starts monitoring for low battery voltage."
The "-threshold-uamp" descriptions don't match the A7's provided values of seemingly voltage rather than micro amps. Assuming they're voltages of 4.2 and 3.4 but I can't guess how they take effect.
What this means for those with slowed devices under a particular percentage, check your battery voltage to see if this is the cause using a battery app or something like DevCheck. BMS State of Charge fuel gauge percentage is a varying arbitrary number influenced by numerous functions and algorithms, in other words it's a meaningless number to troubleshoot. If your battery voltage is under 3.3V at something like 50%, your battery is severely degraded and the fuel gauge is completely off, you could perhaps try setting /sys/module/qpnp_fg/parameters/restart 1 (it will restart fuel gauge calibration and the setting will automatically go back to 0). Alternatively we could try to disable the Battery Current Limit but I suspect the purpose of it is to prevent Nexus 6P style sudden early shutdowns which require an external charger to jump start them again. In any case at least this info will help those diagnose why and how degraded their battery is.
I got my A7 new only a few months ago so my battery hasn't degraded enough to have the issue yet. I did notice the lagging symptom before I ran my battery flat recently. I've got an interest in battery life after modding around on my last device a Sony Z3C and since then the A7 too.
From experience I know /sys/class/power_supply/bms/device/v_cutoff_uv 3200000 is the voltage threshold at which my Z3C shuts down. Battery configuration varies a lot by models, the A7 lacks this writable file.
On the A7 I found these related writable files in /sys/class/power_supply/bcl/device/
high_threshold_ua 4200000
low_threshold_ua 3400000
vph_high_thresh_uv 35000000
vph_low_thresh_uv 3300000
Google search provides this generic related documentation. The initial description paragraphs translated in lay terms describes a CPU throttling function based on battery voltage and current load limits. https://android.googlesource.com/ke...mentation/devicetree/bindings/arm/msm/bcl.txt
Of direct interest is "vph-low-threshold-uv: The battery voltage threshold below which the BCL driver starts monitoring the battery current thresholds and mitigates the CPU on the event of high load."
Also "vph-high-threshold-uv: The battery voltage threshold above which the BCL driver clears the previously applied mitigation, disables the battery current monitoring, and starts monitoring for low battery voltage."
The "-threshold-uamp" descriptions don't match the A7's provided values of seemingly voltage rather than micro amps. Assuming they're voltages of 4.2 and 3.4 but I can't guess how they take effect.
What this means for those with slowed devices under a particular percentage, check your battery voltage to see if this is the cause using a battery app or something like DevCheck. BMS State of Charge fuel gauge percentage is a varying arbitrary number influenced by numerous functions and algorithms, in other words it's a meaningless number to troubleshoot. If your battery voltage is under 3.3V at something like 50%, your battery is severely degraded and the fuel gauge is completely off, you could perhaps try setting /sys/module/qpnp_fg/parameters/restart 1 (it will restart fuel gauge calibration and the setting will automatically go back to 0). Alternatively we could try to disable the Battery Current Limit but I suspect the purpose of it is to prevent Nexus 6P style sudden early shutdowns which require an external charger to jump start them again. In any case at least this info will help those diagnose why and how degraded their battery is.
Last edited: