On my Lenovo Thinkpad T14s with AMD CPU, when the machine is suspended, plugging the USB-C power cable in or out causes the machine to wake up. I want to disable that.
Some information I think is relevant:
Kernel version is 6.14.0-33-generic #33~24.04.1-Ubuntu SMP PREEMPT_DYNAMIC Fri Sep 19 17:02:30 UTC 2 x86_64 x86_64 x86_64 GNU/Linux
I don't see any relevant entry in dmesg or the systemd journal for what ACPI event is causing the wakeup.
I tried disabling all the GP*, NHI* and XHC* devices in
/proc/acpi/wakeup, to no avail.Adding
acpi_sleep=nonvsoracpi.ec_no_wake=1as a kernel flag doesn't helpI see these two entries for the USB-C power input under
/sys/class/power_supply:lrwxrwxrwx 1 root root 0 Oct 3 21:55 AC -> ../../devices/pci0000:00/0000:00:14.3/PNP0C09:00/ACPI0003:00/power_supply/AC lrwxrwxrwx 1 root root 0 Oct 3 21:55 BAT0 -> ../../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:47/PNP0C09:00/PNP0C0A:00/power_supply/BAT0 lrwxrwxrwx 1 root root 0 Oct 3 21:56 ucsi-source-psy-USBC000:001 -> ../../devices/platform/USBC000:00/power_supply/ucsi-source-psy-USBC000:001 lrwxrwxrwx 1 root root 0 Oct 3 21:56 ucsi-source-psy-USBC000:002 -> ../../devices/platform/USBC000:00/power_supply/ucsi-source-psy-USBC000:002Under
/sys/devices/platform/USBC000:00/power, there is nowakeupsetting.
EDITED TO ADD with PM debugging enabled, I do see some stuff in dmesg that might be relevant:
[ 2013.964391] PM: Triggering wakeup from IRQ 9
[ 2022.475524] ucsi_acpi USBC000:00: ucsi_handle_connector_change: GET_CONNECTOR_STATUS failed (-110)