Created
July 12, 2012 11:11
-
-
Save alexciarlillo/3097481 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 | |
# | |
# /etc/rc.local: Local multi-user startup script. | |
# | |
POWER_CHECK=/sys/class/power_supply/AC/online | |
# set screen brightness | |
echo 10 > /sys/class/backlight/acpi_video0/brightness | |
chown ciarlill /sys/kernel/debug/vgaswitcheroo/switch | |
# set active card based on power state | |
grep -q "1" $POWER_CHECK | |
if [ "$?" -eq "0" ]; then | |
/usr/bin/envy-video ac-on boot | |
else | |
/usr/bin/envy-video ac-off boot | |
fi | |
# set auto power management | |
echo auto > /sys/class/drm/card0/device/power_profile | |
echo 1500 > /proc/sys/vm/dirty_writeback_centisecs |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment