I have a shell script in /etc/acpi and an event file in /etc/acpi/events, but even though the script works if run directly and the event can be seen with acpi_listen the script doesn't run with the trigger. Any ideas how I can troubleshoot this?
/etc/acpi/eepc-she.sh:
Code:
#!/bin/bash
if (grep -q 'discharging' /proc/acpi/battery/BAT0/state); then
# Super Hybrid Engine On
echo 2 > /sys/devices/platform/eeepc/cpufv
# Disable Webcam
echo 0 > /sys/devices/platform/eeepc/camera
# Intel Atom N270 @ 800MHz
echo powersave > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
# Intel GMA950 @ 200MHz
setpci -s 00:02.0 f0.b=00,60
setpci -s 00:02.0 f0.b=34,05
STATUS="Enabled"
else
# Super Hybrid Engine Off
echo 0 > /sys/devices/platform/eeepc/cpufv
# Webcam Off
echo 1 > /sys/devices/platform/eeepc/camera
# Intel Atom @ 1.60GHz
echo ondemand > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
# Intel GMA950 @ 400Mhz
setpci -s 00:02.0 f0.b=00,60
setpci -s 00:02.0 f0.b=33,05
STATUS="Disabled"
fi
sleep 1
export DISPLAY=:0 && notify-send -t 1000 "Super Hybrid Engine" $STATUS
/etc/acpi/events/eeepc-she:
Code:
event=battery
action=/etc/acpi/eeepc-she.sh
Bookmarks