Hi,
the following udev rules are triggered when I charge my phone via the laptop:
SUBSYSTEM=="power_supply",ATTR{online}=="0",RUN+="/usr/bin/powerprofilesctl set power-saver"
SUBSYSTEM=="power_supply",ATTR{online}=="1",RUN+="/usr/bin/powerprofilesctl set performance"
What do I have to do different that the rules are only triggered when a power supply is plugged in?
FYI those rules are probably too aggressive, especially once PPD 0.21 is released.
It’s probably better experience to change manually in situations that you need the extra performance or extra battery and leave in balanced most of the time.
PPD 0.21 was released today. It will specifically turn down the EPP while in balanced on battery and up on balanced on AC.
If you have specific tasks that you’re doing that you really want power savings or performance every time you should try using $ powerprofilesctl launch FOO -BAR --profile BAZ --reason BECAUSE.
This will let you change the daemon momentarily to that profile and when the process ends it will return back to standard.
Thanks, so you recommend just disabling the udev rules as long as the profile is set to balanced?
❯ powerprofilesctl version
client: 0.21
daemon: 0.20
@Loell_Framework The rules were copied from my old laptop. I just want them to be triggered when I plug in a charger and not the phone (or any other USB device that can be charged) which is currently the case.