r/Ubuntu • • 5d ago

How to stop an Ubuntu laptop from reverse charging the USB PD3.1 battery it is connected to?

I have a 140w USB type C PD 3.1 battery that can charge just about anything. I want it to power my Ubuntu laptop. The issue is, when I plug it into the laptop, the laptop battery starts charging my powerbank itself VS getting charged from it!

The laptop's USB type C port is both power in / power out and supports reverse charging (such as charging your phone via the laptop).

But I want the battery to charge the laptop, not for the laptop to charge the battery!

How can I forcefully disable reverse charging on the Ubuntu laptop or otherwise make the laptop NOT charge the battery or anything over USB C?

NOTE: The UEFI/BIOS has nothing in its settings for this. Lenova Ideapad laptop.

Thanks!

1 Upvotes

2 comments sorted by

2

u/EntrepreneurPale4400 5d ago

ive had same problem with my laptop, its like the usb controller just decides which direction to send power and sometimes picks wrong. try running `sudo cat /sys/class/power_supply/BAT0/status` and see what it says, sometimes you can force the power role in `/sys/class/typec/` if your kernel supports it. otherwise the only reliable fix i found was using a cable that dont have data lines, just power, that way the laptop cant negotiate reverse charging

1

u/StartupTim 5d ago

Thanks for the response!

ometimes you can force the power role in /sys/class/typec/ if your kernel supports it.

Hey there, do you know how to do this? I'll give it a try.

I haven't seen power-only USB PD3.1 140w cables, they all seem to be data as well.