Fix separate GPU off script

master
Cole Deck 4 years ago
parent 705f307a03
commit addd8aa78c

@ -7,12 +7,11 @@
#sudo sh -c "echo 1 > /sys/bus/pci/devices/0000:01:00.0/remove; echo '\\_SB.PCI0.PEG0.PEGP._OFF' > /proc/acpi/call" #sudo sh -c "echo 1 > /sys/bus/pci/devices/0000:01:00.0/remove; echo '\\_SB.PCI0.PEG0.PEGP._OFF' > /proc/acpi/call"
#output=$(optimus-manager --print-mode) #output=$(optimus-manager --print-mode)
#echo $output #echo $output
if [ $(sudo -u cole xrandr --listproviders | grep NVIDIA) ]; then if xrandr --listproviders | grep NVIDIA; then
echo "GPU is in use for PRIME, keeping on" echo "GPU is in use for PRIME, keeping on"
else else
sudo sh -c 'echo "\\_SB.PCI0.GPP0.PG00._OFF" > /proc/acpi/call' sudo sh -c 'echo "\\_SB.PCI0.GPP0.PG00._OFF" > /proc/acpi/call'
echo $(sudo cat /proc/acpi/call) echo "GPU powered off"
echo "GPU POWERED OFF"
fi fi
#if [ "$(optimus-manager --print-mode)" = " #if [ "$(optimus-manager --print-mode)" = "
# #

Loading…
Cancel
Save