System details
Thinkpad P14S Gen 6 Intel - Arrow Lake Ultra 7 255H
What's wrong?
The udev rule in install/config/powerprofilesctl-rules.sh matches on ATTR{type}=="Mains", which assumes the AC power supply device fires udev change events on plug/unplug. On ThinkPads and likely other USB-C only machines, the AC device never fires these events, only the ucsi-source-psy-* devices do.
Additionally, power-profiles-daemon is left in a disabled state after the update, which prevents profile switching entirely even if the udev rule matched.
Steps to reproduce
- Install or update to v3.6.0 on a USB-C only machine (e.g. Thinkpad)
- Plug or unplug the charger
- Power profile does not switch
Diagnosis
The AC device exists and reports correctly:
$ cat /sys/class/power_supply/AC/type
Mains
$ cat /sys/class/power_supply/AC/online
1
But it never fires a udev change event. Only the USB-C port devices fire events:
$ udevadm monitor --property | grep -A5 "power_supply"
# Only ucsi-source-psy-USBC000:* events appear on plug/unplug
# /sys/class/power_supply/AC never appears
The ucsi devices have POWER_SUPPLY_TYPE=USB, not Mains, so the existing rule never matches.
Also, after the update:
$ systemctl status power-profiles-daemon
... disabled ...
Fix
In install/config/powerprofilesctl-rules.sh, we could add rules for USB type devices alongside the existing Mains rules, but I'm not positive if this is the best route.
# Existing Mains rules...
SUBSYSTEM=="power_supply", ATTR{type}=="Mains", ATTR{online}=="0", RUN+="..."
SUBSYSTEM=="power_supply", ATTR{type}=="Mains", ATTR{online}=="1", RUN+="..."
# Add USB-C support for machines where AC device doesn't fire events
SUBSYSTEM=="power_supply", ENV{POWER_SUPPLY_TYPE}=="USB", ATTR{online}=="0", RUN+="..."
SUBSYSTEM=="power_supply", ENV{POWER_SUPPLY_TYPE}=="USB", ATTR{online}=="1", RUN+="..."
Also ensure power-profiles-daemon is enabled during install/update.
System details
Thinkpad P14S Gen 6 Intel - Arrow Lake Ultra 7 255H
What's wrong?
The udev rule in
install/config/powerprofilesctl-rules.shmatches onATTR{type}=="Mains", which assumes theACpower supply device fires udevchangeevents on plug/unplug. On ThinkPads and likely other USB-C only machines, theACdevice never fires these events, only theucsi-source-psy-*devices do.Additionally,
power-profiles-daemonis left in a disabled state after the update, which prevents profile switching entirely even if the udev rule matched.Steps to reproduce
Diagnosis
The
ACdevice exists and reports correctly:But it never fires a udev
changeevent. Only the USB-C port devices fire events:The
ucsidevices havePOWER_SUPPLY_TYPE=USB, notMains, so the existing rule never matches.Also, after the update:
Fix
In
install/config/powerprofilesctl-rules.sh, we could add rules for USB type devices alongside the existing Mains rules, but I'm not positive if this is the best route.Also ensure
power-profiles-daemonis enabled during install/update.