Don't mix switch methods.

This commit is contained in:
Kolan Sh 2012-05-15 22:23:19 +04:00
parent a374be74ce
commit a15b1d2117
2 changed files with 17 additions and 6 deletions

View File

@ -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

View File

@ -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