TLP: custom commands for battery or AC mode on Ideapad 5 Ryzen 4700

For my Ideapad 5 power modes can be set for performance/on demand/ battery mode with a number of custom commands. They can be found in the arch wiki when searching for 15ARE05:

Set it to Intelligent Cooling mode:
# echo ‘_SB.PCI0.LPC0.EC0.VPC0.DYTC 0x000FB001’ > /proc/acpi/call
Set it to Extreme Performance mode:
# echo ‘_SB.PCI0.LPC0.EC0.VPC0.DYTC 0x0012B001’ > /proc/acpi/call
Set it to Battery Saving mode:
# echo ‘_SB.PCI0.LPC0.EC0.VPC0.DYTC 0x0013B001’ > /proc/acpi/call

Is there a way to execute these commands automatically from TLP when connecting or disconnecting the power cord?

i have done a lot of reading and can not find anything about custom commands in the TLP docs

You can set up udev rules for this:

https://wiki.archlinux.org/index.php/Power_management#Using_a_script_and_an_udev_rule

2 Likes

Great I will check it our!

I have set this up and it works for the most part. It doesn’t always detect de disconnect of the power cable however.!