I'm not sure why this only hit me after upgrading to bullseye, but it
did.

For now, I've fixed it by adding two custom rules to udev (perhaps
dump them into 10_pm-utils-local.rules):

  ACTION=="change", SUBSYSTEM=="power_supply", ATTR{type}=="Mains",\
    ATTR{online}=="1", RUN+="/usr/sbin/pm-powersave false"
  ACTION=="change", SUBSYSTEM=="power_supply", ATTR{type}=="Mains",\
    ATTR{online}=="0", RUN+="/usr/sbin/pm-powersave true"

It clearly would be great if this could somehow be added to the
package, though of course I have no idea how this would interact with
upower or systemd.

It does co-operate nicely with tlp (wearing their upstream down do
allow custom hook scripts would be an attractive alternative, though).

Reply via email to