Viewing information about USB-C power delivery in Linux

Does anyone know how to view information about USB-C power delviery (such as wattage delivered, voltage, etc.)?

I have a USB charger that suggests that it is working (all the lights come on as expected) but battery shows discharging, so I am curious to see if it is delivering any power or what is going on.

3 Likes

Search here for charging voltage. You’ll find something from Framework’s engineer talking about what current is required for charging.

I’ve read all that. I’m looking for how to see what the actual laptop is reporting from the charger.

Thanks for the tip.

This shows some data, it looks like it is the right kind of data, but it doesn’t include anything like charger wattage or voltage. But there are a number of fields missing, so possibly that data is not being reported.

I was hoping to find some info under /sys/class/typec, but no luck there either

1 Like

Pretty late to the party, but current_now, voltage_now and online from /sys/class/power_supply/ucsi-source-psy-USBC000:* seem to show something relevant.
Nice stable round numbers suggest that it’s negotiated values, not the actually measured ones, but hey, better than nothing.

1 Like

I was looking for something like this also.
I.e. Something that dumps the CC1/CC2 messages and associated Voltage / Current levels.
The feedback I got was that USB PD chips don’t tend to capture those is a form helpful to debug problems. The only viable method appears to be using a usb-c breakout cable and use an external CC1/CC2 decoder.

To see actual voltage provided and current drawn, there are a bunch of inexpensive in-line usb meters on amazon etc. I recommend the RuiDeng TC66 for about $30 USD. They can’t reliably inspect/analyze the negotiation packets on the CC lines though.

The ChargerLab Power-Z KM003C ($70 ~ $100) is the best I’ve seen at detecting the protocol negotiation, but it’s still not quite 100% and it may not give all the details you want.

If you’re developing or debugging a USB-C product you may need something like the $190 Infineon CY4500 EZ-PD, available from Mouser and Digikey and the like, and requiring a lot more specialized skills to wrangle the available software and actually use. You can even try to make your own similar device (both based on an old google design that was open-sourced): GitHub - gregdavill/PD-sniffer: USB PD sniffer or GitHub - dojoe/Twonkie: A USB-PD sniffer/injector/sink based on Google's Twinkie, re-designed to be manufactured by mere mortals.

All that said, I recommend the $30 RuiDeng TC66

1 Like