home · contact · privacy
Provide useful W530 scripts in bin/.
[config] / bin / w530_startx_force_nvidia.sh
diff --git a/bin/w530_startx_force_nvidia.sh b/bin/w530_startx_force_nvidia.sh
new file mode 100755 (executable)
index 0000000..3c3ca59
--- /dev/null
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+# Undo bumblebee setup.
+sudo service bumblebeed stop
+sudo modprobe nvidia-drm
+sudo update-alternatives --set glx /usr/lib/nvidia
+
+# Use special xorg.conf and pass NVIDIA_DIRECT directive to .xinitrc.
+NVIDIA_DIRECT=1 startx -- -config xorg.conf.forced_nvidia
+
+# Recreate bumblebee setup.
+sudo service bumblebeed start
+sudo update-alternatives --auto glx