Last active
March 20, 2016 00:15
-
-
Save BernardoGO/8bc84d95fe64b7de76f6 to your computer and use it in GitHub Desktop.
Bash script used to fix suspend/resume on clevo computers that drains a lot of power while sleeping
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/sh | |
GPUDRIVER=nvidia | |
#if [ ! -x /sys/bus/usb/devices/${BUS}-${DEVICE}/power/level ]; then | |
# exit 0 | |
#fi | |
case "$1" in | |
suspend|suspend_hybrid|hibernate) | |
echo "bbb" > /home/bernardo/resume.txt | |
service bumblebeed stop | |
modprobe -r bbswitch | |
modprobe -r ${GPUDRIVER} | |
;; | |
resume|thaw) | |
modprobe bbswitch | |
service bumblebeed start | |
modprobe nvidia | |
tee /proc/acpi/bbswitch <<<OFF | |
: | |
;; | |
esac | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment