Add vgaswitcheroo support
This commit is contained in:
parent
d064701c19
commit
7ba3e230ae
|
@ -4,7 +4,11 @@ model=`dmidecode $@ -s system-product-name`
|
|||
|
||||
let retry=8
|
||||
while [ 0 -lt $retry ]; do
|
||||
|
||||
if [ -f /sys/kernel/debug/vgaswitcheroo/switch ]; then
|
||||
modprobe -r nvidia \
|
||||
&& echo 'OFF DIS' > /sys/kernel/debug/vgaswitcheroo/switch \
|
||||
&& exit 0
|
||||
else
|
||||
case "$model" in
|
||||
M11XR2)
|
||||
modprobe -r nvidia \
|
||||
|
@ -85,6 +89,7 @@ while [ 0 -lt $retry ]; do
|
|||
*) echo "Snail: unknown Notebook model: $model"; exit -1
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
sleep 0.2
|
||||
let retry--
|
||||
|
|
|
@ -4,7 +4,11 @@ model=`dmidecode $@ -s system-product-name`
|
|||
|
||||
let retry=8
|
||||
while [ 0 -lt $retry ]; do
|
||||
|
||||
if [ -f /sys/kernel/debug/vgaswitcheroo/switch ]; then
|
||||
echo 'ON DIS' > /sys/kernel/debug/vgaswitcheroo/switch \
|
||||
&& modprobe nvidia \
|
||||
&& exit 0
|
||||
else
|
||||
case "$model" in
|
||||
M11XR2)
|
||||
echo '\_SB.PCI0.P0P2.PEGP._PS0' > /proc/acpi/call \
|
||||
|
@ -85,6 +89,7 @@ while [ 0 -lt $retry ]; do
|
|||
*) echo "Snail: unknown Notebook model: $model"; exit -1
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
sleep 0.01
|
||||
let retry--
|
||||
|
|
Loading…
Reference in New Issue