aboutsummarylogtreecommitdiffstats
path: root/vgaswitcheroo_start.sh
diff options
context:
space:
mode:
authorAJ2015-12-20 18:47:28 -0600
committerAJ2015-12-20 18:47:28 -0600
commiteaf6292e8cc36f909c0d2a3abe8972fd88e0c4ab (patch)
tree95f34628e00b1e4415bd8e67c62accb41be3f800 /vgaswitcheroo_start.sh
parent707876d1ee9ce1c28445af55b13b50afd29f8631 (diff)
downloadaur-systemd-vgaswitcheroo-units.tar.gz
Only turn off the discrete GPU if it is not the active one
Diffstat (limited to 'vgaswitcheroo_start.sh')
-rwxr-xr-xvgaswitcheroo_start.sh7
1 files changed, 5 insertions, 2 deletions
diff --git a/vgaswitcheroo_start.sh b/vgaswitcheroo_start.sh
index 2f2a59a20298..47f9f4c76728 100755
--- a/vgaswitcheroo_start.sh
+++ b/vgaswitcheroo_start.sh
@@ -11,5 +11,8 @@ do
fi
done
-echo DIGD > /sys/kernel/debug/vgaswitcheroo/switch
-echo OFF > /sys/kernel/debug/vgaswitcheroo/switch
+if [ "$(check_active_gpu.sh)" == "IGD" ]; then
+ echo DIGD > /sys/kernel/debug/vgaswitcheroo/switch
+ echo OFF > /sys/kernel/debug/vgaswitcheroo/switch
+fi
+