This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# script is based on answers at https://askubuntu.com/questions/1038471/problem-with-lenovo-battery-threshold | |
# and relies on the module ideapad-laptop | |
# arguments are status, on and off are self-explanatory | |
if [ "$1" == "status" ] | |
then | |
cat /sys/bus/platform/drivers/ideapad_acpi/VPC2004:00/conservation_mode | |
elif [ "$1" == "on" ] | |
then | |
sudo echo 1 | sudo tee /sys/bus/platform/drivers/ideapad_acpi/VPC2004:00/conservation_mode | |
elif [ "$1" == "off" ] | |
then | |
sudo echo 0 | sudo tee /sys/bus/platform/drivers/ideapad_acpi/VPC2004:00/conservation_mode | |
fi | |
No comments:
Post a Comment