Created
March 20, 2016 08:05
-
-
Save BernardoGO/688c12b400f78f8d9096 to your computer and use it in GitHub Desktop.
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) | |
tee /proc/acpi/bbswitch <<<OFF | |
modprobe -r nouveau | |
#tee /proc/acpi/bbswitch <<<OFF | |
#echo "bbb" > /home/bernardo/resume.txt | |
#systemctl stop bumblebeed | |
modprobe -r bbswitch | |
modprobe -r nvidia | |
;; | |
resume|thaw) | |
modprobe nouveau | |
modprobe -r nouveau | |
modprobe nvidia | |
systemctl start bumblebeed | |
modprobe nvidia | |
tee /proc/acpi/bbswitch <<<OFF | |
modprobe nvidia | |
modprobe bbswitch | |
modprobe nvidia | |
: | |
;; | |
esac |
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) | |
tee /proc/acpi/bbswitch <<<ON | |
modprobe -r nouveau | |
#tee /proc/acpi/bbswitch <<<OFF | |
#echo "bbb" > /home/bernardo/resume.txt | |
#systemctl stop bumblebeed | |
modprobe -r bbswitch | |
modprobe -r nvidia | |
;; | |
resume|thaw) | |
modprobe nouveau | |
modprobe -r nouveau | |
modprobe nvidia | |
systemctl start bumblebeed | |
modprobe nvidia | |
tee /proc/acpi/bbswitch <<<OFF | |
modprobe nvidia | |
modprobe bbswitch | |
modprobe nvidia | |
cp /home/bernardo/trnoff /etc/pm/sleep.d/66nvidia | |
: | |
;; | |
esac |
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
sudo cp /home/bernardo/trnon /etc/pm/sleep.d/66nvidia | |
sudo systemctl suspend |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment