account arrowhead-down arrowhead-up mobile-menu search sm-bold-x x-skinny-rounded x-skinny arrowhead-right social-facebook social-googleplus social-instagram social-linkedin social-pinterest social-qzone social-renren social-tencent social-twitter social-vkontakt social-weibo social-youku social-youtube

Please help us improve our website

Take our customer survey to evaluate your visit.

It should only take a few minutes to answer five quick questions. Just click the Launch survey button at the end of your visit to begin.

cancel
Showing results for 
Search instead for 
Did you mean: 
Welcome to the Theme Creator forum. 

If you have a question, search the forum to see if the answer is already available, or post your question or comment in a new thread.

Bug with chg-pwr-serivice using non-stock PD chargers on xperia 1

Highlighted
One time poster
Message 1 of 1
583 Views
Message 1 of 1

Bug with chg-pwr-serivice using non-stock PD chargers on xperia 1

Hey I've got xperia 1 played around and discovered a bug.

It's a problem with the phone's PD charging voltage selection stratagy.

I noticed when I'm using a non-stock PD charger (stock PD charger is fine), the phone select voltage between 5V and 9V very frequently (1 second raise up and then push down). And AICL is running again and again which slows down the charging process, and maybe harmful to both the device and the charger.

I tracked down the problem and found this is controlled by a bin in /vendor/bin/chg-pwr-service. Unfotunately it is not in open source range, I dissassembled it and try to understand its behaviour, here is part of it which I found related:

else if ( usb_in_current_now >= CHG_PWR_ICL - decrease_voltage_threshold )
{
sub_2A9C(
(__int64)"keep the current voltage.\n",
v251,
v252,
v253,
v254,
v255,
v256,
v257,
v276);
}
else
{
sub_2A9C(
(__int64)"decrease voltage if possible.\n",
v251,
v252,
v253,
v254,
v255,
v256,
v257,
v276);

  This part of logic decreases the PDO if current from usb is below CHG_PWR_ICL a certain value, which is come from a config file /vendor/etc/chg-pwr-service.cfg, which is 500000 (500mA). I edited this value up and it stablized at 9V. Also, I don't think this kind of stratagy makes sense. Reducing to a relatively low voltage definitely increases efficiency but it SHOULD CHECK IF THE LOW VOLTAGE PDO DOES HAS DESIRED POWER.  Now the workaround is to edit that value to 5000000 so it will never come back to 5V until charge completes. I understand the stock charger has 7V PDO and this prevents the problem from happenning, but all PD chargers should be compliant, now the problem occurrs with almost all the PD charger I have except the stock one.

 

  Example for the failed charger: Apple PD 87W.

 

  Hope this helps improving the product, or it's my mistake. Keep in contact, waiting for hennji.