Skip to content

Instantly share code, notes, and snippets.

@BernardoGO BernardoGO/Shit_on
Created Mar 20, 2016

Embed
What would you like to do?
#! /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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.