Don't mix switch methods.
This commit is contained in:
parent
a374be74ce
commit
a15b1d2117
|
@ -16,6 +16,9 @@ if [ -f /proc/acpi/bbswitch ]; then
|
|||
let tries--
|
||||
# echo "tries left: $tries"
|
||||
done
|
||||
|
||||
echo "Cann't power off nVidia chip"
|
||||
exit -1
|
||||
fi
|
||||
|
||||
# Trying acpi_call method
|
||||
|
@ -108,6 +111,9 @@ if [ -f /proc/acpi/call ]; then
|
|||
let tries--
|
||||
# echo "tries left: $tries"
|
||||
done
|
||||
|
||||
echo "Cann't power off nVidia chip"
|
||||
exit -1
|
||||
fi
|
||||
|
||||
# Trying vgaswitcheroo method
|
||||
|
@ -122,7 +128,7 @@ if [ -f /sys/kernel/debug/vgaswitcheroo/switch ]; then
|
|||
let tries--
|
||||
echo "tries left: $tries"
|
||||
done
|
||||
fi
|
||||
|
||||
echo "Cann't power off nVidia chip"
|
||||
exit -1
|
||||
echo "Cann't power off nVidia chip"
|
||||
exit -1
|
||||
fi
|
||||
|
|
|
@ -17,6 +17,8 @@ if [ -f /proc/acpi/bbswitch ]; then
|
|||
echo "tries left: $tries"
|
||||
done
|
||||
|
||||
echo "Cann't power on nVidia chip"
|
||||
exit -1
|
||||
fi
|
||||
|
||||
# Trying acpi_call method
|
||||
|
@ -109,6 +111,9 @@ if [ -f /proc/acpi/call ]; then
|
|||
let tries--
|
||||
echo "tries left: $tries"
|
||||
done
|
||||
|
||||
echo "Cann't power on nVidia chip"
|
||||
exit -1
|
||||
fi
|
||||
|
||||
# Trying vgaswitcheroo method
|
||||
|
@ -123,7 +128,7 @@ if [ -f /sys/kernel/debug/vgaswitcheroo/switch ]; then
|
|||
let tries--
|
||||
echo "tries left: $tries"
|
||||
done
|
||||
fi
|
||||
|
||||
echo "Cann't power on nVidia chip"
|
||||
exit -1
|
||||
echo "Cann't power on nVidia chip"
|
||||
exit -1
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue