home · contact · privacy
Provide scripting for W530 to startx with forced NVidia GPU usage.
[config] / dotfiles / user / thinkpad / W530 / startx_force_nvidia.sh
diff --git a/dotfiles/user/thinkpad/W530/startx_force_nvidia.sh b/dotfiles/user/thinkpad/W530/startx_force_nvidia.sh
new file mode 100755 (executable)
index 0000000..babdbff
--- /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.alt
+
+# Recreate bumblebee setup.
+sudo service bumblebeed start
+sudo update-alternatives --auto glx