Profile pic of Tommy KuTommy Ku's Blog

Reading and thinking

My laptop refused to charge my phone

Posted on June 27, 2018

To extends my 6 year-old Thinkpad X230’s battery life per charge, I have taken measures from installing power saving software tlp to switching to a lightweight window manager. It has since served me well with over 2 hours of battery life under normal load of web development.

Last night I was trying to charge my phone over the laptop’s USB port. For a moment the phone showed that it’s charging, then the charging symbol of the phone quickly switched to non-charging symbol. I tried rebooting both the phone and laptop to no avail. The phone simply refused to be charged.

Or was it?

As I later realized, my laptop is willing to autosuspend power to USB ports in order to save power. So I typed sudo powertop and found the one toggleable that caused the issue.

By toggling this to “Bad”, my phone could be charged from my laptop again

Well that’s weird. Nowadays we assume things to “just work”, but there are things behind the scene that we might not realize if all we did was just installing software without understanding their working principles (in this case, autosuspending USB port).

You could also look at...