On Wed, Nov 30, 2022 at 08:52:41AM +0100, Santiago García Mantiñán wrote:
> I'm running Debian stable on a HP ProDesk 600 G6 Small Form Factor PC
> (Family: 103C_53307F HP ProDesk)
> 
> It is a desktop machine which ovbiously runs on AC all the time, however
> on_ac_power returns 1 which is stopping things like unattended upgrades from 
> being run.
> 
> On /sys/class/power_supply/ there is only:
> lrwxrwxrwx 1 root root 0 Nov 29 14:53 ucsi-source-psy-USBC000:001 -> 
> ../../devices/platform/USBC000:00/power_supply/ucsi-source-psy-USBC000:001
> and there... /sys/class/power_supply/ucsi-source-psy-USBC000\:001/type
> says USB.

The SoC might be shared with laptops/etc and thus expose devices that are
present but not fully functional.

> I have opened the machine and the power supply seems to use only a couple of 
> 12V
> 4 pin connectors like the one introduced with the P4, but that's it, no sign 
> of USB.

The hardware block known as "power supply" it just one of possible sources
for the machine.  For example, Pine64 boards can be powered by:
 * "ac" (dumb USB micro-B)
 * battery
 * USB type A OTG (a _host_ not gadget interface)
 * (sort of) UART (insufficient power for stable operation)
and only the first two even have sensors that inform the kernel.

> My guess is that the USB thing there is one USB-c connector on the front of
> the machine, in fact it says on usb_type [C] PD PD_PPS which I guess means
> that the connector is compatible with power delivery.

It's possible that your machine can indeed be powered via USB C, new laptops
usually can.  Which leads to fun like laptop that wants to be charged by a
phone -- and indeed negotiating it that way.

> For what I see, acpi doesn't have info on power suppy, no sign of it
> executing acpi -V and /proc/acpi only has wakeup inside.  And there is no
> pmu or apm info either.

ACPI doesn't (usually?) know about USB devices; PMU and APM are stuff from
the distant past.

> I don't know what other info to add here, but please don't hesitate to ask
> whatever you need.

Could you perhaps provide:
cd /sys/class/power_supply && grep . */* 2>/dev/null|grep -v /uevent:


Thanks for your report -- with all those new USB-C power delivery schemes
actually being used by machines in the wild, it's time to recognize them,
instead of relying on the old assumption that "USB power supply" means
incoming power.


Meow!
-- 
⢀⣴⠾⠻⢶⣦⠀
⣾⠁⢠⠒⠀⣿⡁
⢿⡄⠘⠷⠚⠋⠀ Quis trollabit ipsos trollos?
⠈⠳⣄⠀⠀⠀⠀

Reply via email to