I have a laptop which can in principle charge via PowerDelivery on the USB-C/Thunderbolt port. It reliably charges via its thunderbolt 4 port when it is off or suspended.
Otherwise, I noticed that it will charge only (but not quite always) when I first suspend to RAM (I cannot test with suspend to disk) connect the USB-C charging cable and then wake the laptop up.
The laptop will then keep charging until I re-connect the cable. Connecting it to the regular charger always works.
Intuitively it looks like somehow the kernel or system prevents it from charging through the USB-C/thunderbolt port. Therefore, the generic question here is whether there is a way to influence the charging state of the port or, e.g., the Power Delivery negotiation (if that can be done in software).
I do not see any related errors in /var/log/messages when connecting the charging cable.
When connected to a thunderbolt 3 dock I find that all devices work if the laptop is also connected to the regular charger. They stay connected if I remove the regular charger, but I cannot connect any periphery via the dock without separate charger.
The notebook is a "TUXEDO InfinityBook Pro 16 - Gen7": https://www.tuxedocomputers.com/en/TUXEDO-InfinityBook-Pro-16-Mk2-Gen7.tuxedo
A slightly older version of the InfinityBook with thunderbolt 3 port did charge quite fine through the USB-C port.
I have a current system:
> uname -a
Linux lovelace 5.19.0-43-generic #44~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Mon May 22 13:39:36 UTC 2 x86_64 x86_64 x86_64 GNU/Linux