home · contact · privacy
Improve on previous commit.
authorChristian Heller <c.heller@plomlompom.de>
Wed, 29 Mar 2017 01:01:07 +0000 (03:01 +0200)
committerChristian Heller <c.heller@plomlompom.de>
Wed, 29 Mar 2017 01:01:07 +0000 (03:01 +0200)
ansible/files/system/___etc___X11___xorg.conf.forced_nvidia [new file with mode: 0644]
dotfiles/user/thinkpad/W530/startx_force_nvidia.sh

diff --git a/ansible/files/system/___etc___X11___xorg.conf.forced_nvidia b/ansible/files/system/___etc___X11___xorg.conf.forced_nvidia
new file mode 100644 (file)
index 0000000..605a10d
--- /dev/null
@@ -0,0 +1,34 @@
+# This is the Optimus-specific configuration recommended by the "NVIDIA
+# Accelerated Linux Graphics Drivre README and Installation Guide", Chapter 32
+# "Offloading Graphics Display with RandR 1.4" 
+# (<http://us.download.nvidia.com/XFree86/Linux-x86/346.35/README/randr14.html>)
+# with the "AllowEmptyInitialConfigratuion" added as described by
+# <http://us.download.nvidia.com/XFree86/Linux-x86/346.35/README/randr14.html>.
+
+Section "ServerLayout"
+    Identifier "layout"
+    Screen 0 "nvidia"
+    Inactive "intel"
+EndSection
+
+Section "Device"
+    Identifier "nvidia"
+    Driver "nvidia"
+    BusID "PCI:01:00:0"
+    Option "AllowEmptyInitialConfiguration"
+EndSection
+
+Section "Screen"
+    Identifier "nvidia"
+    Device "nvidia"
+EndSection
+
+Section "Device"
+    Identifier "intel"
+    Driver "modesetting"
+EndSection
+
+Section "Screen"
+    Identifier "intel"
+    Device "intel"
+EndSection
index babdbffc8306034b15052fae3ffa77333183d0bf..3c3ca59928fc8fe1b0d2d51c9ffdfbee51e44b22 100755 (executable)
@@ -6,7 +6,7 @@ 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
+NVIDIA_DIRECT=1 startx -- -config xorg.conf.forced_nvidia
 
 # Recreate bumblebee setup.
 sudo service bumblebeed start