Sometimes my L5 does not start charging on plugin of the original power supply, also turning the plug does not help or trying it a few times. I don’t think that it is an contact problem because it starts charging being rebooted. What could I do without rebooting?
What’s the battery percentage?
I can’t remember the exact value, but it must have been below 50% because I was out for 4 hours.
What does “sometimes” mean more precisely? Do you see any pattern? What do you do to actually make it charge? Do you have to just reboot, or do you unplug the cable, reboot and then plug it again?
“sometimes” means once a month, more or less. Can’t see any pattern and normally I reboot and after it plugin the cable. I will gather better information from now.
My question was more: can I push the charging from shell w/o reboot?
Hard to tell without knowing why it doesn’t charge in the first place.
Last night I have had another such case. The battery level was around 30% and I tested two original power supplies (I have two L5). None worked. Then I did a reboot (without the power supply plugged in) and after this charging started as usual.
An output of tail -n+0 /sys/class/power_supply/*/uevent
gathered when plugged in but not charging could tell something more.
had that happen to me once in two weeks, it was a little scary. i think the red charging light did not turn on when plugging in the charger.
reboot fixed the issue. the following likely wont show it since it has been a week:
==> /sys/class/power_supply/bq25890-charger/uevent <==
POWER_SUPPLY_NAME=bq25890-charger
POWER_SUPPLY_TYPE=USB
POWER_SUPPLY_MANUFACTURER=Texas Instruments
POWER_SUPPLY_MODEL_NAME=BQ25895
POWER_SUPPLY_STATUS=Charging
POWER_SUPPLY_CHARGE_TYPE=Fast
POWER_SUPPLY_ONLINE=1
POWER_SUPPLY_HEALTH=Good
POWER_SUPPLY_CONSTANT_CHARGE_CURRENT_MAX=1472000
POWER_SUPPLY_CONSTANT_CHARGE_VOLTAGE=3924000
POWER_SUPPLY_CONSTANT_CHARGE_VOLTAGE_MAX=4208000
POWER_SUPPLY_PRECHARGE_CURRENT=128000
POWER_SUPPLY_CHARGE_TERM_CURRENT=128000
POWER_SUPPLY_INPUT_CURRENT_LIMIT=1500000
POWER_SUPPLY_VOLTAGE_NOW=3904000
POWER_SUPPLY_CURRENT_NOW=-700000
POWER_SUPPLY_TEMP=410
==> /sys/class/power_supply/max170xx_battery/uevent <==
POWER_SUPPLY_NAME=max170xx_battery
POWER_SUPPLY_TYPE=Battery
POWER_SUPPLY_STATUS=Unknown
POWER_SUPPLY_PRESENT=1
POWER_SUPPLY_TECHNOLOGY=Li-ion
POWER_SUPPLY_CYCLE_COUNT=37
POWER_SUPPLY_VOLTAGE_MAX=3940000
POWER_SUPPLY_VOLTAGE_MIN=3360000
POWER_SUPPLY_VOLTAGE_MIN_DESIGN=3300000
POWER_SUPPLY_VOLTAGE_NOW=3906875
POWER_SUPPLY_VOLTAGE_AVG=3926562
POWER_SUPPLY_VOLTAGE_OCV=3772500
POWER_SUPPLY_CAPACITY=30
POWER_SUPPLY_CHARGE_FULL_DESIGN=4199160
POWER_SUPPLY_CHARGE_FULL=4199160
POWER_SUPPLY_CHARGE_NOW=1271745
POWER_SUPPLY_CHARGE_COUNTER=-1028794
POWER_SUPPLY_CHARGE_TERM_CURRENT=159343
POWER_SUPPLY_TEMP=467
POWER_SUPPLY_TEMP_ALERT_MIN=-1280
POWER_SUPPLY_TEMP_ALERT_MAX=1270
POWER_SUPPLY_TEMP_MIN=-2147483648
POWER_SUPPLY_TEMP_MAX=700
POWER_SUPPLY_HEALTH=Good
POWER_SUPPLY_SCOPE=System
POWER_SUPPLY_TIME_TO_EMPTY_NOW=368634
POWER_SUPPLY_CURRENT_NOW=716106
POWER_SUPPLY_CURRENT_AVG=867014
==> /sys/class/power_supply/tps6598x-source-psy-0-003f/uevent <==
POWER_SUPPLY_NAME=tps6598x-source-psy-0-003f
POWER_SUPPLY_TYPE=USB
POWER_SUPPLY_USB_TYPE=[C] PD
POWER_SUPPLY_ONLINE=1
POWER_SUPPLY_PRESENT=1
POWER_SUPPLY_CURRENT_MAX=1500000
POWER_SUPPLY_VOLTAGE_MAX=5000000
Yeah, there’s no point in checking that when things work fine
There are a few reasons why charging may stop working until a reboot that come to my mind, and checking this command’s output while in that state could point us to which one is it.
@dos caught it:
Whats happening:
- phone doesnt charge on charger and cable with or without PD,
- phone lock shows solid red LED indicating charging but it isnt charging,
- battery status indicator shows no charging or usb cable being plugged in while it is definately plugged in,
- phone knows when usb is unplugged because sound over headphones disrupts briefly,
Below output with cable plugged in:
==> /sys/class/power_supply/bq25890-charger/uevent <==
POWER_SUPPLY_NAME=bq25890-charger
POWER_SUPPLY_TYPE=USB
POWER_SUPPLY_MANUFACTURER=Texas Instruments
POWER_SUPPLY_MODEL_NAME=BQ25895
POWER_SUPPLY_STATUS=Charging
POWER_SUPPLY_CHARGE_TYPE=Fast
POWER_SUPPLY_ONLINE=1
POWER_SUPPLY_HEALTH=Good
POWER_SUPPLY_CONSTANT_CHARGE_CURRENT_MAX=1472000
POWER_SUPPLY_CONSTANT_CHARGE_VOLTAGE=3784000
POWER_SUPPLY_CONSTANT_CHARGE_VOLTAGE_MAX=4208000
POWER_SUPPLY_PRECHARGE_CURRENT=128000
POWER_SUPPLY_CHARGE_TERM_CURRENT=128000
POWER_SUPPLY_INPUT_CURRENT_LIMIT=500000
POWER_SUPPLY_VOLTAGE_NOW=3744000
POWER_SUPPLY_CURRENT_NOW=0
POWER_SUPPLY_TEMP=340
==> /sys/class/power_supply/max170xx_battery/uevent <==
POWER_SUPPLY_NAME=max170xx_battery
POWER_SUPPLY_TYPE=Battery
POWER_SUPPLY_STATUS=Unknown
POWER_SUPPLY_PRESENT=1
POWER_SUPPLY_TECHNOLOGY=Li-ion
POWER_SUPPLY_CYCLE_COUNT=74
POWER_SUPPLY_VOLTAGE_MAX=4200000
POWER_SUPPLY_VOLTAGE_MIN=3440000
POWER_SUPPLY_VOLTAGE_MIN_DESIGN=3300000
POWER_SUPPLY_VOLTAGE_NOW=3786250
POWER_SUPPLY_VOLTAGE_AVG=3775859
POWER_SUPPLY_VOLTAGE_OCV=3827421
POWER_SUPPLY_CAPACITY=48
POWER_SUPPLY_CHARGE_FULL_DESIGN=4199160
POWER_SUPPLY_CHARGE_FULL=4511097
POWER_SUPPLY_CHARGE_NOW=2177564
POWER_SUPPLY_CHARGE_COUNTER=-1874625
POWER_SUPPLY_CHARGE_TERM_CURRENT=159343
POWER_SUPPLY_TEMP=375
POWER_SUPPLY_TEMP_ALERT_MIN=-1280
POWER_SUPPLY_TEMP_ALERT_MAX=1270
POWER_SUPPLY_TEMP_MIN=-2147483648
POWER_SUPPLY_TEMP_MAX=700
POWER_SUPPLY_HEALTH=Good
POWER_SUPPLY_SCOPE=System
POWER_SUPPLY_TIME_TO_EMPTY_NOW=28096
POWER_SUPPLY_CURRENT_NOW=-209958
POWER_SUPPLY_CURRENT_AVG=-275569
==> /sys/class/power_supply/tps6598x-source-psy-0-003f/uevent <==
POWER_SUPPLY_NAME=tps6598x-source-psy-0-003f
POWER_SUPPLY_TYPE=USB
POWER_SUPPLY_USB_TYPE=[C] PD
POWER_SUPPLY_ONLINE=0
POWER_SUPPLY_PRESENT=1
POWER_SUPPLY_CURRENT_MAX=500000
POWER_SUPPLY_VOLTAGE_MAX=5000000
Output with usb cable removed:
==> /sys/class/power_supply/bq25890-charger/uevent <==
POWER_SUPPLY_NAME=bq25890-charger
POWER_SUPPLY_TYPE=USB
POWER_SUPPLY_MANUFACTURER=Texas Instruments
POWER_SUPPLY_MODEL_NAME=BQ25895
POWER_SUPPLY_STATUS=Discharging
POWER_SUPPLY_CHARGE_TYPE=N/A
POWER_SUPPLY_ONLINE=0
POWER_SUPPLY_HEALTH=Good
POWER_SUPPLY_CONSTANT_CHARGE_CURRENT_MAX=1472000
POWER_SUPPLY_CONSTANT_CHARGE_VOLTAGE=0
POWER_SUPPLY_CONSTANT_CHARGE_VOLTAGE_MAX=4208000
POWER_SUPPLY_PRECHARGE_CURRENT=128000
POWER_SUPPLY_CHARGE_TERM_CURRENT=128000
POWER_SUPPLY_INPUT_CURRENT_LIMIT=500000
POWER_SUPPLY_CURRENT_NOW=0
==> /sys/class/power_supply/max170xx_battery/uevent <==
POWER_SUPPLY_NAME=max170xx_battery
POWER_SUPPLY_TYPE=Battery
POWER_SUPPLY_STATUS=Unknown
POWER_SUPPLY_PRESENT=1
POWER_SUPPLY_TECHNOLOGY=Li-ion
POWER_SUPPLY_CYCLE_COUNT=75
POWER_SUPPLY_VOLTAGE_MAX=4200000
POWER_SUPPLY_VOLTAGE_MIN=3440000
POWER_SUPPLY_VOLTAGE_MIN_DESIGN=3300000
POWER_SUPPLY_VOLTAGE_NOW=3690937
POWER_SUPPLY_VOLTAGE_AVG=3732890
POWER_SUPPLY_VOLTAGE_OCV=3818984
POWER_SUPPLY_CAPACITY=46
POWER_SUPPLY_CHARGE_FULL_DESIGN=4199160
POWER_SUPPLY_CHARGE_FULL=4511097
POWER_SUPPLY_CHARGE_NOW=2108578
POWER_SUPPLY_CHARGE_COUNTER=-1943611
POWER_SUPPLY_CHARGE_TERM_CURRENT=159343
POWER_SUPPLY_TEMP=403
POWER_SUPPLY_TEMP_ALERT_MIN=-1280
POWER_SUPPLY_TEMP_ALERT_MAX=1270
POWER_SUPPLY_TEMP_MIN=-2147483648
POWER_SUPPLY_TEMP_MAX=700
POWER_SUPPLY_HEALTH=Good
POWER_SUPPLY_SCOPE=System
POWER_SUPPLY_TIME_TO_EMPTY_NOW=11806
POWER_SUPPLY_CURRENT_NOW=-759223
POWER_SUPPLY_CURRENT_AVG=-634560
==> /sys/class/power_supply/tps6598x-source-psy-0-003f/uevent <==
POWER_SUPPLY_NAME=tps6598x-source-psy-0-003f
POWER_SUPPLY_TYPE=USB
POWER_SUPPLY_USB_TYPE=[C] PD
POWER_SUPPLY_ONLINE=0
POWER_SUPPLY_PRESENT=0
POWER_SUPPLY_CURRENT_MAX=500000
POWER_SUPPLY_VOLTAGE_MAX=5000000
OK wait tried a different PD cable and now charges, i know it charged before though using the cable in the above scenario, now when charging:
==> /sys/class/power_supply/bq25890-charger/uevent <==
POWER_SUPPLY_NAME=bq25890-charger
POWER_SUPPLY_TYPE=USB
POWER_SUPPLY_MANUFACTURER=Texas Instruments
POWER_SUPPLY_MODEL_NAME=BQ25895
POWER_SUPPLY_STATUS=Charging
POWER_SUPPLY_CHARGE_TYPE=Fast
POWER_SUPPLY_ONLINE=1
POWER_SUPPLY_HEALTH=Good
POWER_SUPPLY_CONSTANT_CHARGE_CURRENT_MAX=1472000
POWER_SUPPLY_CONSTANT_CHARGE_VOLTAGE=4084000
POWER_SUPPLY_CONSTANT_CHARGE_VOLTAGE_MAX=4208000
POWER_SUPPLY_PRECHARGE_CURRENT=128000
POWER_SUPPLY_CHARGE_TERM_CURRENT=128000
POWER_SUPPLY_INPUT_CURRENT_LIMIT=3000000
POWER_SUPPLY_VOLTAGE_NOW=4084000
POWER_SUPPLY_CURRENT_NOW=-1300000
POWER_SUPPLY_TEMP=365
==> /sys/class/power_supply/max170xx_battery/uevent <==
POWER_SUPPLY_NAME=max170xx_battery
POWER_SUPPLY_TYPE=Battery
POWER_SUPPLY_STATUS=Unknown
POWER_SUPPLY_PRESENT=1
POWER_SUPPLY_TECHNOLOGY=Li-ion
POWER_SUPPLY_CYCLE_COUNT=75
POWER_SUPPLY_VOLTAGE_MAX=4200000
POWER_SUPPLY_VOLTAGE_MIN=3440000
POWER_SUPPLY_VOLTAGE_MIN_DESIGN=3300000
POWER_SUPPLY_VOLTAGE_NOW=4095000
POWER_SUPPLY_VOLTAGE_AVG=4041796
POWER_SUPPLY_VOLTAGE_OCV=3822109
POWER_SUPPLY_CAPACITY=47
POWER_SUPPLY_CHARGE_FULL_DESIGN=4199160
POWER_SUPPLY_CHARGE_FULL=4511097
POWER_SUPPLY_CHARGE_NOW=2135572
POWER_SUPPLY_CHARGE_COUNTER=-1916616
POWER_SUPPLY_CHARGE_TERM_CURRENT=159343
POWER_SUPPLY_TEMP=461
POWER_SUPPLY_TEMP_ALERT_MIN=-1280
POWER_SUPPLY_TEMP_ALERT_MAX=1270
POWER_SUPPLY_TEMP_MIN=-2147483648
POWER_SUPPLY_TEMP_MAX=700
POWER_SUPPLY_HEALTH=Good
POWER_SUPPLY_SCOPE=System
POWER_SUPPLY_TIME_TO_EMPTY_NOW=368634
POWER_SUPPLY_CURRENT_NOW=1541879
POWER_SUPPLY_CURRENT_AVG=1569061
==> /sys/class/power_supply/tps6598x-source-psy-0-003f/uevent <==
POWER_SUPPLY_NAME=tps6598x-source-psy-0-003f
POWER_SUPPLY_TYPE=USB
POWER_SUPPLY_USB_TYPE=C [PD]
POWER_SUPPLY_ONLINE=1
POWER_SUPPLY_PRESENT=1
POWER_SUPPLY_CURRENT_MAX=3000000
POWER_SUPPLY_VOLTAGE_MAX=5000000
OK, could you keep it in that state for a moment while I’ll prepare next things to check?
It would be helpful it you could catch the output of:
sudo i2ctransfer -f -y 0 w10@0x3f 0x16 0x08 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff
echo 1 | sudo tee /sys/kernel/debug/tracing/events/tps6598x/enable
sudo cat /sys/kernel/debug/tracing/trace_pipe
during plugging and unplugging the cable in this state. The last command is going to block and wait for events to come, which is when you should do the (un)plugging, so don’t wait for it to finish (you’ll have to ctrl+c it anyway when you’re done).
In any case, it appears that the USB-C controller gets confused for some reason. Now I’d like to see whether it’s its firmware (in which case we likely won’t be able to do anything with it) or the driver (which would be a good news, as we can fix it ;)).
let me try the other cable again, ok its not charging again
Also, please tell what kind of cable are you using. The original thread was about the charger provided with the phone, USB-PD is complex enough that we can’t even rule out the problem with the cable (some are violating the specs and can in turn be picky).
irq/79-0-003f-208 [000] … 5192.622238: tps6598x_irq: event1=PLUG_EVENT|USB_HOST_PRESENT_NO_LONGER|PP_SWITCH_CHANGED|DATA_STATUS_UPDATE|STATUS_UPDATE|USER_VID_ALT_MODE_EXIT, event2=STATUS_UPDATE
irq/79-0-003f-208 [000] … 5192.622971: tps6598x_status: conn: no-conn, pp_5v0: off, pp_hv: off, pp_ext: off, pp_cable: off, pwr-src: vin-3p3, vbus: vSafe5V, usb-host: no, legacy: sink, flags:
irq/79-0-003f-208 [000] … 5192.623482: tps6598x_power_status: conn: 0, pwr-role: source, typec: usb, bc: sdp
irq/79-0-003f-208 [000] … 5192.624191: tps6598x_data_status:
irq/79-0-003f-208 [000] … 5192.624331: tps6598x_data_status:
irq/79-0-003f-208 [000] … 5194.400747: tps6598x_irq: event1=PLUG_EVENT|PP_SWITCH_CHANGED|DATA_STATUS_UPDATE|PD_STATUS_UPDATE, event2=
irq/79-0-003f-208 [000] … 5194.401451: tps6598x_status: conn: conn-no-Ra, pp_5v0: off, pp_hv: in, pp_ext: off, pp_cable: off, pwr-src: vin-3p3, vbus: vSafe5V, usb-host: no, legacy: sink, flags: PLUG_PRESENT
irq/79-0-003f-208 [000] … 5194.402053: tps6598x_power_status: conn: 0, pwr-role: sink, typec: usb, bc: sdp
irq/79-0-003f-208 [000] … 5194.404187: tps6598x_data_status: DATA_CONNECTION|USB2_CONNECTION|USB3_CONNECTION
irq/79-0-003f-208 [000] … 5194.404316: tps6598x_data_status: DATA_CONNECTION|USB2_CONNECTION|USB3_CONNECTION
irq/79-0-003f-208 [000] … 5195.008261: tps6598x_irq: event1=HARD_RESET|BIST|HIGH_VOLTAGE_WARNING|PD_STATUS_UPDATE|USER_VID_ALT_MODE_EXIT, event2=
irq/79-0-003f-208 [000] … 5195.009003: tps6598x_status: conn: conn-no-Ra, pp_5v0: off, pp_hv: in, pp_ext: off, pp_cable: off, pwr-src: vin-3p3, vbus: vSafe5V, usb-host: no, legacy: sink, flags: PLUG_PRESENT
irq/79-0-003f-208 [000] … 5200.251082: tps6598x_irq: event1=HARD_RESET|BIST|HIGH_VOLTAGE_WARNING|PD_STATUS_UPDATE|USER_VID_ALT_MODE_EXIT, event2=
irq/79-0-003f-208 [000] … 5200.251848: tps6598x_status: conn: conn-no-Ra, pp_5v0: off, pp_hv: in, pp_ext: off, pp_cable: off, pwr-src: vin-3p3, vbus: vSafe5V, usb-host: no, legacy: sink, flags: PLUG_PRESENT
irq/79-0-003f-208 [000] … 5205.493835: tps6598x_irq: event1=HARD_RESET|BIST|HIGH_VOLTAGE_WARNING|USER_VID_ALT_MODE_EXIT, event2=
irq/79-0-003f-208 [000] … 5205.494562: tps6598x_status: conn: conn-no-Ra, pp_5v0: off, pp_hv: in, pp_ext: off, pp_cable: off, pwr-src: vin-3p3, vbus: vSafe5V, usb-host: no, legacy: sink, flags: PLUG_PRESENT
irq/79-0-003f-208 [000] … 5210.736530: tps6598x_irq: event1=USB_HOST_PRESENT_NO_LONGER|STATUS_UPDATE, event2=STATUS_UPDATE
irq/79-0-003f-208 [000] … 5210.737313: tps6598x_status: conn: conn-no-Ra, pp_5v0: off, pp_hv: in, pp_ext: off, pp_cable: off, pwr-src: vin-3p3, vbus: vSafe5V, usb-host: no-pd, legacy: sink, flags: PLUG_PRESENT
ok apparently thats not a PD cable (a cable i found in my drawer) , surprised it doesnt charge even without PD, the Purism cable works and charges. I maybe mistakingly thought it was charging before due to red LED.
You will note
in your original configuration, for some reason it was only ‘negotiating’ standard USB-C power, not PD. In other words, either negotiation didn’t happen at all, or it did happen but it failed.
Why that is would be anyone’s guess … however I think the golden rule is: if you are having problems with charging, you must revert to the original Purism-supplied charger and cable for fault isolation.
Agreed it does not explain the red led charging indication though when not charging.
it was a non PD cable i am pretty certain of that now.