From 677e2db01071fbecfbbe684c51c1db7e21a142af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Tue, 24 Jan 2017 17:03:35 +0100 Subject: Add new script asus-fan This script is for explicit switching between full or automatic fan control. --- local/bin/asus-fan | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100755 local/bin/asus-fan (limited to 'local/bin') diff --git a/local/bin/asus-fan b/local/bin/asus-fan new file mode 100755 index 0000000..00337ba --- /dev/null +++ b/local/bin/asus-fan @@ -0,0 +1,27 @@ +#!/bin/sh +HWMON=/sys/devices/platform/asus-nb-wmi/hwmon/hwmon2 + +if [ "$(whoami)" != "root" ]; then + echo "Run $0 only with root privileges" + exit -1 +fi + +case "$1" in + -h|--help) + echo "Usage: $0 -h|full|auto" + echo "This script controls asus hwmon" + echo " full - Full throttle" + echo " auto - Automatic hardware control" + ;; + full) + echo 1 > $HWMON/pwm1_enable + echo 255 > $HWMON/pwm1 + ;; + auto) + echo 0 > $HWMON/pwm1_enable + ;; + *) + echo "Unknown or no option given!" + exit -2 + ;; +esac -- cgit v1.2.3