public
Last active

  • Download Gist
rc.local
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
#!/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

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.