In order to save battery power, I enable runtime PM for all devices using a variant of this rule set:ACTION!=add, GOTO=powersave_endSUBSYSTEM==usb, GOTO=powersaveLABEL=powersaveTEST==power/control, ATTR{power/control}=autoLABEL=powersave_endMy Logitech Unifying mouse however has issues with this mode, causing input events to me dropped. When running on battery, I often just use the touchpad or can live with this issue, but when on mains, I would like to disable runtime PM (ATTR{power/control}=on).It looks like I can use SUBSYSTEM==power_supply, ATTR{POWER_SUPPLY_ONLINE}==1 to match power supply changes, but since the power supply device is not a parent of the USB mouse, it cannot simply be matched.So, how can a udev rule be written such that it matches a property of a different device?
Detect power_supply online status for different device in udev rule
udev