Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Bash script used to fix suspend/resume on clevo computers that drains a lot of power while sleeping
#! /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
You can’t perform that action at this time.